X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.h;h=5b6013795a2d91c0c34334e3d7f1d14f27745dbe;hb=78200aa2a250b6db5c86e0f1b9411ee543d6b6ca;hp=73d1fa93fc5896bf676e529803c9fa7c8c003b66;hpb=021349871bba78f30e07e34f75cbfdda414343bd;p=quassel.git diff --git a/src/qtui/mainwin.h b/src/qtui/mainwin.h index 73d1fa93..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,7 +73,7 @@ class MainWin : public QMainWindow { protected slots: void connectedToCore(); void setConnectedState(); - void updateLagIndicator(float lag); + void updateLagIndicator(int lag); void securedConnection(); void disconnectedFromCore(); void setDisconnectedState(); @@ -76,7 +82,7 @@ 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(); @@ -85,6 +91,7 @@ class MainWin : public QMainWindow { void on_actionLockDockPositions_toggled(bool lock); void showAboutDlg(); void showDebugConsole(); + void on_actionDebugNetworkModel_triggered(bool); void showCoreConnectionDlg(bool autoConnect = false); void coreConnectionDlgFinished(int result); @@ -100,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(); @@ -149,6 +161,11 @@ class MainWin : public QMainWindow { QList _netViews; NickListWidget *nickListWidget; +#ifdef HAVE_DBUS + org::freedesktop::Notifications *desktopNotifications; + quint32 notificationId; +#endif + friend class QtUi; };