source: src-qt4/pc-installgui/installer.h

Last change on this file was db8d936, checked in by Kris Moore <kris@…>, 4 weeks ago

Add icon for Emergency shell to installer GUI. Allows users
to access some of our shell utils, such as disk-mounting, and eventually
other tools

  • Property mode set to 100644
File size: 5.2 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 <QSplashScreen>
11#include <QTranslator>
12
13#include "ui_installer.h"
14#include "dialogHelp.h"
15#include "dialogKeyboard.h"
16#include "dialogDesktopSelection.h"
17#include "dialogCheckHardware.h"
18#include "wizardFreeBSD.h"
19#include "wizardDisk.h"
20#include "wizardRestore.h"
21
22#define wFREEBSD 1
23#define wPCSERVER 2
24#define wKDE 3
25#define wLXDE 4
26#define wGNOME 5
27#define wXFCE 6
28
29#include "backend.h"
30
31class Installer : public QMainWindow, private Ui::Installer
32{
33    Q_OBJECT
34
35public:
36    Installer(QWidget *parent = 0);
37    ~Installer();
38    void initInstall(QSplashScreen *);
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>, QString, 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    // Slot to save keyboard layout
80    void slotSaveKeyLayout(QString, QString, QString);
81
82    // Slot to launch emergency shell
83    void slotEmergencyShell();
84   
85private:
86
87    void setArch();
88    void startInstall(); // Function which begins the install process
89    void installFailed(); // Function which does post-install failure stuff
90
91    // Functions to parse ZFS send/recv messages
92    bool inZFSSend;
93    double displayToDoubleK(QString);
94    void parseStatusMessage(QString);
95    QString repTotalK;
96
97    // Disk functions
98    void loadDiskInfo();
99    bool autoGenPartitionLayout(QString target, bool isDisk);
100    QStringList getDiskSummary();
101
102    // Functions which return parts of the config file
103    QStringList getGlobalCfgSettings();
104    QStringList getDiskCfgSettings();
105
106    void startConfigGen(); // Function which takes pieces of cfg, and assembles
107    void checkSpaceWarning(); // Function to check space of disk drive
108
109    void proceed(bool);
110    bool isInstalled();
111    bool checkDiskRequirements();
112
113    // Desktop packages
114    void initDesktopSelector();
115    QStringList getDeskPkgCfg();
116    bool availDesktopPackageData;
117    bool availServerPackageData;
118    QList<QStringList> listDeskPkgs; // QStringList for our available desktop pkgs
119    QList<QStringList> listServerPkgs; // QStringList for our available server pkgs
120    QStringList selectedPkgs; // QStringList for selected packages
121    desktopSelection *desks;
122    QGraphicsScene *defaultScene;
123    QGraphicsScene *customScene;
124    bool customPkgsSet;
125   
126    // Encryption bits
127    QString autoEncPass;
128    void warnEncryption();
129
130    QList<QStringList> sysDisks; // Our lists which contains disk info
131    QList<QStringList> sysPartitions; // Our lists which contains partition info
132    QList<QStringList> sysFinalDiskLayout; // Our lists which contains the final disk layout
133    QString bootLoader;
134    bool loadGPT;
135    int systemMemory; // Ammount of system RAM we have in MB
136    QList<QStringList> listComponents; // QStringList for our available components
137    QStringList languages;
138    QStringList updatePartitions;
139    QString Arch;
140    QProcess *installProc;
141    bool installFoundCounter;
142    bool installFoundMetaCounter;
143    bool installFoundFetchOutput;
144    bool isLiveMode;
145    bool hasPkgsOnMedia;
146    bool hasInstallOnMedia;
147    bool hasFreeBSDOnMedia;
148    bool toggleKeyLayout;
149    bool haveWarnedSpace;
150
151    // Hardware checker
152    dialogCheckHardware *pcHardware;
153
154    // Help Stuff
155    dialogHelp *pcHelp;
156
157    // Infobox
158    dialogInfoBox *dIB;
159    QMenu *popup;
160
161    // FreeBSD setup wizard
162    wizardFreeBSD *wFBSD;
163
164    // Restore wizard
165    wizardRestore *wRestore;
166   
167    // FreeBSD options
168    QString fRootPW;
169    QString fName;
170    QString fUserName;
171    QString fUserPW;
172    QString fShell;
173    QString fHost;
174    bool fSSH;
175    bool fSRC;
176    bool fPORTS;
177    QStringList fNetSettings;
178    QStringList getUsersCfgSettings();
179
180    // Keyboard Widget
181    widgetKeyboard *wKey;
182    QStringList keyModels;
183    QStringList keyLayouts;
184    QString curKeyLayout;
185    QString curKeyModel;
186    QString curKeyVariant;
187
188    // Disk setup wizard
189    wizardDisk *wDisk;
190    QTranslator *translator;
191
192    // Custom CFG file to install with
193    QString customCfgFile;
194
195    // Zpool custom name
196    QString zpoolName;
197
198    // Force 4K mode?
199    bool force4K;
200
201    // Restore Options
202    QStringList restOpts;
203
204protected:
205    void closeEvent(QCloseEvent *event);
206
207};
208
209#endif // INSTALLER_H
Note: See TracBrowser for help on using the repository browser.