mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
56 lines
1.1 KiB
C++
56 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
|