The dialog should be fully functional, and you should be able to create/edit/save identities.
However, they are not yet actually used (which is why we still have the old dialog as well)...
Also I revamped the whole SettingsDlg stuff, it now notices when settingspages have changed
and behaves accordingly, you can reset/reload settings and whatever else you'd expect from a
fully functional configuration dialog...
Furthermore, I did some general prettyfication, added some icons, tooltips, whatsthis-texts
and so on.
src/client
src/client/buffer.cpp
src/client/buffer.h
+src/client/buffermodel.cpp
+src/client/buffermodel.h
src/client/client.cpp
src/client/client.h
src/client/client.pri
src/qtui/settingspages/identitiessettingspage.h
src/qtui/settingspages/identitiessettingspage.ui
src/qtui/settingspages/networkssettingspage.ui
+src/qtui/settingspages/nickeditdlg.ui
+src/qtui/settingspages/nickeditdlgnew.ui
src/qtui/settingspages/saveidentitiesdlg.ui
src/qtui/settingspages/servereditdlg.ui
src/qtui/settingspages/settingspages.pri
src/qtui/ui/connectionpage.ui
src/qtui/ui/coreconnectdlg.ui
src/qtui/ui/coresettingspage.ui
+src/qtui/ui/debugconsole.ui
src/qtui/ui/identitiesdlg.ui
src/qtui/ui/identitieseditdlg.ui
src/qtui/ui/mainwin.ui
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "global.h"
-#include "identity.h"
-#include "settings.h"
+#include <QDateTime>
#include <QString>
#include <QTimer>
#include <QTranslator>
+#include "global.h"
+#include "identity.h"
+#include "settings.h"
+
#if defined BUILD_CORE
#include <QCoreApplication>
#include <QDir>
QApplication app(argc, argv);
#endif
+ qsrand(QDateTime::currentDateTime().toTime_t());
+
// Set up i18n support
QLocale locale = QLocale::system();
sess->restoreState(m["State"]);
}
}
+ qDebug() << "...done.";
}
}
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#define SPUTDEV
-
#include "coresession.h"
#include "server.h"
CoreUserSettings s(user);
sessionData = s.sessionData();
-#ifdef SPUTDEV
+
foreach(IdentityId id, s.identityIds()) {
Identity *i = new Identity(s.identity(id), this);
if(!i->isValid()) {
i.setIdentityName(tr("Default Identity"));
createIdentity(i);
}
-#endif
p->attachSlot(SIGNAL(requestNetworkStates()), this, SLOT(serverStateRequested()));
p->attachSlot(SIGNAL(requestConnect(QString)), this, SLOT(connectToNetwork(QString)));
void MainWin::setupSettingsDlg() {
settingsDlg->registerSettingsPage(new FontsSettingsPage(settingsDlg));
-#ifdef SPUTDEV
settingsDlg->registerSettingsPage(new IdentitiesSettingsPage(settingsDlg));
-#endif
+
}
void MainWin::connectedToCore() {
ui.setupUi(this);
_currentPage = 0;
- //ui.settingsFrame->setWidgetResizable(true);
- //ui.settingsFrame->setWidget(ui.settingsStack);
+ //recommendedSize = layout()->minimumSize();
+
+ // make the scrollarea behave sanely
+ ui.settingsFrame->setWidgetResizable(true);
+ ui.settingsFrame->setWidget(ui.settingsStack);
+
+ updateGeometry();
+
ui.settingsTree->setRootIsDecorated(false);
connect(ui.settingsTree, SIGNAL(itemSelectionChanged()), this, SLOT(itemSelected()));
connect(ui.buttonBox, SIGNAL(clicked(QAbstractButton *)), this, SLOT(buttonClicked(QAbstractButton *)));
}
+/*
+QSize SettingsDlg::sizeHint() const {
+ return recommendedSize;
+}
+*/
+
SettingsPage *SettingsDlg::currentPage() const {
return _currentPage;
}
void SettingsDlg::registerSettingsPage(SettingsPage *sp) {
sp->setParent(ui.settingsStack);
ui.settingsStack->addWidget(sp);
+ //recommendedSize = recommendedSize.expandedTo(sp->sizeHint());
+ //updateGeometry();
connect(sp, SIGNAL(changed(bool)), this, SLOT(setButtonStates()));
QTreeWidgetItem *cat;
cat->setExpanded(true);
cat->setFlags(Qt::ItemIsEnabled);
} else cat = cats[0];
- new QTreeWidgetItem(cat, QStringList(sp->title()));
+ QTreeWidgetItem *item = new QTreeWidgetItem(cat, QStringList(sp->title()));
+ treeItems[sp] = item;
pages[QString("%1$%2").arg(sp->category(), sp->title())] = sp;
- updateGeometry();
// TESTING
- selectPage(sp->category(), sp->title());
+ //selectPage(sp->category(), sp->title());
}
void SettingsDlg::selectPage(const QString &cat, const QString &title) {
SettingsPage *sp = pages[QString("%1$%2").arg(cat, title)];
- Q_ASSERT(sp); // FIXME allow for invalid settings pages
- ui.settingsStack->setCurrentWidget(sp);
- _currentPage = sp;
+ if(!sp) {
+ _currentPage = 0;
+ ui.settingsStack->setCurrentIndex(0);
+ ui.settingsTree->setCurrentItem(0);
+ return;
+ }
+ if(sp != currentPage() && currentPage() != 0 && currentPage()->hasChanged()) {
+ int ret = QMessageBox::warning(this, tr("Save changes"),
+ tr("There are unsaved changes on the current configuration page. Would you like to apply your changes now?"),
+ QMessageBox::Discard|QMessageBox::Save|QMessageBox::Cancel, QMessageBox::Cancel);
+ if(ret == QMessageBox::Save) {
+ if(!applyChanges()) sp = currentPage();
+ } else if(ret == QMessageBox::Discard) {
+ undoChanges();
+ } else sp = currentPage();
+ }
+ if(sp != currentPage()) {
+ ui.pageTitle->setText(sp->title());
+ ui.settingsStack->setCurrentWidget(sp);
+ ui.settingsStack->setMinimumSize(sp->sizeHint()); // we don't want our page shrinked, use scrollbars instead...
+ _currentPage = sp;
+ }
+ ui.settingsTree->setCurrentItem(treeItems[sp]);
setButtonStates();
}
void SettingsDlg::itemSelected() {
- // Check if we have changed anything...
- // TODO
-
QList<QTreeWidgetItem *> items = ui.settingsTree->selectedItems();
if(!items.count()) {
return;
QString cat = parent->text(0);
QString title = items[0]->text(0);
selectPage(cat, title);
- ui.pageTitle->setText(title);
}
}
ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(sp && sp->hasChanged());
ui.buttonBox->button(QDialogButtonBox::Apply)->setEnabled(sp && sp->hasChanged());
ui.buttonBox->button(QDialogButtonBox::Reset)->setEnabled(sp && sp->hasChanged());
+ ui.buttonBox->button(QDialogButtonBox::RestoreDefaults)->setEnabled(sp && sp->hasDefaults());
}
void SettingsDlg::buttonClicked(QAbstractButton *button) {
applyChanges();
break;
case QDialogButtonBox::Cancel:
+ undoChanges();
reject();
break;
case QDialogButtonBox::Reset:
return false;
}
-// TODO add messagebox
+void SettingsDlg::undoChanges() {
+ if(currentPage()) {
+ currentPage()->load();
+ }
+}
+
void SettingsDlg::reload() {
- SettingsPage *page = qobject_cast<SettingsPage *>(ui.settingsStack->currentWidget());
- if(page) page->load();
+ if(!currentPage()) return;
+ int ret = QMessageBox::question(this, tr("Reload Settings"), tr("Do you like to reload the settings, undoing your changes on this page?"),
+ QMessageBox::Yes|QMessageBox::No, QMessageBox::No);
+ if(ret == QMessageBox::Yes) {
+ currentPage()->load();
+ }
}
void SettingsDlg::loadDefaults() {
- SettingsPage *page = qobject_cast<SettingsPage *>(ui.settingsStack->currentWidget());
- if(page) page->defaults();
+ if(!currentPage()) return;
+ int ret = QMessageBox::question(this, tr("Restore Defaults"), tr("Do you like to restore the default values for this page?"),
+ QMessageBox::RestoreDefaults|QMessageBox::Cancel, QMessageBox::Cancel);
+ if(ret == QMessageBox::Yes) {
+ currentPage()->defaults();
+ }
}
SettingsPage *currentPage() const;
+ //QSize sizeHint() const;
+
public slots:
void selectPage(const QString &category, const QString &title);
void itemSelected();
void buttonClicked(QAbstractButton *);
bool applyChanges();
+ void undoChanges();
void reload();
void loadDefaults();
void setButtonStates();
SettingsPage *_currentPage;
QHash<QString, SettingsPage *> pages;
+ QHash<SettingsPage *, QTreeWidgetItem *> treeItems;
+
+ //QSize recommendedSize;
};
/*
connect(mapper, SIGNAL(mapped(QWidget *)), this, SLOT(chooseFont(QWidget *)));
+ connect(ui.customAppFonts, SIGNAL(clicked()), this, SLOT(widgetHasChanged()));
+ connect(ui.checkTopic, SIGNAL(clicked()), this, SLOT(widgetHasChanged()));
+ connect(ui.checkNickList, SIGNAL(clicked()), this, SLOT(widgetHasChanged()));
+ connect(ui.checkBufferView, SIGNAL(clicked()), this, SLOT(widgetHasChanged()));
+ connect(ui.checkNicks, SIGNAL(clicked()), this, SLOT(widgetHasChanged()));
+ connect(ui.checkTimestamp, SIGNAL(clicked()), this, SLOT(widgetHasChanged()));
+
load();
}
-bool FontsSettingsPage::hasChanged() const {
-
- return false;
+bool FontsSettingsPage::hasDefaults() const {
+ return true;
}
void FontsSettingsPage::defaults() {
load(Settings::Default);
-
+ widgetHasChanged();
}
void FontsSettingsPage::load() {
void FontsSettingsPage::load(Settings::Mode mode) {
QTextCharFormat chatFormat = QtUi::style()->format(UiStyle::None, mode);
- setFont(ui.demoChatMessages, chatFormat.font());
+ initLabel(ui.demoChatMessages, chatFormat.font());
QTextCharFormat nicksFormat = QtUi::style()->format(UiStyle::Sender, mode);
if(nicksFormat.hasProperty(QTextFormat::FontFamily)) {
- setFont(ui.demoNicks, nicksFormat.font());
+ initLabel(ui.demoNicks, nicksFormat.font());
ui.checkNicks->setChecked(true);
} else {
- setFont(ui.demoNicks, chatFormat.font());
+ initLabel(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());
+ initLabel(ui.demoTimestamp, timestampFormat.font());
ui.checkTimestamp->setChecked(true);
} else {
- setFont(ui.demoTimestamp, chatFormat.font());
+ initLabel(ui.demoTimestamp, chatFormat.font());
ui.checkTimestamp->setChecked(false);
}
+ changeState(false);
}
void FontsSettingsPage::save() {
changeState(false);
}
+void FontsSettingsPage::widgetHasChanged() {
+ if(!hasChanged()) changeState(true);
+}
+
+void FontsSettingsPage::initLabel(QLabel *label, const QFont &font) {
+ setFont(label, font);
+}
+
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()));
+ label->setText(QString("%1 %2").arg(font.family()).arg(font.pointSize()));
+ widgetHasChanged();
}
void FontsSettingsPage::chooseFont(QWidget *widget) {
#ifndef _FONTSSETTINGSPAGE_H_
#define _FONTSSETTINGSPAGE_H_
+#include <QHash>
+
#include "settings.h"
#include "settingspage.h"
#include "ui_fontssettingspage.h"
class QSignalMapper;
+class QLabel;
class FontsSettingsPage : public SettingsPage {
Q_OBJECT
public:
FontsSettingsPage(QWidget *parent = 0);
- bool hasChanged() const;
+ bool hasDefaults() const;
public slots:
void save();
private slots:
void load(Settings::Mode mode);
+ void initLabel(QLabel *label, const QFont &font);
void setFont(QLabel *label, const QFont &font);
void chooseFont(QWidget *label);
+ void widgetHasChanged();
+
private:
Ui::FontsSettingsPage ui;
<rect>
<x>0</x>
<y>0</y>
- <width>524</width>
- <height>400</height>
+ <width>475</width>
+ <height>366</height>
</rect>
</property>
<property name="windowTitle" >
</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>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QGroupBox" name="customAppFonts" >
+ <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>
- </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>
+ </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>
- </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>
+ </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>
+ </layout>
</item>
<item>
<spacer>
<property name="sizeHint" >
<size>
<width>20</width>
- <height>41</height>
+ <height>40</height>
</size>
</property>
</spacer>
ui.setupUi(this);
setEnabled(false); // need a core connection!
+ setWidgetStates();
connect(Client::instance(), SIGNAL(coreConnectionStateChanged(bool)), this, SLOT(coreConnectionStateChanged(bool)));
connect(Client::instance(), SIGNAL(identityCreated(IdentityId)), this, SLOT(clientIdentityCreated(IdentityId)));
connect(Client::instance(), SIGNAL(identityRemoved(IdentityId)), this, SLOT(clientIdentityRemoved(IdentityId)));
connect(ui.partReason, SIGNAL(textEdited(const QString &)), this, SLOT(widgetHasChanged()));
connect(ui.quitReason, SIGNAL(textEdited(const QString &)), this, SLOT(widgetHasChanged()));
+ connect(ui.nicknameList, SIGNAL(itemSelectionChanged()), this, SLOT(setWidgetStates()));
+
+ // we would need this if we enabled drag and drop in the nicklist...
+ //connect(ui.nicknameList, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(setWidgetStates()));
+ //connect(ui.nicknameList->model(), SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(nicklistHasChanged()));
+
+}
+
+void IdentitiesSettingsPage::setWidgetStates() {
+ if(ui.nicknameList->selectedItems().count()) {
+ ui.renameNick->setEnabled(true);
+ ui.nickUp->setEnabled(ui.nicknameList->row(ui.nicknameList->selectedItems()[0]) > 0);
+ ui.nickDown->setEnabled(ui.nicknameList->row(ui.nicknameList->selectedItems()[0]) < ui.nicknameList->count()-1);
+ } else {
+ ui.renameNick->setDisabled(true);
+ ui.nickUp->setDisabled(true);
+ ui.nickDown->setDisabled(true);
+ }
+ ui.deleteNick->setEnabled(ui.nicknameList->count() > 1);
+
}
void IdentitiesSettingsPage::coreConnectionStateChanged(bool state) {
changeState(false);
}
-void IdentitiesSettingsPage::defaults() {
- // TODO implement bool hasDefaults()
-}
-
void IdentitiesSettingsPage::widgetHasChanged() {
bool changed = testHasChanged();
if(changed != hasChanged()) changeState(changed);
void IdentitiesSettingsPage::clientIdentityCreated(IdentityId id) {
insertIdentity(new Identity(*Client::identity(id), this));
- Identity *i = identities[id];
connect(Client::identity(id), SIGNAL(updatedRemotely()), this, SLOT(clientIdentityUpdated()));
}
identities.remove(id->id());
ui.identityList->removeItem(ui.identityList->findData(id->id()));
changedIdentities.removeAll(id->id());
+ if(currentId == id->id()) currentId = 0;
id->deleteLater();
widgetHasChanged();
}
QString oldName = identities[currentId]->identityName();
bool ok = false;
QString name = QInputDialog::getText(this, tr("Rename Identity"),
- tr("Please enter a new name for the identity \"%1\":").arg(oldName),
+ tr("Please enter a new name for the identity \"%1\"!").arg(oldName),
QLineEdit::Normal, oldName, &ok);
if(ok && !name.isEmpty()) {
renameIdentity(currentId, name);
}
}
+void IdentitiesSettingsPage::on_addNick_clicked() {
+ QStringList existing;
+ for(int i = 0; i < ui.nicknameList->count(); i++) existing << ui.nicknameList->item(i)->text();
+ NickEditDlgNew dlg(QString(), existing, this);
+ if(dlg.exec() == QDialog::Accepted) {
+ ui.nicknameList->addItem(dlg.nick());
+ ui.nicknameList->setCurrentRow(ui.nicknameList->count()-1);
+ setWidgetStates();
+ }
+}
+
+void IdentitiesSettingsPage::on_deleteNick_clicked() {
+ // no confirmation, since a nickname is really nothing hard to recreate
+ if(ui.nicknameList->selectedItems().count()) {
+ delete ui.nicknameList->selectedItems()[0];
+ ui.nicknameList->setCurrentRow(qMin(ui.nicknameList->currentRow()+1, ui.nicknameList->count()-1));
+ setWidgetStates();
+ widgetHasChanged();
+ }
+}
+
+void IdentitiesSettingsPage::on_renameNick_clicked() {
+ if(!ui.nicknameList->selectedItems().count()) return;
+ QString old = ui.nicknameList->selectedItems()[0]->text();
+ QStringList existing;
+ for(int i = 0; i < ui.nicknameList->count(); i++) existing << ui.nicknameList->item(i)->text();
+ NickEditDlgNew dlg(old, existing, this);
+ if(dlg.exec() == QDialog::Accepted) {
+ ui.nicknameList->selectedItems()[0]->setText(dlg.nick());
+ }
+
+}
+
+void IdentitiesSettingsPage::on_nickUp_clicked() {
+ if(!ui.nicknameList->selectedItems().count()) return;
+ int row = ui.nicknameList->row(ui.nicknameList->selectedItems()[0]);
+ if(row > 0) {
+ ui.nicknameList->insertItem(row-1, ui.nicknameList->takeItem(row));
+ ui.nicknameList->setCurrentRow(row-1);
+ setWidgetStates();
+ widgetHasChanged();
+ }
+}
+
+void IdentitiesSettingsPage::on_nickDown_clicked() {
+ if(!ui.nicknameList->selectedItems().count()) return;
+ int row = ui.nicknameList->row(ui.nicknameList->selectedItems()[0]);
+ if(row < ui.nicknameList->count()-1) {
+ ui.nicknameList->insertItem(row+1, ui.nicknameList->takeItem(row));
+ ui.nicknameList->setCurrentRow(row+1);
+ setWidgetStates();
+ widgetHasChanged();
+ }
+}
+
/*****************************************************************************************/
CreateIdentityDlg::CreateIdentityDlg(QAbstractItemModel *model, QWidget *parent) : QDialog(parent) {
ui.progressBar->setValue(++rcvevents);
if(rcvevents >= numevents) accept();
}
+
+/*************************************************************************************************/
+
+NickEditDlgNew::NickEditDlgNew(const QString &old, const QStringList &exist, QWidget *parent)
+ : QDialog(parent), oldNick(old), existing(exist) {
+ ui.setupUi(this);
+
+ // define a regexp for valid nicknames
+ // TODO: add max nicklength according to ISUPPORT
+ QString letter = "A-Za-z";
+ QString special = "\x5b-\x60\x7b-\x7d";
+ QRegExp rx(QString("[%1%2][%1%2\\d-]*").arg(letter, special));
+ ui.nickEdit->setValidator(new QRegExpValidator(rx, ui.nickEdit));
+ if(old.isEmpty()) {
+ // new nick
+ setWindowTitle(tr("Add Nickname"));
+ on_nickEdit_textChanged(""); // disable ok button
+ } else ui.nickEdit->setText(old);
+}
+
+QString NickEditDlgNew::nick() const {
+ return ui.nickEdit->text();
+
+}
+
+void NickEditDlgNew::on_nickEdit_textChanged(const QString &text) {
+ ui.buttonBox->button(QDialogButtonBox::Ok)->setDisabled(text.isEmpty() || existing.contains(text));
+}
+
+
+
#include "ui_identitiessettingspage.h"
#include "ui_createidentitydlg.h"
#include "ui_saveidentitiesdlg.h"
+#include "ui_nickeditdlgnew.h"
class QAbstractItemModel;
public slots:
void save();
void load();
- void defaults();
private slots:
void coreConnectionStateChanged(bool);
void on_deleteIdentity_clicked();
void on_renameIdentity_clicked();
+ void on_addNick_clicked();
+ void on_deleteNick_clicked();
+ void on_renameNick_clicked();
+ void on_nickUp_clicked();
+ void on_nickDown_clicked();
+
void widgetHasChanged();
+ void setWidgetStates();
private:
Ui::IdentitiesSettingsPage ui;
};
+class NickEditDlgNew : public QDialog {
+ Q_OBJECT
+
+ public:
+ NickEditDlgNew(const QString &oldnick, const QStringList &existing = QStringList(), QWidget *parent = 0);
+
+ QString nick() const;
+
+ private slots:
+ void on_nickEdit_textChanged(const QString &);
+
+ private:
+ Ui::NickEditDlgNew ui;
+
+ QString oldNick;
+ QStringList existing;
+
+};
+
#endif
<rect>
<x>0</x>
<y>0</y>
- <width>431</width>
- <height>398</height>
+ <width>495</width>
+ <height>417</height>
</rect>
</property>
<property name="windowTitle" >
</property>
<layout class="QVBoxLayout" >
<item>
- <layout class="QHBoxLayout" >
+ <layout class="QVBoxLayout" >
<item>
- <widget class="QComboBox" name="identityList" >
- <property name="insertPolicy" >
- <enum>QComboBox::InsertAtBottom</enum>
- </property>
- <property name="duplicatesEnabled" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="renameIdentity" >
- <property name="text" >
- <string>...</string>
- </property>
- <property name="icon" >
- <iconset resource="../../icons/icons.qrc" >:/22x22/actions/oxygen/22x22/actions/edit-rename.png</iconset>
- </property>
- <property name="iconSize" >
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="addIdentity" >
- <property name="text" >
- <string>Add...</string>
- </property>
- <property name="icon" >
- <iconset resource="../../icons/icons.qrc" >:/22x22/actions/oxygen/22x22/actions/list-add-user.png</iconset>
- </property>
- <property name="iconSize" >
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
- <property name="toolButtonStyle" >
- <enum>Qt::ToolButtonIconOnly</enum>
- </property>
- </widget>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QComboBox" name="identityList" >
+ <property name="insertPolicy" >
+ <enum>QComboBox::InsertAtBottom</enum>
+ </property>
+ <property name="duplicatesEnabled" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="renameIdentity" >
+ <property name="toolTip" >
+ <string>Rename Identity</string>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/22x22/actions/oxygen/22x22/actions/edit-rename.png</iconset>
+ </property>
+ <property name="iconSize" >
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="addIdentity" >
+ <property name="toolTip" >
+ <string>Add Identity</string>
+ </property>
+ <property name="text" >
+ <string>Add...</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/22x22/actions/oxygen/22x22/actions/list-add-user.png</iconset>
+ </property>
+ <property name="iconSize" >
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="toolButtonStyle" >
+ <enum>Qt::ToolButtonIconOnly</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="deleteIdentity" >
+ <property name="toolTip" >
+ <string>Remove Identity</string>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/22x22/actions/oxygen/22x22/actions/list-remove-user.png</iconset>
+ </property>
+ <property name="iconSize" >
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
- <widget class="QToolButton" name="deleteIdentity" >
- <property name="text" >
- <string>...</string>
- </property>
- <property name="icon" >
- <iconset resource="../../icons/icons.qrc" >:/22x22/actions/oxygen/22x22/actions/list-remove-user.png</iconset>
- </property>
- <property name="iconSize" >
- <size>
- <width>22</width>
- <height>22</height>
- </size>
+ <widget class="QTabWidget" name="tabWidget" >
+ <property name="currentIndex" >
+ <number>0</number>
</property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QTabWidget" name="tabWidget" >
- <property name="currentIndex" >
- <number>0</number>
- </property>
- <widget class="QWidget" name="generalTab" >
- <attribute name="title" >
- <string>General</string>
- </attribute>
- <layout class="QVBoxLayout" >
- <item>
- <layout class="QHBoxLayout" >
+ <widget class="QWidget" name="generalTab" >
+ <attribute name="title" >
+ <string>General</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
<item>
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>Real Name:</string>
- </property>
- </widget>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Real Name:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="realName" >
+ <property name="whatsThis" >
+ <string>The "Real Name" is shown in /whois.</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
- <widget class="QLineEdit" name="realName" />
- </item>
- </layout>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox" >
- <property name="title" >
- <string>Nicknames</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="QListWidget" name="nicknameList" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QPushButton" name="addNick" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>&Add...</string>
- </property>
- <property name="icon" >
- <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/list-add.png</iconset>
- </property>
- <property name="iconSize" >
- <size>
- <width>16</width>
- <height>16</height>
- </size>
- </property>
- </widget>
- </item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Nicknames</string>
+ </property>
+ <layout class="QHBoxLayout" >
<item>
- <widget class="QPushButton" name="deleteNick" >
+ <widget class="QListWidget" name="nicknameList" >
<property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
- <horstretch>0</horstretch>
+ <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+ <horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
- <string>De&lete</string>
+ <property name="showDropIndicator" stdset="0" >
+ <bool>true</bool>
</property>
- <property name="icon" >
- <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/edit-delete.png</iconset>
+ <property name="dragEnabled" >
+ <bool>false</bool>
</property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="renameNick" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <property name="dragDropMode" >
+ <enum>QAbstractItemView::NoDragDrop</enum>
</property>
- <property name="text" >
- <string>Re&name...</string>
- </property>
- <property name="icon" >
- <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/edit-rename.png</iconset>
+ <property name="selectionBehavior" >
+ <enum>QAbstractItemView::SelectRows</enum>
</property>
</widget>
</item>
<item>
- <layout class="QHBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="leftMargin" >
- <number>0</number>
- </property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
+ <layout class="QVBoxLayout" >
<item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
+ <widget class="QPushButton" name="addNick" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="sizeHint" >
+ <property name="toolTip" >
+ <string>Add Nickname</string>
+ </property>
+ <property name="text" >
+ <string>&Add...</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/list-add.png</iconset>
+ </property>
+ <property name="iconSize" >
<size>
- <width>0</width>
- <height>20</height>
+ <width>16</width>
+ <height>16</height>
</size>
</property>
- </spacer>
+ </widget>
</item>
<item>
- <widget class="QToolButton" name="upNick" >
+ <widget class="QPushButton" name="deleteNick" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="toolTip" >
- <string>Move upwards in list</string>
+ <string>Remove Nickname</string>
</property>
<property name="text" >
- <string>...</string>
+ <string>Remove</string>
</property>
<property name="icon" >
- <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/go-up.png</iconset>
+ <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/edit-delete.png</iconset>
</property>
</widget>
</item>
<item>
- <widget class="QToolButton" name="downNick" >
+ <widget class="QPushButton" name="renameNick" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="toolTip" >
- <string>Move downwards in list</string>
+ <string>Rename Identity</string>
</property>
<property name="text" >
- <string>...</string>
+ <string>Re&name...</string>
</property>
<property name="icon" >
- <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/go-down.png</iconset>
+ <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/edit-rename.png</iconset>
</property>
</widget>
</item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <property name="leftMargin" >
+ <number>0</number>
+ </property>
+ <property name="topMargin" >
+ <number>0</number>
+ </property>
+ <property name="rightMargin" >
+ <number>0</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>0</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>0</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QToolButton" name="nickUp" >
+ <property name="toolTip" >
+ <string>Move upwards in list</string>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/go-up.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="nickDown" >
+ <property name="toolTip" >
+ <string>Move downwards in list</string>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/go-down.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>0</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
<item>
<spacer>
<property name="orientation" >
- <enum>Qt::Horizontal</enum>
+ <enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
- <width>0</width>
- <height>20</height>
+ <width>124</width>
+ <height>76</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>124</width>
- <height>76</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="awayTab" >
- <attribute name="title" >
- <string>A&way</string>
- </attribute>
- <layout class="QVBoxLayout" >
- <item>
- <layout class="QGridLayout" >
- <property name="leftMargin" >
- <number>0</number>
- </property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
- <property name="horizontalSpacing" >
- <number>6</number>
- </property>
- <property name="verticalSpacing" >
- <number>6</number>
- </property>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="awayNick" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QCheckBox" name="awayReasonEnabled" >
- <property name="text" >
- <string>Away Reason</string>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="awayTab" >
+ <attribute name="title" >
+ <string>A&way</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QGridLayout" >
+ <property name="leftMargin" >
+ <number>0</number>
</property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="awayReason" >
- <property name="enabled" >
- <bool>false</bool>
+ <property name="topMargin" >
+ <number>0</number>
</property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QCheckBox" name="returnMessageEnabled" >
- <property name="text" >
- <string>Return Message</string>
+ <property name="rightMargin" >
+ <number>0</number>
</property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="returnMessage" >
- <property name="enabled" >
- <bool>false</bool>
+ <property name="bottomMargin" >
+ <number>0</number>
</property>
- </widget>
- </item>
- <item row="0" column="0" >
- <widget class="QCheckBox" name="awayNickEnabled" >
- <property name="text" >
- <string>Away Nick</string>
+ <property name="horizontalSpacing" >
+ <number>6</number>
</property>
- </widget>
+ <property name="verticalSpacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="awayNick" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QCheckBox" name="awayReasonEnabled" >
+ <property name="text" >
+ <string>Away Reason</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLineEdit" name="awayReason" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QCheckBox" name="returnMessageEnabled" >
+ <property name="text" >
+ <string>Return Message</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QLineEdit" name="returnMessage" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QCheckBox" name="awayNickEnabled" >
+ <property name="text" >
+ <string>Away Nick</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
- </layout>
- </item>
- <item>
- <widget class="QGroupBox" name="autoAwayEnabled" >
- <property name="title" >
- <string>Auto Away</string>
- </property>
- <property name="checkable" >
- <bool>true</bool>
- </property>
- <property name="checked" >
- <bool>false</bool>
- </property>
- <layout class="QVBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="leftMargin" >
- <number>8</number>
- </property>
- <property name="topMargin" >
- <number>8</number>
- </property>
- <property name="rightMargin" >
- <number>8</number>
- </property>
- <property name="bottomMargin" >
- <number>8</number>
- </property>
- <item>
- <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QGroupBox" name="autoAwayEnabled" >
+ <property name="title" >
+ <string>Auto Away</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <property name="checked" >
+ <bool>false</bool>
+ </property>
+ <layout class="QVBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="leftMargin" >
- <number>0</number>
+ <number>8</number>
</property>
<property name="topMargin" >
- <number>0</number>
+ <number>8</number>
</property>
<property name="rightMargin" >
- <number>0</number>
+ <number>8</number>
</property>
<property name="bottomMargin" >
- <number>0</number>
+ <number>8</number>
</property>
<item>
- <widget class="QLabel" name="autoAwayLabel_1" >
- <property name="text" >
- <string>Auto away after</string>
+ <layout class="QHBoxLayout" >
+ <property name="spacing" >
+ <number>6</number>
</property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="autoAwayTime" />
- </item>
- <item>
- <widget class="QLabel" name="autoAwayLabel_2" >
- <property name="text" >
- <string>minutes</string>
+ <property name="leftMargin" >
+ <number>0</number>
</property>
- </widget>
+ <property name="topMargin" >
+ <number>0</number>
+ </property>
+ <property name="rightMargin" >
+ <number>0</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="autoAwayLabel_1" >
+ <property name="text" >
+ <string>Auto away after</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="autoAwayTime" />
+ </item>
+ <item>
+ <widget class="QLabel" name="autoAwayLabel_2" >
+ <property name="text" >
+ <string>minutes</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
</item>
<item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
+ <layout class="QGridLayout" >
+ <property name="leftMargin" >
+ <number>0</number>
</property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
+ <property name="topMargin" >
+ <number>0</number>
</property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QGridLayout" >
- <property name="leftMargin" >
- <number>0</number>
- </property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
- <property name="horizontalSpacing" >
- <number>6</number>
- </property>
- <property name="verticalSpacing" >
- <number>6</number>
- </property>
- <item row="1" column="0" >
- <widget class="QCheckBox" name="autoReturnMessageEnabled" >
- <property name="text" >
- <string>Return Message</string>
+ <property name="rightMargin" >
+ <number>0</number>
</property>
- </widget>
- </item>
- <item row="0" column="0" >
- <widget class="QCheckBox" name="autoAwayReasonEnabled" >
- <property name="text" >
- <string>Away Reason</string>
+ <property name="bottomMargin" >
+ <number>0</number>
</property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="autoReturnMessage" />
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="autoAwayReason" />
+ <property name="horizontalSpacing" >
+ <number>6</number>
+ </property>
+ <property name="verticalSpacing" >
+ <number>6</number>
+ </property>
+ <item row="1" column="0" >
+ <widget class="QCheckBox" name="autoReturnMessageEnabled" >
+ <property name="text" >
+ <string>Return Message</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QCheckBox" name="autoAwayReasonEnabled" >
+ <property name="text" >
+ <string>Away Reason</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLineEdit" name="autoReturnMessage" />
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="autoAwayReason" />
+ </item>
+ </layout>
</item>
</layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="advancedTab" >
- <attribute name="title" >
- <string>Advanced</string>
- </attribute>
- <layout class="QVBoxLayout" >
- <item>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="QLabel" name="label_2" >
- <property name="text" >
- <string>Ident:</string>
- </property>
</widget>
</item>
<item>
- <widget class="QLineEdit" name="ident" />
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
</item>
</layout>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_3" >
- <property name="title" >
- <string>Messages</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <layout class="QGridLayout" >
- <property name="leftMargin" >
- <number>0</number>
- </property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
- <property name="horizontalSpacing" >
- <number>6</number>
- </property>
- <property name="verticalSpacing" >
- <number>6</number>
- </property>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_3" >
- <property name="text" >
- <string>Part Reason:</string>
+ </widget>
+ <widget class="QWidget" name="advancedTab" >
+ <attribute name="title" >
+ <string>Advanced</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Ident:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="ident" >
+ <property name="whatsThis" >
+ <string>The "ident" is part of your hostmask and, together with your host, uniquely identifies you within the IRC network.</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_3" >
+ <property name="title" >
+ <string>Messages</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QGridLayout" >
+ <property name="leftMargin" >
+ <number>0</number>
</property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="partReason" />
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="kickReason" />
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="label_5" >
- <property name="text" >
- <string>Quit Reason:</string>
+ <property name="topMargin" >
+ <number>0</number>
</property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="quitReason" />
- </item>
- <item row="0" column="0" >
- <widget class="QLabel" name="label_4" >
- <property name="text" >
- <string>Kick Reason:</string>
+ <property name="rightMargin" >
+ <number>0</number>
</property>
- </widget>
+ <property name="bottomMargin" >
+ <number>0</number>
+ </property>
+ <property name="horizontalSpacing" >
+ <number>6</number>
+ </property>
+ <property name="verticalSpacing" >
+ <number>6</number>
+ </property>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Part Reason:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLineEdit" name="partReason" />
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="kickReason" />
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>Quit Reason:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QLineEdit" name="quitReason" />
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Kick Reason:</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
</layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- </widget>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
</item>
</layout>
</widget>
--- /dev/null
+<ui version="4.0" >
+ <class>NickEditDlgNew</class>
+ <widget class="QDialog" name="NickEditDlgNew" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>285</width>
+ <height>93</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Edit Nickname</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Please enter a valid nickname:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="nickEdit" >
+ <property name="whatsThis" >
+ <string>A valid nickname may contain letters from the English alphabet, digits, and the special characters {, }, [, ], \, |, `, ^, _ and -.</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>277</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>NickEditDlgNew</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>NickEditDlgNew</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
+# Putting $FOO in SETTINGSPAGES automatically includes
+# $FOOsettingspage.cpp, $FOOsettingspage.h and $FOOsettingspage.ui
SETTINGSPAGES = fonts identities
-# Specify additional files here!
-
-SP_SRCS =
+# Specify additional files (e.g. for subdialogs) here!
+SP_SRCS =
SP_HDRS =
-SP_FRMS = createidentitydlg.ui saveidentitiesdlg.ui
+SP_FRMS = createidentitydlg.ui saveidentitiesdlg.ui nickeditdlgnew.ui
<x>0</x>
<y>0</y>
<width>800</width>
- <height>26</height>
+ <height>24</height>
</rect>
</property>
<widget class="QMenu" name="menuConnection" >
</property>
</action>
<action name="actionQuit" >
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/22x22/actions/oxygen/22x22/actions/application-exit.png</iconset>
+ </property>
<property name="text" >
<string>Quit...</string>
</property>
</property>
</action>
<action name="actionAboutQuassel" >
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/icons/quassel-icon.png</iconset>
+ </property>
<property name="text" >
<string>About Quassel IRC...</string>
</property>
<property name="enabled" >
<bool>false</bool>
</property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/22x22/actions/oxygen/22x22/actions/network-disconnect.png</iconset>
+ </property>
<property name="text" >
<string>Disconnect from Core</string>
</property>
<property name="enabled" >
<bool>false</bool>
</property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/22x22/actions/oxygen/22x22/actions/network-connect.png</iconset>
+ </property>
<property name="text" >
<string>Connect to Core...</string>
</property>
<rect>
<x>0</x>
<y>0</y>
- <width>307</width>
- <height>96</height>
+ <width>309</width>
+ <height>113</height>
</rect>
</property>
<property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>3</vsizetype>
+ <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<bool>true</bool>
</property>
<layout class="QVBoxLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
<property name="spacing" >
<number>6</number>
</property>
+ <property name="leftMargin" >
+ <number>9</number>
+ </property>
+ <property name="topMargin" >
+ <number>9</number>
+ </property>
+ <property name="rightMargin" >
+ <number>9</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>9</number>
+ </property>
<item>
<widget class="QLabel" name="label" >
<property name="text" >
<rect>
<x>0</x>
<y>0</y>
- <width>742</width>
- <height>502</height>
+ <width>780</width>
+ <height>580</height>
</rect>
</property>
<property name="windowTitle" >
- <string/>
+ <string>Configure Quassel</string>
</property>
<layout class="QVBoxLayout" >
<item>
- <widget class="QSplitter" name="splitter" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <widget class="QTreeWidget" name="settingsTree" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize" >
- <size>
- <width>200</width>
- <height>16777215</height>
- </size>
- </property>
- <column>
- <property name="text" >
- <string>Settings</string>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QSplitter" name="splitter" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
</property>
- </column>
- </widget>
- <widget class="QWidget" name="layoutWidget" >
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QLabel" name="pageTitle" >
- <property name="font" >
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
+ <widget class="QTreeWidget" name="settingsTree" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <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>
- </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>
- <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>
- </widget>
- </widget>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok|QDialogButtonBox::Reset|QDialogButtonBox::RestoreDefaults</set>
- </property>
- </widget>
+ </column>
+ </widget>
+ <widget class="QWidget" name="layoutWidget" >
+ <layout class="QVBoxLayout" >
+ <item>
+ <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>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QStackedWidget" name="settingsStack" >
+ <property name="minimumSize" >
+ <size>
+ <width>16</width>
+ <height>16</height>
+ </size>
+ </property>
+ <property name="currentIndex" >
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="page_3" />
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok|QDialogButtonBox::Reset|QDialogButtonBox::RestoreDefaults</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
</layout>
</widget>
<rect>
<x>0</x>
<y>0</y>
- <width>568</width>
- <height>28</height>
+ <width>559</width>
+ <height>30</height>
</rect>
</property>
<property name="sizePolicy" >
</item>
<item>
<widget class="QToolButton" name="topicEditButton" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
<property name="text" >
<string>...</string>
</property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/22x22/actions/oxygen/22x22/actions/configure.png</iconset>
+ </property>
+ <property name="iconSize" >
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
</widget>
</item>
</layout>
</widget>
- <resources/>
+ <resources>
+ <include location="../../icons/icons.qrc" />
+ </resources>
<connections/>
</ui>
return _title;
}
+bool SettingsPage::hasDefaults() const {
+ return false;
+}
+
+void SettingsPage::defaults() {
+
+}
+
bool SettingsPage::hasChanged() const {
return _changed;
}
virtual ~SettingsPage() {};
virtual QString category() const;
virtual QString title() const;
+ virtual bool hasDefaults() const;
bool hasChanged() const;
public slots:
virtual void save() = 0;
virtual void load() = 0;
- virtual void defaults() = 0;
+ virtual void defaults();
protected slots:
//! Calling this slot is equivalent to calling changeState(true).