From 4d80d634a6edd76222c92e6f736124df5e1d345f Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 15 Mar 2017 13:27:12 +0100 Subject: doc: document the anonymous enum type correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ƶ Reviewed-by: Martin Smith --- src/widgets/graphicsview/qgraphicsitem.cpp | 90 ++++++++++++++++++++++++++---- 1 file changed, 78 insertions(+), 12 deletions(-) (limited to 'src/widgets/graphicsview') 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 */ /*! -- cgit v1.2.3