so we won't confuse that anymore.
Distclean advised.
src/qtui/settingspages/identitiessettingspage.cpp
src/qtui/settingspages/identitiessettingspage.h
src/qtui/settingspages/identitiessettingspage.ui
+src/qtui/settingspages/networkssettingspage.cpp
+src/qtui/settingspages/networkssettingspage.h
src/qtui/settingspages/networkssettingspage.ui
src/qtui/settingspages/nickeditdlgnew.ui
src/qtui/settingspages/saveidentitiesdlg.ui
}
void BufferModel::mapProperty(int column, int role, QObject *target, const QByteArray &property) {
+ qDebug() << property;
propertyMapper()->addMapping(column, role, target, property);
}
// This Slot indicates that the user has selected a different buffer in the gui
void BufferModel::setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command) {
Q_UNUSED(command)
-
BufferId newCurrentBuffer;
- if(index.data(NetworkModel::ItemTypeRole) == NetworkModel::BufferItemType && currentBuffer != (newCurrentBuffer = index.data(NetworkModel::BufferIdRole).toUInt())) {
+ if(index.data(NetworkModel::ItemTypeRole) == NetworkModel::BufferItemType && currentBuffer != (newCurrentBuffer = index.data(NetworkModel::BufferIdRole).value<BufferId>())) {
currentBuffer = newCurrentBuffer;
// FIXME: to something like: index.setData(ActivitRole, NoActivity);
// networkModel->bufferActivity(BufferItem::NoActivity, currentBuffer);
return instance()->_networks.values();
}
-Network *Client::network(uint networkid) {
+Network *Client::network(NetworkId networkid) {
if(instance()->_networks.contains(networkid))
return instance()->_networks[networkid];
else
/*** ***/
-void Client::fakeInput(uint bufferUid, QString message) {
+void Client::fakeInput(BufferId bufferUid, QString message) {
Buffer *buff = buffer(bufferUid);
if(!buff)
qWarning() << "No Buffer with uid" << bufferUid << "can't send Input" << message;
Q_UNUSED(deselected)
emit mappedSelectionChanged(mapSelectionToSource(QItemSelectionModel::selection()));
}
-
+
if(targetType != BufferItem::QueryType)
return false;
- QList< QPair<uint, uint> > bufferList = mimeDataToBufferList(data);
+ QList< QPair<NetworkId, BufferId> > bufferList = mimeDataToBufferList(data);
// exactly one buffer has to be dropped
if(bufferList.count() != 1)
return false;
- uint netId = bufferList.first().first;
- uint bufferId = bufferList.first().second;
+ NetworkId netId = bufferList.first().first;
+ BufferId bufferId = bufferList.first().second;
// no self merges (would kill us)
if(bufferId == parent.data(BufferIdRole).value<BufferId>())
_bufferName(QString()) {
}
-BufferInfo::BufferInfo(uint id, uint networkid, uint gid, QString net, QString buf)
+BufferInfo::BufferInfo(BufferId id, NetworkId networkid, uint gid, QString net, QString buf)
: _id(id),
_netid(networkid),
_gid(gid),
class BufferInfo {
public:
BufferInfo();
- BufferInfo(uint id, uint networkid, uint gid = 0, QString net = QString(), QString buf = QString());
+ BufferInfo(BufferId id, NetworkId networkid, uint gid = 0, QString net = QString(), QString buf = QString());
inline BufferId uid() const { return _id; }
inline NetworkId networkId() const { return _netid; }
inline bool operator==(const BufferInfo &other) const { return _id == other._id; }
private:
- uint _id;
- uint _netid;
+ BufferId _id;
+ NetworkId _netid;
uint _gid;
QString _networkName; // WILL BE REMOVED
QString _bufferName;
extern unsigned int defaultPort;
void registerMetaTypes();
-}
+};
#endif
#include <QString>
+/*
+class UnsignedId {
+ quint32 id;
+
+ public:
+ inline UnsignedId(int _id = 0) { id = _id; }
+ inline quint32 toInt() const { return id; }
+ inline bool operator==(const UnsignedId &other) const { return id == other.id; }
+ inline bool operator!=(const UnsignedId &other) const { return id != other.id; }
+};
+
+struct BufferId : public UnsignedId {
+ inline BufferId(int _id = 0) : UnsignedId(_id) {};
+
+};
+*/
+
// FIXME make all ID types quint32 as soon as they all have been replaced
typedef uint UserId; //!< Identifies a core user.
typedef uint MsgId; //!< Identifies a message.
typedef uint BufferId; //!< Identifies a buffer.
-typedef uint NetworkId; //!< Identifies an IRC Network.
-// IdentityId must be signed!
+// These must be signed!
+typedef qint32 NetworkId; //!< Identifies an IRC Network.
typedef qint32 IdentityId; //!< Identifies an identity.
//! Base class for exceptions.
return socket.state() == QAbstractSocket::ConnectedState;
}
-uint NetworkConnection::networkId() const {
+NetworkId NetworkConnection::networkId() const {
return network()->networkId();
}
}
}
-uint SqliteStorage::getNetworkId(UserId user, const QString &network) {
+NetworkId SqliteStorage::getNetworkId(UserId user, const QString &network) {
QSqlQuery query(logDb());
query.prepare("SELECT networkid FROM network "
"WHERE userid = :userid AND networkname = :networkname");
query.exec();
if(query.first())
- return query.value(0).toUInt();
+ return query.value(0).value<NetworkId>();
else {
createBuffer(user, network, "");
query.exec();
if(query.first())
- return query.value(0).toUInt();
+ return query.value(0).value<NetworkId>();
else {
qWarning() << "NETWORK NOT FOUND:" << network << "for User:" << user;
return 0;
BufferInfo SqliteStorage::getBufferInfo(UserId user, const QString &network, const QString &buffer) {
BufferInfo bufferid;
// TODO: get rid of this hackaround
- uint networkId = getNetworkId(user, network);
+ NetworkId networkId = getNetworkId(user, network);
QSqlQuery *getBufferInfoQuery = cachedQuery("select_bufferByName");
getBufferInfoQuery->bindValue(":networkname", network);
createBuffer(user, network, buffer);
getBufferInfoQuery->exec();
if(getBufferInfoQuery->first()) {
- bufferid = BufferInfo(getBufferInfoQuery->value(0).toUInt(), networkId, 0, network, buffer);
+ bufferid = BufferInfo(getBufferInfoQuery->value(0).value<BufferId>(), networkId, 0, network, buffer);
emit bufferInfoUpdated(user, bufferid);
}
} else {
- bufferid = BufferInfo(getBufferInfoQuery->value(0).toUInt(), networkId, 0, network, buffer);
+ bufferid = BufferInfo(getBufferInfoQuery->value(0).value<BufferId>(), networkId, 0, network, buffer);
}
Q_ASSERT(!getBufferInfoQuery->next());
query.exec();
watchQuery(&query);
while(query.next()) {
- bufferlist << BufferInfo(query.value(0).toUInt(), query.value(2).toUInt(), 0, query.value(3).toString(), query.value(1).toString());
+ bufferlist << BufferInfo(query.value(0).value<BufferId>(), query.value(2).value<NetworkId>(), 0, query.value(3).toString(), query.value(1).toString());
}
return bufferlist;
}
getLastMessageIdQuery->exec();
if(getLastMessageIdQuery->first()) {
- return getLastMessageIdQuery->value(0).toUInt();
+ return getLastMessageIdQuery->value(0).value<MsgId>();
} else { // somethin went wrong... :(
qDebug() << getLastMessageIdQuery->lastQuery() << "time/bufferid/type/sender:" << msg.timestamp().toTime_t() << msg.buffer().uid() << msg.type() << msg.sender();
Q_ASSERT(false);
requestMsgsOffsetQuery->bindValue(":messageid", offset);
requestMsgsOffsetQuery->exec();
requestMsgsOffsetQuery->first();
- offset = requestMsgsOffsetQuery->value(0).toUInt();
+ offset = requestMsgsOffsetQuery->value(0).toInt();
// now let's select the messages
QSqlQuery *requestMsgsQuery = cachedQuery("select_messages");
requestMsgsQuery->value(5).toString(),
requestMsgsQuery->value(4).toString(),
requestMsgsQuery->value(3).toUInt());
- msg.setMsgId(requestMsgsQuery->value(0).toUInt());
+ msg.setMsgId(requestMsgsQuery->value(0).value<MsgId>());
messagelist << msg;
}
return messagelist;
requestMsgsSinceOffsetQuery->bindValue(":since", since.toTime_t());
requestMsgsSinceOffsetQuery->exec();
requestMsgsSinceOffsetQuery->first();
- offset = requestMsgsSinceOffsetQuery->value(0).toUInt();
+ offset = requestMsgsSinceOffsetQuery->value(0).toInt();
// now let's select the messages
QSqlQuery *requestMsgsSinceQuery = cachedQuery("select_messagesSince");
requestMsgsSinceQuery->value(5).toString(),
requestMsgsSinceQuery->value(4).toString(),
requestMsgsSinceQuery->value(3).toUInt());
- msg.setMsgId(requestMsgsSinceQuery->value(0).toUInt());
+ msg.setMsgId(requestMsgsSinceQuery->value(0).value<MsgId>());
messagelist << msg;
}
requestMsgRangeQuery->value(5).toString(),
requestMsgRangeQuery->value(4).toString(),
requestMsgRangeQuery->value(3).toUInt());
- msg.setMsgId(requestMsgRangeQuery->value(0).toUInt());
+ msg.setMsgId(requestMsgRangeQuery->value(0).value<MsgId>());
messagelist << msg;
}
virtual void delUser(UserId user);
/* Network handling */
- virtual uint getNetworkId(UserId user, const QString &network);
+ virtual NetworkId getNetworkId(UserId user, const QString &network);
/* Buffer handling */
virtual BufferInfo getBufferInfo(UserId user, const QString &network, const QString &buffer = "");
* \param network The network name
* \return The BufferInfo corresponding to the given network and buffer name, or 0 if not found
*/
- virtual uint getNetworkId(UserId user, const QString &network) = 0;
+ virtual NetworkId getNetworkId(UserId user, const QString &network) = 0;
/* Buffer handling */
class BufferWidget : public QWidget {
Q_OBJECT
- Q_PROPERTY(uint currentBuffer READ currentBuffer WRITE setCurrentBuffer)
-
+ Q_PROPERTY(uint currentBuffer READ currentBuffer WRITE setCurrentBuffer); // FIXME BufferId
+
public:
BufferWidget(QWidget *parent = 0);
virtual ~BufferWidget();
#include "settingspages/fontssettingspage.h"
#include "settingspages/identitiessettingspage.h"
+#include "settingspages/networkssettingspage.h"
#include "debugconsole.h"
void MainWin::setupSettingsDlg() {
settingsDlg->registerSettingsPage(new FontsSettingsPage(settingsDlg));
settingsDlg->registerSettingsPage(new IdentitiesSettingsPage(settingsDlg));
+ settingsDlg->registerSettingsPage(new NetworksSettingsPage(settingsDlg));
}
void MainWin::connectedToCore() {
CoreConnectDlg *coreConnectDlg;
SettingsDlg *settingsDlg;
- uint currentBuffer;
+ BufferId currentBuffer;
QString currentProfile;
QList<QDockWidget *> netViews;
class NickListWidget : public QWidget {
Q_OBJECT
- Q_PROPERTY(uint currentBuffer READ currentBuffer WRITE setCurrentBuffer)
+ Q_PROPERTY(uint currentBuffer READ currentBuffer WRITE setCurrentBuffer); // FIXME BufferId
public:
NickListWidget(QWidget *parent = 0);
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...
+ ui.settingsStack->setMinimumSize(sp->minimumSizeHint()); // we don't want our page shrinked, use scrollbars instead...
_currentPage = sp;
}
ui.settingsTree->setCurrentItem(treeItems[sp]);
//ui.identityList->setEditable(false);
displayIdentity(0);
} else {
- IdentityId id = ui.identityList->itemData(index).toInt();
+ IdentityId id = ui.identityList->itemData(index).value<IdentityId>();
if(identities.contains(id)) displayIdentity(identities[id]);
ui.deleteIdentity->setEnabled(id != 1); // default identity cannot be deleted
ui.renameIdentity->setEnabled(id != 1); // ...or renamed
IdentityId CreateIdentityDlg::duplicateId() const {
if(!ui.duplicateIdentity->isChecked()) return 0;
if(ui.identityList->currentIndex() >= 0) {
- return ui.identityList->itemData(ui.identityList->currentIndex()).toInt();
+ return ui.identityList->itemData(ui.identityList->currentIndex()).value<IdentityId>();
}
return 0;
}
--- /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) version 3. *
+ * *
+ * 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 "networkssettingspage.h"
+
+NetworksSettingsPage::NetworksSettingsPage(QWidget *parent) : SettingsPage(tr("General"), tr("Networks"), parent) {
+ ui.setupUi(this);
+
+}
+
+void NetworksSettingsPage::save() {
+
+
+}
+
+void NetworksSettingsPage::load() {
+
+
+}
--- /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) version 3. *
+ * *
+ * 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 _NETWORKSSETTINGSPAGE_H_
+#define _NETWORKSSETTINGSPAGE_H_
+
+#include "settingspage.h"
+
+#include "ui_networkssettingspage.h"
+
+class NetworksSettingsPage : public SettingsPage {
+ Q_OBJECT
+
+ public:
+ NetworksSettingsPage(QWidget *parent = 0);
+
+ //bool aboutToSave();
+
+ public slots:
+ void save();
+ void load();
+
+ private:
+ Ui::NetworksSettingsPage ui;
+
+
+};
+
+#endif
--- /dev/null
+<ui version="4.0" >
+ <class>NetworksSettingsPage</class>
+ <widget class="QWidget" name="NetworksSettingsPage" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>417</width>
+ <height>416</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QTableWidget" name="networkTable" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <column>
+ <property name="text" >
+ <string>Network</string>
+ </property>
+ </column>
+ <column>
+ <property name="text" >
+ <string>Identity</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QPushButton" name="renameNetwork" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </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>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="addNetwork" >
+ <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>
+ <item>
+ <widget class="QPushButton" name="deleteNetwork" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>De&lete</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/edit-delete.png</iconset>
+ </property>
+ </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>
+ <item>
+ <widget class="QPushButton" name="connectNow" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Connect now</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/network-disconnect.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0" colspan="2" >
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Network Details</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QTabWidget" name="tabWidget" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="currentIndex" >
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="serversTab" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <attribute name="title" >
+ <string>Servers</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QListWidget" name="serverList" >
+ <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="editServer" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>&Edit...</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/configure.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="addServer" >
+ <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>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="deleteServer" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>De&lete</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/edit-delete.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="upServer" >
+ <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="downServer" >
+ <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::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="randomServer" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>Choose random server for connecting</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="performTab" >
+ <attribute name="title" >
+ <string>Perform</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Commands to execute on connect:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QTextEdit" name="performEdit" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="lineWrapMode" >
+ <enum>QTextEdit::NoWrap</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="autoIdentify" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="title" >
+ <string>Auto Identify</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_2" >
+ <property name="text" >
+ <string>Service:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="autoIdentService" >
+ <property name="text" >
+ <string>NickServ</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Password:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLineEdit" name="autoIdentPassword" >
+ <property name="echoMode" >
+ <enum>QLineEdit::PasswordEchoOnEdit</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab" >
+ <attribute name="title" >
+ <string>Advanced</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QGroupBox" name="groupBox_3" >
+ <property name="title" >
+ <string>Network Encoding</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Sending:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QComboBox" name="sendEncoding" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>Receiving:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QComboBox" name="recvEncoding" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </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>
+ <widget class="QCheckBox" name="useDefaultEncodings" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>Use defaults</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>375</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources>
+ <include location="../../icons/icons.qrc" />
+ </resources>
+ <connections>
+ <connection>
+ <sender>useDefaultEncodings</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>sendEncoding</receiver>
+ <slot>setDisabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>356</x>
+ <y>181</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>470</x>
+ <y>122</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>useDefaultEncodings</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>recvEncoding</receiver>
+ <slot>setDisabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>383</x>
+ <y>181</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>445</x>
+ <y>156</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
--- /dev/null
+<ui version="4.0" >
+ <class>ServerEditDlgNew</class>
+ <widget class="QDialog" name="ServerEditDlgNew" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>264</width>
+ <height>159</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Dialog</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Server address:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Port:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLineEdit" name="serverAddress" />
+ </item>
+ <item row="1" column="1" >
+ <widget class="QSpinBox" name="serverPort" >
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ <property name="maximum" >
+ <number>65535</number>
+ </property>
+ <property name="value" >
+ <number>6667</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Password:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="serverPassword" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="echoMode" >
+ <enum>QLineEdit::Password</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="useSSL" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>Use SSL</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../../icons/icons.qrc" >:/16x16/actions/oxygen/16x16/actions/document-encrypt.png</iconset>
+ </property>
+ </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>
+ <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>
+ </widget>
+ <resources>
+ <include location="../../icons/icons.qrc" />
+ </resources>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>ServerEditDlgNew</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>ServerEditDlgNew</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
+SETTINGSPAGES = fonts identities networks
# Specify additional files (e.g. for subdialogs) here!
SP_SRCS =
SP_HDRS =
-SP_FRMS = createidentitydlg.ui saveidentitiesdlg.ui nickeditdlgnew.ui
+SP_FRMS = createidentitydlg.ui saveidentitiesdlg.ui nickeditdlgnew.ui servereditdlgnew.ui
if(bufferType != BufferItem::ChannelType)
return;
- Client::fakeInput(index.data(NetworkModel::BufferIdRole).toUInt(), QString("/JOIN %1").arg(index.sibling(index.row(), 0).data().toString()));
+ Client::fakeInput(index.data(NetworkModel::BufferIdRole).value<BufferId>(), QString("/JOIN %1").arg(index.sibling(index.row(), 0).data().toString()));
}
void BufferView::keyPressEvent(QKeyEvent *event) {
if(!NetworkModel::mimeContainsBufferList(data))
return false;
- QList< QPair<uint, uint> > bufferList = NetworkModel::mimeDataToBufferList(data);
+ QList< QPair<NetworkId, BufferId> > bufferList = NetworkModel::mimeDataToBufferList(data);
- uint netId, bufferId;
+ NetworkId netId;
+ BufferId bufferId;
for(int i = 0; i < bufferList.count(); i++) {
netId = bufferList[i].first;
bufferId = bufferList[i].second;
return true;
}
-void BufferViewFilter::addBuffer(const uint &bufferuid) {
+void BufferViewFilter::addBuffer(const BufferId &bufferuid) {
if(!buffers.contains(bufferuid)) {
buffers << bufferuid;
invalidateFilter();
return; // only child elements can be deleted
bool lastBuffer = (rowCount(index.parent()) == 1);
- uint netId = index.data(NetworkModel::NetworkIdRole).toUInt();
- uint bufferuid = index.data(NetworkModel::BufferIdRole).toUInt();
+ NetworkId netId = index.data(NetworkModel::NetworkIdRole).value<NetworkId>();
+ BufferId bufferuid = index.data(NetworkModel::BufferIdRole).value<BufferId>();
if(buffers.contains(bufferuid)) {
buffers.remove(bufferuid);
// return false;
if((mode & FullCustom)) {
- uint bufferuid = source_bufferIndex.data(NetworkModel::BufferIdRole).toUInt();
+ BufferId bufferuid = source_bufferIndex.data(NetworkModel::BufferIdRole).value<BufferId>();
return buffers.contains(bufferuid);
}
}
bool BufferViewFilter::filterAcceptNetwork(const QModelIndex &source_index) const {
- uint net = source_index.data(NetworkModel::NetworkIdRole).toUInt();
+ NetworkId net = source_index.data(NetworkModel::NetworkIdRole).value<NetworkId>();
return !((mode & (SomeNets | FullCustom)) && !networks.contains(net));
}
#include <QSortFilterProxyModel>
#include <QSet>
// #include "buffer.h"
+#include "types.h"
/*****************************************
* Buffer View Filter
bool filterAcceptBuffer(const QModelIndex &) const;
bool filterAcceptNetwork(const QModelIndex &) const;
- void addBuffer(const uint &);
+ void addBuffer(const BufferId &);
};
Q_DECLARE_OPERATORS_FOR_FLAGS(BufferViewFilter::Modes)
if(!currentIndex.data(NetworkModel::BufferIdRole).isValid())
return;
- NetworkId networkId = currentIndex.data(NetworkModel::NetworkIdRole).toUInt();
+ NetworkId networkId = currentIndex.data(NetworkModel::NetworkIdRole).value<NetworkId>();
QString channelName = currentIndex.sibling(currentIndex.row(), 0).data().toString();
Network *network = Client::network(networkId);
{ using namespace Global;
quasselVersion = "0.2.0-pre";
- quasselDate = "2008-01-17";
- quasselBuild = 355;
+ quasselDate = "2008-01-18";
+ quasselBuild = 356;
//! Minimum client build number the core needs
clientBuildNeeded = 355;