summaryrefslogtreecommitdiff
path: root/Source/QtDialog/QCMakeCacheView.h
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2016-05-16 10:34:04 -0400
committerBrad King <brad.king@kitware.com>2016-05-16 16:05:19 -0400
commitd9fd2f5402eeaa345691313658e02b51038f570b (patch)
treedca71b9a7e267f4c6300da3eb770415381726785 /Source/QtDialog/QCMakeCacheView.h
parent82df6deaafb36cbbfd450202bb20b320f637751a (diff)
downloadcmake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
Diffstat (limited to 'Source/QtDialog/QCMakeCacheView.h')
-rw-r--r--Source/QtDialog/QCMakeCacheView.h57
1 files changed, 32 insertions, 25 deletions
diff --git a/Source/QtDialog/QCMakeCacheView.h b/Source/QtDialog/QCMakeCacheView.h
index 5631b8615d..6ad56fbf62 100644
--- a/Source/QtDialog/QCMakeCacheView.h
+++ b/Source/QtDialog/QCMakeCacheView.h
@@ -38,7 +38,7 @@ public:
// get whether to show advanced entries
bool showAdvanced() const;
- QSize sizeHint() const { return QSize(200,200); }
+ QSize sizeHint() const { return QSize(200, 200); }
public slots:
// set whether to show advanced entries
@@ -65,14 +65,20 @@ public:
// roles used to retrieve extra data such has help strings, types of
// properties, and the advanced flag
- enum { HelpRole = Qt::ToolTipRole,
- TypeRole = Qt::UserRole,
- AdvancedRole,
- StringsRole,
- GroupRole
- };
-
- enum ViewType { FlatView, GroupView };
+ enum
+ {
+ HelpRole = Qt::ToolTipRole,
+ TypeRole = Qt::UserRole,
+ AdvancedRole,
+ StringsRole,
+ GroupRole
+ };
+
+ enum ViewType
+ {
+ FlatView,
+ GroupView
+ };
public slots:
// set a list of properties. This list will be sorted and grouped according
@@ -92,9 +98,9 @@ public slots:
// insert a new property at a row specifying all the information about the
// property
- bool insertProperty(QCMakeProperty::PropertyType t,
- const QString& name, const QString& description,
- const QVariant& value, bool advanced);
+ bool insertProperty(QCMakeProperty::PropertyType t, const QString& name,
+ const QString& description, const QVariant& value,
+ bool advanced);
// set the view type
void setViewType(ViewType t);
@@ -111,12 +117,11 @@ public:
int newPropertyCount() const;
// return flags (overloaded to modify flag based on EditEnabled flag)
- Qt::ItemFlags flags (const QModelIndex& index) const;
+ Qt::ItemFlags flags(const QModelIndex& index) const;
QModelIndex buddy(const QModelIndex& idx) const;
// get the data in the model for this property
- void getPropertyData(const QModelIndex& idx1,
- QCMakeProperty& prop) const;
+ void getPropertyData(const QModelIndex& idx1, QCMakeProperty& prop) const;
protected:
bool EditEnabled;
@@ -125,17 +130,16 @@ protected:
ViewType View;
// set the data in the model for this property
- void setPropertyData(const QModelIndex& idx1,
- const QCMakeProperty& p, bool isNew);
+ void setPropertyData(const QModelIndex& idx1, const QCMakeProperty& p,
+ bool isNew);
// breaks up he property list into groups
// where each group has the same prefix up to the first underscore
static void breakProperties(const QSet<QCMakeProperty>& props,
- QMap<QString, QCMakePropertyList>& result);
+ QMap<QString, QCMakePropertyList>& result);
// gets the prefix of a string up to the first _
static QString prefix(const QString& s);
-
};
/// Qt delegate class for interaction (or other customization)
@@ -147,18 +151,22 @@ public:
QCMakeCacheModelDelegate(QObject* p);
/// create our own editors for cache properties
QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option,
- const QModelIndex& index ) const;
- bool editorEvent (QEvent* event, QAbstractItemModel* model,
- const QStyleOptionViewItem& option, const QModelIndex& index);
+ const QModelIndex& index) const;
+ bool editorEvent(QEvent* event, QAbstractItemModel* model,
+ const QStyleOptionViewItem& option,
+ const QModelIndex& index);
bool eventFilter(QObject* object, QEvent* event);
- void setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index ) const;
- QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
+ void setModelData(QWidget* editor, QAbstractItemModel* model,
+ const QModelIndex& index) const;
+ QSize sizeHint(const QStyleOptionViewItem& option,
+ const QModelIndex& index) const;
QSet<QCMakeProperty> changes() const;
void clearChanges();
protected slots:
void setFileDialogFlag(bool);
+
protected:
bool FileDialogFlag;
// record a change to an item in the model.
@@ -170,4 +178,3 @@ protected:
};
#endif
-