#pragma once #include #include #include #include #include #include "singletons/settingsmanager.hpp" namespace chatterino { namespace widgets { namespace settingspages { class SettingsPage : public QWidget { public: SettingsPage(const QString &name, const QString &iconResource); const QString &getName(); const QString &getIconResource(); void cancel(); QCheckBox *createCheckBox(const QString &text, pajlada::Settings::Setting &setting); QComboBox *createComboBox(const QStringList &items, pajlada::Settings::Setting &setting); QLineEdit *createLineEdit(pajlada::Settings::Setting &setting); QSpinBox *createSpinBox(pajlada::Settings::Setting &setting, int min = 0, int max = 2500); protected: QString name; QString iconResource; pajlada::Signals::NoArgSignal onCancel; std::vector managedConnections; }; } // namespace settingspages } // namespace widgets } // namespace chatterino