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

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

Make system update tray aware of pc-pkgmanager

  • 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 slotOpenPackageManager();
41   void slotOpenSoftwareManager();
42   void slotOpenSoftwareManagerInstalled();
43   void slotPBICheckUpdate();
44   void slotPopulatePBIList();
45   void slotQuitTray();
46   void slotReadPBIBuffer();
47   void slotSaveUpdaterPrefs();
48   void slotScheduledPBICheck();
49   void slotScheduledSystemCheck();
50   void slotSetTimerReadAutoStatus();
51   void slotStartPBIUpdateCheck();
52   void slotStartUpdateCheck();
53   void slotSysUpdateTimer();
54   void slotTrayActivated(QSystemTrayIcon::ActivationReason reason);
55   void slotShowSysUpdatePopup();
56   void slotShowJailUpdatePopup();
57   void slotShowPBIUpdatePopup();
58   void slotChangePopup();
59   void slotShowPkgUpdatePopup();
60   
61protected:
62   
63private:
64   void displayTooltip();
65   QString getLineFromCommandOutput( QString command );
66   void loadUpdaterPrefs();
67   QProcess *checkPBIProc;
68   QFileSystemWatcher *fileWatcher;
69   QFileSystemWatcher *fileWatcherSys;
70   QFileSystemWatcher *fileWatcherAutoUpdate;
71   QFileSystemWatcher *pbiWatcherAutoUpdate;
72   QString sysPatchsetTmpFile;
73   bool useCustomTmpDir;
74   QString customTmpDir;
75   QString patchTmpDir;
76   QAction *runAction;
77   QAction *popAction;
78   int autoStatus;
79   QString autoCurrentUpdate;
80   QStringList autoUpdatesFailed;
81   QStringList autoUpdatesInstalled;
82   QSystemTrayIcon *trayIcon;
83   QMenu *trayIconMenu;
84   bool shownPopup;
85   bool doingCheck;
86};
Note: See TracBrowser for help on using the repository browser.