X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.h;h=5b6013795a2d91c0c34334e3d7f1d14f27745dbe;hb=3307118b56d79f5ddf4f43cb955b66ea26332e5b;hp=9787832c60f017aa2cf9bba921ac4217b7ea666c;hpb=85c2a2a853e4f4d4488344672d47c2aa77172f69;p=quassel.git diff --git a/src/qtui/mainwin.h b/src/qtui/mainwin.h index 9787832c..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,7 +40,9 @@ class Message; class NickListWidget; class DebugConsole; -#include "desktopnotifications.h" +#ifdef HAVE_DBUS +# include "desktopnotifications.h" +#endif //!\brief The main window of Quassel's QtUi. class MainWin : public QMainWindow { @@ -55,7 +56,10 @@ class MainWin : public QMainWindow { void addBufferView(BufferViewConfig *config = 0); 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); @@ -78,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(); @@ -87,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); @@ -103,8 +108,10 @@ class MainWin : public QMainWindow { void loadLayout(); void saveLayout(); - void desktopNotificationClosed(uint id, uint reason); - void desktopNotificationInvoked(uint id, const QString & action); +#ifdef HAVE_DBUS + void desktopNotificationClosed(uint id, uint reason); + void desktopNotificationInvoked(uint id, const QString & action); +#endif signals: void connectToCore(const QVariantMap &connInfo); @@ -154,8 +161,10 @@ class MainWin : public QMainWindow { QList _netViews; NickListWidget *nickListWidget; - org::freedesktop::Notifications *desktopNotifications; - quint32 notificationId; +#ifdef HAVE_DBUS + org::freedesktop::Notifications *desktopNotifications; + quint32 notificationId; +#endif friend class QtUi; };