2 #ifndef FirstConfigure_h
3 #define FirstConfigure_h
7 #include "ui_Compilers.h"
8 #include "ui_CrossCompiler.h"
13 //! the wizard pages we'll use for the first configure of a build
14 enum FirstConfigurePages
23 //! the first page that gives basic options for what compilers setup to choose from
24 class StartCompilerSetup
: public QWizardPage
28 StartCompilerSetup(QWidget
* p
);
29 ~StartCompilerSetup();
30 void setGenerators(const QStringList
& gens
);
31 void setCurrentGenerator(const QString
& gen
);
32 QString
getGenerator() const;
34 bool defaultSetup() const;
35 bool compilerSetup() const;
36 bool crossCompilerSetup() const;
37 bool crossCompilerToolChainFile() const;
42 void selectionChanged();
45 void onSelectionChanged(bool);
48 QComboBox
* GeneratorOptions
;
49 QRadioButton
* CompilerSetupOptions
[4];
52 //! the page that gives basic options for native compilers
53 class NativeCompilerSetup
: public QWizardPage
, protected Ui::Compilers
57 NativeCompilerSetup(QWidget
* p
);
58 ~NativeCompilerSetup();
60 QString
getCCompiler() const;
61 void setCCompiler(const QString
&);
63 QString
getCXXCompiler() const;
64 void setCXXCompiler(const QString
&);
66 QString
getFortranCompiler() const;
67 void setFortranCompiler(const QString
&);
69 int nextId() const { return -1; }
72 //! the page that gives options for cross compilers
73 class CrossCompilerSetup
: public QWizardPage
, protected Ui::CrossCompiler
77 CrossCompilerSetup(QWidget
* p
);
78 ~CrossCompilerSetup();
80 QString
getSystem() const;
81 void setSystem(const QString
&);
83 QString
getVersion() const;
84 void setVersion(const QString
&);
86 QString
getProcessor() const;
87 void setProcessor(const QString
&);
89 QString
getCCompiler() const;
90 void setCCompiler(const QString
&);
92 QString
getCXXCompiler() const;
93 void setCXXCompiler(const QString
&);
95 QString
getFortranCompiler() const;
96 void setFortranCompiler(const QString
&);
98 QString
getFindRoot() const;
99 void setFindRoot(const QString
&);
108 int getProgramMode() const;
109 void setProgramMode(int);
110 int getLibraryMode() const;
111 void setLibraryMode(int);
112 int getIncludeMode() const;
113 void setIncludeMode(int);
115 int nextId() const { return -1; }
118 //! the page that gives options for a toolchain file
119 class ToolchainCompilerSetup
: public QWizardPage
123 ToolchainCompilerSetup(QWidget
* p
);
124 ~ToolchainCompilerSetup();
126 QString
toolchainFile() const;
127 void setToolchainFile(const QString
&);
129 int nextId() const { return -1; }
132 QCMakeFilePathEditor
* ToolchainFile
;
135 //! the wizard with the pages
136 class FirstConfigure
: public QWizard
143 void setGenerators(const QStringList
& gens
);
144 QString
getGenerator() const;
146 bool defaultSetup() const;
147 bool compilerSetup() const;
148 bool crossCompilerSetup() const;
149 bool crossCompilerToolChainFile() const;
151 QString
getCCompiler() const;
152 QString
getCXXCompiler() const;
153 QString
getFortranCompiler() const;
155 QString
getSystemName() const;
156 QString
getSystemVersion() const;
157 QString
getSystemProcessor() const;
158 QString
getCrossRoot() const;
159 QString
getCrossProgramMode() const;
160 QString
getCrossLibraryMode() const;
161 QString
getCrossIncludeMode() const;
163 QString
getCrossCompilerToolChainFile() const;
165 void loadFromSettings();
166 void saveToSettings();
169 StartCompilerSetup
* mStartCompilerSetupPage
;
170 NativeCompilerSetup
* mNativeCompilerSetupPage
;
171 CrossCompilerSetup
* mCrossCompilerSetupPage
;
172 ToolchainCompilerSetup
* mToolchainCompilerSetupPage
;
176 #endif // FirstConfigure_h