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

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

Update Installer with new icon to launch the network manager

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