summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/QCMakeCacheView.h
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2007-11-13 04:54:49 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2007-11-13 04:54:49 (GMT)
commita81896eaedc17f11e3fb412a296309abd9e34b63 (patch)
tree8e1204cfa77852920fa730dec0e97a3b09926818 /Source/QtDialog/QCMakeCacheView.h
parent45a8e26fe159e6c0847addb3dbc126a852779f5a (diff)
downloadCMake-a81896eaedc17f11e3fb412a296309abd9e34b63.zip
CMake-a81896eaedc17f11e3fb412a296309abd9e34b63.tar.gz
CMake-a81896eaedc17f11e3fb412a296309abd9e34b63.tar.bz2
ENH: Add ability to add cache entries (even before first configure).
Diffstat (limited to 'Source/QtDialog/QCMakeCacheView.h')
-rw-r--r--Source/QtDialog/QCMakeCacheView.h40
1 files changed, 28 insertions, 12 deletions
diff --git a/Source/QtDialog/QCMakeCacheView.h b/Source/QtDialog/QCMakeCacheView.h
index a6ddbf2..b427af5 100644
--- a/Source/QtDialog/QCMakeCacheView.h
+++ b/Source/QtDialog/QCMakeCacheView.h
@@ -68,17 +68,18 @@ public slots:
void clear();
void setEditEnabled(bool);
bool removeRows(int row, int count, const QModelIndex& idx = QModelIndex());
+ bool insertRows(int row, int num, const QModelIndex&);
public:
// satisfy [pure] virtuals
- int columnCount ( const QModelIndex & parent ) const;
- QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole) const;
- QModelIndex parent ( const QModelIndex & index ) const;
- int rowCount ( const QModelIndex & parent ) const;
- QVariant headerData ( int section, Qt::Orientation orient, int role ) const;
- Qt::ItemFlags flags ( const QModelIndex& index ) const;
- bool setData ( const QModelIndex& index, const QVariant& value, int role );
- QModelIndex buddy ( const QModelIndex& index ) const;
+ int columnCount (const QModelIndex& parent) const;
+ QVariant data (const QModelIndex& index, int role = Qt::DisplayRole) const;
+ QModelIndex parent (const QModelIndex& index) const;
+ int rowCount (const QModelIndex& parent = QModelIndex()) const;
+ QVariant headerData (int section, Qt::Orientation orient, int role) const;
+ Qt::ItemFlags flags (const QModelIndex& index) const;
+ bool setData (const QModelIndex& index, const QVariant& value, int role);
+ QModelIndex buddy (const QModelIndex& index) const;
// get the properties
QCMakeCachePropertyList properties() const;
@@ -107,18 +108,33 @@ public:
};
/// Editor widget for editing paths or file paths
-class QCMakeCachePathEditor : public QLineEdit
+class QCMakeCacheFileEditor : public QLineEdit
{
Q_OBJECT
public:
- QCMakeCachePathEditor(bool isFilePath, QWidget* p);
+ QCMakeCacheFileEditor(QWidget* p);
protected slots:
- void chooseFile();
+ virtual void chooseFile() = 0;
protected:
void resizeEvent(QResizeEvent* e);
- bool IsFilePath;
QToolButton* ToolButton;
};
+class QCMakeCachePathEditor : public QCMakeCacheFileEditor
+{
+ Q_OBJECT
+public:
+ QCMakeCachePathEditor(QWidget* p = NULL);
+ void chooseFile();
+};
+
+class QCMakeCacheFilePathEditor : public QCMakeCacheFileEditor
+{
+ Q_OBJECT
+public:
+ QCMakeCacheFilePathEditor(QWidget* p = NULL);
+ void chooseFile();
+};
+
#endif