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

9.1-release9.2-releasereleng/10.0releng/10.0.1
Last change on this file since 1620346 was 1620346, checked in by Kris Moore <kris@…>, 12 months ago

Initial import of PC-BSD /current/ SVN repo

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