Skip to content

Commit

Permalink
Add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 30, 2017
1 parent 41fe335 commit 1c1dae3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/annotations/qgsannotation.h
Expand Up @@ -265,6 +265,10 @@ class CORE_EXPORT QgsAnnotation : public QObject

protected:

/**
* Renders the annotation's contents to a target /a context at the specified /a size.
* Derived classes should implement their custom annotation drawing logic here.
*/
virtual void renderAnnotation( QgsRenderContext& context, QSizeF size ) const = 0;

/**
Expand Down
14 changes: 14 additions & 0 deletions src/core/annotations/qgsannotationmanager.h
Expand Up @@ -23,6 +23,20 @@
class QgsProject;
class QgsAnnotation;


/** \ingroup core
* \class QgsAnnotationManager
* \note added in QGIS 3.0
*
* \brief Manages storage of a set of QgsAnnotation annotation objects.
*
* QgsAnnotationManager handles the storage, serializing and deserializing
* of QgsAnnotations. Usually this class is not constructed directly, but
* rather accessed through a QgsProject via QgsProject::annotationManager().
*
* QgsAnnotationManager retains ownership of all the annotations contained
* in the manager.
*/
class CORE_EXPORT QgsAnnotationManager : public QObject
{
Q_OBJECT
Expand Down
13 changes: 13 additions & 0 deletions src/gui/qgsformannotation.h
Expand Up @@ -29,13 +29,26 @@ class GUI_EXPORT QgsFormAnnotation: public QgsAnnotation
{
Q_OBJECT
public:

/**
* Constructor for QgsFormAnnotation.
*/
QgsFormAnnotation( QObject* parent = nullptr );

QSizeF minimumFrameSize() const override;
//! Returns the optimal frame size
QSizeF preferredFrameSize() const;

/**
* Sets the path to the Qt Designer UI file to show in the annotation.
* @see designerForm()
*/
void setDesignerForm( const QString& uiFile );

/**
* Returns the path to the Qt Designer UI file to show in the annotation.
* @see setDesignerForm()
*/
QString designerForm() const { return mDesignerForm; }

virtual void writeXml( QDomElement& elem, QDomDocument & doc ) const override;
Expand Down

0 comments on commit 1c1dae3

Please sign in to comment.