[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,58 @@
#ifndef COCKATRICE_MESSAGES_SETTINGS_PAGE_H
#define COCKATRICE_MESSAGES_SETTINGS_PAGE_H
#include "abstract_settings_page.h"
#include <QCheckBox>
#include <QGroupBox>
#include <QLabel>
#include <QListWidget>
#include <libcockatrice/utility/macros.h>
class MessagesSettingsPage : public AbstractSettingsPage
{
Q_OBJECT
public:
MessagesSettingsPage();
void retranslateUi() override;
private slots:
void actAdd();
void actEdit();
void actRemove();
void updateColor(const QString &value);
void updateHighlightColor(const QString &value);
void updateTextColor(QT_STATE_CHANGED_T value);
void updateTextHighlightColor(QT_STATE_CHANGED_T value);
private:
QListWidget *messageList;
QAction *aAdd;
QAction *aEdit;
QAction *aRemove;
QCheckBox chatMentionCheckBox;
QCheckBox chatMentionCompleterCheckbox;
QCheckBox invertMentionForeground;
QCheckBox invertHighlightForeground;
QCheckBox ignoreUnregUsersMainChat;
QCheckBox ignoreUnregUserMessages;
QCheckBox messagePopups;
QCheckBox mentionPopups;
QCheckBox roomHistory;
QGroupBox *chatGroupBox;
QGroupBox *highlightGroupBox;
QGroupBox *messageGroupBox;
QLineEdit *mentionColor;
QLineEdit *highlightColor;
QLineEdit *customAlertString;
QLabel hexLabel;
QLabel hexHighlightLabel;
QLabel customAlertStringLabel;
QLabel explainMessagesLabel;
void storeSettings();
void updateMentionPreview();
void updateHighlightPreview();
};
#endif // COCKATRICE_MESSAGES_SETTINGS_PAGE_H