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

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

When the user changes language, we can also set a new keyboard layout
at the same time. TODO, add more fine-grained checks for a LANG
and the relevant keyboard layout

Trac Ticket: http://trac.pcbsd.org/ticket/697

  • 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 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    // 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
79private:
80
81    void setArch();
82    void startInstall(); // Function which begins the install process
83    void installFailed(); // Function which does post-install failure stuff
84
85    // Functions to parse ZFS send/recv messages
86    bool inZFSSend;
87    double displayToDoubleK(QString);
88    void parseStatusMessage(QString);
89    QString repTotalK;
90
91    // Disk functions
92    void loadDiskInfo();
93    bool autoGenPartitionLayout(QString target, bool isDisk);
94    QStringList getDiskSummary();
95
96    // Functions which return parts of the config file
97    QStringList getGlobalCfgSettings();
98    QStringList getDiskCfgSettings();
99    QStringList getComponentCfgSettings();
100
101    void startConfigGen(); // Function which takes pieces of cfg, and assembles
102    void checkSpaceWarning(); // Function to check space of disk drive
103
104    void proceed(bool);
105    bool isInstalled();
106    bool checkDiskRequirements();
107
108    // Desktop packages
109    void initDesktopSelector();
110    QStringList getDeskPkgCfg();
111    bool availDesktopPackageData;
112    bool availServerPackageData;
113    QList<QStringList> listDeskPkgs; // QStringList for our available desktop pkgs
114    QList<QStringList> listServerPkgs; // QStringList for our available server pkgs
115    QStringList selectedPkgs; // QStringList for selected packages
116    desktopSelection *desks;
117    QGraphicsScene *defaultScene;
118    QGraphicsScene *customScene;
119    bool customPkgsSet;
120   
121    // Encryption bits
122    QString autoEncPass;
123    void warnEncryption();
124
125    QList<QStringList> sysDisks; // Our lists which contains disk info
126    QList<QStringList> sysPartitions; // Our lists which contains partition info
127    QList<QStringList> sysFinalDiskLayout; // Our lists which contains the final disk layout
128    bool loadMBR;
129    bool loadGPT;
130    int systemMemory; // Ammount of system RAM we have in MB
131    QList<QStringList> listComponents; // QStringList for our available components
132    QStringList languages;
133    QStringList updatePartitions;
134    QString Arch;
135    QProcess *installProc;
136    bool installFoundCounter;
137    bool installFoundMetaCounter;
138    bool installFoundFetchOutput;
139    bool isLiveMode;
140    bool hasPkgsOnMedia;
141    bool hasInstallOnMedia;
142    bool hasFreeBSDOnMedia;
143    bool toggleKeyLayout;
144    bool haveWarnedSpace;
145
146    // Hardware checker
147    dialogCheckHardware *pcHardware;
148
149    // Help Stuff
150    dialogHelp *pcHelp;
151
152    // Infobox
153    dialogInfoBox *dIB;
154    QMenu *popup;
155
156    // FreeBSD setup wizard
157    wizardFreeBSD *wFBSD;
158
159    // Restore wizard
160    wizardRestore *wRestore;
161   
162    // FreeBSD options
163    QString fRootPW;
164    QString fName;
165    QString fUserName;
166    QString fUserPW;
167    QString fShell;
168    QString fHost;
169    bool fSSH;
170    bool fSRC;
171    bool fPORTS;
172    QStringList fNetSettings;
173    QStringList getUsersCfgSettings();
174
175    // Keyboard Widget
176    widgetKeyboard *wKey;
177    QStringList keyModels;
178    QStringList keyLayouts;
179
180    // Disk setup wizard
181    wizardDisk *wDisk;
182    QTranslator *translator;
183
184    // Custom CFG file to install with
185    QString customCfgFile;
186
187    // Zpool custom name
188    QString zpoolName;
189
190    // Force 4K mode?
191    bool force4K;
192
193    // Restore Options
194    QStringList restOpts;
195
196protected:
197    void closeEvent(QCloseEvent *event);
198
199};
200
201#endif // INSTALLER_H
Note: See TracBrowser for help on using the repository browser.