# include <QMainWindow>
#endif
+#ifdef Q_WS_WIN
+# include <windows.h>
+#endif
+
#include <QSystemTrayIcon>
#include "qtui.h"
class ActionCollection;
class BufferView;
class BufferViewConfig;
+class ClientBufferViewConfig;
class BufferViewDock;
class BufferWidget;
class InputWidget;
class MsgProcessorStatusWidget;
class NickListWidget;
-class SystemTrayIcon;
+class SystemTray;
class QMenu;
class QLabel;
void init();
- void addBufferView(BufferViewConfig *config);
+ 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(); }
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();
void updateLagIndicator(int lag = -1);
void disconnectedFromCore();
void setDisconnectedState();
- void systrayActivated(QSystemTrayIcon::ActivationReason);
private slots:
void addBufferView(int bufferViewConfigId);
#endif
void on_actionConfigureNetworks_triggered();
void on_actionConfigureViews_triggered();
- void on_actionLockDockPositions_toggled(bool lock);
+ void on_actionLockLayout_toggled(bool lock);
void on_actionDebugNetworkModel_triggered();
+ void on_actionDebugBufferViewOverlay_triggered();
void on_actionDebugMessageModel_triggered();
void on_actionDebugLog_triggered();
void loadLayout();
void saveLayout();
+ void bufferViewToggled(bool enabled);
+
signals:
void connectToCore(const QVariantMap &connInfo);
void disconnectFromCore();
KHelpMenu *_kHelpMenu;
#endif
- QMenu *systrayMenu;
QLabel *coreLagLabel;
QLabel *sslLabel;
MsgProcessorStatusWidget *msgProcessorStatusWidget;
void setupToolBars();
void updateIcon();
- void hideToTray();
- void toggleMinimizedToTray();
void enableMenus();
- QSystemTrayIcon *_trayIcon;
+ void hideToTray();
+
+ SystemTray *_systemTray;
QList<BufferViewDock *> _bufferViews;
BufferWidget *_bufferWidget;
InputWidget *_inputWidget;
QMenu *_fileMenu, *_networksMenu, *_viewMenu, *_bufferViewsMenu, *_settingsMenu, *_helpMenu, *_helpDebugMenu;
- QToolBar *_networkToolBar, *_chatViewToolBar, *_nickToolBar;
+ QMenu *_toolbarMenu;
+ QToolBar *_mainToolBar, *_chatViewToolBar, *_nickToolBar;
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