Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / QtDialog / FirstConfigure.h
blobf4e368bfc5c43bff850e91201796e9f9dc54aaa8
2 #ifndef FirstConfigure_h
3 #define FirstConfigure_h
5 #include <QWizard>
6 #include <QWizardPage>
7 #include "ui_Compilers.h"
8 #include "ui_CrossCompiler.h"
10 class QRadioButton;
11 class QComboBox;
13 //! the wizard pages we'll use for the first configure of a build
14 enum FirstConfigurePages
16 Start,
17 NativeSetup,
18 ToolchainSetup,
19 CrossSetup,
20 Done
23 //! the first page that gives basic options for what compilers setup to choose from
24 class StartCompilerSetup : public QWizardPage
26 Q_OBJECT
27 public:
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;
39 int nextId() const;
41 signals:
42 void selectionChanged();
44 protected slots:
45 void onSelectionChanged(bool);
47 protected:
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
55 Q_OBJECT
56 public:
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
75 Q_OBJECT
76 public:
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&);
101 enum CrossMode
103 BOTH,
104 ONLY,
105 NEVER
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
121 Q_OBJECT
122 public:
123 ToolchainCompilerSetup(QWidget* p);
124 ~ToolchainCompilerSetup();
126 QString toolchainFile() const;
127 void setToolchainFile(const QString&);
129 int nextId() const { return -1; }
131 protected:
132 QCMakeFilePathEditor* ToolchainFile;
135 //! the wizard with the pages
136 class FirstConfigure : public QWizard
138 Q_OBJECT
139 public:
140 FirstConfigure();
141 ~FirstConfigure();
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();
168 protected:
169 StartCompilerSetup* mStartCompilerSetupPage;
170 NativeCompilerSetup* mNativeCompilerSetupPage;
171 CrossCompilerSetup* mCrossCompilerSetupPage;
172 ToolchainCompilerSetup* mToolchainCompilerSetupPage;
176 #endif // FirstConfigure_h