-
Notifications
You must be signed in to change notification settings - Fork 0
/
settingsdialog.h
87 lines (72 loc) · 2.88 KB
/
settingsdialog.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/***************************************************************************
* Copyright (C) 2011-2012 Fabian Lesniak <[email protected]> *
* *
* This file is part of the QLenLab project. *
* *
* QLenLab is free software: you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation, either version 3 of the License, or (at your *
* option) any later version. *
* *
* QLenLab is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
* for more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with QLenLab. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#include <QtGui>
#include "meta.h"
class communicator;
class QPalette;
class settingsdialog : public QDialog
{
Q_OBJECT
public:
explicit settingsdialog(communicator* com, QWidget *parent = 0);
~settingsdialog();
public slots:
int exec();
void connectSerial();
void disconnectSerial();
void restoreSettings();
QColor getChannelColor(meta::colorindex c) const;
private:
communicator* com;
QComboBox *comboBox_serialport;
QPushButton *pushButton_connect;
QPushButton *pushButton_disconnect;
QCheckBox *checkBox_autoconnect;
QLabel *label_colorBackground;
QLabel *label_colorGrid;
QLabel *label_colorChannel1;
QLabel *label_colorChannel2;
QLabel *label_colorChannel3;
QLabel *label_colorChannel4;
QPushButton *pushButton_colorBackground;
QPushButton *pushButton_colorGrid;
QPushButton *pushButton_colorChannel1;
QPushButton *pushButton_colorChannel2;
QPushButton *pushButton_colorChannel3;
QPushButton *pushButton_colorChannel4;
QColor channelColor[6];
char p_connectTries;
void updateColor(meta::colorindex ci, QColor color);
private slots:
void rescanDevices();
void accept();
void reject();
void getColorBackground();
void getColorGrid();
void getColorChannel1();
void getColorChannel2();
void getColorChannel3();
void getColorChannel4();
void updateButtons();
signals:
void colorChanged(meta::colorindex, QColor);
};
#endif // SETTINGSDIALOG_H