src/qtui/serverlist.h
src/qtui/settingsdlg.cpp
src/qtui/settingsdlg.h
+src/qtui/settingspages
src/qtui/settingspages.cpp
src/qtui/settingspages.h
+src/qtui/settingspages/settingspages.pri
+src/qtui/settingspages/sp_uistyle.cpp
+src/qtui/settingspages/sp_uistyle.h
src/qtui/topicwidget.cpp
src/qtui/topicwidget.h
src/qtui/ui
src/qtui/ui/mainwin.ui
src/qtui/ui/networkeditdlg.ui
src/qtui/ui/nickeditdlg.ui
+src/qtui/ui/nicklistwidget.ui
src/qtui/ui/servereditdlg.ui
src/qtui/ui/serverlistdlg.ui
src/qtui/ui/settingsdlg.ui
src/uisupport/uisettings.h
src/uisupport/uistyle.cpp
src/uisupport/uistyle.h
+src/uisupport/uistylesettings.cpp
+src/uisupport/uistylesettings.h
src/uisupport/uisupport.pri
return res;
}
-QStringList Settings::localChildKeys() {
- beginGroup(group);
+QStringList Settings::localChildKeys(const QString &rootkey) {
+ QString g;
+ if(rootkey.isEmpty()) g = group;
+ else g = QString("%1/%2").arg(group, rootkey);
+ beginGroup(g);
QStringList res = childKeys();
endGroup();
return res;
}
-QStringList Settings::localChildGroups() {
- beginGroup(group);
+QStringList Settings::localChildGroups(const QString &rootkey) {
+ QString g;
+ if(rootkey.isEmpty()) g = group;
+ else g = QString("%1/%2").arg(group, rootkey);
+ beginGroup(g);
QStringList res = childGroups();
endGroup();
return res;
public:
virtual ~Settings();
- static void setGuiValue(QString, QVariant) {};
- static QVariant guiValue(QString, QVariant = QVariant()) { return QVariant(); }
+ //static void setGuiValue(QString, QVariant) {};
+ //static QVariant guiValue(QString, QVariant = QVariant()) { return QVariant(); }
+
+ enum Mode { Default, Custom };
+
protected:
Settings(QString group = "General");
void setGroup(QString group);
virtual QStringList allLocalKeys();
- virtual QStringList localChildKeys();
- virtual QStringList localChildGroups();
+ virtual QStringList localChildKeys(const QString &rootkey = QString());
+ virtual QStringList localChildGroups(const QString &rootkey = QString());
//virtual QStringList allSessionKeys() = 0;
virtual QStringList sessionKeys() = 0;
/* Exception classes for message handling */
Server::ParseError::ParseError(QString cmd, QString prefix, QStringList params) {
+ Q_UNUSED(prefix);
_msg = QString("Command Parse Error: ") + cmd + params.join(" ");
}
Server::UnknownCmdError::UnknownCmdError(QString cmd, QString prefix, QStringList params) {
- _msg = QString("Unknown Command: ") + cmd;
+ Q_UNUSED(prefix);
+ _msg = QString("Unknown Command: ") + cmd + params.join(" ");
}
***************************************************************************/
#include "qtopiauistyle.h"
+#include "settings.h"
-QtopiaUiStyle::QtopiaUiStyle() : UiStyle() {
+QtopiaUiStyle::QtopiaUiStyle() : UiStyle("QtopiaUiStyle") {
QTextCharFormat def;
def.setForeground(QBrush("#000000"));
def.setFont(QFont("Verdana",5));
- setFormat(None, def);
+ setFormat(None, def, Settings::Default);
// We need to just set our internal formats; everything else is done by the base class...
QTextCharFormat plainMsg;
plainMsg.setForeground(QBrush("#000000"));
- setFormat(PlainMsg, plainMsg);
+ setFormat(PlainMsg, plainMsg, Settings::Default);
QTextCharFormat notice;
notice.setForeground(QBrush("#000080"));
- setFormat(NoticeMsg, notice);
+ setFormat(NoticeMsg, notice, Settings::Default);
QTextCharFormat server;
server.setForeground(QBrush("#000080"));
- setFormat(ServerMsg, server);
+ setFormat(ServerMsg, server, Settings::Default);
QTextCharFormat error;
error.setForeground(QBrush("#ff0000"));
- setFormat(ErrorMsg, error);
+ setFormat(ErrorMsg, error, Settings::Default);
QTextCharFormat join;
join.setForeground(QBrush("#008000"));
- setFormat(JoinMsg, join);
+ setFormat(JoinMsg, join, Settings::Default);
QTextCharFormat part;
part.setForeground(QBrush("#ff0000"));
- setFormat(PartMsg, part);
+ setFormat(PartMsg, part, Settings::Default);
QTextCharFormat quit;
quit.setForeground(QBrush("#ff0000"));
- setFormat(QuitMsg, quit);
+ setFormat(QuitMsg, quit, Settings::Default);
QTextCharFormat kick;
kick.setForeground(QBrush("#ff0000"));
- setFormat(KickMsg, kick);
+ setFormat(KickMsg, kick, Settings::Default);
QTextCharFormat nren;
nren.setForeground(QBrush("#6a5acd"));
- setFormat(RenameMsg, nren);
+ setFormat(RenameMsg, nren, Settings::Default);
QTextCharFormat mode;
mode.setForeground(QBrush("#4682b4"));
- setFormat(ModeMsg, mode);
+ setFormat(ModeMsg, mode, Settings::Default);
QTextCharFormat action;
action.setFontItalic(true);
action.setForeground(QBrush("#8b008b"));
- setFormat(ActionMsg, action);
+ setFormat(ActionMsg, action, Settings::Default);
// Internal message element formats
QTextCharFormat ts;
ts.setForeground(QBrush("#808080"));
- setFormat(Timestamp, ts);
+ setFormat(Timestamp, ts, Settings::Default);
QTextCharFormat sender;
sender.setAnchor(true);
sender.setForeground(QBrush("#000080"));
- setFormat(Sender, sender);
+ setFormat(Sender, sender, Settings::Default);
QTextCharFormat nick;
nick.setAnchor(true);
nick.setFontWeight(QFont::Bold);
- setFormat(Nick, nick);
+ setFormat(Nick, nick, Settings::Default);
QTextCharFormat hostmask;
hostmask.setFontItalic(true);
- setFormat(Hostmask, hostmask);
+ setFormat(Hostmask, hostmask, Settings::Default);
QTextCharFormat channel;
channel.setAnchor(true);
channel.setFontWeight(QFont::Bold);
- setFormat(ChannelName, channel);
+ setFormat(ChannelName, channel, Settings::Default);
QTextCharFormat flags;
flags.setFontWeight(QFont::Bold);
- setFormat(ModeFlags, flags);
+ setFormat(ModeFlags, flags, Settings::Default);
QTextCharFormat url;
url.setFontUnderline(true);
url.setAnchor(true);
- setFormat(Url, url);
+ setFormat(Url, url, Settings::Default);
}
#include "nicklistwidget.h"
#include "serverlist.h"
#include "settingsdlg.h"
-//#include "settingspage.h"
#include "signalproxy.h"
#include "topicwidget.h"
#include "selectionmodelsynchronizer.h"
#include "mappedselectionmodel.h"
+#include "settingspages/fontssettingspage.h"
+
MainWin::MainWin(QtUi *_gui, QWidget *parent) : QMainWindow(parent), gui(_gui) {
ui.setupUi(this);
setWindowTitle("Quassel IRC");
setupMenus();
setupViews();
+ setupSettingsDlg();
// create nick dock
nickDock = new QDockWidget("Nicks", this);
ui.menuViews->addAction(dock->toggleViewAction());
+ //showSettingsDlg();
}
MainWin::~MainWin() {
netViews.append(dock);
}
+void MainWin::setupSettingsDlg() {
+ settingsDlg->registerSettingsPage(new FontsSettingsPage(settingsDlg));
+
+}
+
void MainWin::connectedToCore() {
foreach(BufferInfo id, Client::allBufferInfos()) {
emit requestBacklog(id, 1000, -1);
for(ui, FORMNAMES) {
FRMS += ui/$${ui}
}
+
+# Include settingspages
+include(settingspages/settingspages.pri)
+for(page, SETTINGSPAGES) {
+ SRCS += settingspages/$${page}settingspage.cpp
+ HDRS += settingspages/$${page}settingspage.h
+ FRMS += settingspages/$${page}settingspage.ui
+}
#include "qtuistyle.h"
-QtUiStyle::QtUiStyle() : UiStyle() {
+QtUiStyle::QtUiStyle() : UiStyle("QtUiStyle") {
// We need to just set our internal formats; everything else is done by the base class...
// Internal message formats
QTextCharFormat plainMsg;
plainMsg.setForeground(QBrush("black"));
- setFormat(PlainMsg, plainMsg);
+ setFormat(PlainMsg, plainMsg, Settings::Default);
QTextCharFormat notice;
notice.setForeground(QBrush("navy"));
- setFormat(NoticeMsg, notice);
+ setFormat(NoticeMsg, notice, Settings::Default);
QTextCharFormat server;
server.setForeground(QBrush("navy"));
- setFormat(ServerMsg, server);
+ setFormat(ServerMsg, server, Settings::Default);
QTextCharFormat error;
error.setForeground(QBrush("red"));
- setFormat(ErrorMsg, error);
+ setFormat(ErrorMsg, error, Settings::Default);
QTextCharFormat join;
join.setForeground(QBrush("green"));
- setFormat(JoinMsg, join);
+ setFormat(JoinMsg, join, Settings::Default);
QTextCharFormat part;
part.setForeground(QBrush("indianred"));
- setFormat(PartMsg, part);
+ setFormat(PartMsg, part, Settings::Default);
QTextCharFormat quit;
quit.setForeground(QBrush("indianred"));
- setFormat(QuitMsg, quit);
+ setFormat(QuitMsg, quit, Settings::Default);
QTextCharFormat kick;
kick.setForeground(QBrush("indianred"));
- setFormat(KickMsg, kick);
+ setFormat(KickMsg, kick, Settings::Default);
QTextCharFormat nren;
nren.setForeground(QBrush("magenta"));
- setFormat(RenameMsg, nren);
+ setFormat(RenameMsg, nren, Settings::Default);
QTextCharFormat mode;
mode.setForeground(QBrush("steelblue"));
- setFormat(ModeMsg, mode);
+ setFormat(ModeMsg, mode, Settings::Default);
QTextCharFormat action;
action.setFontItalic(true);
action.setForeground(QBrush("darkmagenta"));
- setFormat(ActionMsg, action);
+ setFormat(ActionMsg, action, Settings::Default);
// Internal message element formats
QTextCharFormat ts;
ts.setForeground(QBrush("grey"));
- setFormat(Timestamp, ts);
+ setFormat(Timestamp, ts, Settings::Default);
QTextCharFormat sender;
sender.setAnchor(true);
sender.setForeground(QBrush("navy"));
- setFormat(Sender, sender);
+ setFormat(Sender, sender, Settings::Default);
QTextCharFormat nick;
nick.setAnchor(true);
nick.setFontWeight(QFont::Bold);
- setFormat(Nick, nick);
+ setFormat(Nick, nick, Settings::Default);
QTextCharFormat hostmask;
hostmask.setFontItalic(true);
- setFormat(Hostmask, hostmask);
+ setFormat(Hostmask, hostmask, Settings::Default);
QTextCharFormat channel;
channel.setAnchor(true);
channel.setFontWeight(QFont::Bold);
- setFormat(ChannelName, channel);
+ setFormat(ChannelName, channel, Settings::Default);
QTextCharFormat flags;
flags.setFontWeight(QFont::Bold);
- setFormat(ModeFlags, flags);
+ setFormat(ModeFlags, flags, Settings::Default);
QTextCharFormat url;
url.setFontUnderline(true);
url.setAnchor(true);
- setFormat(Url, url);
+ setFormat(Url, url, Settings::Default);
}
SettingsDlg::SettingsDlg(QWidget *parent) : QDialog(parent) {
ui.setupUi(this);
- ui.settingsFrame->setWidgetResizable(true);
- ui.settingsFrame->setWidget(ui.settingsStack);
+ //ui.settingsFrame->setWidgetResizable(true);
+ //ui.settingsFrame->setWidget(ui.settingsStack);
ui.settingsTree->setRootIsDecorated(false);
connect(ui.settingsTree, SIGNAL(itemSelectionChanged()), this, SLOT(itemSelected()));
void SettingsDlg::registerSettingsPage(SettingsPage *sp) {
- sp->setParent(this);
+ sp->setParent(ui.settingsStack);
ui.settingsStack->addWidget(sp);
QTreeWidgetItem *cat;
cat->setExpanded(true);
cat->setFlags(Qt::ItemIsEnabled);
} else cat = cats[0];
- QTreeWidgetItem *p = new QTreeWidgetItem(cat, QStringList(sp->title()));
+ new QTreeWidgetItem(cat, QStringList(sp->title()));
pages[QString("%1$%2").arg(sp->category(), sp->title())] = sp;
+ updateGeometry();
+ // TESTING
+ //selectPage(sp->category(), sp->title());
}
void SettingsDlg::selectPage(const QString &cat, const QString &title) {
QString cat = parent->text(0);
QString title = items[0]->text(0);
selectPage(cat, title);
+ ui.pageTitle->setText(title);
}
}
void SettingsDlg::buttonClicked(QAbstractButton *button) {
- switch(ui.buttonBox->buttonRole(button)) {
- case QDialogButtonBox::AcceptRole:
+ switch(ui.buttonBox->standardButton(button)) {
+ case QDialogButtonBox::Ok:
applyChanges();
accept();
break;
- case QDialogButtonBox::ApplyRole:
+ case QDialogButtonBox::Apply:
applyChanges();
break;
- case QDialogButtonBox::RejectRole:
+ case QDialogButtonBox::Cancel:
reject();
break;
+ case QDialogButtonBox::Reset:
+ reload();
+ break;
+ case QDialogButtonBox::RestoreDefaults:
+ loadDefaults();
+ break;
default:
break;
}
}
void SettingsDlg::applyChanges() {
- //SettingsInterface *sp = qobject_cast<SettingsInterface *>(ui.settingsStack->currentWidget());
- //if(sp) sp->applyChanges();
+ foreach(SettingsPage *page, pages.values()) {
+ page->save();
+ }
}
+void SettingsDlg::reload() {
+ SettingsPage *page = qobject_cast<SettingsPage *>(ui.settingsStack->currentWidget());
+ if(page) page->load();
+}
+
+void SettingsDlg::loadDefaults() {
+ SettingsPage *page = qobject_cast<SettingsPage *>(ui.settingsStack->currentWidget());
+ if(page) page->defaults();
+}
void itemSelected();
void buttonClicked(QAbstractButton *);
void applyChanges();
+ void reload();
+ void loadDefaults();
private:
Ui::SettingsDlg ui;
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2005-08 by the Quassel IRC Team *
+ * devel@quassel-irc.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General 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 General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General 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 "fontssettingspage.h"
+
+#include "qtui.h"
+
+#include <QFontDialog>
+
+FontsSettingsPage::FontsSettingsPage(QWidget *parent)
+ : SettingsPage(tr("Appearance"), tr("Fonts"), parent) {
+
+ ui.setupUi(this);
+ mapper = new QSignalMapper(this);
+ connect(ui.chooseGeneral, SIGNAL(clicked()), mapper, SLOT(map()));
+ connect(ui.chooseTopic, SIGNAL(clicked()), mapper, SLOT(map()));
+ connect(ui.chooseNickList, SIGNAL(clicked()), mapper, SLOT(map()));
+ connect(ui.chooseBufferView, SIGNAL(clicked()), mapper, SLOT(map()));
+ connect(ui.chooseChatMessages, SIGNAL(clicked()), mapper, SLOT(map()));
+ connect(ui.chooseNicks, SIGNAL(clicked()), mapper, SLOT(map()));
+ connect(ui.chooseTimestamp, SIGNAL(clicked()), mapper, SLOT(map()));
+
+ mapper->setMapping(ui.chooseGeneral, ui.demoGeneral);
+ mapper->setMapping(ui.chooseTopic, ui.demoTopic);
+ mapper->setMapping(ui.chooseNickList, ui.demoNickList);
+ mapper->setMapping(ui.chooseBufferView, ui.demoBufferView);
+ mapper->setMapping(ui.chooseChatMessages, ui.demoChatMessages);
+ mapper->setMapping(ui.chooseNicks, ui.demoNicks);
+ mapper->setMapping(ui.chooseTimestamp, ui.demoTimestamp);
+
+ connect(mapper, SIGNAL(mapped(QWidget *)), this, SLOT(chooseFont(QWidget *)));
+
+ load();
+
+}
+
+bool FontsSettingsPage::hasChanged() const {
+
+ return false;
+}
+
+void FontsSettingsPage::defaults() {
+ load(Settings::Default);
+
+}
+
+void FontsSettingsPage::load() {
+ load(Settings::Custom);
+ changeState(false);
+}
+
+void FontsSettingsPage::load(Settings::Mode mode) {
+ QTextCharFormat chatFormat = QtUi::style()->format(UiStyle::None, mode);
+ setFont(ui.demoChatMessages, chatFormat.font());
+ QTextCharFormat nicksFormat = QtUi::style()->format(UiStyle::Sender, mode);
+ if(nicksFormat.hasProperty(QTextFormat::FontFamily)) {
+ setFont(ui.demoNicks, nicksFormat.font());
+ ui.checkNicks->setChecked(true);
+ } else {
+ setFont(ui.demoNicks, chatFormat.font());
+ ui.checkNicks->setChecked(false);
+ }
+ QTextCharFormat timestampFormat = QtUi::style()->format(UiStyle::Timestamp, mode);
+ if(timestampFormat.hasProperty(QTextFormat::FontFamily)) {
+ setFont(ui.demoTimestamp, timestampFormat.font());
+ ui.checkTimestamp->setChecked(true);
+ } else {
+ setFont(ui.demoTimestamp, chatFormat.font());
+ ui.checkTimestamp->setChecked(false);
+ }
+
+}
+
+void FontsSettingsPage::save() {
+ QTextCharFormat chatFormat = QtUi::style()->format(UiStyle::None);
+ chatFormat.setFont(ui.demoChatMessages->font());
+ QtUi::style()->setFormat(UiStyle::None, chatFormat, Settings::Custom);
+ if(ui.checkNicks->checkState() == Qt::Checked) {
+ QTextCharFormat nicksFormat = QtUi::style()->format(UiStyle::Sender);
+ nicksFormat.setFont(ui.demoNicks->font());
+ QtUi::style()->setFormat(UiStyle::Sender, nicksFormat, Settings::Custom);
+ }
+ if(ui.checkTimestamp->checkState() == Qt::Checked) {
+ QTextCharFormat timestampFormat = QtUi::style()->format(UiStyle::Timestamp);
+ timestampFormat.setFont(ui.demoTimestamp->font());
+ QtUi::style()->setFormat(UiStyle::Timestamp, timestampFormat, Settings::Custom);
+ }
+ changeState(false);
+}
+
+void FontsSettingsPage::setFont(QLabel *label, const QFont &font) {
+ QFontInfo fontInfo(font);
+ label->setFont(font);
+ label->setText(QString("%1 %2").arg(fontInfo.family()).arg(fontInfo.pointSize()));
+}
+
+void FontsSettingsPage::chooseFont(QWidget *widget) {
+ QLabel *label = qobject_cast<QLabel *>(widget);
+ Q_ASSERT(label);
+ bool ok;
+ QFont font = QFontDialog::getFont(&ok, label->font());
+ if(ok) {
+ setFont(label, font);
+ }
+}
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2005-08 by the Quassel IRC Team *
+ * devel@quassel-irc.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General 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 General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General 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. *
+ ***************************************************************************/
+
+#ifndef _FONTSSETTINGSPAGE_H_
+#define _FONTSSETTINGSPAGE_H_
+
+#include "settings.h"
+#include "settingspage.h"
+
+#include "ui_fontssettingspage.h"
+
+class QSignalMapper;
+
+class FontsSettingsPage : public SettingsPage {
+ Q_OBJECT
+
+ public:
+ FontsSettingsPage(QWidget *parent = 0);
+
+ bool hasChanged() const;
+
+ public slots:
+ void save();
+ void load();
+ void defaults();
+
+ private slots:
+ void load(Settings::Mode mode);
+ void setFont(QLabel *label, const QFont &font);
+ void chooseFont(QWidget *label);
+
+ private:
+ Ui::FontsSettingsPage ui;
+
+ QSignalMapper *mapper;
+
+};
+
+#endif
--- /dev/null
+<ui version="4.0" >
+ <class>FontsSettingsPage</class>
+ <widget class="QWidget" name="FontsSettingsPage" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>524</width>
+ <height>400</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="title" >
+ <string>Custom Application Fonts</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <property name="checked" >
+ <bool>false</bool>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>General:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLabel" name="demoGeneral" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text" >
+ <string>Font</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2" >
+ <widget class="QPushButton" name="chooseGeneral" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Choose...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QCheckBox" name="checkTopic" >
+ <property name="text" >
+ <string>Topic:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLabel" name="demoTopic" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text" >
+ <string>Font</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <widget class="QPushButton" name="chooseTopic" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Choose...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QCheckBox" name="checkBufferView" >
+ <property name="text" >
+ <string>Buffer Views:</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QLabel" name="demoBufferView" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text" >
+ <string>Font</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2" >
+ <widget class="QPushButton" name="chooseBufferView" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Choose...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QCheckBox" name="checkNickList" >
+ <property name="text" >
+ <string>Nick List:</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QLabel" name="demoNickList" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text" >
+ <string>Font</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2" >
+ <widget class="QPushButton" name="chooseNickList" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Choose...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2" >
+ <property name="title" >
+ <string>Chat Widget</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>General:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLabel" name="demoChatMessages" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text" >
+ <string>Font</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2" >
+ <widget class="QPushButton" name="chooseChatMessages" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Choose...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLabel" name="demoNicks" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text" >
+ <string>Font</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <widget class="QPushButton" name="chooseNicks" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Choose...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QLabel" name="demoTimestamp" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text" >
+ <string>Font</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2" >
+ <widget class="QPushButton" name="chooseTimestamp" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Choose...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QCheckBox" name="checkNicks" >
+ <property name="text" >
+ <string>Nicks:</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QCheckBox" name="checkTimestamp" >
+ <property name="text" >
+ <string>Timestamp:</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3" >
+ <property name="font" >
+ <font>
+ <italic>true</italic>
+ </font>
+ </property>
+ <property name="text" >
+ <string>Some of these settings require a restart of the Quassel Client in order to take effect. We intend to fix this.</string>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>41</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>checkTimestamp</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>demoTimestamp</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>46</x>
+ <y>292</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>183</x>
+ <y>290</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>checkTimestamp</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>chooseTimestamp</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>96</x>
+ <y>288</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>452</x>
+ <y>293</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>checkBufferView</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>demoBufferView</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>32</x>
+ <y>116</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>215</x>
+ <y>117</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>checkBufferView</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>chooseBufferView</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>86</x>
+ <y>113</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>451</x>
+ <y>118</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>checkNickList</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>demoNickList</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>69</x>
+ <y>147</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>199</x>
+ <y>151</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>checkNickList</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>chooseNickList</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>78</x>
+ <y>145</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>455</x>
+ <y>151</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>checkTopic</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>demoTopic</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>34</x>
+ <y>81</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>190</x>
+ <y>87</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>checkTopic</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>chooseTopic</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>101</x>
+ <y>81</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>451</x>
+ <y>82</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>checkNicks</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>demoNicks</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>40</x>
+ <y>255</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>211</x>
+ <y>257</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>checkNicks</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>chooseNicks</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>89</x>
+ <y>257</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>447</x>
+ <y>258</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
--- /dev/null
+SETTINGSPAGES = fonts
<rect>
<x>0</x>
<y>0</y>
- <width>784</width>
- <height>558</height>
+ <width>742</width>
+ <height>502</height>
</rect>
</property>
<property name="windowTitle" >
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="maximumSize" >
+ <size>
+ <width>200</width>
+ <height>16777215</height>
+ </size>
+ </property>
<column>
<property name="text" >
<string>Settings</string>
</property>
</column>
</widget>
- <widget class="QScrollArea" name="settingsFrame" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape" >
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Plain</enum>
- </property>
+ <widget class="QWidget" name="" >
<layout class="QVBoxLayout" >
<item>
- <widget class="QStackedWidget" name="settingsStack" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <widget class="QLabel" name="pageTitle" >
+ <property name="font" >
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text" >
+ <string>Settings</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="line" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QScrollArea" name="settingsFrame" >
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
</property>
- <widget class="QWidget" name="page" />
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QStackedWidget" name="settingsStack" >
+ <widget class="QWidget" name="page_3" />
+ <widget class="QWidget" name="page_4" />
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
</layout>
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons" >
- <set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok|QDialogButtonBox::Reset</set>
+ <set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok|QDialogButtonBox::Reset|QDialogButtonBox::RestoreDefaults</set>
</property>
</widget>
</item>
SettingsPage::SettingsPage(const QString &category, const QString &title, QWidget *parent) : QWidget(parent),
_category(category), _title(title) {
+ _changed = false;
}
QString SettingsPage::category() const {
}
void SettingsPage::changed() {
+ _changed = true;
emit changed(true);
}
void SettingsPage::changeState(bool hasChanged) {
- emit changed(hasChanged);
+ if(hasChanged != _changed) emit changed(hasChanged);
}
private:
QString _category, _title;
+ bool _changed;
};
#endif
#include "uisettings.h"
-UiSettings::UiSettings() : ClientSettings("UI") {
+UiSettings::UiSettings(const QString &group) : ClientSettings(group) {
}
class UiSettings : public ClientSettings {
public:
- UiSettings();
+ UiSettings(const QString &group = "UI");
void setValue(const QString &key, const QVariant &data);
QVariant value(const QString &key, const QVariant &def = QVariant());
***************************************************************************/
#include "uistyle.h"
+#include "uistylesettings.h"
-UiStyle::UiStyle() {
+UiStyle::UiStyle(const QString &settingsKey) : _settingsKey(settingsKey) {
// Default format
QTextCharFormat def;
def.setForeground(QBrush("#000000"));
- def.setFont(QFont("Verdana",9));
-
- _formats = QVector<QTextCharFormat>(NumFormatTypes, def);
+ def.setFont(QFont("Mono",12));
+ _defaultFormats = QVector<QTextCharFormat>(NumFormatTypes, def);
+ _customFormats = QVector<QTextCharFormat>(NumFormatTypes, QTextFormat().toCharFormat());
+
+ // Load saved custom formats
+ UiStyleSettings s(_settingsKey);
+ foreach(FormatType type, s.availableFormats()) {
+ _customFormats[type] = s.customFormat(type);
+ }
// Initialize color codes according to mIRC "standard"
QStringList colors;
_formatCodes[QString("%Dcf%1").arg(idx)] = (FormatType)(FgCol00 + i);
_formatCodes[QString("%Dcb%1").arg(idx)] = (FormatType)(BgCol00 + i);
QTextCharFormat fgf, bgf;
- fgf.setForeground(QBrush(QColor(colors[i]))); _formats[FgCol00 + i] = fgf;
- bgf.setBackground(QBrush(QColor(colors[i]))); _formats[BgCol00 + i] = bgf;
+ fgf.setForeground(QBrush(QColor(colors[i]))); setFormat((FormatType)(FgCol00 + i), fgf, Settings::Default);
+ bgf.setBackground(QBrush(QColor(colors[i]))); setFormat((FormatType)(BgCol00 + i), bgf, Settings::Default);
}
// Set a few more standard formats
QTextCharFormat bold; bold.setFontWeight(QFont::Bold);
- setFormat(Bold, bold);
+ setFormat(Bold, bold, Settings::Default);
QTextCharFormat italic; italic.setFontItalic(true);
- setFormat(Italic, italic);
+ setFormat(Italic, italic, Settings::Default);
QTextCharFormat underline; underline.setFontUnderline(true);
- setFormat(Underline, underline);
+ setFormat(Underline, underline, Settings::Default);
// All other formats should be defined in derived classes.
}
}
-void UiStyle::setFormat(FormatType ftype, QTextCharFormat fmt) {
- _formats[ftype] = fmt;
+void UiStyle::setFormat(FormatType ftype, QTextCharFormat fmt, Settings::Mode mode) {
+ if(mode == Settings::Default) {
+ _defaultFormats[ftype] = fmt;
+ } else {
+ UiStyleSettings s(_settingsKey);
+ if(fmt != _defaultFormats[ftype]) {
+ _customFormats[ftype] = fmt;
+ s.setCustomFormat(ftype, fmt);
+ } else {
+ _customFormats[ftype] = QTextFormat().toCharFormat();
+ s.removeCustomFormat(ftype);
+ }
+ }
}
-QTextCharFormat UiStyle::format(FormatType ftype) const {
- return _formats[ftype];
+QTextCharFormat UiStyle::format(FormatType ftype, Settings::Mode mode) const {
+ if(mode == Settings::Custom && _customFormats[ftype].isValid()) return _customFormats[ftype];
+ else return _defaultFormats[ftype];
}
UiStyle::FormatType UiStyle::formatType(const QString & code) const {
#include <QUrl>
#include "message.h"
+#include "settings.h"
class UiStyle {
public:
- UiStyle();
+ UiStyle(const QString &settingsKey);
virtual ~UiStyle();
/** This enumerates the possible formats a text element may have. */
StyledText styleString(QString);
- void setFormat(FormatType, QTextCharFormat);
- QTextCharFormat format(FormatType) const;
+ void setFormat(FormatType, QTextCharFormat, Settings::Mode mode/* = Settings::Custom*/);
+ QTextCharFormat format(FormatType, Settings::Mode mode = Settings::Custom) const;
FormatType formatType(const QString &code) const;
QString formatCode(FormatType) const;
private:
QTextCharFormat mergedFormat(QList<FormatType>);
- QVector<QTextCharFormat> _formats;
+ QVector<QTextCharFormat> _defaultFormats;
+ QVector<QTextCharFormat> _customFormats;
QHash<QString, FormatType> _formatCodes;
+ QString _settingsKey;
+
};
#endif
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2005-08 by the Quassel IRC Team *
+ * devel@quassel-irc.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General 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 General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General 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 "uistylesettings.h"
+
+UiStyleSettings::UiStyleSettings(const QString &group) : ClientSettings(group) {
+
+}
+
+void UiStyleSettings::setCustomFormat(UiStyle::FormatType ftype, QTextCharFormat format) {
+ setLocalValue(QString("Format/%1").arg(ftype), format);
+}
+
+QTextCharFormat UiStyleSettings::customFormat(UiStyle::FormatType ftype) {
+ return localValue(QString("Format/%1").arg(ftype), QTextFormat()).value<QTextFormat>().toCharFormat();
+}
+
+void UiStyleSettings::removeCustomFormat(UiStyle::FormatType ftype) {
+ removeLocalKey(QString("Format/%1").arg(ftype));
+}
+
+QList<UiStyle::FormatType> UiStyleSettings::availableFormats() {
+ QList<UiStyle::FormatType> formats;
+ QStringList list = localChildKeys("Format");
+ foreach(QString type, list) {
+ formats << (UiStyle::FormatType)type.toInt();
+ }
+ return formats;
+}
+
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2005-08 by the Quassel IRC Team *
+ * devel@quassel-irc.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General 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 General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General 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. *
+ ***************************************************************************/
+
+#ifndef _UISTYLESETTINGS_H_
+#define _UISTYLESETTINGS_H_
+
+#include "clientsettings.h"
+#include "uistyle.h"
+
+class UiStyleSettings : public ClientSettings {
+
+ public:
+ UiStyleSettings(const QString &group = "UiStyle");
+
+ void setCustomFormat(UiStyle::FormatType, QTextCharFormat);
+ QTextCharFormat customFormat(UiStyle::FormatType);
+
+ void removeCustomFormat(UiStyle::FormatType);
+ QList<UiStyle::FormatType> availableFormats();
+
+ private:
+
+};
+
+#endif
DEPMOD = common client
QT_MOD = core gui network
-SRCS += bufferview.cpp bufferviewfilter.cpp inputline.cpp nickview.cpp settingspage.cpp tabcompleter.cpp uisettings.cpp uistyle.cpp
-HDRS += bufferview.h bufferviewfilter.h inputline.h nickview.h settingspage.h tabcompleter.h uisettings.h uistyle.h
+SRCS += bufferview.cpp bufferviewfilter.cpp inputline.cpp nickview.cpp settingspage.cpp tabcompleter.cpp uisettings.cpp uistyle.cpp uistylesettings.cpp
+HDRS += bufferview.h bufferviewfilter.h inputline.h nickview.h settingspage.h tabcompleter.h uisettings.h uistyle.h uistylesettings.h
FORMNAMES =