+void CoreAccountSettings::clearAccounts() {
+ foreach(const QString &key, localChildGroups())
+ removeLocalKey(key);
+}
+
+/***********************************************************************************************/
+// CoreConnectionSettings:
+
+CoreConnectionSettings::CoreConnectionSettings() : ClientSettings("CoreConnection") {}
+
+void CoreConnectionSettings::setNetworkDetectionMode(NetworkDetectionMode mode) {
+ setLocalValue("NetworkDetectionMode", mode);
+}
+
+CoreConnectionSettings::NetworkDetectionMode CoreConnectionSettings::networkDetectionMode() {
+#ifdef HAVE_KDE
+ NetworkDetectionMode def = UseSolid;
+#else
+ NetworkDetectionMode def = UsePingTimeout;
+#endif
+ return (NetworkDetectionMode)localValue("NetworkDetectionMode", def).toInt();
+}
+
+void CoreConnectionSettings::setAutoReconnect(bool autoReconnect) {
+ setLocalValue("AutoReconnect", autoReconnect);
+}
+
+bool CoreConnectionSettings::autoReconnect() {
+ return localValue("AutoReconnect", true).toBool();
+}
+
+void CoreConnectionSettings::setPingTimeoutInterval(int interval) {
+ setLocalValue("PingTimeoutInterval", interval);
+}
+
+int CoreConnectionSettings::pingTimeoutInterval() {
+ return localValue("PingTimeoutInterval", 60).toInt();
+}
+
+void CoreConnectionSettings::setReconnectInterval(int interval) {
+ setLocalValue("ReconnectInterval", interval);
+}
+
+int CoreConnectionSettings::reconnectInterval() {
+ return localValue("ReconnectInterval", 60).toInt();
+}
+
+/***********************************************************************************************/
+// NotificationSettings:
+
+NotificationSettings::NotificationSettings() : ClientSettings("Notification") {
+}
+
+void NotificationSettings::setHighlightList(const QVariantList &highlightList) {
+ setLocalValue("Highlights/CustomList", highlightList);
+}
+
+QVariantList NotificationSettings::highlightList() {
+ return localValue("Highlights/CustomList").toList();
+}
+
+void NotificationSettings::setHighlightNick(NotificationSettings::HighlightNickType highlightNickType) {
+ setLocalValue("Highlights/HighlightNick", highlightNickType);
+}
+
+NotificationSettings::HighlightNickType NotificationSettings::highlightNick() {
+ return (NotificationSettings::HighlightNickType) localValue("Highlights/HighlightNick", CurrentNick).toInt();
+}
+
+void NotificationSettings::setNicksCaseSensitive(bool cs) {
+ setLocalValue("Highlights/NicksCaseSensitive", cs);
+}
+
+bool NotificationSettings::nicksCaseSensitive() {
+ return localValue("Highlights/NicksCaseSensitive", false).toBool();
+}
+
+// ========================================
+// TabCompletionSettings
+// ========================================
+
+TabCompletionSettings::TabCompletionSettings() : ClientSettings("TabCompletion") {
+}
+
+void TabCompletionSettings::setCompletionSuffix(const QString &suffix) {
+ setLocalValue("CompletionSuffix", suffix);
+}
+
+QString TabCompletionSettings::completionSuffix() {
+ return localValue("CompletionSuffix", ": ").toString();
+}
+
+void TabCompletionSettings::setSortMode(SortMode mode) {
+ setLocalValue("SortMode", mode);
+}
+
+TabCompletionSettings::SortMode TabCompletionSettings::sortMode() {
+ return static_cast<SortMode>(localValue("SortMode"), LastActivity);
+}
+
+void TabCompletionSettings::setCaseSensitivity(Qt::CaseSensitivity cs) {
+ setLocalValue("CaseSensitivity", cs);
+}
+
+Qt::CaseSensitivity TabCompletionSettings::caseSensitivity() {
+ return (Qt::CaseSensitivity)localValue("CaseSensitivity", Qt::CaseInsensitive).toInt();
+}