2008-12-16 23:00:17 +03:00
|
|
|
|
|
|
|
#ifndef FirstConfigure_h
|
|
|
|
#define FirstConfigure_h
|
|
|
|
|
|
|
|
#include <QWizard>
|
|
|
|
#include <QWizardPage>
|
2016-04-29 16:40:20 +03:00
|
|
|
|
2015-02-15 22:17:54 +03:00
|
|
|
#include "cmake.h"
|
2016-04-29 16:40:20 +03:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
#include "ui_Compilers.h"
|
|
|
|
#include "ui_CrossCompiler.h"
|
|
|
|
|
|
|
|
class QRadioButton;
|
|
|
|
class QComboBox;
|
|
|
|
|
|
|
|
//! the wizard pages we'll use for the first configure of a build
|
|
|
|
enum FirstConfigurePages
|
|
|
|
{
|
|
|
|
Start,
|
|
|
|
NativeSetup,
|
|
|
|
ToolchainSetup,
|
|
|
|
CrossSetup,
|
|
|
|
Done
|
|
|
|
};
|
|
|
|
|
|
|
|
//! the first page that gives basic options for what compilers setup to choose from
|
|
|
|
class StartCompilerSetup : public QWizardPage
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
StartCompilerSetup(QWidget* p);
|
|
|
|
~StartCompilerSetup();
|
2015-02-15 22:17:54 +03:00
|
|
|
void setGenerators(std::vector<cmake::GeneratorInfo> const& gens);
|
2008-12-16 23:00:17 +03:00
|
|
|
void setCurrentGenerator(const QString& gen);
|
|
|
|
QString getGenerator() const;
|
2015-02-15 22:17:54 +03:00
|
|
|
QString getToolset() const;
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
bool defaultSetup() const;
|
|
|
|
bool compilerSetup() const;
|
|
|
|
bool crossCompilerSetup() const;
|
|
|
|
bool crossCompilerToolChainFile() const;
|
|
|
|
|
|
|
|
int nextId() const;
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
signals:
|
|
|
|
void selectionChanged();
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
void onSelectionChanged(bool);
|
2015-02-15 22:17:54 +03:00
|
|
|
void onGeneratorChanged(QString const& name);
|
2008-12-16 23:00:17 +03:00
|
|
|
|
|
|
|
protected:
|
|
|
|
QComboBox* GeneratorOptions;
|
|
|
|
QRadioButton* CompilerSetupOptions[4];
|
2015-02-15 22:17:54 +03:00
|
|
|
QFrame* ToolsetFrame;
|
|
|
|
QLineEdit* Toolset;
|
|
|
|
QLabel* ToolsetLabel;
|
|
|
|
QStringList GeneratorsSupportingToolset;
|
|
|
|
|
|
|
|
private:
|
|
|
|
QFrame* CreateToolsetWidgets();
|
2008-12-16 23:00:17 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
//! the page that gives basic options for native compilers
|
|
|
|
class NativeCompilerSetup : public QWizardPage, protected Ui::Compilers
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
NativeCompilerSetup(QWidget* p);
|
|
|
|
~NativeCompilerSetup();
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
QString getCCompiler() const;
|
|
|
|
void setCCompiler(const QString&);
|
|
|
|
|
|
|
|
QString getCXXCompiler() const;
|
|
|
|
void setCXXCompiler(const QString&);
|
|
|
|
|
|
|
|
QString getFortranCompiler() const;
|
|
|
|
void setFortranCompiler(const QString&);
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
int nextId() const { return -1; }
|
|
|
|
};
|
|
|
|
|
|
|
|
//! the page that gives options for cross compilers
|
|
|
|
class CrossCompilerSetup : public QWizardPage, protected Ui::CrossCompiler
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
CrossCompilerSetup(QWidget* p);
|
|
|
|
~CrossCompilerSetup();
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
QString getSystem() const;
|
|
|
|
void setSystem(const QString&);
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
QString getVersion() const;
|
|
|
|
void setVersion(const QString&);
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
QString getProcessor() const;
|
|
|
|
void setProcessor(const QString&);
|
|
|
|
|
|
|
|
QString getCCompiler() const;
|
|
|
|
void setCCompiler(const QString&);
|
|
|
|
|
|
|
|
QString getCXXCompiler() const;
|
|
|
|
void setCXXCompiler(const QString&);
|
|
|
|
|
|
|
|
QString getFortranCompiler() const;
|
|
|
|
void setFortranCompiler(const QString&);
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
QString getFindRoot() const;
|
|
|
|
void setFindRoot(const QString&);
|
|
|
|
|
|
|
|
enum CrossMode
|
|
|
|
{
|
|
|
|
BOTH,
|
|
|
|
ONLY,
|
|
|
|
NEVER
|
|
|
|
};
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
int getProgramMode() const;
|
|
|
|
void setProgramMode(int);
|
|
|
|
int getLibraryMode() const;
|
|
|
|
void setLibraryMode(int);
|
|
|
|
int getIncludeMode() const;
|
|
|
|
void setIncludeMode(int);
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
int nextId() const { return -1; }
|
|
|
|
};
|
|
|
|
|
|
|
|
//! the page that gives options for a toolchain file
|
|
|
|
class ToolchainCompilerSetup : public QWizardPage
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
ToolchainCompilerSetup(QWidget* p);
|
|
|
|
~ToolchainCompilerSetup();
|
|
|
|
|
|
|
|
QString toolchainFile() const;
|
|
|
|
void setToolchainFile(const QString&);
|
|
|
|
|
|
|
|
int nextId() const { return -1; }
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
protected:
|
|
|
|
QCMakeFilePathEditor* ToolchainFile;
|
|
|
|
};
|
|
|
|
|
|
|
|
//! the wizard with the pages
|
|
|
|
class FirstConfigure : public QWizard
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
FirstConfigure();
|
|
|
|
~FirstConfigure();
|
|
|
|
|
2015-02-15 22:17:54 +03:00
|
|
|
void setGenerators(std::vector<cmake::GeneratorInfo> const& gens);
|
2008-12-16 23:00:17 +03:00
|
|
|
QString getGenerator() const;
|
2015-02-15 22:17:54 +03:00
|
|
|
QString getToolset() const;
|
2008-12-16 23:00:17 +03:00
|
|
|
|
|
|
|
bool defaultSetup() const;
|
|
|
|
bool compilerSetup() const;
|
|
|
|
bool crossCompilerSetup() const;
|
|
|
|
bool crossCompilerToolChainFile() const;
|
|
|
|
|
|
|
|
QString getCCompiler() const;
|
|
|
|
QString getCXXCompiler() const;
|
|
|
|
QString getFortranCompiler() const;
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
QString getSystemName() const;
|
|
|
|
QString getSystemVersion() const;
|
|
|
|
QString getSystemProcessor() const;
|
|
|
|
QString getCrossRoot() const;
|
|
|
|
QString getCrossProgramMode() const;
|
|
|
|
QString getCrossLibraryMode() const;
|
|
|
|
QString getCrossIncludeMode() const;
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-12-16 23:00:17 +03:00
|
|
|
QString getCrossCompilerToolChainFile() const;
|
|
|
|
|
|
|
|
void loadFromSettings();
|
|
|
|
void saveToSettings();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
StartCompilerSetup* mStartCompilerSetupPage;
|
|
|
|
NativeCompilerSetup* mNativeCompilerSetupPage;
|
|
|
|
CrossCompilerSetup* mCrossCompilerSetupPage;
|
|
|
|
ToolchainCompilerSetup* mToolchainCompilerSetupPage;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // FirstConfigure_h
|
|
|
|
|