-
Notifications
You must be signed in to change notification settings - Fork 0
/
decision.hpp
51 lines (45 loc) · 1.09 KB
/
decision.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef DECISION_H
#define DECISION_H
#include <QObject>
#include <QSystemTrayIcon>
#include <QMenu>
#include <QAction>
#include <QTimer>
class decision : public QObject
{
Q_OBJECT
public:
explicit decision(QObject *parent = 0);
void setSysTray(QSystemTrayIcon*);
signals:
void poweron();
void poweroff();
void ask(bool,bool,QString);
void bnetClean();
public slots:
void newState(bool st);
void unknowState(bool bbinfo, bool shouldbe, QString pciReport);
void showNotif(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon icon, int millisecondsTimeoutHint);
void glxgears();
void getprocesses();
void analyze(int);
void kill();
void purge();
private:
void _tryCorrect(bool,bool,QString);
QSystemTrayIcon* _ic;
QMenu m;
QAction* autoHandle;
QAction* cleanBnet;
QAction* processes;
QAction* glx;
QAction* exit;
QMenu* purgeaction;
QTimer poll;
QIcon on;
QIcon off;
QIcon unknow;
QMap<unsigned int, QString> _processes;
QMap<QAction*, unsigned int> _processesActions;
};
#endif // DECISION_H