|
| 1 | +/************************************************************************ |
| 2 | + * This file has been generated automatically from * |
| 3 | + * * |
| 4 | + * src/core/diagram/qgsdiagram.h * |
| 5 | + * * |
| 6 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 7 | + ************************************************************************/ |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
1 | 12 | class QgsDiagram
|
2 | 13 | {
|
| 14 | +%Docstring |
| 15 | + Base class for all diagram types* |
| 16 | +%End |
| 17 | + |
3 | 18 | %TypeHeaderCode
|
4 |
| -#include <qgsdiagram.h> |
| 19 | +#include "qgsdiagram.h" |
5 | 20 | %End
|
6 | 21 | public:
|
7 | 22 | virtual ~QgsDiagram();
|
8 |
| - /** Returns an instance that is equivalent to this one |
9 |
| - * @note added in 2.4 */ |
| 23 | + |
10 | 24 | virtual QgsDiagram *clone() const = 0 /Factory/;
|
| 25 | +%Docstring |
| 26 | + Returns an instance that is equivalent to this one |
| 27 | +.. versionadded:: 2.4 |
| 28 | + :rtype: QgsDiagram |
| 29 | +%End |
11 | 30 |
|
12 | 31 | void clearCache();
|
13 | 32 |
|
14 |
| - /** Returns a prepared expression for the specified context. |
15 |
| - * @param expression expression string |
16 |
| - * @param context expression context |
17 |
| - * @note added in QGIS 2.12 |
18 |
| - */ |
19 | 33 | QgsExpression *getExpression( const QString &expression, const QgsExpressionContext &context );
|
| 34 | +%Docstring |
| 35 | + Returns a prepared expression for the specified context. |
| 36 | + \param expression expression string |
| 37 | + \param context expression context |
| 38 | +.. versionadded:: 2.12 |
| 39 | + :rtype: QgsExpression |
| 40 | +%End |
20 | 41 |
|
21 |
| - /** Draws the diagram at the given position (in pixel coordinates)*/ |
22 | 42 | virtual void renderDiagram( const QgsFeature &feature, QgsRenderContext &c, const QgsDiagramSettings &s, QPointF position ) = 0;
|
| 43 | +%Docstring |
| 44 | +Draws the diagram at the given position (in pixel coordinates) |
| 45 | +%End |
| 46 | + |
23 | 47 | virtual QString diagramName() const = 0;
|
24 |
| - /** Returns the size in map units the diagram will use to render.*/ |
| 48 | +%Docstring |
| 49 | + Get a descriptive name for this diagram type. |
| 50 | + :rtype: str |
| 51 | +%End |
25 | 52 | virtual QSizeF diagramSize( const QgsAttributes &attributes, const QgsRenderContext &c, const QgsDiagramSettings &s ) = 0;
|
26 |
| - /** Returns the size in map units the diagram will use to render. Interpolate size*/ |
| 53 | +%Docstring |
| 54 | +Returns the size in map units the diagram will use to render. |
| 55 | + :rtype: QSizeF |
| 56 | +%End |
27 | 57 | virtual QSizeF diagramSize( const QgsFeature &feature, const QgsRenderContext &c, const QgsDiagramSettings &s, const QgsDiagramInterpolationSettings &is ) = 0;
|
| 58 | +%Docstring |
| 59 | +Returns the size in map units the diagram will use to render. Interpolate size |
| 60 | + :rtype: QSizeF |
| 61 | +%End |
28 | 62 |
|
29 |
| - /** Returns the size of the legend item for the diagram corresponding to a specified value. |
30 |
| - * @param value value to return legend item size for |
31 |
| - * @param s diagram settings |
32 |
| - * @param is interpolation settings |
33 |
| - * @note added in QGIS 2.16 |
34 |
| - */ |
35 | 63 | virtual double legendSize( double value, const QgsDiagramSettings &s, const QgsDiagramInterpolationSettings &is ) const = 0;
|
| 64 | +%Docstring |
| 65 | + Returns the size of the legend item for the diagram corresponding to a specified value. |
| 66 | + \param value value to return legend item size for |
| 67 | + \param s diagram settings |
| 68 | + \param is interpolation settings |
| 69 | +.. versionadded:: 2.16 |
| 70 | + :rtype: float |
| 71 | +%End |
36 | 72 |
|
37 | 73 | protected:
|
38 | 74 | QgsDiagram();
|
39 | 75 | QgsDiagram( const QgsDiagram &other );
|
40 | 76 |
|
41 |
| - /** Changes the pen width to match the current settings and rendering context |
42 |
| - * @param pen The pen to modify |
43 |
| - * @param s The settings that specify the pen width |
44 |
| - * @param c The rendering specifying the proper scale units for pixel conversion |
45 |
| - */ |
46 | 77 | void setPenWidth( QPen &pen, const QgsDiagramSettings &s, const QgsRenderContext &c );
|
| 78 | +%Docstring |
| 79 | + Changes the pen width to match the current settings and rendering context |
| 80 | + \param pen The pen to modify |
| 81 | + \param s The settings that specify the pen width |
| 82 | + \param c The rendering specifying the proper scale units for pixel conversion |
| 83 | +%End |
47 | 84 |
|
48 |
| - /** Calculates a size to match the current settings and rendering context |
49 |
| - * @param size The size to convert |
50 |
| - * @param s The settings that specify the size type |
51 |
| - * @param c The rendering specifying the proper scale units for pixel conversion |
52 |
| - * |
53 |
| - * @return The converted size for rendering |
54 |
| - */ |
55 | 85 | QSizeF sizePainterUnits( QSizeF size, const QgsDiagramSettings &s, const QgsRenderContext &c );
|
| 86 | +%Docstring |
| 87 | + Calculates a size to match the current settings and rendering context |
| 88 | + \param size The size to convert |
| 89 | + \param s The settings that specify the size type |
| 90 | + \param c The rendering specifying the proper scale units for pixel conversion |
| 91 | + |
| 92 | + :return: The converted size for rendering |
| 93 | + :rtype: QSizeF |
| 94 | +%End |
56 | 95 |
|
57 |
| - /** Calculates a length to match the current settings and rendering context |
58 |
| - * @param l The length to convert |
59 |
| - * @param s Unused |
60 |
| - * @param c The rendering specifying the proper scale units for pixel conversion |
61 |
| - * |
62 |
| - * @return The converted length for rendering |
63 |
| - */ |
64 | 96 | double sizePainterUnits( double l, const QgsDiagramSettings &s, const QgsRenderContext &c );
|
| 97 | +%Docstring |
| 98 | + Calculates a length to match the current settings and rendering context |
| 99 | + \param l The length to convert |
| 100 | + \param s Unused |
| 101 | + \param c The rendering specifying the proper scale units for pixel conversion |
| 102 | + |
| 103 | + :return: The converted length for rendering |
| 104 | + :rtype: float |
| 105 | +%End |
65 | 106 |
|
66 |
| - /** Calculates a size to match the current settings and rendering context |
67 |
| - * @param s The settings that contain the font size and size type |
68 |
| - * @param c The rendering specifying the proper scale units for pixel conversion |
69 |
| - * |
70 |
| - * @return The properly scaled font for rendering |
71 |
| - */ |
72 | 107 | QFont scaledFont( const QgsDiagramSettings &s, const QgsRenderContext &c );
|
| 108 | +%Docstring |
| 109 | + Calculates a size to match the current settings and rendering context |
| 110 | + \param s The settings that contain the font size and size type |
| 111 | + \param c The rendering specifying the proper scale units for pixel conversion |
| 112 | + |
| 113 | + :return: The properly scaled font for rendering |
| 114 | + :rtype: QFont |
| 115 | +%End |
73 | 116 |
|
74 |
| - /** Returns the scaled size of a diagram for a value, respecting the specified diagram interpolation settings. |
75 |
| - * @param value value to calculate corresponding circular size for |
76 |
| - * @param s diagram settings |
77 |
| - * @param is interpolation settings |
78 |
| - * @note added in QGIS 2.16 |
79 |
| - */ |
80 | 117 | QSizeF sizeForValue( double value, const QgsDiagramSettings &s, const QgsDiagramInterpolationSettings &is ) const;
|
| 118 | +%Docstring |
| 119 | + Returns the scaled size of a diagram for a value, respecting the specified diagram interpolation settings. |
| 120 | + \param value value to calculate corresponding circular size for |
| 121 | + \param s diagram settings |
| 122 | + \param is interpolation settings |
| 123 | +.. versionadded:: 2.16 |
| 124 | + :rtype: QSizeF |
| 125 | +%End |
| 126 | + |
81 | 127 | };
|
| 128 | + |
| 129 | +/************************************************************************ |
| 130 | + * This file has been generated automatically from * |
| 131 | + * * |
| 132 | + * src/core/diagram/qgsdiagram.h * |
| 133 | + * * |
| 134 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 135 | + ************************************************************************/ |
0 commit comments