2017-06-07 10:09:24 +02:00
|
|
|
#pragma once
|
2017-01-05 20:49:13 +01:00
|
|
|
|
2019-07-28 13:19:17 +02:00
|
|
|
#include "common/Channel.hpp"
|
2023-08-28 17:51:28 +02:00
|
|
|
#include "common/ChatterinoSetting.hpp"
|
2023-05-07 15:18:07 +02:00
|
|
|
#include "common/enums/MessageOverflow.hpp"
|
2020-02-23 22:15:13 +01:00
|
|
|
#include "common/SignalVector.hpp"
|
2023-08-28 17:51:28 +02:00
|
|
|
#include "controllers/filters/FilterRecord.hpp"
|
|
|
|
#include "controllers/highlights/HighlightBadge.hpp"
|
|
|
|
#include "controllers/highlights/HighlightBlacklistUser.hpp"
|
|
|
|
#include "controllers/highlights/HighlightPhrase.hpp"
|
|
|
|
#include "controllers/ignores/IgnorePhrase.hpp"
|
2023-01-15 12:47:22 +01:00
|
|
|
#include "controllers/logging/ChannelLog.hpp"
|
2023-08-28 17:51:28 +02:00
|
|
|
#include "controllers/moderationactions/ModerationAction.hpp"
|
|
|
|
#include "controllers/nicknames/Nickname.hpp"
|
2023-11-26 22:06:12 +01:00
|
|
|
#include "controllers/sound/ISoundController.hpp"
|
2019-04-27 13:47:13 +02:00
|
|
|
#include "singletons/Toasts.hpp"
|
2022-12-31 15:41:01 +01:00
|
|
|
#include "util/RapidJsonSerializeQString.hpp"
|
2020-10-11 13:52:14 +02:00
|
|
|
#include "util/StreamerMode.hpp"
|
2020-08-13 15:43:08 +02:00
|
|
|
#include "widgets/Notebook.hpp"
|
2017-01-20 06:10:28 +01:00
|
|
|
|
Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories
In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:
In ChatterSet.hpp, I changed lrucache to a <>include
In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
2022-11-27 19:32:53 +01:00
|
|
|
#include <pajlada/settings/setting.hpp>
|
|
|
|
#include <pajlada/settings/settinglistener.hpp>
|
2023-08-28 17:51:28 +02:00
|
|
|
#include <pajlada/signals/signalholder.hpp>
|
Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories
In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:
In ChatterSet.hpp, I changed lrucache to a <>include
In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
2022-11-27 19:32:53 +01:00
|
|
|
|
2019-09-27 14:05:03 +02:00
|
|
|
using TimeoutButton = std::pair<QString, int>;
|
|
|
|
|
2017-01-18 21:30:23 +01:00
|
|
|
namespace chatterino {
|
|
|
|
|
2023-08-28 17:51:28 +02:00
|
|
|
void _actuallyRegisterSetting(
|
|
|
|
std::weak_ptr<pajlada::Settings::SettingData> setting);
|
2020-02-23 22:15:13 +01:00
|
|
|
|
2021-06-13 14:13:19 +02:00
|
|
|
enum UsernameDisplayMode : int {
|
|
|
|
Username = 1, // Username
|
|
|
|
LocalizedName = 2, // Localized name
|
|
|
|
UsernameAndLocalizedName = 3, // Username (Localized name)
|
|
|
|
};
|
2022-10-02 15:27:55 +02:00
|
|
|
|
|
|
|
enum HelixTimegateOverride : int {
|
|
|
|
// Use the default timegated behaviour
|
|
|
|
// This means we use the old IRC command up until the migration date and
|
|
|
|
// switch over to the Helix API only after the migration date
|
|
|
|
Timegate = 1,
|
|
|
|
|
|
|
|
// Ignore timegating and always force use the IRC command
|
|
|
|
AlwaysUseIRC = 2,
|
|
|
|
|
|
|
|
// Ignore timegating and always force use the Helix API
|
|
|
|
AlwaysUseHelix = 3,
|
|
|
|
};
|
|
|
|
|
2023-04-08 15:43:38 +02:00
|
|
|
enum ThumbnailPreviewMode : int {
|
|
|
|
DontShow = 0,
|
|
|
|
|
|
|
|
AlwaysShow = 1,
|
|
|
|
|
|
|
|
ShowOnShift = 2,
|
|
|
|
};
|
|
|
|
|
2023-07-01 13:03:16 +02:00
|
|
|
enum UsernameRightClickBehavior : int {
|
|
|
|
Reply = 0,
|
|
|
|
Mention = 1,
|
|
|
|
Ignore = 2,
|
|
|
|
};
|
|
|
|
|
2020-02-23 23:07:28 +01:00
|
|
|
/// Settings which are availlable for reading and writing on the gui thread.
|
2020-02-23 22:15:13 +01:00
|
|
|
// These settings are still accessed concurrently in the code but it is bad practice.
|
2023-08-28 17:51:28 +02:00
|
|
|
class Settings
|
2017-01-05 20:49:13 +01:00
|
|
|
{
|
2019-10-07 22:42:34 +02:00
|
|
|
static Settings *instance_;
|
2023-11-26 16:54:19 +01:00
|
|
|
Settings *prevInstance_ = nullptr;
|
2018-04-27 22:11:19 +02:00
|
|
|
|
2018-06-28 19:38:57 +02:00
|
|
|
public:
|
2018-11-25 15:02:48 +01:00
|
|
|
Settings(const QString &settingsDirectory);
|
2023-08-28 17:51:28 +02:00
|
|
|
~Settings();
|
2017-05-27 16:16:39 +02:00
|
|
|
|
2019-10-07 22:42:34 +02:00
|
|
|
static Settings &instance();
|
2018-01-04 01:52:37 +01:00
|
|
|
|
2023-08-28 17:51:28 +02:00
|
|
|
void saveSnapshot();
|
|
|
|
void restoreSnapshot();
|
|
|
|
|
|
|
|
FloatSetting uiScale = {"/appearance/uiScale2", 1};
|
|
|
|
BoolSetting windowTopMost = {"/appearance/windowAlwaysOnTop", false};
|
|
|
|
|
|
|
|
float getClampedUiScale() const;
|
|
|
|
void setClampedUiScale(float value);
|
|
|
|
|
2017-12-17 01:19:56 +01:00
|
|
|
/// Appearance
|
|
|
|
BoolSetting showTimestamps = {"/appearance/messages/showTimestamps", true};
|
2018-10-31 19:45:51 +01:00
|
|
|
BoolSetting animationsWhenFocused = {
|
2018-08-15 23:48:16 +02:00
|
|
|
"/appearance/enableAnimationsWhenFocused", false};
|
2018-01-11 20:16:25 +01:00
|
|
|
QStringSetting timestampFormat = {"/appearance/messages/timestampFormat",
|
|
|
|
"h:mm"};
|
2017-12-17 01:19:56 +01:00
|
|
|
BoolSetting showLastMessageIndicator = {
|
|
|
|
"/appearance/messages/showLastMessageIndicator", false};
|
2020-10-04 18:26:46 +02:00
|
|
|
EnumSetting<Qt::BrushStyle> lastMessagePattern = {
|
2021-03-13 12:33:54 +01:00
|
|
|
"/appearance/messages/lastMessagePattern", Qt::SolidPattern};
|
2018-10-20 13:25:24 +02:00
|
|
|
QStringSetting lastMessageColor = {"/appearance/messages/lastMessageColor",
|
2021-03-13 12:33:54 +01:00
|
|
|
"#7f2026"};
|
2018-07-05 18:17:12 +02:00
|
|
|
BoolSetting showEmptyInput = {"/appearance/showEmptyInputBox", true};
|
2017-12-17 01:19:56 +01:00
|
|
|
BoolSetting showMessageLength = {"/appearance/messages/showMessageLength",
|
|
|
|
false};
|
2022-11-13 12:47:46 +01:00
|
|
|
EnumSetting<MessageOverflow> messageOverflow = {
|
|
|
|
"/appearance/messages/messageOverflow", MessageOverflow::Highlight};
|
2018-06-24 18:32:00 +02:00
|
|
|
BoolSetting separateMessages = {"/appearance/messages/separateMessages",
|
|
|
|
false};
|
2019-04-16 14:36:15 +02:00
|
|
|
BoolSetting hideModerated = {"/appearance/messages/hideModerated", false};
|
2019-05-25 11:24:10 +02:00
|
|
|
BoolSetting hideModerationActions = {
|
|
|
|
"/appearance/messages/hideModerationActions", false};
|
2021-06-06 17:51:57 +02:00
|
|
|
BoolSetting hideDeletionActions = {
|
|
|
|
"/appearance/messages/hideDeletionActions", false};
|
2019-08-20 21:50:36 +02:00
|
|
|
BoolSetting colorizeNicknames = {"/appearance/messages/colorizeNicknames",
|
2020-10-04 12:59:31 +02:00
|
|
|
true};
|
2021-06-13 14:13:19 +02:00
|
|
|
EnumSetting<UsernameDisplayMode> usernameDisplayMode = {
|
|
|
|
"/appearance/messages/usernameDisplayMode",
|
|
|
|
UsernameDisplayMode::UsernameAndLocalizedName};
|
2018-10-29 21:46:43 +01:00
|
|
|
|
2022-07-23 16:09:12 +02:00
|
|
|
EnumSetting<NotebookTabLocation> tabDirection = {"/appearance/tabDirection",
|
|
|
|
NotebookTabLocation::Top};
|
2023-06-11 11:34:28 +02:00
|
|
|
EnumSetting<NotebookTabVisibility> tabVisibility = {
|
|
|
|
"/appearance/tabVisibility",
|
|
|
|
NotebookTabVisibility::AllTabs,
|
|
|
|
};
|
2020-08-13 15:43:08 +02:00
|
|
|
|
2018-06-04 16:34:47 +02:00
|
|
|
// BoolSetting collapseLongMessages =
|
|
|
|
// {"/appearance/messages/collapseLongMessages", false};
|
2022-12-07 22:02:54 +01:00
|
|
|
BoolSetting hideReplyContext = {"/appearance/hideReplyContext", false};
|
2022-07-31 12:45:25 +02:00
|
|
|
BoolSetting showReplyButton = {"/appearance/showReplyButton", false};
|
2022-10-08 16:25:32 +02:00
|
|
|
BoolSetting stripReplyMention = {"/appearance/stripReplyMention", true};
|
2018-06-04 16:34:47 +02:00
|
|
|
IntSetting collpseMessagesMinLines = {
|
|
|
|
"/appearance/messages/collapseMessagesMinLines", 0};
|
2018-10-31 19:45:51 +01:00
|
|
|
BoolSetting alternateMessages = {
|
2018-05-06 14:38:23 +02:00
|
|
|
"/appearance/messages/alternateMessageBackground", false};
|
2019-07-28 20:23:39 +02:00
|
|
|
FloatSetting boldScale = {"/appearance/boldScale", 63};
|
2018-04-27 01:11:09 +02:00
|
|
|
BoolSetting showTabCloseButton = {"/appearance/showTabCloseButton", true};
|
2020-10-04 12:59:31 +02:00
|
|
|
BoolSetting showTabLive = {"/appearance/showTabLiveButton", true};
|
2017-12-17 01:19:56 +01:00
|
|
|
BoolSetting hidePreferencesButton = {"/appearance/hidePreferencesButton",
|
|
|
|
false};
|
|
|
|
BoolSetting hideUserButton = {"/appearance/hideUserButton", false};
|
2017-12-18 18:55:09 +01:00
|
|
|
BoolSetting enableSmoothScrolling = {"/appearance/smoothScrolling", true};
|
2018-01-05 03:23:06 +01:00
|
|
|
BoolSetting enableSmoothScrollingNewMessages = {
|
|
|
|
"/appearance/smoothScrollingNewMessages", false};
|
2020-10-04 12:59:31 +02:00
|
|
|
BoolSetting boldUsernames = {"/appearance/messages/boldUsernames", true};
|
2020-12-19 14:42:20 +01:00
|
|
|
BoolSetting colorUsernames = {"/appearance/messages/colorUsernames", true};
|
2020-07-18 16:03:51 +02:00
|
|
|
BoolSetting findAllUsernames = {"/appearance/messages/findAllUsernames",
|
|
|
|
false};
|
2018-08-06 16:42:23 +02:00
|
|
|
// BoolSetting customizable splitheader
|
2018-10-31 19:45:51 +01:00
|
|
|
BoolSetting headerViewerCount = {"/appearance/splitheader/showViewerCount",
|
|
|
|
false};
|
|
|
|
BoolSetting headerStreamTitle = {"/appearance/splitheader/showTitle",
|
|
|
|
false};
|
|
|
|
BoolSetting headerGame = {"/appearance/splitheader/showGame", false};
|
|
|
|
BoolSetting headerUptime = {"/appearance/splitheader/showUptime", false};
|
2018-10-25 21:52:12 +02:00
|
|
|
FloatSetting customThemeMultiplier = {"/appearance/customThemeMultiplier",
|
|
|
|
-0.5f};
|
2017-12-17 01:19:56 +01:00
|
|
|
// BoolSetting useCustomWindowFrame = {"/appearance/useCustomWindowFrame",
|
|
|
|
// false};
|
|
|
|
|
2018-09-16 17:42:30 +02:00
|
|
|
// Badges
|
|
|
|
BoolSetting showBadgesGlobalAuthority = {
|
|
|
|
"/appearance/badges/GlobalAuthority", true};
|
2021-04-25 14:37:19 +02:00
|
|
|
BoolSetting showBadgesPredictions = {"/appearance/badges/predictions",
|
|
|
|
true};
|
2018-09-16 17:42:30 +02:00
|
|
|
BoolSetting showBadgesChannelAuthority = {
|
|
|
|
"/appearance/badges/ChannelAuthority", true};
|
|
|
|
BoolSetting showBadgesSubscription = {"/appearance/badges/subscription",
|
|
|
|
true};
|
|
|
|
BoolSetting showBadgesVanity = {"/appearance/badges/vanity", true};
|
|
|
|
BoolSetting showBadgesChatterino = {"/appearance/badges/chatterino", true};
|
2020-10-25 10:36:00 +01:00
|
|
|
BoolSetting showBadgesFfz = {"/appearance/badges/ffz", true};
|
2021-05-16 22:07:12 +02:00
|
|
|
BoolSetting useCustomFfzModeratorBadges = {
|
|
|
|
"/appearance/badges/useCustomFfzModeratorBadges", true};
|
|
|
|
BoolSetting useCustomFfzVipBadges = {
|
|
|
|
"/appearance/badges/useCustomFfzVipBadges", true};
|
2022-10-16 13:22:17 +02:00
|
|
|
BoolSetting showBadgesSevenTV = {"/appearance/badges/seventv", true};
|
2018-09-16 17:42:30 +02:00
|
|
|
|
2017-12-17 01:19:56 +01:00
|
|
|
/// Behaviour
|
2017-12-17 13:48:02 +01:00
|
|
|
BoolSetting allowDuplicateMessages = {"/behaviour/allowDuplicateMessages",
|
|
|
|
true};
|
2017-12-17 01:19:56 +01:00
|
|
|
BoolSetting mentionUsersWithAt = {"/behaviour/mentionUsersWithAt", false};
|
2018-05-26 18:06:55 +02:00
|
|
|
BoolSetting showJoins = {"/behaviour/showJoins", false};
|
|
|
|
BoolSetting showParts = {"/behaviour/showParts", false};
|
2017-12-19 02:47:55 +01:00
|
|
|
FloatSetting mouseScrollMultiplier = {"/behaviour/mouseScrollMultiplier",
|
|
|
|
1.0};
|
2020-08-08 14:43:26 +02:00
|
|
|
BoolSetting autoCloseUserPopup = {"/behaviour/autoCloseUserPopup", true};
|
2022-07-31 12:45:25 +02:00
|
|
|
BoolSetting autoCloseThreadPopup = {"/behaviour/autoCloseThreadPopup",
|
|
|
|
false};
|
2023-07-01 13:03:16 +02:00
|
|
|
|
|
|
|
EnumSetting<UsernameRightClickBehavior> usernameRightClickBehavior = {
|
|
|
|
"/behaviour/usernameRightClickBehavior",
|
|
|
|
UsernameRightClickBehavior::Mention,
|
|
|
|
};
|
|
|
|
EnumSetting<UsernameRightClickBehavior> usernameRightClickModifierBehavior =
|
|
|
|
{
|
|
|
|
"/behaviour/usernameRightClickBehaviorWithModifier",
|
|
|
|
UsernameRightClickBehavior::Reply,
|
2023-08-28 17:51:28 +02:00
|
|
|
};
|
2023-07-01 13:03:16 +02:00
|
|
|
EnumSetting<Qt::KeyboardModifier> usernameRightClickModifier = {
|
|
|
|
"/behaviour/usernameRightClickModifier",
|
|
|
|
Qt::KeyboardModifier::ShiftModifier};
|
|
|
|
|
2023-06-17 17:41:52 +02:00
|
|
|
BoolSetting autoSubToParticipatedThreads = {
|
|
|
|
"/behaviour/autoSubToParticipatedThreads",
|
|
|
|
true,
|
|
|
|
};
|
2018-07-16 17:23:41 +02:00
|
|
|
// BoolSetting twitchSeperateWriteConnection =
|
|
|
|
// {"/behaviour/twitchSeperateWriteConnection", false};
|
2018-03-30 15:42:59 +02:00
|
|
|
|
|
|
|
// Auto-completion
|
|
|
|
BoolSetting onlyFetchChattersForSmallerStreamers = {
|
|
|
|
"/behaviour/autocompletion/onlyFetchChattersForSmallerStreamers", true};
|
|
|
|
IntSetting smallStreamerLimit = {
|
|
|
|
"/behaviour/autocompletion/smallStreamerLimit", 1000};
|
2019-08-20 21:50:36 +02:00
|
|
|
BoolSetting prefixOnlyEmoteCompletion = {
|
|
|
|
"/behaviour/autocompletion/prefixOnlyCompletion", true};
|
2020-02-29 11:52:49 +01:00
|
|
|
BoolSetting userCompletionOnlyWithAt = {
|
|
|
|
"/behaviour/autocompletion/userCompletionOnlyWithAt", false};
|
2020-08-23 11:28:22 +02:00
|
|
|
BoolSetting emoteCompletionWithColon = {
|
|
|
|
"/behaviour/autocompletion/emoteCompletionWithColon", true};
|
2021-06-19 18:29:17 +02:00
|
|
|
BoolSetting showUsernameCompletionMenu = {
|
|
|
|
"/behaviour/autocompletion/showUsernameCompletionMenu", true};
|
2023-11-28 11:06:35 +01:00
|
|
|
BoolSetting useSmartEmoteCompletion = {
|
|
|
|
"/experiments/useSmartEmoteCompletion",
|
|
|
|
false,
|
|
|
|
};
|
2018-03-30 15:42:59 +02:00
|
|
|
|
2019-09-16 11:36:19 +02:00
|
|
|
FloatSetting pauseOnHoverDuration = {"/behaviour/pauseOnHoverDuration", 0};
|
2019-09-16 10:40:02 +02:00
|
|
|
EnumSetting<Qt::KeyboardModifier> pauseChatModifier = {
|
|
|
|
"/behaviour/pauseChatModifier", Qt::KeyboardModifier::NoModifier};
|
2019-07-23 23:56:14 +02:00
|
|
|
BoolSetting autorun = {"/behaviour/autorun", false};
|
2019-08-21 01:08:15 +02:00
|
|
|
BoolSetting mentionUsersWithComma = {"/behaviour/mentionUsersWithComma",
|
|
|
|
true};
|
2017-12-17 01:19:56 +01:00
|
|
|
|
|
|
|
/// Commands
|
|
|
|
BoolSetting allowCommandsAtEnd = {"/commands/allowCommandsAtEnd", false};
|
|
|
|
|
|
|
|
/// Emotes
|
|
|
|
BoolSetting scaleEmotesByLineHeight = {"/emotes/scaleEmotesByLineHeight",
|
|
|
|
false};
|
2019-06-22 14:34:54 +02:00
|
|
|
BoolSetting enableEmoteImages = {"/emotes/enableEmoteImages", true};
|
2018-10-31 19:45:51 +01:00
|
|
|
BoolSetting animateEmotes = {"/emotes/enableGifAnimations", true};
|
2023-03-18 17:30:08 +01:00
|
|
|
BoolSetting enableZeroWidthEmotes = {"/emotes/enableZeroWidthEmotes", true};
|
2018-01-04 02:19:35 +01:00
|
|
|
FloatSetting emoteScale = {"/emotes/scale", 1.f};
|
2022-10-16 13:22:17 +02:00
|
|
|
BoolSetting showUnlistedSevenTVEmotes = {
|
|
|
|
"/emotes/showUnlistedSevenTVEmotes", false};
|
2021-02-13 19:17:22 +01:00
|
|
|
QStringSetting emojiSet = {"/emotes/emojiSet", "Twitter"};
|
2018-06-06 01:29:43 +02:00
|
|
|
|
2019-12-21 10:36:46 +01:00
|
|
|
BoolSetting stackBits = {"/emotes/stackBits", false};
|
2021-04-26 00:25:23 +02:00
|
|
|
BoolSetting removeSpacesBetweenEmotes = {
|
|
|
|
"/emotes/removeSpacesBetweenEmotes", false};
|
2019-12-21 10:36:46 +01:00
|
|
|
|
2022-08-28 12:20:47 +02:00
|
|
|
BoolSetting enableBTTVGlobalEmotes = {"/emotes/bttv/global", true};
|
|
|
|
BoolSetting enableBTTVChannelEmotes = {"/emotes/bttv/channel", true};
|
2023-01-21 15:06:55 +01:00
|
|
|
BoolSetting enableBTTVLiveUpdates = {"/emotes/bttv/liveupdates", true};
|
2022-08-28 12:20:47 +02:00
|
|
|
BoolSetting enableFFZGlobalEmotes = {"/emotes/ffz/global", true};
|
|
|
|
BoolSetting enableFFZChannelEmotes = {"/emotes/ffz/channel", true};
|
2022-10-16 13:22:17 +02:00
|
|
|
BoolSetting enableSevenTVGlobalEmotes = {"/emotes/seventv/global", true};
|
|
|
|
BoolSetting enableSevenTVChannelEmotes = {"/emotes/seventv/channel", true};
|
2022-11-13 12:07:41 +01:00
|
|
|
BoolSetting enableSevenTVEventAPI = {"/emotes/seventv/eventapi", true};
|
2023-07-29 11:49:44 +02:00
|
|
|
BoolSetting sendSevenTVActivity = {"/emotes/seventv/sendActivity", true};
|
2022-08-28 12:20:47 +02:00
|
|
|
|
2017-12-17 01:19:56 +01:00
|
|
|
/// Links
|
|
|
|
BoolSetting linksDoubleClickOnly = {"/links/doubleClickToOpen", false};
|
2018-10-31 19:45:51 +01:00
|
|
|
BoolSetting linkInfoTooltip = {"/links/linkInfoTooltip", false};
|
2020-05-10 12:11:10 +02:00
|
|
|
IntSetting thumbnailSize = {"/appearance/thumbnailSize", 0};
|
2020-05-24 11:57:15 +02:00
|
|
|
IntSetting thumbnailSizeStream = {"/appearance/thumbnailSizeStream", 2};
|
2018-10-31 19:45:51 +01:00
|
|
|
BoolSetting unshortLinks = {"/links/unshortLinks", false};
|
|
|
|
BoolSetting lowercaseDomains = {"/links/linkLowercase", true};
|
2017-12-17 01:19:56 +01:00
|
|
|
|
2020-10-11 13:52:14 +02:00
|
|
|
/// Streamer Mode
|
|
|
|
EnumSetting<StreamerModeSetting> enableStreamerMode = {
|
2022-05-28 14:17:42 +02:00
|
|
|
"/streamerMode/enabled", StreamerModeSetting::DetectStreamingSoftware};
|
2020-10-11 13:52:14 +02:00
|
|
|
BoolSetting streamerModeHideUsercardAvatars = {
|
|
|
|
"/streamerMode/hideUsercardAvatars", true};
|
|
|
|
BoolSetting streamerModeHideLinkThumbnails = {
|
|
|
|
"/streamerMode/hideLinkThumbnails", true};
|
|
|
|
BoolSetting streamerModeHideViewerCountAndDuration = {
|
|
|
|
"/streamerMode/hideViewerCountAndDuration", false};
|
2022-11-06 17:30:53 +01:00
|
|
|
BoolSetting streamerModeHideModActions = {"/streamerMode/hideModActions",
|
|
|
|
true};
|
2020-10-11 13:52:14 +02:00
|
|
|
BoolSetting streamerModeMuteMentions = {"/streamerMode/muteMentions", true};
|
2021-02-21 16:42:59 +01:00
|
|
|
BoolSetting streamerModeSuppressLiveNotifications = {
|
2021-01-10 15:01:38 +01:00
|
|
|
"/streamerMode/supressLiveNotifications", false};
|
2022-10-22 12:04:51 +02:00
|
|
|
BoolSetting streamerModeSuppressInlineWhispers = {
|
|
|
|
"/streamerMode/suppressInlineWhispers", true};
|
2020-10-11 13:52:14 +02:00
|
|
|
|
|
|
|
/// Ignored Phrases
|
2018-10-06 17:51:13 +02:00
|
|
|
QStringSetting ignoredPhraseReplace = {"/ignore/ignoredPhraseReplace",
|
|
|
|
"***"};
|
2018-09-23 20:21:50 +02:00
|
|
|
|
2021-02-14 14:01:13 +01:00
|
|
|
/// Blocked Users
|
|
|
|
BoolSetting enableTwitchBlockedUsers = {"/ignore/enableTwitchBlockedUsers",
|
2018-01-23 21:33:49 +01:00
|
|
|
true};
|
2021-02-14 14:01:13 +01:00
|
|
|
IntSetting showBlockedUsersMessages = {"/ignore/showBlockedUsers", 0};
|
2018-01-23 21:33:49 +01:00
|
|
|
|
2018-01-13 03:06:10 +01:00
|
|
|
/// Moderation
|
2018-03-24 16:55:28 +01:00
|
|
|
QStringSetting timeoutAction = {"/moderation/timeoutAction", "Disable"};
|
2019-07-28 13:19:17 +02:00
|
|
|
IntSetting timeoutStackStyle = {
|
|
|
|
"/moderation/timeoutStackStyle",
|
|
|
|
static_cast<int>(TimeoutStackStyle::Default)};
|
2018-01-13 03:06:10 +01:00
|
|
|
|
2017-12-17 01:19:56 +01:00
|
|
|
/// Highlighting
|
2018-04-27 01:11:09 +02:00
|
|
|
// BoolSetting enableHighlights = {"/highlighting/enabled", true};
|
2020-01-25 11:03:10 +01:00
|
|
|
|
2018-08-29 01:21:36 +02:00
|
|
|
BoolSetting enableSelfHighlight = {
|
|
|
|
"/highlighting/selfHighlight/nameIsHighlightKeyword", true};
|
2020-10-24 14:33:15 +02:00
|
|
|
BoolSetting showSelfHighlightInMentions = {
|
|
|
|
"/highlighting/selfHighlight/showSelfHighlightInMentions", true};
|
2018-08-29 01:21:36 +02:00
|
|
|
BoolSetting enableSelfHighlightSound = {
|
|
|
|
"/highlighting/selfHighlight/enableSound", true};
|
|
|
|
BoolSetting enableSelfHighlightTaskbar = {
|
|
|
|
"/highlighting/selfHighlight/enableTaskbarFlashing", true};
|
2020-01-25 11:03:10 +01:00
|
|
|
QStringSetting selfHighlightSoundUrl = {
|
|
|
|
"/highlighting/selfHighlightSoundUrl", ""};
|
|
|
|
QStringSetting selfHighlightColor = {"/highlighting/selfHighlightColor",
|
|
|
|
""};
|
|
|
|
|
2023-01-30 11:40:50 +01:00
|
|
|
BoolSetting enableSelfMessageHighlight = {
|
|
|
|
"/highlighting/selfMessageHighlight/enabled", false};
|
|
|
|
BoolSetting showSelfMessageHighlightInMentions = {
|
|
|
|
"/highlighting/selfMessageHighlight/showInMentions", false};
|
|
|
|
QStringSetting selfMessageHighlightColor = {
|
|
|
|
"/highlighting/selfMessageHighlight/color", ""};
|
|
|
|
|
2018-08-29 01:21:36 +02:00
|
|
|
BoolSetting enableWhisperHighlight = {
|
|
|
|
"/highlighting/whisperHighlight/whispersHighlighted", true};
|
|
|
|
BoolSetting enableWhisperHighlightSound = {
|
|
|
|
"/highlighting/whisperHighlight/enableSound", false};
|
|
|
|
BoolSetting enableWhisperHighlightTaskbar = {
|
|
|
|
"/highlighting/whisperHighlight/enableTaskbarFlashing", false};
|
2020-01-25 11:03:10 +01:00
|
|
|
QStringSetting whisperHighlightSoundUrl = {
|
|
|
|
"/highlighting/whisperHighlightSoundUrl", ""};
|
|
|
|
QStringSetting whisperHighlightColor = {
|
|
|
|
"/highlighting/whisperHighlightColor", ""};
|
|
|
|
|
2020-04-15 23:15:45 +02:00
|
|
|
BoolSetting enableRedeemedHighlight = {
|
|
|
|
"/highlighting/redeemedHighlight/highlighted", true};
|
2020-04-18 20:05:05 +02:00
|
|
|
// BoolSetting enableRedeemedHighlightSound = {
|
|
|
|
// "/highlighting/redeemedHighlight/enableSound", false};
|
|
|
|
// BoolSetting enableRedeemedHighlightTaskbar = {
|
|
|
|
// "/highlighting/redeemedHighlight/enableTaskbarFlashing", false};
|
2022-12-03 17:01:49 +01:00
|
|
|
// QStringSetting redeemedHighlightSoundUrl = {
|
|
|
|
// "/highlighting/redeemedHighlightSoundUrl", ""};
|
2020-04-15 23:15:45 +02:00
|
|
|
QStringSetting redeemedHighlightColor = {
|
|
|
|
"/highlighting/redeemedHighlightColor", ""};
|
|
|
|
|
2021-10-02 14:17:24 +02:00
|
|
|
BoolSetting enableFirstMessageHighlight = {
|
|
|
|
"/highlighting/firstMessageHighlight/highlighted", true};
|
2021-11-28 12:19:08 +01:00
|
|
|
// BoolSetting enableFirstMessageHighlightSound = {
|
|
|
|
// "/highlighting/firstMessageHighlight/enableSound", false};
|
|
|
|
// BoolSetting enableFirstMessageHighlightTaskbar = {
|
|
|
|
// "/highlighting/firstMessageHighlight/enableTaskbarFlashing", false};
|
2022-12-03 17:01:49 +01:00
|
|
|
// QStringSetting firstMessageHighlightSoundUrl = {
|
|
|
|
// "/highlighting/firstMessageHighlightSoundUrl", ""};
|
2021-10-02 14:17:24 +02:00
|
|
|
QStringSetting firstMessageHighlightColor = {
|
|
|
|
"/highlighting/firstMessageHighlightColor", ""};
|
|
|
|
|
2022-10-01 01:23:31 +02:00
|
|
|
BoolSetting enableElevatedMessageHighlight = {
|
|
|
|
"/highlighting/elevatedMessageHighlight/highlighted", true};
|
|
|
|
// BoolSetting enableElevatedMessageHighlightSound = {
|
|
|
|
// "/highlighting/elevatedMessageHighlight/enableSound", false};
|
|
|
|
// BoolSetting enableElevatedMessageHighlightTaskbar = {
|
|
|
|
// "/highlighting/elevatedMessageHighlight/enableTaskbarFlashing", false};
|
2022-12-03 17:01:49 +01:00
|
|
|
// QStringSetting elevatedMessageHighlightSoundUrl = {
|
|
|
|
// "/highlighting/elevatedMessageHighlight/soundUrl", ""};
|
2022-10-01 01:23:31 +02:00
|
|
|
QStringSetting elevatedMessageHighlightColor = {
|
|
|
|
"/highlighting/elevatedMessageHighlight/color", ""};
|
|
|
|
|
2020-01-25 11:03:10 +01:00
|
|
|
BoolSetting enableSubHighlight = {
|
|
|
|
"/highlighting/subHighlight/subsHighlighted", true};
|
|
|
|
BoolSetting enableSubHighlightSound = {
|
|
|
|
"/highlighting/subHighlight/enableSound", false};
|
|
|
|
BoolSetting enableSubHighlightTaskbar = {
|
|
|
|
"/highlighting/subHighlight/enableTaskbarFlashing", false};
|
|
|
|
QStringSetting subHighlightSoundUrl = {"/highlighting/subHighlightSoundUrl",
|
|
|
|
""};
|
|
|
|
QStringSetting subHighlightColor = {"/highlighting/subHighlightColor", ""};
|
|
|
|
|
2022-10-08 16:25:32 +02:00
|
|
|
BoolSetting enableThreadHighlight = {
|
|
|
|
"/highlighting/thread/nameIsHighlightKeyword", true};
|
|
|
|
BoolSetting showThreadHighlightInMentions = {
|
|
|
|
"/highlighting/thread/showSelfHighlightInMentions", true};
|
|
|
|
BoolSetting enableThreadHighlightSound = {
|
|
|
|
"/highlighting/thread/enableSound", true};
|
|
|
|
BoolSetting enableThreadHighlightTaskbar = {
|
|
|
|
"/highlighting/thread/enableTaskbarFlashing", true};
|
|
|
|
QStringSetting threadHighlightSoundUrl = {
|
|
|
|
"/highlighting/threadHighlightSoundUrl", ""};
|
|
|
|
QStringSetting threadHighlightColor = {"/highlighting/threadHighlightColor",
|
|
|
|
""};
|
|
|
|
|
2019-04-22 18:32:58 +02:00
|
|
|
QStringSetting highlightColor = {"/highlighting/color", ""};
|
2017-06-11 20:53:43 +02:00
|
|
|
|
2018-10-06 17:51:13 +02:00
|
|
|
BoolSetting longAlerts = {"/highlighting/alerts", false};
|
|
|
|
|
2021-01-16 14:27:19 +01:00
|
|
|
BoolSetting highlightMentions = {"/highlighting/mentions", true};
|
|
|
|
|
2020-10-18 15:16:56 +02:00
|
|
|
/// Filtering
|
|
|
|
BoolSetting excludeUserMessagesFromFilter = {
|
|
|
|
"/filtering/excludeUserMessages", false};
|
|
|
|
|
2018-01-28 14:23:55 +01:00
|
|
|
/// Logging
|
|
|
|
BoolSetting enableLogging = {"/logging/enabled", false};
|
2023-01-15 12:47:22 +01:00
|
|
|
BoolSetting onlyLogListedChannels = {"/logging/onlyLogListedChannels",
|
|
|
|
false};
|
2018-01-28 14:23:55 +01:00
|
|
|
|
2018-06-06 20:30:11 +02:00
|
|
|
QStringSetting logPath = {"/logging/path", ""};
|
2018-05-15 19:44:58 +02:00
|
|
|
|
2018-01-04 02:19:35 +01:00
|
|
|
QStringSetting pathHighlightSound = {"/highlighting/highlightSoundPath",
|
2020-01-25 11:03:10 +01:00
|
|
|
""};
|
2017-12-17 01:19:56 +01:00
|
|
|
|
|
|
|
BoolSetting highlightAlwaysPlaySound = {"/highlighting/alwaysPlaySound",
|
|
|
|
false};
|
|
|
|
|
|
|
|
BoolSetting inlineWhispers = {"/whispers/enableInlineWhispers", true};
|
2019-07-14 16:35:32 +02:00
|
|
|
BoolSetting highlightInlineWhispers = {"/whispers/highlightInlineWhispers",
|
|
|
|
false};
|
2017-04-12 17:46:44 +02:00
|
|
|
|
2018-08-09 15:41:03 +02:00
|
|
|
/// Notifications
|
|
|
|
BoolSetting notificationFlashTaskbar = {"/notifications/enableFlashTaskbar",
|
|
|
|
false};
|
|
|
|
BoolSetting notificationPlaySound = {"/notifications/enablePlaySound",
|
|
|
|
false};
|
2018-08-24 18:05:36 +02:00
|
|
|
BoolSetting notificationCustomSound = {"/notifications/customPlaySound",
|
|
|
|
false};
|
|
|
|
QStringSetting notificationPathSound = {"/notifications/highlightSoundPath",
|
|
|
|
"qrc:/sounds/ping3.wav"};
|
2021-05-09 16:17:04 +02:00
|
|
|
BoolSetting notificationOnAnyChannel = {"/notifications/onAnyChannel",
|
|
|
|
false};
|
2018-08-24 18:05:36 +02:00
|
|
|
|
2018-08-12 18:54:32 +02:00
|
|
|
BoolSetting notificationToast = {"/notifications/enableToast", false};
|
2019-05-10 22:37:44 +02:00
|
|
|
IntSetting openFromToast = {"/notifications/openFromToast",
|
|
|
|
static_cast<int>(ToastReaction::OpenInBrowser)};
|
2018-08-09 15:41:03 +02:00
|
|
|
|
2018-05-06 16:33:00 +02:00
|
|
|
/// External tools
|
|
|
|
// Streamlink
|
|
|
|
BoolSetting streamlinkUseCustomPath = {"/external/streamlink/useCustomPath",
|
|
|
|
false};
|
|
|
|
QStringSetting streamlinkPath = {"/external/streamlink/customPath", ""};
|
|
|
|
QStringSetting preferredQuality = {"/external/streamlink/quality",
|
|
|
|
"Choose"};
|
|
|
|
QStringSetting streamlinkOpts = {"/external/streamlink/options", ""};
|
|
|
|
|
2020-04-11 11:43:35 +02:00
|
|
|
// Custom URI Scheme
|
|
|
|
QStringSetting customURIScheme = {"/external/urischeme"};
|
|
|
|
|
2020-07-05 14:32:10 +02:00
|
|
|
// Image Uploader
|
2020-08-22 18:33:37 +02:00
|
|
|
BoolSetting imageUploaderEnabled = {"/external/imageUploader/enabled",
|
|
|
|
false};
|
|
|
|
QStringSetting imageUploaderUrl = {"/external/imageUploader/url", ""};
|
2020-07-05 14:32:10 +02:00
|
|
|
QStringSetting imageUploaderFormField = {
|
2020-08-22 18:33:37 +02:00
|
|
|
"/external/imageUploader/formField", ""};
|
2020-07-05 14:32:10 +02:00
|
|
|
QStringSetting imageUploaderHeaders = {"/external/imageUploader/headers",
|
|
|
|
""};
|
|
|
|
QStringSetting imageUploaderLink = {"/external/imageUploader/link", ""};
|
|
|
|
QStringSetting imageUploaderDeletionLink = {
|
|
|
|
"/external/imageUploader/deletionLink", ""};
|
|
|
|
|
2018-06-21 22:02:35 +02:00
|
|
|
/// Misc
|
2019-09-02 10:52:01 +02:00
|
|
|
BoolSetting betaUpdates = {"/misc/beta", false};
|
2019-09-13 19:26:52 +02:00
|
|
|
#ifdef Q_OS_LINUX
|
|
|
|
BoolSetting useKeyring = {"/misc/useKeyring", true};
|
|
|
|
#endif
|
2019-09-22 17:12:09 +02:00
|
|
|
BoolSetting enableExperimentalIrc = {"/misc/experimentalIrc", false};
|
2019-09-13 19:26:52 +02:00
|
|
|
|
2018-06-21 22:02:35 +02:00
|
|
|
IntSetting startUpNotification = {"/misc/startUpNotification", 0};
|
2018-06-23 22:17:57 +02:00
|
|
|
QStringSetting currentVersion = {"/misc/currentVersion", ""};
|
2020-12-06 13:04:49 +01:00
|
|
|
|
2019-05-25 11:24:10 +02:00
|
|
|
BoolSetting loadTwitchMessageHistoryOnConnect = {
|
|
|
|
"/misc/twitch/loadMessageHistoryOnConnect", true};
|
2020-12-06 13:04:49 +01:00
|
|
|
IntSetting twitchMessageHistoryLimit = {
|
|
|
|
"/misc/twitch/messageHistoryLimit",
|
|
|
|
800,
|
|
|
|
};
|
2022-11-12 16:53:42 +01:00
|
|
|
IntSetting scrollbackSplitLimit = {
|
|
|
|
"/misc/scrollback/splitLimit",
|
|
|
|
1000,
|
|
|
|
};
|
|
|
|
IntSetting scrollbackUsercardLimit = {
|
|
|
|
"/misc/scrollback/usercardLimit",
|
|
|
|
1000,
|
|
|
|
};
|
2020-12-06 13:04:49 +01:00
|
|
|
|
2022-10-02 15:27:55 +02:00
|
|
|
// Temporary time-gate-overrides
|
|
|
|
EnumSetting<HelixTimegateOverride> helixTimegateRaid = {
|
|
|
|
"/misc/twitch/helix-timegate/raid",
|
|
|
|
HelixTimegateOverride::Timegate,
|
|
|
|
};
|
2022-10-08 13:11:55 +02:00
|
|
|
EnumSetting<HelixTimegateOverride> helixTimegateWhisper = {
|
|
|
|
"/misc/twitch/helix-timegate/whisper",
|
|
|
|
HelixTimegateOverride::Timegate,
|
|
|
|
};
|
2022-10-10 12:56:55 +02:00
|
|
|
EnumSetting<HelixTimegateOverride> helixTimegateVIPs = {
|
|
|
|
"/misc/twitch/helix-timegate/vips",
|
|
|
|
HelixTimegateOverride::Timegate,
|
|
|
|
};
|
2022-11-05 12:20:12 +01:00
|
|
|
EnumSetting<HelixTimegateOverride> helixTimegateModerators = {
|
|
|
|
"/misc/twitch/helix-timegate/moderators",
|
|
|
|
HelixTimegateOverride::Timegate,
|
|
|
|
};
|
2022-10-02 15:27:55 +02:00
|
|
|
|
2022-11-05 10:43:31 +01:00
|
|
|
EnumSetting<HelixTimegateOverride> helixTimegateCommercial = {
|
|
|
|
"/misc/twitch/helix-timegate/commercial",
|
|
|
|
HelixTimegateOverride::Timegate,
|
|
|
|
};
|
|
|
|
|
2019-09-08 14:59:51 +02:00
|
|
|
BoolSetting openLinksIncognito = {"/misc/openLinksIncognito", 0};
|
2018-06-21 22:02:35 +02:00
|
|
|
|
2023-04-08 15:43:38 +02:00
|
|
|
EnumSetting<ThumbnailPreviewMode> emotesTooltipPreview = {
|
|
|
|
"/misc/emotesTooltipPreview",
|
|
|
|
ThumbnailPreviewMode::AlwaysShow,
|
|
|
|
};
|
2018-08-19 16:20:14 +02:00
|
|
|
QStringSetting cachePath = {"/cache/path", ""};
|
2019-10-03 17:36:44 +02:00
|
|
|
BoolSetting restartOnCrash = {"/misc/restartOnCrash", false};
|
2019-10-07 20:23:28 +02:00
|
|
|
BoolSetting attachExtensionToAnyProcess = {
|
|
|
|
"/misc/attachExtensionToAnyProcess", false};
|
2020-05-09 13:14:41 +02:00
|
|
|
BoolSetting askOnImageUpload = {"/misc/askOnImageUpload", true};
|
2021-05-30 13:39:34 +02:00
|
|
|
BoolSetting informOnTabVisibilityToggle = {"/misc/askOnTabVisibilityToggle",
|
|
|
|
true};
|
2022-03-26 14:16:45 +01:00
|
|
|
BoolSetting lockNotebookLayout = {"/misc/lockNotebookLayout", false};
|
2018-08-19 16:20:14 +02:00
|
|
|
|
2019-09-18 11:11:50 +02:00
|
|
|
/// Debug
|
|
|
|
BoolSetting showUnhandledIrcMessages = {"/debug/showUnhandledIrcMessages",
|
|
|
|
false};
|
|
|
|
|
2019-09-11 13:17:36 +02:00
|
|
|
/// UI
|
2019-09-18 11:11:50 +02:00
|
|
|
// Purely QOL settings are here (like last item in a list).
|
2019-09-11 13:17:36 +02:00
|
|
|
IntSetting lastSelectChannelTab = {"/ui/lastSelectChannelTab", 0};
|
|
|
|
IntSetting lastSelectIrcConn = {"/ui/lastSelectIrcConn", 0};
|
|
|
|
|
2023-05-07 15:18:07 +02:00
|
|
|
BoolSetting showSendButton = {"/ui/showSendButton", false};
|
|
|
|
|
2020-02-02 14:31:37 +01:00
|
|
|
// Similarity
|
|
|
|
BoolSetting similarityEnabled = {"/similarity/similarityEnabled", false};
|
|
|
|
BoolSetting colorSimilarDisabled = {"/similarity/colorSimilarDisabled",
|
|
|
|
true};
|
|
|
|
BoolSetting hideSimilar = {"/similarity/hideSimilar", false};
|
2021-08-14 14:28:08 +02:00
|
|
|
BoolSetting hideSimilarBySameUser = {"/similarity/hideSimilarBySameUser",
|
|
|
|
true};
|
2020-02-02 14:31:37 +01:00
|
|
|
BoolSetting hideSimilarMyself = {"/similarity/hideSimilarMyself", false};
|
|
|
|
BoolSetting shownSimilarTriggerHighlights = {
|
|
|
|
"/similarity/shownSimilarTriggerHighlights", false};
|
|
|
|
FloatSetting similarityPercentage = {"/similarity/similarityPercentage",
|
|
|
|
0.9f};
|
|
|
|
IntSetting hideSimilarMaxDelay = {"/similarity/hideSimilarMaxDelay", 5};
|
|
|
|
IntSetting hideSimilarMaxMessagesToCheck = {
|
|
|
|
"/similarity/hideSimilarMaxMessagesToCheck", 3};
|
|
|
|
|
2019-09-27 14:05:03 +02:00
|
|
|
/// Timeout buttons
|
|
|
|
|
|
|
|
ChatterinoSetting<std::vector<TimeoutButton>> timeoutButtons = {
|
|
|
|
"/timeouts/timeoutButtons",
|
2020-09-26 15:18:48 +02:00
|
|
|
{{"s", 1},
|
|
|
|
{"s", 30},
|
|
|
|
{"m", 1},
|
|
|
|
{"m", 5},
|
|
|
|
{"m", 30},
|
|
|
|
{"h", 1},
|
|
|
|
{"d", 1},
|
|
|
|
{"w", 1}}};
|
2019-09-27 14:05:03 +02:00
|
|
|
|
2023-04-02 15:31:53 +02:00
|
|
|
BoolSetting pluginsEnabled = {"/plugins/supportEnabled", false};
|
|
|
|
ChatterinoSetting<std::vector<QString>> enabledPlugins = {
|
|
|
|
"/plugins/enabledPlugins", {}};
|
|
|
|
|
2023-11-26 22:06:12 +01:00
|
|
|
// Advanced
|
|
|
|
EnumStringSetting<SoundBackend> soundBackend = {
|
|
|
|
"/sound/backend",
|
|
|
|
SoundBackend::Miniaudio,
|
|
|
|
};
|
|
|
|
|
2017-09-21 12:15:01 +02:00
|
|
|
private:
|
2023-08-28 17:51:28 +02:00
|
|
|
ChatterinoSetting<std::vector<HighlightPhrase>> highlightedMessagesSetting =
|
|
|
|
{"/highlighting/highlights"};
|
|
|
|
ChatterinoSetting<std::vector<HighlightPhrase>> highlightedUsersSetting = {
|
|
|
|
"/highlighting/users"};
|
|
|
|
ChatterinoSetting<std::vector<HighlightBadge>> highlightedBadgesSetting = {
|
|
|
|
"/highlighting/badges"};
|
|
|
|
ChatterinoSetting<std::vector<HighlightBlacklistUser>>
|
|
|
|
blacklistedUsersSetting = {"/highlighting/blacklist"};
|
|
|
|
ChatterinoSetting<std::vector<IgnorePhrase>> ignoredMessagesSetting = {
|
|
|
|
"/ignore/phrases"};
|
|
|
|
ChatterinoSetting<std::vector<QString>> mutedChannelsSetting = {
|
|
|
|
"/pings/muted"};
|
|
|
|
ChatterinoSetting<std::vector<FilterRecordPtr>> filterRecordsSetting = {
|
|
|
|
"/filtering/filters"};
|
|
|
|
ChatterinoSetting<std::vector<Nickname>> nicknamesSetting = {"/nicknames"};
|
|
|
|
ChatterinoSetting<std::vector<ModerationAction>> moderationActionsSetting =
|
|
|
|
{"/moderation/actions"};
|
|
|
|
ChatterinoSetting<std::vector<ChannelLog>> loggedChannelsSetting = {
|
|
|
|
"/logging/channels"};
|
|
|
|
|
|
|
|
public:
|
|
|
|
SignalVector<HighlightPhrase> highlightedMessages;
|
|
|
|
SignalVector<HighlightPhrase> highlightedUsers;
|
|
|
|
SignalVector<HighlightBadge> highlightedBadges;
|
|
|
|
SignalVector<HighlightBlacklistUser> blacklistedUsers;
|
|
|
|
SignalVector<IgnorePhrase> ignoredMessages;
|
|
|
|
SignalVector<QString> mutedChannels;
|
|
|
|
SignalVector<FilterRecordPtr> filterRecords;
|
|
|
|
SignalVector<Nickname> nicknames;
|
|
|
|
SignalVector<ModerationAction> moderationActions;
|
|
|
|
SignalVector<ChannelLog> loggedChannels;
|
|
|
|
|
|
|
|
bool isHighlightedUser(const QString &username);
|
|
|
|
bool isBlacklistedUser(const QString &username);
|
|
|
|
bool isMutedChannel(const QString &channelName);
|
|
|
|
bool toggleMutedChannel(const QString &channelName);
|
2023-10-08 18:50:48 +02:00
|
|
|
std::optional<QString> matchNickname(const QString &username);
|
2023-08-28 17:51:28 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
void mute(const QString &channelName);
|
|
|
|
void unmute(const QString &channelName);
|
|
|
|
|
2018-01-17 14:14:31 +01:00
|
|
|
void updateModerationActions();
|
2023-08-28 17:51:28 +02:00
|
|
|
|
|
|
|
std::unique_ptr<rapidjson::Document> snapshot_;
|
|
|
|
|
|
|
|
pajlada::Signals::SignalHolder signalHolder;
|
2017-01-05 20:49:13 +01:00
|
|
|
};
|
2017-01-22 23:00:35 +01:00
|
|
|
|
2023-08-28 17:51:28 +02:00
|
|
|
Settings *getSettings();
|
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
} // namespace chatterino
|