bool ChatViewSettings::showWebPreview() const
{
return localValue("ShowWebPreview", false).toBool();
}
bool ChatViewSettings::showWebPreview() const
{
return localValue("ShowWebPreview", false).toBool();
}
void ChatViewSettings::enableWebPreview(bool enabled)
{
setLocalValue("ShowWebPreview", enabled);
}
void ChatViewSettings::enableWebPreview(bool enabled)
{
setLocalValue("ShowWebPreview", enabled);
}
bool ChatViewSettings::useCustomTimestampFormat() const
{
return localValue("UseCustomTimestampFormat", false).toBool();
}
bool ChatViewSettings::useCustomTimestampFormat() const
{
return localValue("UseCustomTimestampFormat", false).toBool();
}
void ChatViewSettings::setUseCustomTimestampFormat(bool enabled)
{
setLocalValue("UseCustomTimestampFormat", enabled);
}
void ChatViewSettings::setUseCustomTimestampFormat(bool enabled)
{
setLocalValue("UseCustomTimestampFormat", enabled);
}
QString ChatViewSettings::timestampFormatString() const
{
// Include a space in the default TimestampFormat to give the timestamp a small bit of padding
QString ChatViewSettings::timestampFormatString() const
{
// Include a space in the default TimestampFormat to give the timestamp a small bit of padding
UiStyle::SenderPrefixMode ChatViewSettings::senderPrefixDisplay() const
{
return static_cast<UiStyle::SenderPrefixMode>(
UiStyle::SenderPrefixMode ChatViewSettings::senderPrefixDisplay() const
{
return static_cast<UiStyle::SenderPrefixMode>(
- localValue("SenderPrefixMode",
- QVariant::fromValue<UiStyle::SenderPrefixMode>(
- UiStyle::SenderPrefixMode::HighestMode)).toInt());
+ localValue("SenderPrefixMode", QVariant::fromValue(UiStyle::SenderPrefixMode::HighestMode)).toInt());
// Cast the QVariant to an integer, then cast that to the enum class.
// .canConvert<UiStyle::SenderPrefixMode>() returned true, but
// .value<UiStyle::SenderPrefixMode>(); always gave the default value 0.
// Cast the QVariant to an integer, then cast that to the enum class.
// .canConvert<UiStyle::SenderPrefixMode>() returned true, but
// .value<UiStyle::SenderPrefixMode>(); always gave the default value 0.
bool ChatViewSettings::showSenderBrackets() const
{
return localValue("ShowSenderBrackets", false).toBool();
}
bool ChatViewSettings::showSenderBrackets() const
{
return localValue("ShowSenderBrackets", false).toBool();
}
void ChatViewSettings::enableSenderBrackets(bool enabled)
{
setLocalValue("ShowSenderBrackets", enabled);
}
void ChatViewSettings::enableSenderBrackets(bool enabled)
{
setLocalValue("ShowSenderBrackets", enabled);
}
QString ChatViewSettings::webSearchUrlFormatString() const
{
return localValue("WebSearchUrlFormat", "https://www.google.com/search?q=%s").toString();
}
QString ChatViewSettings::webSearchUrlFormatString() const
{
return localValue("WebSearchUrlFormat", "https://www.google.com/search?q=%s").toString();
}