* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU Blank Public License as published by *
+ * it under the terms of the GNU Blank Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU Blank Public License for more details. *
+ * GNU Blank Public License for more details. *
* *
- * You should have received a copy of the GNU Blank Public License *
+ * You should have received a copy of the GNU Blank Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
#include <QVariant>
ChatMonitorSettingsPage::ChatMonitorSettingsPage(QWidget *parent)
- : SettingsPage(tr("Behaviour"), tr("ChatMonitor"), parent) {
+ : SettingsPage(tr("General"), tr("Chat Monitor"), parent) {
ui.setupUi(this);
ui.activateBuffer->setIcon(SmallIcon("go-next"));
configActive = 0;
// fill combobox with operation modes
- ui.operationMode->addItem("Opt-In", ChatViewSettings::OptIn);
- ui.operationMode->addItem("Opt-Out", ChatViewSettings::OptOut);
+ ui.operationMode->addItem(tr("Opt In"), ChatViewSettings::OptIn);
+ ui.operationMode->addItem(tr("Opt Out"), ChatViewSettings::OptOut);
// connect slots
connect(ui.operationMode, SIGNAL(currentIndexChanged(int)), this, SLOT(switchOperationMode(int)));
void ChatMonitorSettingsPage::defaults() {
settings["OperationMode"] = ChatViewSettings::OptOut;
- settings["HighlightAlways"] = false;
+ settings["ShowHighlights"] = false;
settings["Buffers"] = QVariant();
settings["Default"] = true;
load();
loadSettings();
ui.operationMode->setCurrentIndex(settings["OperationMode"].toInt() - 1);
- ui.highlightAlways->setChecked(settings["HighlightAlways"].toBool());
+ ui.showHighlights->setChecked(settings["ShowHighlights"].toBool());
// setup available buffers config (for the bufferview on the left)
configAvailable = new BufferViewConfig(-667);
switchOperationMode(ui.operationMode->findData(ChatViewSettings::OptOut));
settings["OperationMode"] == ChatViewSettings::OptOut;
}
- settings["HighlightAlways"] = chatViewSettings.value("HighlightAlways", false);
+ settings["ShowHighlights"] = chatViewSettings.value("ShowHighlights", false);
settings["Buffers"] = chatViewSettings.value("Buffers", QVariantList());
}
ChatViewSettings chatViewSettings("ChatMonitor");
// save operation mode
chatViewSettings.setValue("OperationMode", settings["OperationMode"]);
- chatViewSettings.setValue("HighlightAlways", settings["HighlightAlways"]);
+ chatViewSettings.setValue("ShowHighlights", settings["ShowHighlights"]);
// save list of active buffers
- QVariantList saveableBufferIdList;
+ QVariantList saveableBufferIdList;
foreach(BufferId id, configActive->bufferList()) {
saveableBufferIdList << QVariant::fromValue<BufferId>(id);
}
foreach (QModelIndex index, inView->selectionModel()->selectedIndexes()) {
BufferId inBufferId = index.data(NetworkModel::BufferIdRole).value<BufferId>();
if(index.data(NetworkModel::ItemTypeRole) == NetworkModel::NetworkItemType) {
- // TODO:
+ // TODO:
// If item is a network: move over all children and skip other selected items of this node
}
else if (index.data(NetworkModel::ItemTypeRole) == NetworkModel::BufferItemType) {
}
}
-void ChatMonitorSettingsPage::on_highlightAlways_toggled(bool state)
+void ChatMonitorSettingsPage::on_showHighlights_toggled(bool state)
{
- settings["HighlightAlways"] = state;
+ settings["ShowHighlights"] = state;
widgetHasChanged();
}
if(newMode == ChatViewSettings::OptIn) {
ui.labelActiveBuffers->setText(tr("Show:"));
- }
+ }
else if(newMode == ChatViewSettings::OptOut) {
ui.labelActiveBuffers->setText(tr("Ignore:"));
}
<rect>
<x>0</x>
<y>0</y>
- <width>672</width>
- <height>529</height>
+ <width>553</width>
+ <height>444</height>
</rect>
</property>
<property name="windowTitle" >
<string>Form</string>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout_3" >
+ <layout class="QVBoxLayout" name="verticalLayout_4" >
<item>
- <layout class="QVBoxLayout" name="verticalLayout_3" >
- <item>
- <spacer name="verticalSpacer_4" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2" >
<item>
<widget class="QLabel" name="label" >
<property name="text" >
</widget>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_2" >
- <item>
- <widget class="QComboBox" name="operationMode" >
- <property name="toolTip" >
- <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+ <widget class="QComboBox" name="operationMode" >
+ <property name="toolTip" >
+ <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Operation modes:</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"><span style=" font-weight:400; text-decoration: underline;">Opt-In:</span> <span style=" font-weight:400;">Only buffers on the right side are shown in chatmonitor</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Opt-Out:</span> Buffers on the right side will be ignored in chatmonitor</p></body></html></string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QCheckBox" name="highlightAlways" >
- <property name="toolTip" >
- <string>Show highlights in chatmonitor even if the originating buffer is ignored</string>
- </property>
- <property name="text" >
- <string>Highlights always</string>
</property>
</widget>
</item>
<item>
- <spacer name="verticalSpacer_3" >
+ <spacer name="horizontalSpacer" >
<property name="orientation" >
- <enum>Qt::Vertical</enum>
+ <enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
- <width>20</width>
- <height>338</height>
+ <width>40</width>
+ <height>20</height>
</size>
</property>
</spacer>
</layout>
</item>
<item>
- <layout class="QVBoxLayout" >
+ <layout class="QHBoxLayout" name="horizontalLayout" >
<item>
- <widget class="QLabel" name="labelAvailableBuffers" >
- <property name="text" >
- <string>Available Buffers:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="BufferView" name="availableBuffers" />
- </item>
- </layout>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout" >
- <item>
- <spacer name="verticalSpacer" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="deactivateBuffer" >
- <property name="toolTip" >
- <string>Move selected buffers to the left</string>
- </property>
- <property name="text" >
- <string/>
- </property>
- <property name="icon" >
- <iconset>
- <normaloff>:/16x16/actions/oxygen/16x16/actions/go-previous.png</normaloff>:/16x16/actions/oxygen/16x16/actions/go-previous.png
- </iconset>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="activateBuffer" >
- <property name="toolTip" >
- <string>Move selected buffers to the right</string>
- </property>
- <property name="text" >
- <string/>
- </property>
- <property name="icon" >
- <iconset>
- <normaloff>:/16x16/actions/oxygen/16x16/actions/go-next.png</normaloff>:/16x16/actions/oxygen/16x16/actions/go-next.png
- </iconset>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer_2" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
+ <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <item>
+ <widget class="QLabel" name="labelAvailableBuffers" >
+ <property name="text" >
+ <string>Available Buffers:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="BufferView" name="availableBuffers" />
+ </item>
+ </layout>
</item>
- </layout>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
- <layout class="QHBoxLayout" name="horizontalLayout" >
+ <layout class="QVBoxLayout" name="verticalLayout" >
<item>
- <widget class="QLabel" name="labelActiveBuffers" >
+ <spacer name="verticalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="deactivateBuffer" >
+ <property name="toolTip" >
+ <string>Move selected buffers to the left</string>
+ </property>
<property name="text" >
- <string>Show:</string>
+ <string/>
+ </property>
+ <property name="icon" >
+ <iconset>
+ <normaloff>:/16x16/actions/oxygen/16x16/actions/go-previous.png</normaloff>:/16x16/actions/oxygen/16x16/actions/go-previous.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="activateBuffer" >
+ <property name="toolTip" >
+ <string>Move selected buffers to the right</string>
+ </property>
+ <property name="text" >
+ <string/>
+ </property>
+ <property name="icon" >
+ <iconset>
+ <normaloff>:/16x16/actions/oxygen/16x16/actions/go-next.png</normaloff>:/16x16/actions/oxygen/16x16/actions/go-next.png</iconset>
</property>
</widget>
</item>
<item>
- <spacer name="horizontalSpacer" >
+ <spacer name="verticalSpacer_2" >
<property name="orientation" >
- <enum>Qt::Horizontal</enum>
+ <enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
- <width>40</width>
- <height>20</height>
+ <width>20</width>
+ <height>40</height>
</size>
</property>
</spacer>
</layout>
</item>
<item>
- <widget class="BufferView" name="activeBuffers" />
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <widget class="QLabel" name="labelActiveBuffers" >
+ <property name="text" >
+ <string>Show:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="BufferView" name="activeBuffers" />
+ </item>
+ </layout>
</item>
</layout>
</item>
+ <item>
+ <widget class="QCheckBox" name="showHighlights" >
+ <property name="toolTip" >
+ <string>Show highlights in chatmonitor even if the originating buffer is ignored</string>
+ </property>
+ <property name="text" >
+ <string>Always show highlighted messages</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="showOwnMessages" >
+ <property name="text" >
+ <string>Show own messages</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<customwidgets>
<header>bufferview.h</header>
</customwidget>
</customwidgets>
-<resources/>
+ <resources/>
<connections/>
</ui>