2011-05-12 03:40:40 -04:00
|
|
|
#ifndef OPTIONSDIALOG_H
|
|
|
|
#define OPTIONSDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2012-05-07 15:49:22 -04:00
|
|
|
#include <QList>
|
2011-05-13 16:00:27 -04:00
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class QStackedWidget;
|
|
|
|
class QListWidget;
|
|
|
|
class QListWidgetItem;
|
2011-06-01 03:33:48 -04:00
|
|
|
class QPushButton;
|
2011-05-13 16:00:27 -04:00
|
|
|
QT_END_NAMESPACE
|
2011-05-31 16:24:53 -04:00
|
|
|
class OptionsModel;
|
2012-05-07 15:49:22 -04:00
|
|
|
class OptionsPage;
|
2011-06-01 08:40:06 -04:00
|
|
|
class MonitoredDataMapper;
|
2011-05-12 03:40:40 -04:00
|
|
|
|
2011-11-13 09:19:52 -03:00
|
|
|
/** Preferences dialog. */
|
2011-05-12 03:40:40 -04:00
|
|
|
class OptionsDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2011-05-31 16:24:53 -04:00
|
|
|
explicit OptionsDialog(QWidget *parent=0);
|
|
|
|
|
|
|
|
void setModel(OptionsModel *model);
|
2011-05-12 03:40:40 -04:00
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
public slots:
|
2011-11-13 09:19:52 -03:00
|
|
|
/** Change the current page to \a index. */
|
2011-07-25 15:35:45 -04:00
|
|
|
void changePage(int index);
|
|
|
|
|
2011-06-01 03:33:48 -04:00
|
|
|
private slots:
|
|
|
|
void okClicked();
|
|
|
|
void cancelClicked();
|
|
|
|
void applyClicked();
|
|
|
|
void enableApply();
|
2011-06-01 08:40:06 -04:00
|
|
|
void disableApply();
|
2011-11-13 09:19:52 -03:00
|
|
|
|
2011-05-12 08:44:52 -04:00
|
|
|
private:
|
|
|
|
QListWidget *contents_widget;
|
|
|
|
QStackedWidget *pages_widget;
|
2011-05-31 16:24:53 -04:00
|
|
|
OptionsModel *model;
|
2011-06-01 08:40:06 -04:00
|
|
|
MonitoredDataMapper *mapper;
|
2011-06-01 03:33:48 -04:00
|
|
|
QPushButton *apply_button;
|
2011-05-12 03:40:40 -04:00
|
|
|
|
2012-05-07 15:49:22 -04:00
|
|
|
QList<OptionsPage*> pages;
|
2011-05-12 03:40:40 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // OPTIONSDIALOG_H
|