#ifndef APPSETTINGS_H #define APPSETTINGS_H #include "messages/word.h" #include "setting.h" #include "settingssnapshot.h" #include namespace chatterino { class Settings : public QObject { Q_OBJECT public: static Settings & getInstance() { return instance; } void load(); void save(); messages::Word::Type getWordTypeMask() { return wordTypeMask; } bool isIgnoredEmote(const QString &emote); bool getPortable() { return portable; } void setPortable(bool value) { portable = value; } QSettings & getQSettings() { return settings; } SettingsSnapshot createSnapshot() { SettingsSnapshot snapshot; for (auto &item : this->settingsItems) { snapshot.addItem(item, item.get().getVariant()); } return snapshot; } signals: void wordTypeMaskChanged(); private: Settings(); static Settings instance; void updateWordTypeMask(); QSettings settings; std::vector> settingsItems; bool portable; messages::Word::Type wordTypeMask; public: Setting theme; Setting themeHue; Setting selectedUser; Setting emoteScale; Setting mouseScrollMultiplier; Setting scaleEmotesByLineHeight; Setting showTimestamps; Setting showTimestampSeconds; Setting showLastMessageIndicator; Setting allowDouplicateMessages; Setting linksDoubleClickOnly; Setting hideEmptyInput; Setting showMessageLength; Setting seperateMessages; Setting mentionUsersWithAt; Setting allowCommandsAtEnd; Setting enableHighlights; Setting enableHighlightSound; Setting enableHighlightTaskbar; Setting customHighlightSound; Setting enableTwitchEmotes; Setting enableBttvEmotes; Setting enableFfzEmotes; Setting enableEmojis; Setting enableGifAnimations; Setting enableGifs; Setting inlineWhispers; Setting windowTopMost; Setting hideTabX; }; } // namespace chatterino #endif // APPSETTINGS_H