2 KSysGuard, the KDE System Guard
4 Copyright (c) 1999, 2000 Chris Schlaeger <cs@kde.org>
5 Copyright (c) 2006 John Tapsell <john.tapsell@kde.org>
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public
9 License version 2 or at your option version 3 as published by
10 the Free Software Foundation.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef _ProcessController_h_
24 #define _ProcessController_h_
27 #include <QAbstractItemModel>
29 #include <QVBoxLayout>
30 #include <QHBoxLayout>
35 #include <kapplication.h>
37 #include <SensorDisplay.h>
39 class KSysGuardProcessList
;
44 * This widget implements a process list page. Besides the process
45 * list which is implemented as a ProcessList, it contains two
46 * comboxes and two buttons. The combo boxes are used to set the
47 * update rate and the process filter. The buttons are used to force
48 * an immediate update and to kill a process.
50 class ProcessController
: public KSGRD::SensorDisplay
55 ProcessController(QWidget
* parent
, const QString
& title
, SharedSettings
*workSheetSettings
);
56 virtual ~ProcessController() { }
58 /* Functions for SensorDisplay*/
60 bool restoreSettings(QDomElement
& element
);
62 bool saveSettings(QDomDocument
& doc
, QDomElement
& element
);
64 virtual void timerTick()
68 virtual bool addSensor(const QString
&, const QString
&, const QString
&, const QString
&);
70 virtual void sensorError(int, bool err
);
72 void configureSettings() { }
74 virtual bool hasSettingsDialog() const
79 virtual void answerReceived(int id
, const QList
<QByteArray
>& answer
);
82 void runCommand(const QString
&command
, int id
);
85 KSysGuardProcessList
*mProcessList
;
86 KSysGuard::Processes
*mProcesses
;