As preparation for revamping the whole networking stuff, I did two renames:
[quassel.git] / src / client / networkmodel.h
index 0ed7487..e15cdd8 100644 (file)
 
 #include <QPointer>
 
-#include <QItemSelectionModel>
-
 class BufferInfo;
 
 #include "selectionmodelsynchronizer.h"
 #include "modelpropertymapper.h"
 class MappedSelectionModel;
 class QAbstractItemView;
-class NetworkInfo;
+class Network;
 class IrcChannel;
 class IrcUser;
 
@@ -102,14 +100,14 @@ public slots:
   void setNetworkName(const QString &networkName);
   void setCurrentServer(const QString &serverName);
 
-  void attachNetworkInfo(NetworkInfo *networkInfo);
+  void attachNetwork(Network *network);
   void attachIrcChannel(const QString &channelName);
   
 private:
   uint _networkId;
   QString _networkName;
 
-  QPointer<NetworkInfo> _networkInfo;
+  QPointer<Network> _network;
 };
 
 /*****************************************
@@ -159,13 +157,6 @@ public:
   NetworkModel(QObject *parent = 0);
   static QList<QVariant> defaultHeader();
 
-  inline SelectionModelSynchronizer *selectionModelSynchronizer() { return _selectionModelSynchronizer; }
-  inline ModelPropertyMapper *propertyMapper() { return _propertyMapper; }
-
-  void synchronizeSelectionModel(MappedSelectionModel *selectionModel);
-  void synchronizeView(QAbstractItemView *view);
-  void mapProperty(int column, int role, QObject *target, const QByteArray &property);
-
   static bool mimeContainsBufferList(const QMimeData *mimeData);
   static QList< QPair<uint, uint> > mimeDataToBufferList(const QMimeData *mimeData);
 
@@ -173,33 +164,24 @@ public:
   virtual QMimeData *mimeData(const QModelIndexList &) const;
   virtual bool dropMimeData(const QMimeData *, Qt::DropAction, int, int, const QModelIndex &);
 
-  void attachNetworkInfo(NetworkInfo *networkInfo);
-                                                 
+  void attachNetwork(Network *network);
+
+  bool isBufferIndex(const QModelIndex &) const;
+  Buffer *getBufferByIndex(const QModelIndex &) const;
+  QModelIndex bufferIndex(BufferInfo bufferInfo);
+
 public slots:
   void bufferUpdated(Buffer *);
-  void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command);
-  void selectBuffer(Buffer *buffer);
   void bufferActivity(Buffer::ActivityLevel, Buffer *buffer);
 
-signals:
-  void bufferSelected(Buffer *);
-  void selectionChanged(const QModelIndex &);
-
 private:
-  bool isBufferIndex(const QModelIndex &) const;
-  Buffer *getBufferByIndex(const QModelIndex &) const;
-
   QModelIndex networkIndex(uint networkId);
   NetworkItem *network(uint networkId);
   NetworkItem *newNetwork(uint networkId, const QString &networkName);
   
-  QModelIndex bufferIndex(BufferInfo bufferInfo);
   BufferItem *buffer(BufferInfo bufferInfo);
   BufferItem *newBuffer(BufferInfo bufferInfo);
 
-  QPointer<SelectionModelSynchronizer> _selectionModelSynchronizer;
-  QPointer<ModelPropertyMapper> _propertyMapper;
-  Buffer *currentBuffer;
 };
 
 #endif // NETWORKMODEL_H