Properly clean up after disconnecting
[quassel.git] / src / uisupport / networkmodelcontroller.h
index 3d91ef9..4e84a6b 100644 (file)
@@ -88,6 +88,17 @@ public:
     NickKick = 0x0c0000,
     NickBan = 0x0d0000,
     NickKickBan = 0x0e0000,
+    NickIgnoreUser = 0x0f0000,
+    NickIgnoreHost = 0x100000,
+    NickIgnoreDomain = 0x200000,
+    NickIgnoreCustom = 0x300000,
+    // The next 5 types have stay together
+    // Don't change without reading ContextMenuActionProvider::addIgnoreMenu!
+    NickIgnoreToggleEnabled0 = 0x400000,
+    NickIgnoreToggleEnabled1 = 0x500000,
+    NickIgnoreToggleEnabled2 = 0x600000,
+    NickIgnoreToggleEnabled3 = 0x700000,
+    NickIgnoreToggleEnabled4 = 0x800000,
 
     // Actions that are handled externally
     // These emit a signal to the action requester, rather than being handled here
@@ -105,6 +116,10 @@ public:
   };
   Q_DECLARE_FLAGS(ItemActiveStates, ItemActiveState)
 
+public slots:
+  virtual void connectedToCore() {}
+  virtual void disconnectedFromCore() {}
+
 protected:
   inline ActionCollection *actionCollection() const;
   inline QList<QModelIndex> indexList() const;
@@ -133,13 +148,13 @@ protected slots:
 
 signals:
   void showChannelList(NetworkId);
-  void showIgnoreList(NetworkId);
+  void showIgnoreList(QString);
 
 protected:
   virtual void handleNetworkAction(ActionType, QAction *);
   virtual void handleBufferAction(ActionType, QAction *);
   virtual void handleHideAction(ActionType, QAction *);
-  virtual void handleNickAction(ActionType, QAction *);
+  virtual void handleNickAction(ActionType, QAction *action);
   virtual void handleGeneralAction(ActionType, QAction *);
   virtual void handleExternalAction(ActionType, QAction *);
 
@@ -166,6 +181,7 @@ public:
   JoinDlg(const QModelIndex &index, QWidget *parent = 0);
 
   QString channelName() const;
+  QString channelPassword() const;
   NetworkId networkId() const;
 
 private slots:
@@ -174,6 +190,7 @@ private slots:
 private:
   QComboBox *networks;
   QLineEdit *channel;
+  QLineEdit *password;
   QDialogButtonBox *buttonBox;
 };