Trying to workaroundinate a weird bug with connection states not always being sent
[quassel.git] / src / qtui / mainwin.h
index 0559b4e..d194a6f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-07 by the Quassel IRC Team                         *
+ *   Copyright (C) 2005-08 by the Quassel Project                          *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -26,6 +26,8 @@
 #include "qtui.h"
 #include "bufferviewfilter.h"
 
+#include <QSystemTrayIcon>
+
 class ServerListDlg;
 class CoreConnectDlg;
 class Buffer;
@@ -33,7 +35,6 @@ class SettingsDlg;
 class QtUi;
 class Message;
 class NickListWidget;
-
 class DebugConsole;
 
 //!\brief The main window of Quassel's QtUi.
@@ -45,7 +46,7 @@ class MainWin : public QMainWindow {
     virtual ~MainWin();
 
     void init();
-    void addBufferView(const QString &, QAbstractItemModel *, const BufferViewFilter::Modes &, const QList<uint> &);
+    QDockWidget *addBufferView(const QString &, QAbstractItemModel *, const BufferViewFilter::Modes &, const QList<NetworkId> &);
 
     AbstractUiMsg *layoutMsg(const Message &);
 
@@ -55,17 +56,20 @@ class MainWin : public QMainWindow {
   protected slots:
     void connectedToCore();
     void disconnectedFromCore();
+    void systrayActivated( QSystemTrayIcon::ActivationReason );
 
   private slots:
 
-    void showServerList();
     void showSettingsDlg();
     void showDebugConsole();
+
     void showCoreConnectionDlg(bool autoConnect = false);
     void coreConnectionDlgFinished(int result);
 
-    void showBuffer(BufferInfo);
-    void showBuffer(Buffer *);
+    void clientNetworkCreated(NetworkId);
+    void clientNetworkRemoved(NetworkId);
+    void clientNetworkUpdated();
+    void connectOrDisconnectFromNet();
 
   signals:
     void connectToCore(const QVariantMap &connInfo);
@@ -78,23 +82,31 @@ class MainWin : public QMainWindow {
 
     void setupMenus();
     void setupViews();
+    void setupNickWidget();
+    void setupChatMonitor();
+    void setupInputWidget();
+    void setupTopicWidget();
+    void setupSystray();
+
     void setupSettingsDlg();
 
     void enableMenus();
 
     QSystemTrayIcon *systray;
 
-    ServerListDlg *serverListDlg;
     CoreConnectDlg *coreConnectDlg;
     SettingsDlg *settingsDlg;
 
-    uint currentBuffer;
+    BufferId currentBuffer;
     QString currentProfile;
 
     QList<QDockWidget *> netViews;
     QDockWidget *nickDock;
     NickListWidget *nickListWidget;
 
+    QAction *actionEditNetworks;
+    QList<QAction *> networkActions;
+
     DebugConsole *debugConsole;
     friend class QtUi;
 };