summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/QCMakeWidgets.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/QCMakeWidgets.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/QCMakeWidgets.h')
-rw-r--r--Source/QtDialog/QCMakeWidgets.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/Source/QtDialog/QCMakeWidgets.h b/Source/QtDialog/QCMakeWidgets.h
new file mode 100644
index 0000000..231f728
--- /dev/null
+++ b/Source/QtDialog/QCMakeWidgets.h
@@ -0,0 +1,71 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+
+#ifndef QCMakeWidgets_h
+#define QCMakeWidgets_h
+
+#include <QLineEdit>
+#include <QCompleter>
+class QToolButton;
+
+// common widgets for Qt based CMake
+
+/// Editor widget for editing paths or file paths
+class QCMakeFileEditor : public QLineEdit
+{
+ Q_OBJECT
+public:
+ QCMakeFileEditor(QWidget* p, const QString& var);
+protected slots:
+ virtual void chooseFile() = 0;
+signals:
+ void fileDialogExists(bool);
+protected:
+ void resizeEvent(QResizeEvent* e);
+ QToolButton* ToolButton;
+ QString Variable;
+};
+
+/// editor widget for editing files
+class QCMakePathEditor : public QCMakeFileEditor
+{
+ Q_OBJECT
+public:
+ QCMakePathEditor(QWidget* p = NULL, const QString& var = QString());
+ void chooseFile();
+};
+
+/// editor widget for editing paths
+class QCMakeFilePathEditor : public QCMakeFileEditor
+{
+ Q_OBJECT
+public:
+ QCMakeFilePathEditor(QWidget* p = NULL, const QString& var = QString());
+ void chooseFile();
+};
+
+/// completer class that returns native cmake paths
+class QCMakeFileCompleter : public QCompleter
+{
+ Q_OBJECT
+public:
+ QCMakeFileCompleter(QObject* o, bool dirs);
+ virtual QString pathFromIndex(const QModelIndex& idx) const;
+};
+
+#endif
+