#BR127: user can now set the style of the application in the config menu (behaviour...
[quassel.git] / src / qtui / mainwin.h
index 0e915cf..0f5e299 100644 (file)
@@ -27,6 +27,7 @@
 #include "bufferviewfilter.h"
 
 #include <QSystemTrayIcon>
+#include <QTimer>
 
 class ServerListDlg;
 class CoreConnectDlg;
@@ -49,11 +50,16 @@ class MainWin : public QMainWindow {
     QDockWidget *addBufferView(const QString &, QAbstractItemModel *, const BufferViewFilter::Modes &, const QList<NetworkId> &);
 
     AbstractUiMsg *layoutMsg(const Message &);
+    void displayTrayIconMessage(const QString &title, const QString &message);
+
+    virtual bool event(QEvent *event);
+
+  public slots:
+    void setTrayIconActivity(bool active = false);
 
   protected:
     void closeEvent(QCloseEvent *event);
     virtual void changeEvent(QEvent *event);
-    virtual void keyPressEvent(QKeyEvent *event);
 
   protected slots:
     void connectedToCore();
@@ -61,6 +67,7 @@ class MainWin : public QMainWindow {
     void systrayActivated( QSystemTrayIcon::ActivationReason );
 
   private slots:
+    void receiveMessage(const Message &msg);
     void showSettingsDlg();
     void showNetworkDlg();
     void showAboutDlg();
@@ -74,6 +81,9 @@ class MainWin : public QMainWindow {
     void clientNetworkUpdated();
     void connectOrDisconnectFromNet();
 
+    void changeTopic(const QString &topic);
+    void makeTrayIconBlink();
+
   signals:
     void connectToCore(const QVariantMap &connInfo);
     void disconnectFromCore();
@@ -99,26 +109,25 @@ class MainWin : public QMainWindow {
 
     void enableMenus();
 
-    void bindKey(int key);
-    void jumpKey(int key);
-
-    QHash<int, BufferId> _keyboardJump;
     QSystemTrayIcon *systray;
+    QIcon activeTrayIcon;
+    QIcon inactiveTrayIcon;
+    bool trayIconActive;
+    QTimer *timer;
 
     CoreConnectDlg *coreConnectDlg;
     SettingsDlg *settingsDlg;
+    DebugConsole *debugConsole;
 
     BufferId currentBuffer;
     QString currentProfile;
 
     QList<QDockWidget *> netViews;
-    QDockWidget *nickDock;
     NickListWidget *nickListWidget;
 
     QAction *actionEditNetworks;
     QList<QAction *> networkActions;
 
-    DebugConsole *debugConsole;
     friend class QtUi;
 };