Warning, file /plasma/libksysguard/processui/ReniceDlg.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     KSysGuard, the KDE System Guard
0003 
0004     SPDX-FileCopyrightText: 2006-2007 John Tapsell <tapsell@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.0-or-later
0007 
0008 */
0009 
0010 #ifndef _ReniceDlg_h_
0011 #define _ReniceDlg_h_
0012 
0013 #include <QDialog>
0014 
0015 class Ui_ReniceDlgUi;
0016 class QButtonGroup;
0017 
0018 /**
0019  * This class creates and handles a simple dialog to change the scheduling
0020  * priority of a process.
0021  */
0022 class ReniceDlg : public QDialog
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     /** Let the user specify the new priorities of the @p processes given, using the given current values.
0028      *  @p currentCpuSched The current Cpu Scheduler of the processes.  Set to -1 to they have different schedulers
0029      *  @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
0030      */
0031     explicit ReniceDlg(QWidget *parent, const QStringList &processes, int currentCpuPrio, int currentCpuSched, int currentIoPrio = -2, int currentIoSched = -2);
0032     ~ReniceDlg() override;
0033     int newCPUPriority;
0034     int newIOPriority;
0035     int newCPUSched;
0036     int newIOSched;
0037 
0038     bool ioniceSupported;
0039 
0040 public Q_SLOTS:
0041     void slotOk();
0042     void updateUi();
0043     void cpuSliderChanged(int value);
0044     void ioSliderChanged(int value);
0045     void cpuSchedulerChanged(int value);
0046 
0047 private:
0048     void setSliderRange();
0049     Ui_ReniceDlgUi *ui;
0050     QButtonGroup *cpuScheduler;
0051     QButtonGroup *ioScheduler;
0052     int previous_cpuscheduler;
0053 };
0054 
0055 #endif