uint -> NetworkId, uint -> BufferId almost everywhere. Conversion will be made explic...
authorManuel Nickschas <sputnick@quassel-irc.org>
Fri, 18 Jan 2008 15:50:03 +0000 (15:50 +0000)
committerManuel Nickschas <sputnick@quassel-irc.org>
Fri, 18 Jan 2008 15:50:03 +0000 (15:50 +0000)
so we won't confuse that anymore.

Distclean advised.

29 files changed:
Quassel.kdevelop.filelist
src/client/buffermodel.cpp
src/client/client.cpp
src/client/mappedselectionmodel.cpp
src/client/networkmodel.cpp
src/common/bufferinfo.cpp
src/common/bufferinfo.h
src/common/global.h
src/common/types.h
src/core/networkconnection.cpp
src/core/sqlitestorage.cpp
src/core/sqlitestorage.h
src/core/storage.h
src/qtui/bufferwidget.h
src/qtui/mainwin.cpp
src/qtui/mainwin.h
src/qtui/nicklistwidget.h
src/qtui/settingsdlg.cpp
src/qtui/settingspages/identitiessettingspage.cpp
src/qtui/settingspages/networkssettingspage.cpp [new file with mode: 0644]
src/qtui/settingspages/networkssettingspage.h [new file with mode: 0644]
src/qtui/settingspages/networkssettingspage.ui [new file with mode: 0644]
src/qtui/settingspages/servereditdlgnew.ui [new file with mode: 0644]
src/qtui/settingspages/settingspages.pri
src/uisupport/bufferview.cpp
src/uisupport/bufferviewfilter.cpp
src/uisupport/bufferviewfilter.h
src/uisupport/tabcompleter.cpp
version.inc

index fe1d9fa..1cedf41 100644 (file)
@@ -187,6 +187,8 @@ src/qtui/settingspages/fontssettingspage.ui
 src/qtui/settingspages/identitiessettingspage.cpp
 src/qtui/settingspages/identitiessettingspage.h
 src/qtui/settingspages/identitiessettingspage.ui
 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
 src/qtui/settingspages/networkssettingspage.ui
 src/qtui/settingspages/nickeditdlgnew.ui
 src/qtui/settingspages/saveidentitiesdlg.ui
index 440fff0..88c1ab8 100644 (file)
@@ -68,15 +68,15 @@ void BufferModel::synchronizeView(QAbstractItemView *view) {
 }
 
 void BufferModel::mapProperty(int column, int role, QObject *target, const QByteArray &property) {
 }
 
 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)
   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;
   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);
     currentBuffer = newCurrentBuffer;
     // FIXME: to something like: index.setData(ActivitRole, NoActivity);
     // networkModel->bufferActivity(BufferItem::NoActivity, currentBuffer);
index 34c903e..dd8bd21 100644 (file)
@@ -127,7 +127,7 @@ QList<Network *> Client::networks() {
   return instance()->_networks.values();
 }
 
   return instance()->_networks.values();
 }
 
-Network *Client::network(uint networkid) {
+Network *Client::network(NetworkId networkid) {
   if(instance()->_networks.contains(networkid))
     return instance()->_networks[networkid];
   else
   if(instance()->_networks.contains(networkid))
     return instance()->_networks[networkid];
   else
@@ -245,7 +245,7 @@ void Client::coreIdentityRemoved(IdentityId id) {
 
 /***  ***/
 
 
 /***  ***/
 
-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;
   Buffer *buff = buffer(bufferUid);
   if(!buff)
     qWarning() << "No Buffer with uid" << bufferUid << "can't send Input" << message;
index f5b7470..e632581 100644 (file)
@@ -111,4 +111,4 @@ void MappedSelectionModel::_selectionChanged(const QItemSelection &selected, con
   Q_UNUSED(deselected)
   emit mappedSelectionChanged(mapSelectionToSource(QItemSelectionModel::selection()));
 }
   Q_UNUSED(deselected)
   emit mappedSelectionChanged(mapSelectionToSource(QItemSelectionModel::selection()));
 }
-  
+
index 59485da..e3739ae 100644 (file)
@@ -527,14 +527,14 @@ bool NetworkModel::dropMimeData(const QMimeData *data, Qt::DropAction action, in
   if(targetType != BufferItem::QueryType)
     return false;
 
   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;
 
 
   // 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>())
 
   // no self merges (would kill us)
   if(bufferId == parent.data(BufferIdRole).value<BufferId>())
index 75a816d..74cf492 100644 (file)
@@ -35,7 +35,7 @@ BufferInfo::BufferInfo()
     _bufferName(QString()) {
 }
 
     _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),
   : _id(id),
     _netid(networkid),
     _gid(gid),
index 0597adc..5e2b5f2 100644 (file)
@@ -29,7 +29,7 @@ class QDataStream;
 class BufferInfo {
 public:
   BufferInfo();
 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 BufferId uid() const { return _id; }
   inline NetworkId networkId() const { return _netid; }
@@ -42,8 +42,8 @@ public:
   inline bool operator==(const BufferInfo &other) const { return _id == other._id; }
 
 private:
   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;
   uint _gid;
   QString _networkName; // WILL BE REMOVED
   QString _bufferName;
index 8b7cf83..3963367 100644 (file)
@@ -54,6 +54,6 @@ namespace Global {
   extern unsigned int defaultPort;
 
   void registerMetaTypes();
   extern unsigned int defaultPort;
 
   void registerMetaTypes();
-}
+};
 
 #endif
 
 #endif
index b0dd0d1..9793150 100644 (file)
 
 #include <QString>
 
 
 #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.
 // 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.
 typedef qint32 IdentityId; //!< Identifies an identity.
 
 //! Base class for exceptions.
index 21e7f63..c4433de 100644 (file)
@@ -63,7 +63,7 @@ bool NetworkConnection::isConnected() const {
   return socket.state() == QAbstractSocket::ConnectedState;
 }
 
   return socket.state() == QAbstractSocket::ConnectedState;
 }
 
-uint NetworkConnection::networkId() const {
+NetworkId NetworkConnection::networkId() const {
   return network()->networkId();
 }
 
   return network()->networkId();
 }
 
index 81108bd..0cde45d 100644 (file)
@@ -163,7 +163,7 @@ void SqliteStorage::createBuffer(UserId user, const QString &network, const QStr
   }
 }
 
   }
 }
 
-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");
   QSqlQuery query(logDb());
   query.prepare("SELECT networkid FROM network "
                "WHERE userid = :userid AND networkname = :networkname");
@@ -172,12 +172,12 @@ uint SqliteStorage::getNetworkId(UserId user, const QString &network) {
   query.exec();
   
   if(query.first())
   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())
   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;
     else {
       qWarning() << "NETWORK NOT FOUND:" << network << "for User:" << user;
       return 0;
@@ -188,7 +188,7 @@ uint SqliteStorage::getNetworkId(UserId user, const QString &network) {
 BufferInfo SqliteStorage::getBufferInfo(UserId user, const QString &network, const QString &buffer) {
   BufferInfo bufferid;
   // TODO: get rid of this hackaround
 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);
 
   QSqlQuery *getBufferInfoQuery = cachedQuery("select_bufferByName");
   getBufferInfoQuery->bindValue(":networkname", network);
@@ -201,11 +201,11 @@ BufferInfo SqliteStorage::getBufferInfo(UserId user, const QString &network, con
     createBuffer(user, network, buffer);
     getBufferInfoQuery->exec();
     if(getBufferInfoQuery->first()) {
     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 {
       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());
   }
 
   Q_ASSERT(!getBufferInfoQuery->next());
@@ -227,7 +227,7 @@ QList<BufferInfo> SqliteStorage::requestBuffers(UserId user, QDateTime since) {
   query.exec();
   watchQuery(&query);
   while(query.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;
 }
   }
   return bufferlist;
 }
@@ -265,7 +265,7 @@ MsgId SqliteStorage::logMessage(Message msg) {
   getLastMessageIdQuery->exec();
 
   if(getLastMessageIdQuery->first()) {
   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);
   } 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);
@@ -281,7 +281,7 @@ QList<Message> SqliteStorage::requestMsgs(BufferInfo buffer, int lastmsgs, int o
   requestMsgsOffsetQuery->bindValue(":messageid", offset);
   requestMsgsOffsetQuery->exec();
   requestMsgsOffsetQuery->first();
   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");
 
   // now let's select the messages
   QSqlQuery *requestMsgsQuery = cachedQuery("select_messages");
@@ -297,7 +297,7 @@ QList<Message> SqliteStorage::requestMsgs(BufferInfo buffer, int lastmsgs, int o
                 requestMsgsQuery->value(5).toString(),
                 requestMsgsQuery->value(4).toString(),
                 requestMsgsQuery->value(3).toUInt());
                 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;
     messagelist << msg;
   }
   return messagelist;
@@ -312,7 +312,7 @@ QList<Message> SqliteStorage::requestMsgs(BufferInfo buffer, QDateTime since, in
   requestMsgsSinceOffsetQuery->bindValue(":since", since.toTime_t());
   requestMsgsSinceOffsetQuery->exec();
   requestMsgsSinceOffsetQuery->first();
   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");
 
   // now let's select the messages
   QSqlQuery *requestMsgsSinceQuery = cachedQuery("select_messagesSince");
@@ -329,7 +329,7 @@ QList<Message> SqliteStorage::requestMsgs(BufferInfo buffer, QDateTime since, in
                 requestMsgsSinceQuery->value(5).toString(),
                 requestMsgsSinceQuery->value(4).toString(),
                 requestMsgsSinceQuery->value(3).toUInt());
                 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;
   }
 
     messagelist << msg;
   }
 
@@ -352,7 +352,7 @@ QList<Message> SqliteStorage::requestMsgRange(BufferInfo buffer, int first, int
                 requestMsgRangeQuery->value(5).toString(),
                 requestMsgRangeQuery->value(4).toString(),
                 requestMsgRangeQuery->value(3).toUInt());
                 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;
   }
 
     messagelist << msg;
   }
 
index 992fc8f..2038b2b 100644 (file)
@@ -51,7 +51,7 @@ public slots:
   virtual void delUser(UserId user);
   
   /* Network handling */
   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 = "");
   
   /* Buffer handling */
   virtual BufferInfo getBufferInfo(UserId user, const QString &network, const QString &buffer = "");
index db68417..1af8d86 100644 (file)
@@ -101,7 +101,7 @@ class Storage : public QObject {
      *  \param network The network name
      *  \return The BufferInfo corresponding to the given network and buffer name, or 0 if not found
      */
      *  \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 */
 
 
     /* Buffer handling */
 
index 980d0de..d035fed 100644 (file)
@@ -36,8 +36,8 @@ class LayoutThread;
 class BufferWidget : public QWidget {
   Q_OBJECT
 
 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();
 public:
   BufferWidget(QWidget *parent = 0);
   virtual ~BufferWidget();
index 8aa0bb2..38b07a2 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "settingspages/fontssettingspage.h"
 #include "settingspages/identitiessettingspage.h"
 
 #include "settingspages/fontssettingspage.h"
 #include "settingspages/identitiessettingspage.h"
+#include "settingspages/networkssettingspage.h"
 
 #include "debugconsole.h"
 
 
 #include "debugconsole.h"
 
@@ -202,6 +203,7 @@ void MainWin::addBufferView(const QString &viewname, QAbstractItemModel *model,
 void MainWin::setupSettingsDlg() {
   settingsDlg->registerSettingsPage(new FontsSettingsPage(settingsDlg));
   settingsDlg->registerSettingsPage(new IdentitiesSettingsPage(settingsDlg));
 void MainWin::setupSettingsDlg() {
   settingsDlg->registerSettingsPage(new FontsSettingsPage(settingsDlg));
   settingsDlg->registerSettingsPage(new IdentitiesSettingsPage(settingsDlg));
+  settingsDlg->registerSettingsPage(new NetworksSettingsPage(settingsDlg));
 }
 
 void MainWin::connectedToCore() {
 }
 
 void MainWin::connectedToCore() {
index fc0ba02..00cfd68 100644 (file)
@@ -85,7 +85,7 @@ class MainWin : public QMainWindow {
     CoreConnectDlg *coreConnectDlg;
     SettingsDlg *settingsDlg;
 
     CoreConnectDlg *coreConnectDlg;
     SettingsDlg *settingsDlg;
 
-    uint currentBuffer;
+    BufferId currentBuffer;
     QString currentProfile;
 
     QList<QDockWidget *> netViews;
     QString currentProfile;
 
     QList<QDockWidget *> netViews;
index 4e8ac8d..d58735f 100644 (file)
@@ -32,7 +32,7 @@ class NickView;
 class NickListWidget : public QWidget {
   Q_OBJECT
 
 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);
 
 public:
   NickListWidget(QWidget *parent = 0);
index 1e8a59b..62fbdd0 100644 (file)
@@ -90,7 +90,7 @@ void SettingsDlg::selectPage(const QString &cat, const QString &title) {
   if(sp != currentPage()) {
     ui.pageTitle->setText(sp->title());
     ui.settingsStack->setCurrentWidget(sp);
   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]);
     _currentPage = sp;
   }
   ui.settingsTree->setCurrentItem(treeItems[sp]);
index 83b1206..e78e645 100644 (file)
@@ -250,7 +250,7 @@ void IdentitiesSettingsPage::on_identityList_currentIndexChanged(int index) {
     //ui.identityList->setEditable(false);
     displayIdentity(0);
   } else {
     //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
     if(identities.contains(id)) displayIdentity(identities[id]);
     ui.deleteIdentity->setEnabled(id != 1); // default identity cannot be deleted
     ui.renameIdentity->setEnabled(id != 1); // ...or renamed
@@ -431,7 +431,7 @@ QString CreateIdentityDlg::identityName() const {
 IdentityId CreateIdentityDlg::duplicateId() const {
   if(!ui.duplicateIdentity->isChecked()) return 0;
   if(ui.identityList->currentIndex() >= 0) {
 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;
 }
   }
   return 0;
 }
diff --git a/src/qtui/settingspages/networkssettingspage.cpp b/src/qtui/settingspages/networkssettingspage.cpp
new file mode 100644 (file)
index 0000000..205975f
--- /dev/null
@@ -0,0 +1,36 @@
+/***************************************************************************
+ *   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() {
+
+
+}
diff --git a/src/qtui/settingspages/networkssettingspage.h b/src/qtui/settingspages/networkssettingspage.h
new file mode 100644 (file)
index 0000000..16e4981
--- /dev/null
@@ -0,0 +1,46 @@
+/***************************************************************************
+ *   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
diff --git a/src/qtui/settingspages/networkssettingspage.ui b/src/qtui/settingspages/networkssettingspage.ui
new file mode 100644 (file)
index 0000000..c1696a7
--- /dev/null
@@ -0,0 +1,543 @@
+<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&amp;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>&amp;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&amp;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>&amp;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>&amp;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&amp;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>
diff --git a/src/qtui/settingspages/servereditdlgnew.ui b/src/qtui/settingspages/servereditdlgnew.ui
new file mode 100644 (file)
index 0000000..96e7eeb
--- /dev/null
@@ -0,0 +1,146 @@
+<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>
index e97d8cd..7b14b4b 100644 (file)
@@ -1,8 +1,8 @@
 # Putting $FOO in SETTINGSPAGES automatically includes
 # $FOOsettingspage.cpp, $FOOsettingspage.h and $FOOsettingspage.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 =
 
 # 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
index 14b27ec..c0bddb7 100644 (file)
@@ -87,7 +87,7 @@ void BufferView::joinChannel(const QModelIndex &index) {
   if(bufferType != BufferItem::ChannelType)
     return;
   
   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) {
 }
 
 void BufferView::keyPressEvent(QKeyEvent *event) {
index cf3d468..4e7af88 100644 (file)
@@ -65,9 +65,10 @@ bool BufferViewFilter::dropMimeData(const QMimeData *data, Qt::DropAction action
   if(!NetworkModel::mimeContainsBufferList(data))
     return false;
 
   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;
   for(int i = 0; i < bufferList.count(); i++) {
     netId = bufferList[i].first;
     bufferId = bufferList[i].second;
@@ -79,7 +80,7 @@ bool BufferViewFilter::dropMimeData(const QMimeData *data, Qt::DropAction action
   return true;
 }
 
   return true;
 }
 
-void BufferViewFilter::addBuffer(const uint &bufferuid) {
+void BufferViewFilter::addBuffer(const BufferId &bufferuid) {
   if(!buffers.contains(bufferuid)) {
     buffers << bufferuid;
     invalidateFilter();
   if(!buffers.contains(bufferuid)) {
     buffers << bufferuid;
     invalidateFilter();
@@ -94,8 +95,8 @@ void BufferViewFilter::removeBuffer(const QModelIndex &index) {
     return; // only child elements can be deleted
 
   bool lastBuffer = (rowCount(index.parent()) == 1);
     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);
 
   if(buffers.contains(bufferuid)) {
     buffers.remove(bufferuid);
@@ -128,7 +129,7 @@ bool BufferViewFilter::filterAcceptBuffer(const QModelIndex &source_bufferIndex)
 //     return false;
 
   if((mode & FullCustom)) {
 //     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);
   }
     
     return buffers.contains(bufferuid);
   }
     
@@ -136,7 +137,7 @@ bool BufferViewFilter::filterAcceptBuffer(const QModelIndex &source_bufferIndex)
 }
 
 bool BufferViewFilter::filterAcceptNetwork(const QModelIndex &source_index) const {
 }
 
 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));
 }
 
   return !((mode & (SomeNets | FullCustom)) && !networks.contains(net));
 }
 
index d20445d..506cbeb 100644 (file)
@@ -26,6 +26,7 @@
 #include <QSortFilterProxyModel>
 #include <QSet>
 // #include "buffer.h"
 #include <QSortFilterProxyModel>
 #include <QSet>
 // #include "buffer.h"
+#include "types.h"
 
 /*****************************************
  * Buffer View Filter
 
 /*****************************************
  * Buffer View Filter
@@ -69,7 +70,7 @@ private:
 
   bool filterAcceptBuffer(const QModelIndex &) const;
   bool filterAcceptNetwork(const QModelIndex &) const;
 
   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)    
 
 };
 Q_DECLARE_OPERATORS_FOR_FLAGS(BufferViewFilter::Modes)    
index 60a74fb..41ea4ff 100644 (file)
@@ -42,7 +42,7 @@ void TabCompleter::buildCompletionList() {
   if(!currentIndex.data(NetworkModel::BufferIdRole).isValid())
     return;
   
   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);
   QString channelName = currentIndex.sibling(currentIndex.row(), 0).data().toString();
 
   Network *network = Client::network(networkId);
index 2f02d5a..a4744a8 100644 (file)
@@ -4,8 +4,8 @@
 { using namespace Global;
 
   quasselVersion = "0.2.0-pre";
 { 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;
 
   //! Minimum client build number the core needs
   clientBuildNeeded = 355;