mirror-chatterino2/widgets/settingsdialog.h
2017-01-24 19:51:57 +01:00

57 lines
1.1 KiB
C++

#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#include "settings.h"
#include "settingssnapshot.h"
#include "widgets/settingsdialogtab.h"
#include <QButtonGroup>
#include <QCheckBox>
#include <QDialogButtonBox>
#include <QHBoxLayout>
#include <QListView>
#include <QMainWindow>
#include <QPushButton>
#include <QStackedLayout>
#include <QVBoxLayout>
#include <QWidget>
namespace chatterino {
namespace widgets {
class SettingsDialog : public QWidget
{
public:
SettingsDialog();
void select(SettingsDialogTab *tab);
private:
SettingsSnapshot snapshot;
QVBoxLayout tabs;
QVBoxLayout vbox;
QHBoxLayout hbox;
QStackedLayout pageStack;
QDialogButtonBox buttonBox;
QPushButton okButton;
QPushButton cancelButton;
void addTab(QLayout *layout, QString title, QString imageRes);
void addTabs();
SettingsDialogTab *selectedTab = NULL;
/// Widget creation helpers
QCheckBox *createCheckbox(const QString &title, Setting<bool> &setting);
void okButtonClicked();
void cancelButtonClicked();
};
} // namespace widgets
} // namespace chatterino
#endif // SETTINGSDIALOG_H