moved settings tab icons to SettingsDialog
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
namespace chatterino {
|
||||
|
||||
AboutPage::AboutPage()
|
||||
: SettingsPage("About", ":/settings/about.svg")
|
||||
: SettingsPage("About")
|
||||
{
|
||||
LayoutCreator<AboutPage> layoutCreator(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
namespace chatterino {
|
||||
|
||||
AccountsPage::AccountsPage()
|
||||
: SettingsPage("Accounts", ":/settings/accounts.svg")
|
||||
: SettingsPage("Accounts")
|
||||
{
|
||||
auto *app = getApp();
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace {
|
||||
} // namespace
|
||||
|
||||
CommandPage::CommandPage()
|
||||
: SettingsPage("Commands", ":/settings/commands.svg")
|
||||
: SettingsPage("Commands")
|
||||
{
|
||||
auto app = getApp();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
namespace chatterino {
|
||||
|
||||
ExternalToolsPage::ExternalToolsPage()
|
||||
: SettingsPage("External tools", ":/settings/externaltools.svg")
|
||||
: SettingsPage("External tools")
|
||||
{
|
||||
LayoutCreator<ExternalToolsPage> layoutCreator(this);
|
||||
auto layout = layoutCreator.setLayoutType<QVBoxLayout>();
|
||||
|
||||
@@ -237,7 +237,7 @@ bool SettingsLayout::filterElements(const QString &query)
|
||||
}
|
||||
|
||||
GeneralPage::GeneralPage()
|
||||
: SettingsPage("General", ":/settings/about.svg")
|
||||
: SettingsPage("General")
|
||||
{
|
||||
auto y = new QVBoxLayout;
|
||||
auto scroll = new QScrollArea;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
namespace chatterino {
|
||||
|
||||
HighlightingPage::HighlightingPage()
|
||||
: SettingsPage("Highlights", ":/settings/notifications.svg")
|
||||
: SettingsPage("Highlights")
|
||||
{
|
||||
auto app = getApp();
|
||||
LayoutCreator<HighlightingPage> layoutCreator(this);
|
||||
|
||||
@@ -29,7 +29,7 @@ static void addUsersTab(IgnoresPage &page, LayoutCreator<QVBoxLayout> box,
|
||||
QStringListModel &model);
|
||||
|
||||
IgnoresPage::IgnoresPage()
|
||||
: SettingsPage("Ignores", ":/settings/ignore.svg")
|
||||
: SettingsPage("Ignores")
|
||||
{
|
||||
LayoutCreator<IgnoresPage> layoutCreator(this);
|
||||
auto layout = layoutCreator.setLayoutType<QVBoxLayout>();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
namespace chatterino {
|
||||
|
||||
KeyboardSettingsPage::KeyboardSettingsPage()
|
||||
: SettingsPage("Keybindings", ":/settings/keybinds.svg")
|
||||
: SettingsPage("Keybindings")
|
||||
{
|
||||
auto layout =
|
||||
LayoutCreator<KeyboardSettingsPage>(this).setLayoutType<QVBoxLayout>();
|
||||
|
||||
@@ -73,7 +73,7 @@ QString fetchLogDirectorySize()
|
||||
}
|
||||
|
||||
ModerationPage::ModerationPage()
|
||||
: SettingsPage("Moderation", ":/settings/moderation.svg")
|
||||
: SettingsPage("Moderation")
|
||||
{
|
||||
auto app = getApp();
|
||||
LayoutCreator<ModerationPage> layoutCreator(this);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
namespace chatterino {
|
||||
|
||||
NotificationPage::NotificationPage()
|
||||
: SettingsPage("Notifications", ":/settings/notification2.svg")
|
||||
: SettingsPage("Notifications")
|
||||
{
|
||||
LayoutCreator<NotificationPage> layoutCreator(this);
|
||||
auto layout = layoutCreator.emplace<QVBoxLayout>().withoutMargin();
|
||||
|
||||
@@ -64,9 +64,8 @@ bool filterItemsRec(QObject *object, const QString &query)
|
||||
return any;
|
||||
}
|
||||
|
||||
SettingsPage::SettingsPage(const QString &name, const QString &iconResource)
|
||||
SettingsPage::SettingsPage(const QString &name)
|
||||
: name_(name)
|
||||
, iconResource_(iconResource)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -81,11 +80,6 @@ const QString &SettingsPage::getName()
|
||||
return this->name_;
|
||||
}
|
||||
|
||||
const QString &SettingsPage::getIconResource()
|
||||
{
|
||||
return this->iconResource_;
|
||||
}
|
||||
|
||||
SettingsDialogTab *SettingsPage::tab() const
|
||||
{
|
||||
return this->tab_;
|
||||
|
||||
@@ -47,10 +47,9 @@ class SettingsPage : public QFrame
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SettingsPage(const QString &name, const QString &iconResource);
|
||||
SettingsPage(const QString &name);
|
||||
|
||||
const QString &getName();
|
||||
const QString &getIconResource();
|
||||
|
||||
virtual bool filterElements(const QString &query);
|
||||
|
||||
@@ -73,10 +72,7 @@ public:
|
||||
|
||||
protected:
|
||||
QString name_;
|
||||
QString iconResource_;
|
||||
|
||||
SettingsDialogTab *tab_;
|
||||
|
||||
pajlada::Signals::NoArgSignal onCancel_;
|
||||
std::vector<pajlada::Signals::ScopedConnection> managedConnections_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user