[Settings] Split cache_settings monolith into multiple SettingsManager sub-classes (#7050)

* [Settings] Split cache_settings into multiple files

Took 9 minutes

Took 4 minutes

* [Settings] Fwd declare settings classes in cache_settings

Took 15 minutes

* Fix oracle includes.

Took 8 minutes

* Address comments, fix windows CI

Took 8 minutes

* fix copy constructor visibility

Took 3 minutes

* lint

Took 2 minutes

* Fix native format tests.

Took 5 minutes

* Remove test header guard

Took 4 seconds

* Remove tests invalid in CI environ

Took 24 seconds

* Adjust to rebase.

Took 11 minutes

* Change settings file name.

Took 8 minutes

---------

Co-authored-by: Lukas Brübach <lukas.bruebach@bdosecurity.de>
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2026-07-27 11:25:39 +02:00 committed by GitHub
parent cf0b453e75
commit 12f0f59453
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
166 changed files with 5589 additions and 3066 deletions

View file

@ -0,0 +1,52 @@
#ifndef CHAT_SETTINGS_H
#define CHAT_SETTINGS_H
#include "settings_manager.h"
#include <libcockatrice/interfaces/interface_chat_settings_provider.h>
class ChatSettings : public SettingsManager, public IChatSettingsProvider
{
Q_OBJECT
friend class SettingsCache;
public:
[[nodiscard]] bool getChatMention() const override;
[[nodiscard]] bool getChatMentionCompleter() const override;
[[nodiscard]] QString getChatMentionColor() const override;
[[nodiscard]] QString getChatHighlightColor() const override;
[[nodiscard]] bool getChatMentionForeground() const override;
[[nodiscard]] bool getChatHighlightForeground() const override;
[[nodiscard]] bool getIgnoreUnregisteredUsers() const override;
[[nodiscard]] bool getIgnoreUnregisteredUserMessages() const override;
[[nodiscard]] bool getIgnoreNonBuddyUserMessages() const override;
[[nodiscard]] bool getShowMessagePopup() const override;
[[nodiscard]] bool getShowMentionPopup() const override;
[[nodiscard]] bool getRoomHistory() const override;
[[nodiscard]] QString getHighlightWords() const override;
void setChatMention(bool _chatMention);
void setChatMentionCompleter(bool _chatMentionCompleter);
void setChatMentionColor(const QString &_chatMentionColor);
void setChatHighlightColor(const QString &_chatHighlightColor);
void setChatMentionForeground(bool _chatMentionForeground);
void setChatHighlightForeground(bool _chatHighlightForeground);
void setIgnoreUnregisteredUsers(bool _ignoreUnregisteredUsers);
void setIgnoreUnregisteredUserMessages(bool _ignoreUnregisteredUserMessages);
void setIgnoreNonBuddyUserMessages(bool _ignoreNonBuddyUserMessages);
void setShowMessagePopups(bool _showMessagePopups);
void setShowMentionPopups(bool _showMentionPopups);
void setRoomHistory(bool _roomHistory);
void setHighlightWords(const QString &_highlightWords);
signals:
void chatMentionCompleterChanged();
public:
explicit ChatSettings(const QString &settingPath, QObject *parent = nullptr);
private:
ChatSettings(const ChatSettings & /*other*/);
};
#endif // CHAT_SETTINGS_H