Some refactoring in SettingsDlg
[irwi] / src / settingsdlg.h
1 #ifndef SETTINGSDLG_H
2 #define SETTINGSDLG_H
3
4 #include <QDialog>
5 #include <QSettings>
6
7 #include "remote.h"
8
9 class QWidget;
10 class QHBoxLayout;
11 class QVBoxLayout;
12 class QPushButton;
13 class QLabel;
14 class Remote;
15
16 class SettingsDlg : public QDialog
17 {
18     Q_OBJECT
19 public:
20     SettingsDlg(QWidget *parent = 0);
21     ~SettingsDlg();
22
23 private slots:
24     void showAdvSettingsDlg();
25     void showSelectRemoteDlg();
26     void showAboutDlg();
27     void setRemote(Remote);
28     void setRemote(const QString &name);
29     void updateRemoteInfo();
30     void rateUpClicked();
31     void rateDownClicked();
32
33 private:
34     void enableRateBtns(bool enable = true);
35     void processRemoteChange();
36     void processRatingSent();
37
38 private:
39     Remote m_remote;
40
41     QVBoxLayout *m_layout;
42     QHBoxLayout *m_btnLayout;
43     QHBoxLayout *m_remoteNameLayout;
44     QPushButton *m_advSettingsBtn;
45     QPushButton *m_selectRemoteBtn;
46     QPushButton *m_rateUpBtn;
47     QPushButton *m_rateDownBtn;
48     QPushButton *m_aboutBtn;
49     QLabel *m_remoteNameLabel;
50     QLabel *m_ratingLabel;
51 };
52
53 #endif
54