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

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

Fix installing src / ports if chosen

  • Property mode set to 100644
File size: 5.1 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 initInstall();
38
39private slots:
40    void slotAbort();
41    void slotBack();
42    void slotHelp();
43    void slotNext();
44    void slotFinished();
45    void slotChangeLanguage();
46    void slotCheckHardware();
47
48    // Disk slots
49    void slotDiskCustomizeClicked();
50    void slotSaveDiskChanges(QList<QStringList>, QString, bool, QString, bool);
51
52    // Slots for the installation
53    void slotInstallProcFinished( int exitCode, QProcess::ExitStatus status);
54    void slotReadInstallerOutput();
55
56    // Start xvkbd
57    void slotPushVirtKeyboard();
58
59    // Keyboard selector
60    void slotPushKeyLayout();
61
62    // Slots related to USB config files
63    void slotSaveConfigUSB();
64    void slotLoadConfigUSB();
65
66    // Slot to start the network manager
67    void slotStartNetworkManager();
68
69    // Desktop selector slots
70    void slotDesktopCustomizeClicked();
71    void slotSaveMetaChanges(QStringList);
72    void slotChangedMetaPkgSelection();
73    void slotSaveFBSDSettings(QString, QString, QString, QString, QString, QString, bool, bool, bool, QStringList);
74
75    // Restore-related slots
76    void slotSaveRestoreSettings(QStringList);
77
78    // Slot to save keyboard layout
79    void slotSaveKeyLayout(QString, QString, QString);
80
81private:
82
83    void setArch();
84    void startInstall(); // Function which begins the install process
85    void installFailed(); // Function which does post-install failure stuff
86
87    // Functions to parse ZFS send/recv messages
88    bool inZFSSend;
89    double displayToDoubleK(QString);
90    void parseStatusMessage(QString);
91    QString repTotalK;
92
93    // Disk functions
94    void loadDiskInfo();
95    bool autoGenPartitionLayout(QString target, bool isDisk);
96    QStringList getDiskSummary();
97
98    // Functions which return parts of the config file
99    QStringList getGlobalCfgSettings();
100    QStringList getDiskCfgSettings();
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    QString bootLoader;
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    QString curKeyLayout;
181    QString curKeyModel;
182    QString curKeyVariant;
183
184    // Disk setup wizard
185    wizardDisk *wDisk;
186    QTranslator *translator;
187
188    // Custom CFG file to install with
189    QString customCfgFile;
190
191    // Zpool custom name
192    QString zpoolName;
193
194    // Force 4K mode?
195    bool force4K;
196
197    // Restore Options
198    QStringList restOpts;
199
200protected:
201    void closeEvent(QCloseEvent *event);
202
203};
204
205#endif // INSTALLER_H
Note: See TracBrowser for help on using the repository browser.