void RshareSettings::getPublicChatStyle(QString &stylePath, QString &styleVariant) { stylePath = valueFromGroup("Chat", "StylePublic", ":/qss/chat/compact/public").toString(); // Correct changed standard path for older RetroShare versions before 31.01.2012 (can be removed later) if (stylePath == ":/qss/chat/public") { stylePath = ":/qss/chat/standard/public"; } styleVariant = valueFromGroup("Chat", "StylePublicVariant", "Colored").toString(); }
void RshareSettings::getHistoryChatStyle(QString &stylePath, QString &styleVariant) { stylePath = valueFromGroup("Chat", "StyleHistory", ":/qss/chat/standard/history").toString(); // Correct changed standard path for older RetroShare versions before 31.01.2012 (can be removed later) if (stylePath == ":/qss/chat/history") { stylePath = ":/qss/chat/standard/history"; } styleVariant = valueFromGroup("Chat", "StylePrivateVariant", "").toString(); }
bool RshareSettings::getGroupFrameSettings(GroupFrameSettings::Type type, GroupFrameSettings &groupFrameSettings) { QString group = groupFrameSettingsTypeToString(type); if (group.isEmpty()) { return false; } groupFrameSettings.mOpenAllInNewTab = valueFromGroup(group, "OpenAllInNewTab", false).toBool(); groupFrameSettings.mHideTabBarWithOneTab = valueFromGroup(group, "HideTabBarWithOneTab", true).toBool(); return true; }
QString RshareSettings::getLastDir(enumLastDir type) { QString key = getKeyForLastDir(type); if (key.isEmpty()) { return ""; } return valueFromGroup("LastDir", key).toString(); }
RshareSettings::enumMsgOpen RshareSettings::getMsgOpen() { enumMsgOpen value = (enumMsgOpen) valueFromGroup("MessageDialog", "msgOpen", MSG_OPEN_TAB).toInt(); switch (value) { case MSG_OPEN_TAB: case MSG_OPEN_WINDOW: return value; } return MSG_OPEN_TAB; }
int RshareSettings::getLobbyChatHistoryCount() { return valueFromGroup("Chat", "LobbyChatHistoryCount", 0).toInt(); }
uint16_t RshareSettings::getWebinterfacePort() { return valueFromGroup("Webinterface", "port", 9090).toUInt(); }
int RshareSettings::getChatSearchCharToStartSearch() { return valueFromGroup("Chat", "SearchCharToStartSearch", 4).toUInt(); }
bool RshareSettings::getForumOpenAllInNewTab() { return valueFromGroup("ForumDialog", "OpenAllInNewTab", true).toBool(); }
/* Forums */ bool RshareSettings::getForumMsgSetToReadOnActivate () { return valueFromGroup("ForumDialog", "SetMsgToReadOnActivate", true).toBool(); }
bool RshareSettings::getMsgLoadEmbeddedImages() { return valueFromGroup("MessageDialog", "LoadEmbeddedImages", false).toBool(); }
/* MainWindow */ int RshareSettings::getLastPageInMainWindow () { return valueFromGroup("MainWindow", "LastPage", MainWindow::Network).toInt(); }
bool RshareSettings::getWebinterfaceAllowAllIps() { return valueFromGroup("Webinterface", "allowAllIps", false).toBool(); }
QRgb RshareSettings::getChatSearchFoundColor() { return valueFromGroup("Chat", "SearchMaxSearchFoundColor", QString::number(QColor(255,255,150).rgba())).toUInt(); }
uint RshareSettings::getChatSearchMaxSearchLimitColor() { return valueFromGroup("Chat", "SearchMaxSearchLimitColor", 40).toUInt(); }
bool RshareSettings::getChatSearchSearchWithoutLimit() { return valueFromGroup("Chat", "SearchSearchWithoutLimit", false).toBool(); }
bool RshareSettings::getChatSearchMoveToCursor() { return valueFromGroup("Chat", "SearchMoveToCursor", true).toBool(); }
bool RshareSettings::getChatSearchWholeWords() { return valueFromGroup("Chat", "SearchWholeWords", false).toBool(); }
bool RshareSettings::getChatSearchCaseSensitively() { return valueFromGroup("Chat", "SearchCaseSensitively", false).toBool(); }
int RshareSettings::getPublicChatHistoryCount() { return valueFromGroup("Chat", "PublicChatHistoryCount", 0).toInt(); }
int RshareSettings::getPrivateChatHistoryCount() { return valueFromGroup("Chat", "PrivateChatHistoryCount", 20).toInt(); }
/* Message */ bool RshareSettings::getMsgSetToReadOnActivate () { return valueFromGroup("Message", "SetMsgToReadOnActivate", true).toBool(); }
uint RshareSettings::getStatusBarFlags() { /* Default = All but disc status */ return valueFromGroup("MainWindow", "StatusBarFlags", 0xFFFFFFFF ^ STATUSBAR_DISC).toUInt(); }
/* Channel */ bool RshareSettings::getChannelLoadThread() { return valueFromGroup("Channel", "LoadThread", true).toBool(); }
bool RshareSettings::getWebinterfaceEnabled() { return valueFromGroup("Webinterface", "enabled", false).toBool(); }
bool RshareSettings::getChatSendMessageWithCtrlReturn() { return valueFromGroup("Chat", "SendMessageWithCtrlReturn", false).toBool(); }
bool RshareSettings::getForumExpandNewMessages() { return valueFromGroup("ForumDialog", "ExpandNewMessages", true).toBool(); }
QString RshareSettings::getChatScreenFont() { return valueFromGroup("Chat", "ChatScreenFont").toString(); }
bool RshareSettings::getForumLoadEmbeddedImages() { return valueFromGroup("ForumDialog", "LoadEmbeddedImages", false).toBool(); }
bool RshareSettings::getChatSearchShowBarByDefault() { return valueFromGroup("Chat", "SearchShowBarByDefault", false).toBool(); }