source: src-qt4/life-preserver/LPTray.h @ 2a5e337

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 2a5e337 was 2a5e337, checked in by Kris Moore <kris@…>, 13 months ago

Replace old life-preserver utility with our new one which uses ZFS snapshots / replication

  • Property mode set to 100644
File size: 1010 bytes
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
15class LPTray : public QSystemTrayIcon{
16                Q_OBJECT
17public:
18        LPTray();
19        ~LPTray();
20
21private:
22        QFileSystemWatcher *watcher;
23        QMenu *menu;
24        QTimer *timer;
25        mainUI *GUI;
26        QString sFile; //location of the replication status file
27        QFile *logFile, *statFile;
28        QTextStream *LFStream, *SFStream;
29        QString repTotK, lastSize;
30        int wNum; //internal tracking of which frame of the icon animation we are on
31
32        void parseLogMessage(QString);
33        void parseStatusMessage(QString);
34        void startWorkingIcon();
35        void stopWorkingIcon();
36        double displayToDoubleK(QString);
37
38private slots:
39        void firstCheck();
40        void slotNewLogMessage(QString);
41        void slotTrayClicked(QSystemTrayIcon::ActivationReason);
42        void slotClose();
43        void slotSingleInstance();
44        void startGUI();
45        void displayWorkingIcon();
46};
47
48#endif
Note: See TracBrowser for help on using the repository browser.