forked from qt-creator/qt-creator
Tracing: Give TimelineModel a name and make its properties FINAL
You really should not shadow them. The name helps to use it from QML in a type safe manner. Change-Id: I3fbd03ad267e10f5003647cdfb916a6f90e30b8c Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -31,7 +31,7 @@ import QtCreator.Tracing
|
|||||||
Item {
|
Item {
|
||||||
id: labelContainer
|
id: labelContainer
|
||||||
|
|
||||||
property QtObject model
|
property TimelineModel model
|
||||||
property QtObject notesModel
|
property QtObject notesModel
|
||||||
property string text: model ? model.displayName : ""
|
property string text: model ? model.displayName : ""
|
||||||
property bool expanded: model && model.expanded
|
property bool expanded: model && model.expanded
|
||||||
|
@@ -39,22 +39,22 @@ class TimelineModelAggregator;
|
|||||||
class TRACING_EXPORT TimelineModel : public QObject
|
class TRACING_EXPORT TimelineModel : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(int modelId READ modelId CONSTANT)
|
Q_PROPERTY(int modelId READ modelId CONSTANT FINAL)
|
||||||
Q_PROPERTY(QString displayName READ displayName WRITE setDisplayName NOTIFY displayNameChanged)
|
Q_PROPERTY(QString displayName READ displayName WRITE setDisplayName NOTIFY displayNameChanged FINAL)
|
||||||
Q_PROPERTY(QString tooltip READ tooltip NOTIFY tooltipChanged)
|
Q_PROPERTY(QString tooltip READ tooltip NOTIFY tooltipChanged FINAL)
|
||||||
Q_PROPERTY(QColor categoryColor READ categoryColor NOTIFY categoryColorChanged)
|
Q_PROPERTY(QColor categoryColor READ categoryColor NOTIFY categoryColorChanged FINAL)
|
||||||
Q_PROPERTY(bool hasMixedTypesInExpandedState READ hasMixedTypesInExpandedState NOTIFY hasMixedTypesInExpandedStateChanged)
|
Q_PROPERTY(bool hasMixedTypesInExpandedState READ hasMixedTypesInExpandedState NOTIFY hasMixedTypesInExpandedStateChanged FINAL)
|
||||||
Q_PROPERTY(bool empty READ isEmpty NOTIFY contentChanged)
|
Q_PROPERTY(bool empty READ isEmpty NOTIFY contentChanged FINAL)
|
||||||
Q_PROPERTY(bool hidden READ hidden WRITE setHidden NOTIFY hiddenChanged)
|
Q_PROPERTY(bool hidden READ hidden WRITE setHidden NOTIFY hiddenChanged FINAL)
|
||||||
Q_PROPERTY(bool expanded READ expanded WRITE setExpanded NOTIFY expandedChanged)
|
Q_PROPERTY(bool expanded READ expanded WRITE setExpanded NOTIFY expandedChanged FINAL)
|
||||||
Q_PROPERTY(int height READ height NOTIFY heightChanged)
|
Q_PROPERTY(int height READ height NOTIFY heightChanged FINAL)
|
||||||
Q_PROPERTY(int expandedRowCount READ expandedRowCount NOTIFY contentChanged)
|
Q_PROPERTY(int expandedRowCount READ expandedRowCount NOTIFY contentChanged FINAL)
|
||||||
Q_PROPERTY(int collapsedRowCount READ collapsedRowCount NOTIFY contentChanged)
|
Q_PROPERTY(int collapsedRowCount READ collapsedRowCount NOTIFY contentChanged FINAL)
|
||||||
Q_PROPERTY(int rowCount READ rowCount NOTIFY rowCountChanged)
|
Q_PROPERTY(int rowCount READ rowCount NOTIFY rowCountChanged FINAL)
|
||||||
Q_PROPERTY(QVariantList labels READ labels NOTIFY labelsChanged)
|
Q_PROPERTY(QVariantList labels READ labels NOTIFY labelsChanged FINAL)
|
||||||
Q_PROPERTY(int count READ count NOTIFY contentChanged)
|
Q_PROPERTY(int count READ count NOTIFY contentChanged FINAL)
|
||||||
Q_PROPERTY(int defaultRowHeight READ defaultRowHeight CONSTANT)
|
Q_PROPERTY(int defaultRowHeight READ defaultRowHeight CONSTANT FINAL)
|
||||||
QML_ANONYMOUS
|
QML_ELEMENT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
class TimelineModelPrivate;
|
class TimelineModelPrivate;
|
||||||
|
Reference in New Issue
Block a user