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

enter/10releng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1releng/10.1.1releng/10.1.2
Last change on this file since 7cd7e8f was 7cd7e8f, checked in by Ken Moore <ken@…>, 18 months ago

Fix up the system diagnostic output and make sure that it lists any pcbsd-* packages that are installed on the system (with version numbers).

  • Property mode set to 100644
File size: 3.4 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 "cmdDialog.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 changeOpenTab(int tab);
57
58private slots:
59    void ReadUname();
60    void startGenerateSheet();
61    void finishedSheet();
62    void fetchSourcePressed();
63    void fetchPortsPressed();
64    void loadBootData();
65    void slotMiscSave();
66    void slotClose();
67   
68private:
69    QString KernDescr[50];
70    QString KernDefaultTag;
71    QString KernTag[50];
72    QString KernFileName[50];
73    QProcess *SheetGenScript;
74    QString SheetFileName;
75    QProcess *GetPBVer;
76    QProcess *GetUname;
77    CMDDialog *portsnapUI;
78    QString username;
79    bool miscChanged;
80    bool kernelChanged;
81    void CheckUname();
82    void CheckPBVer();
83    void CreateSheetFile();
84    void showRebootRequired();
85    //void LoadKernSettings();
86    QString getLineFromCommandOutput(QString cmd);
87    bool sanityCheckSettings();
88
89    QString mirrorNames[900];
90    QString mirrorURLs[900];
91    QString mirrorJobBuf;
92    QNetworkAccessManager *mirrorJob;
93    QNetworkReply *mirrorReply;
94    void checkProxy();
95
96    updaterStatus *UpdaterStatusDialog;
97   
98    QMenu *popup;
99    QNetworkAccessManager *sysFetchJob;
100    QNetworkReply *sysFetchReply;
101    QNetworkAccessManager *sysCopyJob;
102    QNetworkReply *sysCopyReply;
103
104    int mirrorType;
105    QString mirrorURL;
106    QString customTmpDir;
107    QString Version;
108    QString Arch;
109    QString Lang;
110    int programstatus;
111    int currentSysWorkingItem;
112    QStringList workingSysUpdates;
113    int workingPopupItem;
114    long totalSeconds;
115    long downloadSize;
116    int totalSteps;
117    int attemptedRedownload;
118    int firstInstall;
119    int firstDownload;
120    int requiresSysReboot;
121    QString sysPatchsetTmpFile;
122    QProcess *getUpdatesDir;
123    QProcess *readSysUpdates;
124    QProcess *listingProc;
125    QProcess *checksumProc;
126    QProcess *extractProc;
127    QProcess *installProc;
128    QProcess *getFreeSpaceProc;
129    QString SysUpdateName[500];
130    QString SysUpdateIgnore[500];
131    QString SysUpdatePatchFile[500];
132    QString SysUpdateDate[500];
133    QString SysUpdateMD5[500];
134    QString SysUpdateSize[500];
135    QString SysUpdateURL[500];
136    QString SysUpdateAlone[500];
137    QString SysUpdateReboot[500];
138    QString SysUpdateDetailsURL[500];
139    QString SysUpdatesShown[501];
140    metaWidget *pkgWidget;
141
142
143signals:
144  void changed();
145
146} ;
147#endif // PBSYSTEMTAB_H
Note: See TracBrowser for help on using the repository browser.