- QtUiSettings qtUiSettings;
- QString showFieldSettingId = QString("ChatView/%1/showFields").arg(idString());
- QString showOwnMessagesSettingId = QString("ChatView/%1/showOwnMsgs").arg(idString());
-
- _showFields = qtUiSettings.value(showFieldSettingId, AllFields).toInt();
- _showOwnMessages = qtUiSettings.value(showOwnMessagesSettingId, true).toBool();
- qtUiSettings.notify(showFieldSettingId, this, SLOT(showFieldsSettingsChanged(const QVariant &)));
- qtUiSettings.notify(showOwnMessagesSettingId, this, SLOT(showOwnMessagesSettingChanged(const QVariant &)));
+ // Global configuration
+ ChatViewSettings defaultSettings;
+ _showSenderBrackets = defaultSettings.showSenderBrackets();
+ defaultSettings.notify("ShowSenderBrackets", this, SLOT(showSenderBracketsSettingChanged(const QVariant &)));
+
+ // Chat Monitor specific configuration
+ ChatViewSettings viewSettings(idString());
+ _showFields = viewSettings.value("ShowFields", AllFields).toInt();
+ _showOwnMessages = viewSettings.value("ShowOwnMsgs", true).toBool();
+ viewSettings.notify("ShowFields", this, SLOT(showFieldsSettingChanged(const QVariant &)));
+ viewSettings.notify("ShowOwnMsgs", this, SLOT(showOwnMessagesSettingChanged(const QVariant &)));
+
+ // ChatMonitorSettingsPage
+ QString showHighlightsSettingsId = "ShowHighlights";
+ QString operationModeSettingsId = "OperationMode";
+ QString buffersSettingsId = "Buffers";
+ QString showBacklogSettingsId = "ShowBacklog";
+ QString includeReadSettingsId = "IncludeRead";
+
+ _showHighlights = viewSettings.value(showHighlightsSettingsId, false).toBool();
+ _operationMode = viewSettings.value(operationModeSettingsId, 0).toInt();
+ // read configured list of buffers to monitor/ignore
+ foreach(QVariant v, viewSettings.value(buffersSettingsId, QVariant()).toList())
+ _bufferIds << v.value<BufferId>();
+ _showBacklog = viewSettings.value(showBacklogSettingsId, true).toBool();
+ _includeRead = viewSettings.value(includeReadSettingsId, true).toBool();
+
+ viewSettings.notify(showHighlightsSettingsId, this, SLOT(showHighlightsSettingChanged(const QVariant &)));
+ viewSettings.notify(operationModeSettingsId, this, SLOT(operationModeSettingChanged(const QVariant &)));
+ viewSettings.notify(buffersSettingsId, this, SLOT(buffersSettingChanged(const QVariant &)));
+ viewSettings.notify(showBacklogSettingsId, this, SLOT(showBacklogSettingChanged(const QVariant &)));
+ viewSettings.notify(includeReadSettingsId, this, SLOT(includeReadSettingChanged(const QVariant &)));