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

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