X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.h;h=5b6013795a2d91c0c34334e3d7f1d14f27745dbe;hb=019a59ffca44ddc32fc6b16fd6cdcc8f3e1c93c6;hp=5549cde1e90190b849702584c181b65aa9c0cf5e;hpb=8ff7242c289343d53d1a0d7ca507096cb944cafb;p=quassel.git diff --git a/src/qtui/mainwin.h b/src/qtui/mainwin.h index 5549cde1..5b601379 100644 --- a/src/qtui/mainwin.h +++ b/src/qtui/mainwin.h @@ -29,7 +29,6 @@ #include #include - class ServerListDlg; class ChannelListDlg; class CoreConnectDlg; @@ -41,6 +40,9 @@ 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 +57,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 +73,7 @@ class MainWin : public QMainWindow { protected slots: void connectedToCore(); void setConnectedState(); + void updateLagIndicator(int lag); void securedConnection(); void disconnectedFromCore(); void setDisconnectedState(); @@ -75,14 +82,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 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 +107,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,6 +123,7 @@ class MainWin : public QMainWindow { QtUi *gui; QMenu *systrayMenu; + QLabel *coreLagLabel; QLabel *sslLabel; TitleSetter _titleSetter; @@ -146,8 +161,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; };