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

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

Add option to pc-sysinstal and to install GUI to enable / disable
the forcing of ZFS 4k block sizes

This will fix some issues where drives wont boot from the 4K size, or
GRUB cannot locate the zpool on GPT

  • Property mode set to 100644
File size: 4.6 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
20#define wFREEBSD 1
21#define wPCSERVER 2
22#define wKDE 3
23#define wLXDE 4
24#define wGNOME 5
25#define wXFCE 6
26
27#include "backend.h"
28
29class Installer : public QMainWindow, private Ui::Installer
30{
31    Q_OBJECT
32
33public:
34    Installer(QWidget *parent = 0);
35    ~Installer();
36    void changeLang(QString code);
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>, bool, 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    // Desktop selector slots
67    void slotDesktopCustomizeClicked();
68    void slotSaveMetaChanges(QStringList);
69    void slotChangedMetaPkgSelection();
70    void slotSaveFBSDSettings(QString, QString, QString, QString, QString, QString, bool, bool, bool, QStringList);
71
72
73private:
74
75    void setArch();
76    void startInstall(); // Function which begins the install process
77    void installFailed(); // Function which does post-install failure stuff
78
79    // Disk functions
80    void loadDiskInfo();
81    bool autoGenPartitionLayout(QString target, bool isDisk);
82    QStringList getDiskSummary();
83
84    // Functions which return parts of the config file
85    QStringList getGlobalCfgSettings();
86    QStringList getDiskCfgSettings();
87    QStringList getComponentCfgSettings();
88
89    void startConfigGen(); // Function which takes pieces of cfg, and assembles
90    void checkSpaceWarning(); // Function to check space of disk drive
91
92    void proceed(bool);
93    bool isInstalled();
94    bool checkDiskRequirements();
95
96    // Desktop packages
97    void initDesktopSelector();
98    QStringList getDeskPkgCfg();
99    bool availDesktopPackageData;
100    bool availServerPackageData;
101    QList<QStringList> listDeskPkgs; // QStringList for our available desktop pkgs
102    QList<QStringList> listServerPkgs; // QStringList for our available server pkgs
103    QStringList selectedPkgs; // QStringList for selected packages
104    desktopSelection *desks;
105    QGraphicsScene *defaultScene;
106    QGraphicsScene *customScene;
107    bool customPkgsSet;
108   
109    // Encryption bits
110    QString autoEncPass;
111    void warnEncryption();
112
113    QList<QStringList> sysDisks; // Our lists which contains disk info
114    QList<QStringList> sysPartitions; // Our lists which contains partition info
115    QList<QStringList> sysFinalDiskLayout; // Our lists which contains the final disk layout
116    bool loadMBR;
117    bool loadGPT;
118    int systemMemory; // Ammount of system RAM we have in MB
119    QList<QStringList> listComponents; // QStringList for our available components
120    QStringList languages;
121    QStringList updatePartitions;
122    QString Arch;
123    QProcess *installProc;
124    bool installFoundCounter;
125    bool installFoundMetaCounter;
126    bool installFoundFetchOutput;
127    bool isLiveMode;
128    bool hasPkgsOnMedia;
129    bool hasInstallOnMedia;
130    bool hasFreeBSDOnMedia;
131    bool toggleKeyLayout;
132    bool haveWarnedSpace;
133
134    // Hardware checker
135    dialogCheckHardware *pcHardware;
136
137    // Help Stuff
138    dialogHelp *pcHelp;
139
140    // Infobox
141    dialogInfoBox *dIB;
142    QMenu *popup;
143
144    // FreeBSD setup wizard
145    wizardFreeBSD *wFBSD;
146   
147    // FreeBSD options
148    QString fRootPW;
149    QString fName;
150    QString fUserName;
151    QString fUserPW;
152    QString fShell;
153    QString fHost;
154    bool fSSH;
155    bool fSRC;
156    bool fPORTS;
157    QStringList fNetSettings;
158    QStringList getUsersCfgSettings();
159
160    // Keyboard Widget
161    widgetKeyboard *wKey;
162    QStringList keyModels;
163    QStringList keyLayouts;
164
165    // Disk setup wizard
166    wizardDisk *wDisk;
167    QTranslator *translator;
168
169    // Custom CFG file to install with
170    QString customCfgFile;
171
172    // Zpool custom name
173    QString zpoolName;
174
175    // Force 4K mode?
176    bool force4K;
177
178protected:
179    void closeEvent(QCloseEvent *event);
180
181};
182
183#endif // INSTALLER_H
Note: See TracBrowser for help on using the repository browser.