summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/QCMakeCacheView.h
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2007-11-08 15:17:37 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2007-11-08 15:17:37 (GMT)
commit9f676df3c6daddc0d6d2d8d2907b2ce707ceebaf (patch)
tree5409c6b3d32eca167ddfe312cb3a9c1df02b7215 /Source/QtDialog/QCMakeCacheView.h
parente3572607f4097fbc07bebbfbfe333adc16e43195 (diff)
downloadCMake-9f676df3c6daddc0d6d2d8d2907b2ce707ceebaf.zip
CMake-9f676df3c6daddc0d6d2d8d2907b2ce707ceebaf.tar.gz
CMake-9f676df3c6daddc0d6d2d8d2907b2ce707ceebaf.tar.bz2
ENH: add context menu for deleting, ignoring, and getting help for cache entries.
ENH: add delete cache button ENH: add information string above configure/generate buttons ENH: change search to search both columns, and from regex to plain string search ENH: add buddy info in cache entry view, so double clicking in the left column starts editing the associated value. BUG: fix file path editor so it goes away when focus is lost
Diffstat (limited to 'Source/QtDialog/QCMakeCacheView.h')
-rw-r--r--Source/QtDialog/QCMakeCacheView.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/QtDialog/QCMakeCacheView.h b/Source/QtDialog/QCMakeCacheView.h
index 52b154e..8e92b42 100644
--- a/Source/QtDialog/QCMakeCacheView.h
+++ b/Source/QtDialog/QCMakeCacheView.h
@@ -27,6 +27,7 @@
#include <QSortFilterProxyModel>
class QCMakeCacheModel;
+class QToolButton;
/// Qt view class for cache properties
@@ -44,6 +45,7 @@ public slots:
void setSearchFilter(const QString&);
protected:
+ void contextMenuEvent(QContextMenuEvent* e);
QModelIndex moveCursor(CursorAction, Qt::KeyboardModifiers);
void showEvent(QShowEvent* e);
bool Init;
@@ -66,16 +68,18 @@ public slots:
void setProperties(const QCMakeCachePropertyList& props);
void clear();
void setEditEnabled(bool);
+ bool removeRows(int row, int count, const QModelIndex& idx = QModelIndex());
public:
// satisfy [pure] virtuals
int columnCount ( const QModelIndex & parent ) const;
- QVariant data ( const QModelIndex & index, int role ) 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;
// flag if a cache property has been modified
bool modifiedValues() const;
@@ -105,18 +109,17 @@ public:
};
/// Editor widget for editing paths or file paths
-class QCMakeCachePathEditor : public QWidget
+class QCMakeCachePathEditor : public QLineEdit
{
Q_OBJECT
- Q_PROPERTY(QString value READ value USER true)
public:
- QCMakeCachePathEditor(const QString& file, bool isFilePath, QWidget* p);
- QString value() const { return this->LineEdit.text(); }
+ QCMakeCachePathEditor(bool isFilePath, QWidget* p);
protected slots:
void chooseFile();
protected:
- QLineEdit LineEdit;
+ void resizeEvent(QResizeEvent* e);
bool IsFilePath;
+ QToolButton* ToolButton;
};
#endif