#ifndef MAINWIN_H_
#define MAINWIN_H_
+#include <QSystemTrayIcon>
+
#include "ui_mainwin.h"
#include "qtui.h"
-#include "titlesetter.h"
#include "sessionsettings.h"
-
-#include <QPixmap>
-#include <QSystemTrayIcon>
-#include <QTimer>
+#include "titlesetter.h"
class ActionCollection;
-class Buffer;
class BufferViewConfig;
class MsgProcessorStatusWidget;
-class Message;
class NickListWidget;
class SystemTrayIcon;
-#ifdef HAVE_DBUS
-# include "desktopnotifications.h"
-#endif
-
//!\brief The main window of Quassel's QtUi.
class MainWin : public QMainWindow {
Q_OBJECT
void addBufferView(BufferViewConfig *config = 0);
- void displayTrayIconMessage(const QString &title, const QString &message);
inline QSystemTrayIcon *systemTrayIcon() const;
-#ifdef HAVE_DBUS
- void sendDesktopNotification(const QString &title, const QString &message);
-#endif
-
virtual bool event(QEvent *event);
public slots:
- void setTrayIconActivity(bool active = false);
void saveStateToSession(const QString &sessionId);
void saveStateToSessionSettings(SessionSettings &s);
void addBufferView(int bufferViewConfigId);
void removeBufferView(int bufferViewConfigId);
void messagesInserted(const QModelIndex &parent, int start, int end);
+ void showAboutDlg();
void showChannelList(NetworkId netId = NetworkId());
+ void showCoreConnectionDlg(bool autoConnect = false);
void showCoreInfoDlg();
void showSettingsDlg();
void on_actionEditNetworks_triggered();
void on_actionManageViews_triggered();
void on_actionLockDockPositions_toggled(bool lock);
- void showAboutDlg();
void on_actionDebugNetworkModel_triggered(bool);
- void showCoreConnectionDlg(bool autoConnect = false);
-
void clientNetworkCreated(NetworkId);
void clientNetworkRemoved(NetworkId);
void clientNetworkUpdated();
void connectOrDisconnectFromNet();
- void makeTrayIconBlink();
void saveStatusBarStatus(bool enabled);
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();
void setupStatusBar();
void setupSystray();
+ void updateIcon();
void toggleVisibility();
void enableMenus();
QSystemTrayIcon *_trayIcon;
- QPixmap activeTrayIcon;
- QPixmap onlineTrayIcon;
- QPixmap offlineTrayIcon;
- bool trayIconActive;
- QTimer *timer;
-
- BufferId currentBuffer;
- QString currentProfile;
QList<QDockWidget *> _netViews;
NickListWidget *nickListWidget;
ActionCollection *_actionCollection;
-#ifdef HAVE_DBUS
- org::freedesktop::Notifications *desktopNotifications;
- quint32 notificationId;
-#endif
-
friend class QtUi;
};