2 KSysGuard, the KDE System Guard
4 Copyright (c) 1999, 2000 Chris Schlaeger <cs@kde.org>
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public
8 License version 2 or at your option version 3 as published by
9 the Free Software Foundation.
11 This program 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
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef KSG_KSYSGUARD_H
22 #define KSG_KSYSGUARD_H
25 #include <QtDBus/QtDBus>
27 #include <kapplication.h>
28 #include <kxmlguiwindow.h>
30 #include <ksgrd/SensorClient.h>
34 class SensorBrowserWidget
;
37 class TopLevel
: public KXmlGuiWindow
, public KSGRD::SensorClient
40 Q_CLASSINFO("D-Bus Interface", "org.kde.SystemMonitor")
45 virtual void saveProperties( KConfigGroup
& );
46 virtual void readProperties( const KConfigGroup
& );
48 virtual void answerReceived( int id
, const QList
<QByteArray
> & );
50 void beATaskManager();
54 // calling ksysguard with kwin/kicker hot-key
55 Q_SCRIPTABLE Q_NOREPLY
void showOnCurrentDesktop();
56 Q_SCRIPTABLE Q_NOREPLY
void importWorkSheet( const QString
&fileName
);
57 Q_SCRIPTABLE Q_NOREPLY
void removeWorkSheet( const QString
&fileName
);
58 Q_SCRIPTABLE Q_NOREPLY
void getHotNewWorksheet();
59 Q_SCRIPTABLE QStringList
listHosts();
60 Q_SCRIPTABLE QStringList
listSensors( const QString
&hostName
);
63 virtual bool event( QEvent
* );
64 virtual void timerEvent( QTimerEvent
* );
65 virtual bool queryClose();
69 void disconnectHost();
70 void updateStatusBar();
72 void slotNewToolbarConfig();
73 void currentTabChanged(int index
);
76 void setSwapInfo( long, long, const QString
& );
77 void changeEvent( QEvent
* event
);
80 QDBusMessage mDBusReply
;
83 void startSensorBrowserWidget(); ///creates an mSensorBrowser if it doesn't exist
85 SensorBrowserWidget
* mSensorBrowser
;
86 Workspace
* mWorkSpace
;
89 QAction
*mNewWorksheetAction
;
90 QAction
*mInsertWorksheetAction
;
91 QAction
*mTabExportAction
;
92 QAction
*mTabRemoveAction
;
93 QAction
*mMonitorRemoteAction
;
94 QAction
*mHotNewWorksheetAction
;
96 QAction
*mConfigureSheetAction
;
98 QLabel
*sbProcessCount
;
103 QList
<int> mSplitterSize
;
106 extern TopLevel
* Toplevel
;