source: src-qt4/pc-systemupdatertray/UpdaterTray.h @ 1620346

9.1-release9.2-releasereleng/10.0releng/10.0.1releng/10.0.2
Last change on this file since 1620346 was 1620346, checked in by Kris Moore <kris@…>, 16 months ago

Initial import of PC-BSD /current/ SVN repo

  • Property mode set to 100644
File size: 2.1 KB
Line 
1#include <QAction>
2#include <QDialog>
3#include <QFileSystemWatcher>
4#include <QFile>
5#include <QMenu>
6#include <QPair>
7#include <QProcess>
8#include <QString>
9#include <QSystemTrayIcon>
10
11#define SYSTRIGGER "/tmp/.sysupdatetraytrigger"
12#define PBITRIGGER "/tmp/.pbiupdatetraytrigger"
13
14class QString;
15class QPixmap;
16
17class UpdaterTray : public QDialog {
18   Q_OBJECT
19   
20public:
21   UpdaterTray() : QDialog()
22   {
23   }
24   void programInit();
25   
26   virtual ~UpdaterTray() {};
27
28public slots:
29    void slotSingleInstance();
30   
31private slots:
32   void contextMenuRefresh();
33   void slotAutoUpdateStatusChanged();
34   void slotChangeRunStartup();
35   void slotCheckAllUpdates();
36   void slotMonitorForChanges();
37   void slotOpenConfigDlg();
38   void slotOpenJailManager();
39   void slotOpenUpdateManager();
40   void slotOpenSoftwareManager();
41   void slotOpenSoftwareManagerInstalled();
42   void slotPBICheckUpdate();
43   void slotPopulatePBIList();
44   void slotQuitTray();
45   void slotReadPBIBuffer();
46   void slotSaveUpdaterPrefs();
47   void slotScheduledPBICheck();
48   void slotScheduledSystemCheck();
49   void slotSetTimerReadAutoStatus();
50   void slotStartPBIUpdateCheck();
51   void slotStartUpdateCheck();
52   void slotSysUpdateTimer();
53   void slotTrayActivated(QSystemTrayIcon::ActivationReason reason);
54   void slotShowSysUpdatePopup();
55   void slotShowJailUpdatePopup();
56   void slotShowPBIUpdatePopup();
57   void slotChangePopup();
58   
59protected:
60   
61private:
62   void displayTooltip();
63   QString getLineFromCommandOutput( QString command );
64   void loadUpdaterPrefs();
65   QProcess *checkPBIProc;
66   QFileSystemWatcher *fileWatcher;
67   QFileSystemWatcher *fileWatcherSys;
68   QFileSystemWatcher *fileWatcherAutoUpdate;
69   QFileSystemWatcher *pbiWatcherAutoUpdate;
70   QString sysPatchsetTmpFile;
71   bool useCustomTmpDir;
72   QString customTmpDir;
73   QString patchTmpDir;
74   QAction *runAction;
75   QAction *popAction;
76   int autoStatus;
77   QString autoCurrentUpdate;
78   QStringList autoUpdatesFailed;
79   QStringList autoUpdatesInstalled;
80   QSystemTrayIcon *trayIcon;
81   QMenu *trayIconMenu;
82   bool shownPopup;
83   bool doingCheck;
84};
Note: See TracBrowser for help on using the repository browser.