~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to libs/ksysguard/processui/ReniceDlg.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    KSysGuard, the KDE System Guard
 
3
 
 
4
    Copyright (c) 2006-2007 John Tapsell <tapsell@kde.org>
 
5
 
 
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.
 
10
 
 
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.
 
15
 
 
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.
 
20
 
 
21
*/
 
22
 
 
23
#ifndef _ReniceDlg_h_
 
24
#define _ReniceDlg_h_
 
25
 
 
26
#include <kdialog.h>
 
27
 
 
28
class Ui_ReniceDlgUi;
 
29
class QButtonGroup;
 
30
 
 
31
/**
 
32
 * This class creates and handles a simple dialog to change the scheduling
 
33
 * priority of a process.
 
34
 */
 
35
class ReniceDlg : public KDialog
 
36
{
 
37
        Q_OBJECT
 
38
 
 
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
 
43
         */
 
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;
 
49
 
 
50
        bool ioniceSupported;
 
51
 
 
52
 
 
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;
 
65
};
 
66
 
 
67
#endif