X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.h;h=8cffe8bd2678b1453d9a1bddffd4b3126249b5bc;hp=453062fdfcc0d181ac5f709add62abd5623784c0;hb=31253a98ef87edb8f87ff53270529ed4f7659612;hpb=25eb89768427a8c62f0ea776d05407db3aec2f97 diff --git a/src/qtui/mainwin.h b/src/qtui/mainwin.h index 453062fd..8cffe8bd 100644 --- a/src/qtui/mainwin.h +++ b/src/qtui/mainwin.h @@ -29,18 +29,21 @@ #include #include - class ServerListDlg; class ChannelListDlg; class CoreConnectDlg; class Buffer; class BufferViewConfig; +class MsgProcessorStatusWidget; class SettingsDlg; class QtUi; class Message; class NickListWidget; class DebugConsole; +#ifdef HAVE_DBUS +# include "desktopnotifications.h" +#endif //!\brief The main window of Quassel's QtUi. class MainWin : public QMainWindow { @@ -55,6 +58,10 @@ class MainWin : public QMainWindow { void displayTrayIconMessage(const QString &title, const QString &message); +#ifdef HAVE_DBUS + void sendDesktopNotification(const QString &title, const QString &message); +#endif + virtual bool event(QEvent *event); public slots: @@ -67,6 +74,7 @@ class MainWin : public QMainWindow { protected slots: void connectedToCore(); void setConnectedState(); + void updateLagIndicator(int lag); void securedConnection(); void disconnectedFromCore(); void setDisconnectedState(); @@ -75,14 +83,16 @@ class MainWin : public QMainWindow { private slots: void addBufferView(int bufferViewConfigId); void removeBufferView(int bufferViewConfigId); - void receiveMessage(const Message &msg); + void messagesInserted(const QModelIndex &parent, int start, int end); void showChannelList(NetworkId netId = NetworkId()); + void showCoreInfoDlg(); void showSettingsDlg(); - void showNetworkDlg(); - void showManageViewsDlg(); - void lockVerticalDocks(bool lock); + void on_actionEditNetworks_triggered(); + void on_actionManageViews_triggered(); + void on_actionLockDockPositions_toggled(bool lock); void showAboutDlg(); void showDebugConsole(); + void on_actionDebugNetworkModel_triggered(bool); void showCoreConnectionDlg(bool autoConnect = false); void coreConnectionDlgFinished(int result); @@ -98,7 +108,12 @@ class MainWin : public QMainWindow { void loadLayout(); void saveLayout(); - + +#ifdef HAVE_DBUS + void desktopNotificationClosed(uint id, uint reason); + void desktopNotificationInvoked(uint id, const QString & action); +#endif + signals: void connectToCore(const QVariantMap &connInfo); void disconnectFromCore(); @@ -109,7 +124,9 @@ class MainWin : public QMainWindow { QtUi *gui; QMenu *systrayMenu; + QLabel *coreLagLabel; QLabel *sslLabel; + MsgProcessorStatusWidget *msgProcessorStatusWidget; TitleSetter _titleSetter; @@ -146,8 +163,10 @@ class MainWin : public QMainWindow { QList _netViews; NickListWidget *nickListWidget; - QAction *actionEditNetworks; - QList networkActions; +#ifdef HAVE_DBUS + org::freedesktop::Notifications *desktopNotifications; + quint32 notificationId; +#endif friend class QtUi; };