From 8cf1247d5f32f02be2fbe5bd3311a76a78f2b14d Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 21 May 2024 15:23:04 +0200 Subject: [PATCH] Doc: Add docs for Utils::TypedAspect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Updated the description of Utils::BaseAspect docs - Documented Utils::TypedAspect - Fixed the \fn for setDefaultValue(const ValueType &value) Change-Id: Ief1acee1b4f6fbf33e2cd3e870c109878a6b9e7c Reviewed-by: Topi Reiniƶ Reviewed-by: Marcus Tillmanns --- src/libs/utils/aspects.cpp | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/libs/utils/aspects.cpp b/src/libs/utils/aspects.cpp index cb8b54a57cb..664f4773872 100644 --- a/src/libs/utils/aspects.cpp +++ b/src/libs/utils/aspects.cpp @@ -103,16 +103,21 @@ public: \brief The \c BaseAspect class provides a common base for classes implementing aspects. - An aspect is a hunk of data like a property or collection of related + An \e aspect is a hunk of data like a property or collection of related properties of some object, together with a description of its behavior for common operations like visualizing or persisting. - Simple aspects are for example a boolean property represented by a QCheckBox + Simple aspects are, for example, a boolean property represented by a QCheckBox in the user interface, or a string property represented by a PathChooser, - selecting directories in the filesystem. + for selecting directories in the filesystem. - While aspects implementations usually have the ability to visualize and to persist + While aspects implementations usually can visualize and persist their data, or use an ID, neither of these is mandatory. + + The derived classes can implement addToLayout() to create a UI. + + Implement \c guiToBuffer() and \c bufferToGui() to synchronize the UI with + the internal data. */ /*! @@ -198,7 +203,20 @@ QVariant BaseAspect::defaultVariantValue() const } /*! - \fn TypedAspect::setDefaultValue(const ValueType &value) + \class Utils::TypedAspect + \inheaderfile utils/aspects.h + \inmodule QtCreator + + \brief The \c TypedAspect class is a helper class for implementing a simple + aspect. + + A typed aspect contains a single piece of data that is of the type + \c ValueType. +*/ + + +/*! + \fn template void Utils::TypedAspect::setDefaultValue(const ValueType &value) Sets a default \a value and the current value for this aspect.