X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.h;h=845d378c8cd765a9891c223ba47bae98cb28ba6f;hp=4d168253e2909db7eb141bc755a105ad05d0811e;hb=6f442c275cc5a2d5f1084ac2ceca5f1ffce1d024;hpb=ee7d56f3abdb6ee4ce6c79ddea0142407b4e9e74 diff --git a/src/qtui/mainwin.h b/src/qtui/mainwin.h index 4d168253..845d378c 100644 --- a/src/qtui/mainwin.h +++ b/src/qtui/mainwin.h @@ -27,6 +27,10 @@ # include #endif +#ifdef Q_WS_WIN +# include +#endif + #include #include "qtui.h" @@ -42,7 +46,7 @@ class BufferWidget; class InputWidget; class MsgProcessorStatusWidget; class NickListWidget; -class SystemTrayIcon; +class SystemTray; class QMenu; class QLabel; @@ -68,9 +72,9 @@ class MainWin void addBufferView(ClientBufferViewConfig *config); BufferView *allBuffersView() const; - inline QSystemTrayIcon *systemTrayIcon() const; + inline SystemTray *systemTray() const; - virtual bool event(QEvent *event); + bool event(QEvent *event); static void flagRemoteCoreOnly(QObject *object) { object->setProperty("REMOTE_CORE_ONLY", true); } static bool isRemoteCoreOnly(QObject *object) { return object->property("REMOTE_CORE_ONLY").toBool(); } @@ -80,9 +84,14 @@ class MainWin void saveStateToSessionSettings(SessionSettings &s); void showStatusBarMessage(const QString &message); + void toggleMinimizedToTray(); + + //! Bring window to front and focus it + void forceActivated(); + protected: void closeEvent(QCloseEvent *event); - virtual void changeEvent(QEvent *event); + void changeEvent(QEvent *event); protected slots: void connectedToCore(); @@ -90,7 +99,6 @@ class MainWin void updateLagIndicator(int lag = -1); void disconnectedFromCore(); void setDisconnectedState(); - void systrayActivated(QSystemTrayIcon::ActivationReason); private slots: void addBufferView(int bufferViewConfigId); @@ -134,7 +142,6 @@ class MainWin KHelpMenu *_kHelpMenu; #endif - QMenu *systrayMenu; QLabel *coreLagLabel; QLabel *sslLabel; MsgProcessorStatusWidget *msgProcessorStatusWidget; @@ -154,11 +161,11 @@ class MainWin void setupToolBars(); void updateIcon(); - void hideToTray(); - void toggleMinimizedToTray(); void enableMenus(); - QSystemTrayIcon *_trayIcon; + void hideToTray(); + + SystemTray *_systemTray; QList _bufferViews; BufferWidget *_bufferWidget; @@ -171,10 +178,14 @@ class MainWin QWidget *_awayLog; friend class QtUi; + +#ifdef Q_WS_WIN + DWORD dwTickCount; +#endif }; -QSystemTrayIcon *MainWin::systemTrayIcon() const { - return _trayIcon; +SystemTray *MainWin::systemTray() const { + return _systemTray; } #endif