+ public:
+ MainWin(QWidget *parent = 0);
+ virtual ~MainWin();
+
+ void init();
+
+ void addBufferView(ClientBufferViewConfig *config);
+ BufferView *allBuffersView() const;
+
+ inline SystemTray *systemTray() const;
+
+ 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 saveStateToSettings(UiSettings &);
+ void restoreStateFromSettings(UiSettings &);
+
+ public slots:
+ void showStatusBarMessage(const QString &message);
+
+ void toggleMinimizedToTray();
+
+ //! Bring window to front and focus it
+ void forceActivated();
+
+ protected:
+ void closeEvent(QCloseEvent *event);
+ void changeEvent(QEvent *event);
+ void moveEvent(QMoveEvent *event);
+ void resizeEvent(QResizeEvent *event);
+
+ protected slots:
+ void connectedToCore();
+ void setConnectedState();
+ void updateLagIndicator(int lag = -1);
+ void disconnectedFromCore();
+ void setDisconnectedState();
+
+ private slots:
+ void addBufferView(int bufferViewConfigId);
+ void awayLogDestroyed();
+ void removeBufferView(int bufferViewConfigId);
+ void messagesInserted(const QModelIndex &parent, int start, int end);
+ void showAboutDlg();
+ void showChannelList(NetworkId netId = NetworkId());
+ void startInternalCore();
+ void showCoreConnectionDlg(bool autoConnect = false);
+ void showCoreInfoDlg();
+ void showAwayLog();
+ void showSettingsDlg();
+ void showNotificationsDlg();
+#ifdef HAVE_KDE
+ void showShortcutsDlg();
+#endif
+ void on_actionConfigureNetworks_triggered();
+ void on_actionConfigureViews_triggered();
+ void on_actionLockLayout_toggled(bool lock);
+ void on_jumpHotBuffer_triggered();
+ void on_actionDebugNetworkModel_triggered();
+ void on_actionDebugBufferViewOverlay_triggered();
+ void on_actionDebugMessageModel_triggered();
+ void on_actionDebugHotList_triggered();
+ void on_actionDebugLog_triggered();
+
+ void clientNetworkCreated(NetworkId);
+ void clientNetworkRemoved(NetworkId);
+ void clientNetworkUpdated();
+ void connectOrDisconnectFromNet();
+
+ void saveStatusBarStatus(bool enabled);
+ void aboutToQuit();
+
+ void loadLayout();
+ void saveLayout();
+
+ void bufferViewToggled(bool enabled);
+
+ signals:
+ void connectToCore(const QVariantMap &connInfo);
+ void disconnectFromCore();
+
+ private:
+#ifdef HAVE_KDE
+ KHelpMenu *_kHelpMenu;
+#endif
+
+ QLabel *coreLagLabel;
+ QLabel *sslLabel;
+ MsgProcessorStatusWidget *msgProcessorStatusWidget;