summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2017-03-15 13:27:12 +0100
committerMartin Smith <martin.smith@qt.io>2017-11-30 13:08:32 +0000
commit4d80d634a6edd76222c92e6f736124df5e1d345f (patch)
treed3c2922339e66c721c54c9b6f75029e14d9dec3f
parent259197d8df913e115f9d21c8f08201fb3c9f2dbc (diff)
doc: document the anonymous enum type correctly
clangqdoc now accepts an unnamed enum type, calls it "anonymous" and allows it to be documented as a named enum type. In this update, several instances appear in subclasses of QGraphicsItem. This update documents them correctly. Change-Id: Ide8026801269154a37e7677a1ce62e0cb392efea Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp90
1 files changed, 78 insertions, 12 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index a649d61135..f298ffd61e 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -268,27 +268,93 @@
*/
/*!
- \variable QGraphicsItem::Type
+ \enum QGraphicsItem::anonymous
- The type value returned by the virtual type() function in standard
- graphics item classes in Qt. All such standard graphics item
- classes in Qt are associated with a unique value for Type,
- e.g. the value returned by QGraphicsPathItem::type() is 2.
+ The value returned by the virtual type() function in standard
+ graphics item classes in Qt. All such standard graphics item classes
+ in Qt are associated with a unique value for Type, e.g. the value
+ returned by QGraphicsPathItem::type() is 2.
+
+ \value Type
\snippet code/src_gui_graphicsview_qgraphicsitem.cpp 18
+
+ \value UserType The lowest value returned by the virtual type()
+ function for custom subclasses of QGraphicsItem.
+
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 1
*/
/*!
- \variable QGraphicsItem::UserType
+ \enum QGraphicsPathItem::anonymous
- The lowest permitted type value for custom items (subclasses
- of QGraphicsItem or any of the standard items). This value is
- used in conjunction with a reimplementation of QGraphicsItem::type()
- and declaring a Type enum value. Example:
+ The value returned by the virtual type() function.
- \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 1
+ \value Type A graphics path item
+*/
+
+/*!
+ \enum QGraphicsRectItem::anonymous
+
+ The value returned by the virtual type() function.
+
+ \value Type A graphics rect item
+*/
+
+/*!
+ \enum QGraphicsEllipseItem::anonymous
+
+ The value returned by the virtual type() function.
+
+ \value Type A graphics ellipse item
+*/
+
+/*!
+ \enum QGraphicsPolygonItem::anonymous
+
+ The value returned by the virtual type() function.
+
+ \value Type A graphics polygon item
+*/
+
+/*!
+ \enum QGraphicsPixmapItem::anonymous
+
+ The value returned by the virtual type() function.
+
+ \value Type A graphics pixmap item
+*/
+
+/*!
+ \enum QGraphicsTextItem::anonymous
+
+ The value returned by the virtual type() function.
+
+ \value Type A graphics text item
+*/
+
+/*!
+ \enum QGraphicsSimpleTextItem::anonymous
+
+ The value returned by the virtual type() function.
+
+ \value Type A graphics simple text item
+*/
+
+/*!
+ \enum QGraphicsItemGroup::anonymous
+
+ The value returned by the virtual type() function.
+
+ \value Type A graphics item group
+*/
+
+/*!
+ \enum QGraphicsLineItem::anonymous
+
+ The value returned by the virtual type() function.
- \note UserType = 65536
+ \value Type A graphics line item
*/
/*!