source: src-qt4/life-preserver/LPTray.h @ 559e01f

9.2-releasereleng/10.0releng/10.0.1
Last change on this file since 559e01f was 559e01f, checked in by Ken Moore <ken@…>, 7 months ago

Clean up LPWatcher so that it now compiles in with life-preserver. It should be ready for drop-in testing within LPTray.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1#ifndef _LP_TRAY_H
2#define _LP_TRAY_H
3
4#include <QSystemTrayIcon>
5#include <QMenu>
6#include <QFileSystemWatcher>
7#include <QString>
8#include <QTimer>
9#include <QProcess>
10#include <QFile>
11#include <QTextStream>
12
13#include "mainUI.h"
14#include "LPWatcher.h"
15
16class LPTray : public QSystemTrayIcon{
17                Q_OBJECT
18public:
19        LPTray();
20        ~LPTray();
21
22private:
23        QFileSystemWatcher *watcher;
24        QMenu *menu;
25        QTimer *timer;
26        mainUI *GUI;
27        QString sFile; //location of the replication status file
28        QFile *logFile, *statFile;
29        QTextStream *LFStream, *SFStream;
30        QString repTotK, lastSize;
31        int wNum; //internal tracking of which frame of the icon animation we are on
32        bool initPhase;
33
34        void parseLogMessage(QString, bool quiet = false);
35        void parseStatusMessage(QString);
36        void setIdleToolTip();
37        void startWorkingIcon();
38        void stopWorkingIcon();
39        double displayToDoubleK(QString);
40
41private slots:
42        void firstCheck();
43        void slotNewLogMessage(QString);
44        void slotTrayClicked(QSystemTrayIcon::ActivationReason);
45        void slotClose();
46        void slotSingleInstance();
47        void startGUI();
48        void displayWorkingIcon();
49};
50
51#endif
Note: See TracBrowser for help on using the repository browser.