add more spacing
[personal-kdebase.git] / workspace / ksysguard / gui / SensorDisplayLib / ProcessController.h
blob8f23602b65845bc6d65aeaac572f01f4cd29185d
1 /*
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_
26 #include <QWidget>
27 #include <QAbstractItemModel>
29 #include <QVBoxLayout>
30 #include <QHBoxLayout>
31 #include <QList>
32 #include <QProcess>
35 #include <kapplication.h>
37 #include <SensorDisplay.h>
39 class KSysGuardProcessList;
40 namespace KSysGuard {
41 class Processes;
43 /**
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
52 Q_OBJECT
54 public:
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
76 return false;
79 virtual void answerReceived(int id, const QList<QByteArray>& answer );
81 private Q_SLOTS:
82 void runCommand(const QString &command, int id);
84 private:
85 KSysGuardProcessList *mProcessList;
86 KSysGuard::Processes *mProcesses;
89 #endif