QtUiStyle::QtUiStyle(QObject *parent) : UiStyle(parent)
{
ChatViewSettings s;
- s.notify("UseCustomTimestampFormat", this, SLOT(updateUseCustomTimestampFormat()));
- updateUseCustomTimestampFormat();
- s.notify("TimestampFormat", this, SLOT(updateTimestampFormatString()));
- updateTimestampFormatString();
- s.notify("SenderPrefixMode", this, SLOT(updateSenderPrefixDisplay()));
- updateSenderPrefixDisplay();
- s.notify("ShowSenderBrackets", this, SLOT(updateShowSenderBrackets()));
- updateShowSenderBrackets();
+ s.initAndNotify("UseCustomTimestampFormat", this, &QtUiStyle::updateUseCustomTimestampFormat);
+ s.initAndNotify("TimestampFormat", this, &QtUiStyle::updateTimestampFormatString);
+ s.initAndNotify("SenderPrefixMode", this, &QtUiStyle::updateSenderPrefixDisplay);
+ s.initAndNotify("ShowSenderBrackets", this, &QtUiStyle::updateShowSenderBrackets);
// If no style sheet exists, generate it on first run.
initializeSettingsQss();
}
-QtUiStyle::~QtUiStyle() {}
-
void QtUiStyle::updateUseCustomTimestampFormat()
{
ChatViewSettings s;
void QtUiStyle::updateSenderPrefixDisplay()
{
ChatViewSettings s;
- setSenderPrefixDisplay(s.SenderPrefixDisplay());
+ setSenderPrefixDisplay(s.senderPrefixDisplay());
}
void QtUiStyle::updateShowSenderBrackets()
out << "\n// NickView Colors\n"
<< "NickListItem[type=\"category\"] { foreground: " << color("DefaultBuffer", uiColors) << "; }\n"
<< "NickListItem[type=\"user\"] { foreground: " << color("OnlineNick", uiColors) << "; }\n"
- << "NickListItem[type=\"user\", state=\"away\"] { foreground: " << color("AwayNick", uiColors) << "; }\n";
+ << R"(NickListItem[type="user", state="away"] { foreground: )" << color("AwayNick", uiColors) << "; }\n";
}
settingsQss.close();