add more spacing
[personal-kdebase.git] / workspace / libs / ksysguard / processui / ReniceDlg.h
blobfa445a53a175ad27bbc3ce848e3d3a328b5a0e0b
1 /*
2 KSysGuard, the KDE System Guard
4 Copyright (c) 2006-2007 John Tapsell <tapsell@kde.org>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
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.
23 #ifndef _ReniceDlg_h_
24 #define _ReniceDlg_h_
26 #include <kdialog.h>
28 class Ui_ReniceDlgUi;
29 class QButtonGroup;
31 /**
32 * This class creates and handles a simple dialog to change the scheduling
33 * priority of a process.
35 class ReniceDlg : public KDialog
37 Q_OBJECT
39 public:
40 /** Let the user specify the new priorities of the @p processes given, using the given current values.
41 * @p currentCpuSched The current Cpu Scheduler of the processes. Set to -1 to they have different schedulers
42 * @p currentIoSched The current I/O Scheduler of the processes. Set to -1 to they have different schedulers. Leave as the default -2 if not supported
44 ReniceDlg(QWidget* parent, const QStringList& processes, int currentCpuPrio, int currentCpuSched, int currentIoPrio=-2, int currentIoSched=-2);
45 int newCPUPriority;
46 int newIOPriority;
47 int newCPUSched;
48 int newIOSched;
50 bool ioniceSupported;
53 public Q_SLOTS:
54 void slotOk();
55 void updateUi();
56 void cpuSliderChanged(int value);
57 void ioSliderChanged(int value);
58 void cpuSchedulerChanged(int value);
59 private:
60 void setSliderRange();
61 Ui_ReniceDlgUi *ui;
62 QButtonGroup *cpuScheduler;
63 QButtonGroup *ioScheduler;
64 int previous_cpuscheduler;
67 #endif