mirror-chatterino2/widgets/settingsdialog.h
Rasmus Karlsson 5429e62e73 Utilize templates for Settings class
Use boost2::signals for the valueChanged signal (a LOT less messy to
        deal with than qt signals)
Remove unused settings classes (BoolSetting, FloatSetting, IntSetting,
        StringSetting)

What's left: Implement the remaining signals
2017-01-22 23:02:48 +01:00

52 lines
1 KiB
C++

#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#include "settings/settings.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:
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,
settings::Setting<bool> &setting);
};
} // namespace widgets
} // namespace chatterino
#endif // SETTINGSDIALOG_H