summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/QCMake.h
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2008-05-15 23:21:01 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2008-05-15 23:21:01 (GMT)
commitf8f4140b6ca1d7f1944514741f61aaf631b59115 (patch)
treeb5cb3b3b79515727c503194c0f639298a98826b1 /Source/QtDialog/QCMake.h
parent3e6decf31205ecfcbe837c0d0344f4597aa33369 (diff)
downloadCMake-f8f4140b6ca1d7f1944514741f61aaf631b59115.zip
CMake-f8f4140b6ca1d7f1944514741f61aaf631b59115.tar.gz
CMake-f8f4140b6ca1d7f1944514741f61aaf631b59115.tar.bz2
ENH: Add cross compiling support in the GUI in the same dialog that prompts for
the generator on the first configure. It either ask for a toolchain file or asks for all the information a toolchain file might contain. Also added option for setting non-default compilers if not cross compiling. Fixes #6849. Also a bit of code cleanup and re-organizing.
Diffstat (limited to 'Source/QtDialog/QCMake.h')
-rw-r--r--Source/QtDialog/QCMake.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h
index c46aab6..909c1ac 100644
--- a/Source/QtDialog/QCMake.h
+++ b/Source/QtDialog/QCMake.h
@@ -31,9 +31,9 @@
class cmake;
-/// struct to represent cache properties in Qt
+/// struct to represent cmake properties in Qt
/// Value is of type String or Bool
-struct QCMakeCacheProperty
+struct QCMakeProperty
{
enum PropertyType { BOOL, PATH, FILEPATH, STRING };
QString Key;
@@ -41,20 +41,22 @@ struct QCMakeCacheProperty
QString Help;
PropertyType Type;
bool Advanced;
- bool operator==(const QCMakeCacheProperty& other) const
+ bool operator==(const QCMakeProperty& other) const
{
return this->Key == other.Key;
}
- bool operator<(const QCMakeCacheProperty& other) const
+ bool operator<(const QCMakeProperty& other) const
{
return this->Key < other.Key;
}
};
-// make types usable with QVariant
-Q_DECLARE_METATYPE(QCMakeCacheProperty)
-typedef QList<QCMakeCacheProperty> QCMakeCachePropertyList;
-Q_DECLARE_METATYPE(QCMakeCachePropertyList)
+// list of properties
+typedef QList<QCMakeProperty> QCMakePropertyList;
+
+// allow QVariant to be a property or list of properties
+Q_DECLARE_METATYPE(QCMakeProperty)
+Q_DECLARE_METATYPE(QCMakePropertyList)
/// Qt API for CMake library.
/// Wrapper like class allows for easier integration with
@@ -65,7 +67,6 @@ class QCMake : public QObject
public:
QCMake(QObject* p=0);
~QCMake();
- void SetSuppressDevWarnings(bool value);
public slots:
/// load the cache file in a directory
void loadCache(const QString& dir);
@@ -80,7 +81,7 @@ public slots:
/// generate the files
void generate();
/// set the property values
- void setProperties(const QCMakeCachePropertyList&);
+ void setProperties(const QCMakePropertyList&);
/// interrupt the configure or generate process
void interrupt();
/// delete the cache in binary directory
@@ -89,10 +90,12 @@ public slots:
void reloadCache();
/// set whether to do debug output
void setDebugOutput(bool);
+ /// set whether to do suppress dev warnings
+ void setSuppressDevWarnings(bool value);
public:
/// get the list of cache properties
- QCMakeCachePropertyList properties() const;
+ QCMakePropertyList properties() const;
/// get the current binary directory
QString binaryDirectory() const;
/// get the current source directory
@@ -106,7 +109,7 @@ public:
signals:
/// signal when properties change (during read from disk or configure process)
- void propertiesChanged(const QCMakeCachePropertyList& vars);
+ void propertiesChanged(const QCMakePropertyList& vars);
/// signal when the generator changes
void generatorChanged(const QString& gen);
/// signal when the source directory changes (binary directory already