/***************************************************************************
- * Copyright (C) 2005-2018 by the Quassel Project *
+ * Copyright (C) 2005-2020 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
***************************************************************************/
#include "chatviewsettingspage.h"
+
#include "chatviewsettings.h"
#include "client.h"
#include "qtui.h"
#include "qtuistyle.h"
#include "uistyle.h"
-ChatViewSettingsPage::ChatViewSettingsPage(QWidget *parent)
+ChatViewSettingsPage::ChatViewSettingsPage(QWidget* parent)
: SettingsPage(tr("Interface"), tr("Chat View"), parent)
{
ui.setupUi(this);
// [Original tool-tip]
// [Bold 'does not support feature' message]
// [Specific version needed and feature details]
- ui.senderPrefixComboBox->setToolTip(
- QString("<b>%2</b><br/>%3").arg(
- tr("Your Quassel core does not support this feature"),
- tr("You need a Quassel core v0.13.0 or newer in order to show sender "
- "modes before nicknames.")));
+ ui.senderPrefixComboBox->setToolTip(QString("<b>%2</b><br/>%3")
+ .arg(tr("Your Quassel core does not support this feature"),
+ tr("You need a Quassel core v0.13.0 or newer in order to show sender "
+ "modes before nicknames.")));
}
initAutoWidgets();
initSenderPrefixComboBox();
}
-
void ChatViewSettingsPage::initSenderPrefixComboBox()
{
// Fill combobox with sender prefix modes
// Do not change ComboBox ordering without also adjusting chatviewsettingspage.ui "defaultValue"
// and UiStyle::SenderPrefixMode
- ui.senderPrefixComboBox->addItem(tr("No modes"),
- static_cast<int>(UiStyle::SenderPrefixMode::NoModes));
- ui.senderPrefixComboBox->addItem(tr("Highest mode"),
- static_cast<int>(UiStyle::SenderPrefixMode::HighestMode));
- ui.senderPrefixComboBox->addItem(tr("All modes"),
- static_cast<int>(UiStyle::SenderPrefixMode::AllModes));
+ ui.senderPrefixComboBox->addItem(tr("No modes"), static_cast<int>(UiStyle::SenderPrefixMode::NoModes));
+ ui.senderPrefixComboBox->addItem(tr("Highest mode"), static_cast<int>(UiStyle::SenderPrefixMode::HighestMode));
+ ui.senderPrefixComboBox->addItem(tr("All modes"), static_cast<int>(UiStyle::SenderPrefixMode::AllModes));
}
-
void ChatViewSettingsPage::save()
{
- bool needsStyleReload = SettingsPage::hasChanged(ui.customChatViewFont)
- || SettingsPage::hasChanged(ui.chatViewFont);
+ bool needsStyleReload = SettingsPage::hasChanged(ui.customChatViewFont) || SettingsPage::hasChanged(ui.chatViewFont);
// Save the general settings
SettingsPage::save();