source: src-qt4/pc-installgui/installer.h @ 93572be

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2
Last change on this file since 93572be was 93572be, checked in by Kris Moore <kris@…>, 11 months ago

Welcome the new Life-Preserver restore ability to the Installer GUI

Now you can restore your entire system from a replicated life-preserver backup on a
remote machine

  • Property mode set to 100644
File size: 5.0 KB
Line 
1#ifndef INSTALLER_H
2#define INSTALLER_H
3
4#include <QtGui/QWidget>
5#include <QMessageBox>
6#include <QFile>
7#include <QMenu>
8#include <QProcess>
9#include <QGraphicsScene>
10#include <QTranslator>
11
12#include "ui_installer.h"
13#include "dialogHelp.h"
14#include "dialogKeyboard.h"
15#include "dialogDesktopSelection.h"
16#include "dialogCheckHardware.h"
17#include "wizardFreeBSD.h"
18#include "wizardDisk.h"
19#include "wizardRestore.h"
20
21#define wFREEBSD 1
22#define wPCSERVER 2
23#define wKDE 3
24#define wLXDE 4
25#define wGNOME 5
26#define wXFCE 6
27
28#include "backend.h"
29
30class Installer : public QMainWindow, private Ui::Installer
31{
32    Q_OBJECT
33
34public:
35    Installer(QWidget *parent = 0);
36    ~Installer();
37    void changeLang(QString code);
38    void initInstall();
39
40private slots:
41    void slotAbort();
42    void slotBack();
43    void slotHelp();
44    void slotNext();
45    void slotFinished();
46    void slotChangeLanguage();
47    void slotCheckHardware();
48
49    // Disk slots
50    void slotDiskCustomizeClicked();
51    void slotSaveDiskChanges(QList<QStringList>, bool, bool, QString, bool);
52
53    // Slots for the installation
54    void slotInstallProcFinished( int exitCode, QProcess::ExitStatus status);
55    void slotReadInstallerOutput();
56
57    // Start xvkbd
58    void slotPushVirtKeyboard();
59
60    // Keyboard selector
61    void slotPushKeyLayout();
62
63    // Slots related to USB config files
64    void slotSaveConfigUSB();
65    void slotLoadConfigUSB();
66
67    // Slot to start the network manager
68    void slotStartNetworkManager();
69
70    // Desktop selector slots
71    void slotDesktopCustomizeClicked();
72    void slotSaveMetaChanges(QStringList);
73    void slotChangedMetaPkgSelection();
74    void slotSaveFBSDSettings(QString, QString, QString, QString, QString, QString, bool, bool, bool, QStringList);
75
76    // Restore-related slots
77    void slotSaveRestoreSettings(QStringList);
78
79
80private:
81
82    void setArch();
83    void startInstall(); // Function which begins the install process
84    void installFailed(); // Function which does post-install failure stuff
85
86    // Functions to parse ZFS send/recv messages
87    bool inZFSSend;
88    double displayToDoubleK(QString);
89    void parseStatusMessage(QString);
90    QString repTotalK;
91
92    // Disk functions
93    void loadDiskInfo();
94    bool autoGenPartitionLayout(QString target, bool isDisk);
95    QStringList getDiskSummary();
96
97    // Functions which return parts of the config file
98    QStringList getGlobalCfgSettings();
99    QStringList getDiskCfgSettings();
100    QStringList getComponentCfgSettings();
101
102    void startConfigGen(); // Function which takes pieces of cfg, and assembles
103    void checkSpaceWarning(); // Function to check space of disk drive
104
105    void proceed(bool);
106    bool isInstalled();
107    bool checkDiskRequirements();
108
109    // Desktop packages
110    void initDesktopSelector();
111    QStringList getDeskPkgCfg();
112    bool availDesktopPackageData;
113    bool availServerPackageData;
114    QList<QStringList> listDeskPkgs; // QStringList for our available desktop pkgs
115    QList<QStringList> listServerPkgs; // QStringList for our available server pkgs
116    QStringList selectedPkgs; // QStringList for selected packages
117    desktopSelection *desks;
118    QGraphicsScene *defaultScene;
119    QGraphicsScene *customScene;
120    bool customPkgsSet;
121   
122    // Encryption bits
123    QString autoEncPass;
124    void warnEncryption();
125
126    QList<QStringList> sysDisks; // Our lists which contains disk info
127    QList<QStringList> sysPartitions; // Our lists which contains partition info
128    QList<QStringList> sysFinalDiskLayout; // Our lists which contains the final disk layout
129    bool loadMBR;
130    bool loadGPT;
131    int systemMemory; // Ammount of system RAM we have in MB
132    QList<QStringList> listComponents; // QStringList for our available components
133    QStringList languages;
134    QStringList updatePartitions;
135    QString Arch;
136    QProcess *installProc;
137    bool installFoundCounter;
138    bool installFoundMetaCounter;
139    bool installFoundFetchOutput;
140    bool isLiveMode;
141    bool hasPkgsOnMedia;
142    bool hasInstallOnMedia;
143    bool hasFreeBSDOnMedia;
144    bool toggleKeyLayout;
145    bool haveWarnedSpace;
146
147    // Hardware checker
148    dialogCheckHardware *pcHardware;
149
150    // Help Stuff
151    dialogHelp *pcHelp;
152
153    // Infobox
154    dialogInfoBox *dIB;
155    QMenu *popup;
156
157    // FreeBSD setup wizard
158    wizardFreeBSD *wFBSD;
159
160    // Restore wizard
161    wizardRestore *wRestore;
162   
163    // FreeBSD options
164    QString fRootPW;
165    QString fName;
166    QString fUserName;
167    QString fUserPW;
168    QString fShell;
169    QString fHost;
170    bool fSSH;
171    bool fSRC;
172    bool fPORTS;
173    QStringList fNetSettings;
174    QStringList getUsersCfgSettings();
175
176    // Keyboard Widget
177    widgetKeyboard *wKey;
178    QStringList keyModels;
179    QStringList keyLayouts;
180
181    // Disk setup wizard
182    wizardDisk *wDisk;
183    QTranslator *translator;
184
185    // Custom CFG file to install with
186    QString customCfgFile;
187
188    // Zpool custom name
189    QString zpoolName;
190
191    // Force 4K mode?
192    bool force4K;
193
194    // Restore Options
195    QStringList restOpts;
196
197protected:
198    void closeEvent(QCloseEvent *event);
199
200};
201
202#endif // INSTALLER_H
Note: See TracBrowser for help on using the repository browser.