aboutsummaryrefslogtreecommitdiff
path: root/gui/include/optionsdialog.h
blob: 07e85297d542ede72e301d3bfe553782d9951237 (plain)
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
#ifndef OPTIONSDIALOG_H
#define OPTIONSDIALOG_H

#include <QDialog>

QT_BEGIN_NAMESPACE
class QStackedWidget;
class QListWidget;
class QListWidgetItem;
class QPushButton;
QT_END_NAMESPACE
class OptionsModel;
class MainOptionsPage;
class MonitoredDataMapper;

class OptionsDialog : public QDialog
{
    Q_OBJECT
public:
    explicit OptionsDialog(QWidget *parent=0);

    void setModel(OptionsModel *model);

signals:

public slots:
    void changePage(QListWidgetItem *current, QListWidgetItem *previous);
private slots:
    void okClicked();
    void cancelClicked();
    void applyClicked();
    void enableApply();
    void disableApply();
private:
    QListWidget *contents_widget;
    QStackedWidget *pages_widget;
    MainOptionsPage *main_options_page;
    OptionsModel *model;
    MonitoredDataMapper *mapper;
    QPushButton *apply_button;

    void setupMainPage();
};

#endif // OPTIONSDIALOG_H