-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathnvocdialog.h
66 lines (43 loc) · 1.15 KB
/
nvocdialog.h
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef NVOCDIALOG_H
#define NVOCDIALOG_H
#include <QDialog>
#include <QAbstractButton>
#include "nvidianvml.h"
#include "nvidiaapi.h"
#include <QSettings>
struct nvCard
{
int powerOffset;
int memOffset;
int gpuOffset;
int fanSpeed;
};
namespace Ui {
class nvOCDialog;
}
class nvOCDialog : public QDialog
{
Q_OBJECT
public:
explicit nvOCDialog(nvidiaAPI* nvapi, QSettings* settings, QWidget *parent = 0);
~nvOCDialog();
private slots:
void on_horizontalSliderPowerPercent_valueChanged(int value);
void on_horizontalSliderGpuOffset_valueChanged(int value);
void on_horizontalSliderMemOffset_valueChanged(int value);
void on_horizontalSliderFanSpeed_valueChanged(int value);
void on_comboBoxDevice_activated(int index);
void on_buttonBox_clicked(QAbstractButton *button);
void on_checkBoxAutoSpeedFan_clicked(bool checked);
private:
void updateSliders(unsigned int gpu);
bool loadConfig();
void saveConfig();
Ui::nvOCDialog *ui;
QSettings* _settings;
nvidiaNVML* _nvml;
nvidiaAPI* _nvapi;
QList<nvCard> _cardList;
unsigned int _gpuIndex;
};
#endif // NVOCDIALOG_H