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

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

Add UI functionality to load a pc-sysinstall config file from USB media, and install with it

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