source: src-qt4/pc-sysmanager/pbsystemtab.h @ 8f95077

releng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1releng/10.1.1
Last change on this file since 8f95077 was 8f95077, checked in by Ken Moore <ken@…>, 13 months ago

Large update to the new GIT usage for the system manager. It should be almost finished, it still just needs the proper branch detection for source checkouts (and maybe ports checkouts, but I think we always want the master branch for ports by default).

  • Property mode set to 100644
File size: 3.5 KB
Line 
1#ifndef PBSYSTEMTAB_H
2#define PBSYSTEMTAB_H
3
4#include <QDialog>
5#include <QFile>
6#include <QMenu>
7#include <QMessageBox>
8#include <QNetworkAccessManager>
9#include <QNetworkReply>
10#include <QProcess>
11#include <QProgressDialog>
12#include <QTextStream>
13#include <QTimer>
14#include <QCloseEvent>
15
16#include <pcbsd-utils.h>
17#include <pcbsd-ui.h>
18#include "updaterDialog.h"
19#include "ui_pbsystemtab.h"
20#include "cmdDialog.h"
21#include "../config.h"
22
23/* Change this to switch the default patch tmpdir */
24const QString PATCHTMPDIR_DEFAULT( PREFIX + "/tmp" );
25#define SYSTRIGGER "/tmp/.sysupdatetraytrigger"
26
27/* The Update STATUS Flags */
28#define SYSTEM_UP2DATE 0
29#define SYSTEM_UPDATE_AVAIL 1
30#define SYSTEM_CHECKING4UPDATES 4
31#define SYSTEM_UPDATING 5
32#define CHECK_FAILED 6
33
34// Set our defines for the type of mirror the user is running
35#define AUTOMIRROR      0
36#define SELECTMIRROR    1
37#define CUSTOMMIRROR    2
38
39
40
41class PBSystemTab : public QDialog, private Ui::PBSystemTab
42{
43        Q_OBJECT
44
45public:
46        PBSystemTab() : QDialog()
47        {
48          setupUi(this);
49        }
50
51    QMap <QString, QString> codeMap;
52    bool checkValue( QString File, QString Key, QString Value );
53
54public slots:
55    void ProgramInit();
56    void saveKernScreen();
57    void changeOpenTab(int tab);
58
59private slots:
60    void ReadUname();
61    void startGenerateSheet();
62    void finishedSheet();
63    void fetchSourcePressed();
64    void fetchPortsPressed();
65    void loadBootData();
66    void slotMiscSave();
67    void slotClose();
68   
69private:
70    QString KernDescr[50];
71    QString KernDefaultTag;
72    QString KernTag[50];
73    QString KernFileName[50];
74    QProcess *SheetGenScript;
75    QString SheetFileName;
76    QProcess *GetPBVer;
77    QProcess *GetUname;
78    CMDDialog *cmdDlg;
79    QString username;
80    bool miscChanged;
81    bool kernelChanged;
82    void CheckUname();
83    void CheckPBVer();
84    void CreateSheetFile();
85    void showRebootRequired();
86    //void LoadKernSettings();
87    QString getLineFromCommandOutput(QString cmd);
88    bool sanityCheckSettings();
89
90    QString mirrorNames[900];
91    QString mirrorURLs[900];
92    QString mirrorJobBuf;
93    QNetworkAccessManager *mirrorJob;
94    QNetworkReply *mirrorReply;
95    void checkProxy();
96
97    updaterStatus *UpdaterStatusDialog;
98   
99    QMenu *popup;
100    QNetworkAccessManager *sysFetchJob;
101    QNetworkReply *sysFetchReply;
102    QNetworkAccessManager *sysCopyJob;
103    QNetworkReply *sysCopyReply;
104
105    int mirrorType;
106    QString mirrorURL;
107    QString customTmpDir;
108    QString Version;
109    QString Arch;
110    QString Lang;
111    int programstatus;
112    int currentSysWorkingItem;
113    QStringList workingSysUpdates;
114    int workingPopupItem;
115    long totalSeconds;
116    long downloadSize;
117    int totalSteps;
118    int attemptedRedownload;
119    int firstInstall;
120    int firstDownload;
121    int requiresSysReboot;
122    QString sysPatchsetTmpFile;
123    QProcess *getUpdatesDir;
124    QProcess *readSysUpdates;
125    QProcess *listingProc;
126    QProcess *checksumProc;
127    QProcess *extractProc;
128    QProcess *installProc;
129    QProcess *getFreeSpaceProc;
130    QString SysUpdateName[500];
131    QString SysUpdateIgnore[500];
132    QString SysUpdatePatchFile[500];
133    QString SysUpdateDate[500];
134    QString SysUpdateMD5[500];
135    QString SysUpdateSize[500];
136    QString SysUpdateURL[500];
137    QString SysUpdateAlone[500];
138    QString SysUpdateReboot[500];
139    QString SysUpdateDetailsURL[500];
140    QString SysUpdatesShown[501];
141    metaWidget *pkgWidget;
142
143protected:
144        void closeEvent(QCloseEvent *event);
145
146signals:
147  void changed();
148
149} ;
150#endif // PBSYSTEMTAB_H
Note: See TracBrowser for help on using the repository browser.