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

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

Initial import of PC-BSD /current/ SVN repo

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