source: src-qt4/life-preserver/LPTray.h @ 539d8eb

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 539d8eb was 539d8eb, checked in by Ken Moore <ken@…>, 12 months ago

Clean up the tooltip for the life preserver tray: will now list the latest snapshot for each managed dataset/zpool.
Also clean up the ordering of the available snapshots - they should always list in the proper chronological order for snapshots that life-preserver created, with an additional section at the end for any other snapshots that are available for that data subset.

  • Property mode set to 100644
File size: 1.0 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
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        bool initPhase;
32
33        void parseLogMessage(QString, bool quiet = false);
34        void parseStatusMessage(QString);
35        void setIdleToolTip();
36        void startWorkingIcon();
37        void stopWorkingIcon();
38        double displayToDoubleK(QString);
39
40private slots:
41        void firstCheck();
42        void slotNewLogMessage(QString);
43        void slotTrayClicked(QSystemTrayIcon::ActivationReason);
44        void slotClose();
45        void slotSingleInstance();
46        void startGUI();
47        void displayWorkingIcon();
48};
49
50#endif
Note: See TracBrowser for help on using the repository browser.