-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.h
69 lines (57 loc) · 1.24 KB
/
settings.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
#ifndef SETTINGS_H
#define SETTINGS_H
#include <QDialog>
class QLabel;
class QLineEdit;
class QPushButton;
class QString;
class QCheckBox;
class QSpinBox;
class SettingsDialog : public QDialog
{
Q_OBJECT
public:
SettingsDialog(QWidget *parent = 0);
QString getHost();
QString getPort();
QString getUrl();
int getInterval();
bool getAutoRefresh();
void setHost(QString p);
void setPort(QString h);
void setUrl(QString u);
void setInterval(int i);
void setAutoRefresh(bool a);
signals:
void applyed();
void canceled();
private:
QLabel *hostLabel;
QLabel *portLabel;
QLabel *urlLabel;
QLabel *intervalLabel;
QLabel *autoRefreshLabel;
QLineEdit *hostLineEdit;
QLineEdit *portLineEdit;
QLineEdit *urlLineEdit;
QSpinBox *intervalSpinBox;
QCheckBox *autoRefreshCheckBox;
QPushButton *okButton;
QPushButton *cancelButton;
QString host;
QString port;
QString url;
int interval;
Qt::CheckState autoRefresh;
private slots:
void okButtonClicked();
void cancelButtonClicked();
void hostChanged(QString h);
void portChanged(QString p);
void urlChanged(QString u);
void intervalChanged(int i);
void autoRefreshChanged(int a);
protected:
void showEvent(QShowEvent *event);
};
#endif