[DlgSettings] Refactor: split SettingsPage into separate files (#6899)

This commit is contained in:
RickyRister 2026-05-18 01:59:02 -07:00 committed by GitHub
parent cba9ce2b2b
commit 021a9f8383
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 2452 additions and 2299 deletions

View file

@ -0,0 +1,71 @@
#ifndef COCKATRICE_GENERAL_SETTINGS_PAGE_H
#define COCKATRICE_GENERAL_SETTINGS_PAGE_H
#include "abstract_settings_page.h"
#include <QCheckBox>
#include <QComboBox>
#include <QGroupBox>
#include <QLabel>
#include <QLoggingCategory>
#include <QPushButton>
#include <QSpinBox>
inline Q_LOGGING_CATEGORY(GeneralSettingsPageLog, "general_settings_page");
class GeneralSettingsPage : public AbstractSettingsPage
{
Q_OBJECT
public:
GeneralSettingsPage();
void retranslateUi() override;
private slots:
void deckPathButtonClicked();
void filtersPathButtonClicked();
void replaysPathButtonClicked();
void picsPathButtonClicked();
void cardDatabasePathButtonClicked();
void customCardDatabaseButtonClicked();
void tokenDatabasePathButtonClicked();
void resetAllPathsClicked();
void languageBoxChanged(int index);
private:
QStringList findQmFiles();
QString languageName(const QString &lang);
QLineEdit *deckPathEdit;
QLineEdit *filtersPathEdit;
QLineEdit *replaysPathEdit;
QLineEdit *picsPathEdit;
QLineEdit *cardDatabasePathEdit;
QLineEdit *customCardDatabasePathEdit;
QLineEdit *tokenDatabasePathEdit;
QPushButton *resetAllPathsButton;
QLabel *allPathsResetLabel;
QGroupBox *personalGroupBox;
QGroupBox *pathsGroupBox;
QComboBox languageBox;
QCheckBox startupUpdateCheckCheckBox;
QLabel startupCardUpdateCheckBehaviorLabel;
QComboBox startupCardUpdateCheckBehaviorSelector;
QLabel cardUpdateCheckIntervalLabel;
QSpinBox cardUpdateCheckIntervalSpinBox;
QLabel lastCardUpdateCheckDateLabel;
QCheckBox updateNotificationCheckBox;
QCheckBox newVersionOracleCheckBox;
QComboBox updateReleaseChannelBox;
QLabel languageLabel;
QLabel deckPathLabel;
QLabel filtersPathLabel;
QLabel replaysPathLabel;
QLabel picsPathLabel;
QLabel cardDatabasePathLabel;
QLabel customCardDatabasePathLabel;
QLabel tokenDatabasePathLabel;
QLabel updateReleaseChannelLabel;
QLabel advertiseTranslationPageLabel;
QCheckBox showTipsOnStartup;
};
#endif // COCKATRICE_GENERAL_SETTINGS_PAGE_H