source: src-qt4/life-preserver/lp-tray/LPTray.h @ cbe0295

releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1releng/10.1.1
Last change on this file since cbe0295 was cbe0295, checked in by Ken Moore <ken@…>, 14 months ago

Add a popup-message ppolicy setting to the life preserver tray so that you can select to show popups for all messages, errors only, or none. This will not touch "critical" messages, which will cause an actual window to appear that requires attention.

  • Property mode set to 100644
File size: 940 bytes
Line 
1#ifndef _LP_TRAY_H
2#define _LP_TRAY_H
3
4#include <QSystemTrayIcon>
5#include <QMenu>
6#include <QString>
7#include <QMessageBox>
8#include <QRadioButton>
9#include <QWidgetAction>
10#include <QSettings>
11
12#include "LPWatcher.h"
13#include "LPMessages.h"
14
15class LPTray : public QSystemTrayIcon{
16                Q_OBJECT
17public:
18        LPTray();
19        ~LPTray();
20
21private:
22        LPWatcher *watcher;
23        LPMessages *msgdlg;
24        QMenu *menu, *notificationMenu;
25        QRadioButton *nShowAll, *nShowError, *nShowNone; //notification popup messages
26        QWidgetAction *naAll, *naErr, *naNone; //widget-action containers for the readio buttons
27        QSettings *settings;
28        int popupPolicy;
29
30        void updateTrayIcon();
31        void updateToolTip();
32       
33private slots:
34        void watcherMessage(QString type = "");
35
36        void slotTrayClicked(QSystemTrayIcon::ActivationReason);
37        void slotClose();
38        void slotSingleInstance();
39        void startGUI();
40        void startMessageDialog();
41        void refreshStatus();
42        void changePopupPolicy();
43
44};
45
46#endif
Note: See TracBrowser for help on using the repository browser.