X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fqtui%2Fmainwin.h;h=011568d88617c56158a5e6532a736a4a7e5a5781;hb=020c860035180e468705b836a21f7aaa70ba0160;hp=4d168253e2909db7eb141bc755a105ad05d0811e;hpb=ee7d56f3abdb6ee4ce6c79ddea0142407b4e9e74;p=quassel.git diff --git a/src/qtui/mainwin.h b/src/qtui/mainwin.h index 4d168253..011568d8 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); @@ -112,6 +120,7 @@ class MainWin void on_actionConfigureViews_triggered(); void on_actionLockLayout_toggled(bool lock); void on_actionDebugNetworkModel_triggered(); + void on_actionDebugBufferViewOverlay_triggered(); void on_actionDebugMessageModel_triggered(); void on_actionDebugLog_triggered(); @@ -125,6 +134,8 @@ class MainWin void loadLayout(); void saveLayout(); + void bufferViewToggled(bool enabled); + signals: void connectToCore(const QVariantMap &connInfo); void disconnectFromCore(); @@ -134,7 +145,6 @@ class MainWin KHelpMenu *_kHelpMenu; #endif - QMenu *systrayMenu; QLabel *coreLagLabel; QLabel *sslLabel; MsgProcessorStatusWidget *msgProcessorStatusWidget; @@ -154,11 +164,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 +181,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