2 * This file is part of the KDE project
3 * Copyright (C) 2006-2008 Rafael Fernández López <ereslibre@kde.org>
4 * Copyright (C) 2000 Matej Koss <koss@miesto.sk>
5 * David Faure <faure@kde.org>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License version 2 as published by the Free Software Foundation.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
25 #include <QtGui/QListView>
26 #include <QtDBus/QDBusObjectPath>
28 #include <kxmlguiwindow.h>
29 #include <kio/global.h>
30 #include <kio/authinfo.h>
34 #include <kuiserversettings.h>
36 class ProgressListModel
;
37 class ProgressListDelegate
;
38 class JobViewServerAdaptor
;
43 class OrgKdeJobViewInterface
;
47 : public KXmlGuiWindow
50 Q_CLASSINFO("D-Bus Interface", "org.kde.JobViewServer")
55 static UIServer
* createInstance();
57 QDBusObjectPath
requestView(const QString
&appName
, const QString
&appIconName
, int capabilities
);
60 void updateConfiguration();
64 virtual void closeEvent(QCloseEvent
*event
);
67 void showConfigurationDialog();
68 void slotServiceOwnerChanged(const QString
&name
, const QString
&oldOwner
, const QString
&newOwner
);
74 ProgressListModel
*m_progressListModel
;
75 ProgressListModel
*m_progressListFinishedModel
;
76 ProgressListDelegate
*progressListDelegate
;
77 ProgressListDelegate
*progressListDelegateFinished
;
78 QListView
*listProgress
;
79 QListView
*listFinished
;
80 KTabWidget
*tabWidget
;
83 KLineEdit
*searchText
;
86 static UIServer
*s_uiserver
;
91 class UIServer::JobView
95 Q_CLASSINFO("D-Bus Interface", "org.kde.JobView")
98 JobView(QObject
*parent
= 0);
100 void terminate(const QString
&errorMessage
);
101 void setSuspended(bool suspended
);
102 void setTotalAmount(qlonglong amount
, const QString
&unit
);
103 void setProcessedAmount(qlonglong amount
, const QString
&unit
);
104 void setPercent(uint percent
);
105 void setSpeed(qlonglong bytesPerSecond
);
106 void setInfoMessage(const QString
&infoMessage
);
107 bool setDescriptionField(uint number
, const QString
&name
, const QString
&value
);
108 void clearDescriptionField(uint number
);
110 QDBusObjectPath
objectPath() const;
113 void suspendRequested();
114 void resumeRequested();
115 void cancelRequested();
118 QDBusObjectPath m_objectPath
;
120 friend class ProgressListDelegate
;