diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2008-05-15 23:21:01 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2008-05-15 23:21:01 (GMT) |
commit | f8f4140b6ca1d7f1944514741f61aaf631b59115 (patch) | |
tree | b5cb3b3b79515727c503194c0f639298a98826b1 /Source/QtDialog/QCMakeCacheView.h | |
parent | 3e6decf31205ecfcbe837c0d0344f4597aa33369 (diff) | |
download | CMake-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/QCMakeCacheView.h')
-rw-r--r-- | Source/QtDialog/QCMakeCacheView.h | 58 |
1 files changed, 10 insertions, 48 deletions
diff --git a/Source/QtDialog/QCMakeCacheView.h b/Source/QtDialog/QCMakeCacheView.h index 45a858e..41b3e1f 100644 --- a/Source/QtDialog/QCMakeCacheView.h +++ b/Source/QtDialog/QCMakeCacheView.h @@ -21,14 +21,10 @@ #include "QCMake.h" #include <QTableView> #include <QAbstractTableModel> -#include <QCheckBox> -#include <QLineEdit> #include <QItemDelegate> -#include <QSortFilterProxyModel> -#include <QCompleter> +class QSortFilterProxyModel; class QCMakeCacheModel; -class QToolButton; /// Qt view class for cache properties @@ -65,11 +61,17 @@ public: enum { HelpRole = Qt::UserRole, TypeRole, AdvancedRole }; public slots: - void setProperties(const QCMakeCachePropertyList& props); + void setProperties(const QCMakePropertyList& props); void clear(); void setEditEnabled(bool); bool removeRows(int row, int count, const QModelIndex& idx = QModelIndex()); bool insertRows(int row, int num, const QModelIndex&); + + // insert a property at a row specifying all the information about the + // property + bool insertProperty(int row, QCMakeProperty::PropertyType t, + const QString& name, const QString& description, + const QVariant& value, bool advanced); public: // satisfy [pure] virtuals @@ -83,7 +85,7 @@ public: QModelIndex buddy (const QModelIndex& index) const; // get the properties - QCMakeCachePropertyList properties() const; + QCMakePropertyList properties() const; // editing enabled bool editEnabled() const; @@ -91,7 +93,7 @@ public: int newCount() const; protected: - QCMakeCachePropertyList Properties; + QCMakePropertyList Properties; int NewCount; bool EditEnabled; }; @@ -115,45 +117,5 @@ protected: bool FileDialogFlag; }; -/// Editor widget for editing paths or file paths -class QCMakeCacheFileEditor : public QLineEdit -{ - Q_OBJECT -public: - QCMakeCacheFileEditor(QWidget* p, const QString& var); -protected slots: - virtual void chooseFile() = 0; -signals: - void fileDialogExists(bool); -protected: - void resizeEvent(QResizeEvent* e); - QToolButton* ToolButton; - QString Variable; -}; - -class QCMakeCachePathEditor : public QCMakeCacheFileEditor -{ - Q_OBJECT -public: - QCMakeCachePathEditor(QWidget* p = NULL, const QString& var = QString()); - void chooseFile(); -}; - -class QCMakeCacheFilePathEditor : public QCMakeCacheFileEditor -{ - Q_OBJECT -public: - QCMakeCacheFilePathEditor(QWidget* p = NULL, const QString& var = QString()); - void chooseFile(); -}; - -/// completer class that returns native cmake paths -class QCMakeFileCompleter : public QCompleter -{ -public: - QCMakeFileCompleter(QObject* o, bool dirs); - virtual QString pathFromIndex(const QModelIndex& idx) const; -}; - #endif |