File: qgsunitselectionwidget.sip.in

package info (click to toggle)
qgis 3.22.16%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,186,020 kB
  • sloc: cpp: 1,275,562; python: 194,091; xml: 15,597; perl: 3,471; sh: 3,368; sql: 2,485; ansic: 2,219; yacc: 1,056; lex: 574; javascript: 504; lisp: 411; makefile: 227
file content (256 lines) | stat: -rw-r--r-- 6,721 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgsunitselectionwidget.h                                     *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/





class QgsMapUnitScaleWidget : QgsPanelWidget
{
%Docstring(signature="appended")
A widget which allows the user to choose the minimum and maximum scale of an object in map units
and millimeters. This widget is designed to allow users to edit the properties of a
:py:class:`QgsMapUnitScale` object.

.. seealso:: :py:class:`QgsMapUnitScaleDialog`

.. seealso:: :py:class:`QgsUnitSelectionWidget`

.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsunitselectionwidget.h"
%End
  public:

    QgsMapUnitScaleWidget( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsMapUnitScaleWidget.

:param parent: parent widget
%End

    QgsMapUnitScale mapUnitScale() const;
%Docstring
Returns a :py:class:`QgsMapUnitScale` representing the settings shown in the
widget.

.. seealso:: :py:func:`setMapUnitScale`

.. seealso:: :py:func:`mapUnitScaleChanged`
%End

    void setMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Updates the widget to reflect the settings from the specified
:py:class:`QgsMapUnitScale` object.

:param scale: map unit scale to show in widget

.. seealso:: :py:func:`mapUnitScale`

.. seealso:: :py:func:`mapUnitScaleChanged`
%End

    void setMapCanvas( QgsMapCanvas *canvas );
%Docstring
Sets the map canvas associated with the widget. This allows the
widget to retrieve the current map scale from the canvas.

:param canvas: map canvas
%End

  signals:

    void mapUnitScaleChanged( const QgsMapUnitScale &scale );
%Docstring
Emitted when the settings in the widget are modified.

:param scale: :py:class:`QgsMapUnitScale` reflecting new settings from the widget
%End

};

class QgsMapUnitScaleDialog : QDialog
{
%Docstring(signature="appended")
A dialog which allows the user to choose the minimum and maximum scale of an object in map units
and millimeters. This dialog is designed to allow users to edit the properties of a
:py:class:`QgsMapUnitScale` object.

.. seealso:: :py:class:`QgsMapUnitScaleWidget`

.. seealso:: :py:class:`QgsUnitSelectionWidget`
%End

%TypeHeaderCode
#include "qgsunitselectionwidget.h"
%End
  public:

    QgsMapUnitScaleDialog( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsMapUnitScaleDialog.

:param parent: parent widget
%End

    QgsMapUnitScale getMapUnitScale() const;
%Docstring
Returns a :py:class:`QgsMapUnitScale` representing the settings shown in the
dialog.

.. seealso:: :py:func:`setMapUnitScale`
%End

    void setMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Updates the dialog to reflect the settings from the specified
:py:class:`QgsMapUnitScale` object.

:param scale: map unit scale to show in dialog

.. seealso:: :py:func:`mapUnitScale`
%End

    void setMapCanvas( QgsMapCanvas *canvas );
%Docstring
Sets the map canvas associated with the dialog. This allows the dialog to retrieve the current
map scale from the canvas.

:param canvas: map canvas

.. versionadded:: 2.12
%End

};

class QgsUnitSelectionWidget : QWidget
{
%Docstring(signature="appended")
A widget displaying a combobox allowing the user to choose between various display units,
such as millimeters or map unit. If the user chooses map units, a button appears allowing
adjustment of minimum and maximum scaling.

.. seealso:: :py:class:`QgsMapUnitScaleWidget`

.. seealso:: :py:class:`QgsMapUnitScaleDialog`
%End

%TypeHeaderCode
#include "qgsunitselectionwidget.h"
%End
  public:

    QgsUnitSelectionWidget( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsUnitSelectionWidget.

:param parent: parent widget
%End

    void setUnits( const QStringList &units, int mapUnitIdx );
%Docstring
Sets the units which the user can choose from in the combobox.

:param units: list of strings for custom units to display in the widget
:param mapUnitIdx: specifies which entry corresponds to the map units, or -1 if none
%End

    void setUnits( const QgsUnitTypes::RenderUnitList &units );
%Docstring
Sets the units which the user can choose from in the combobox. Clears any existing units.

:param units: list of valid units

.. versionadded:: 2.9
%End

    int getUnit() const;
%Docstring
Gets the selected unit index
%End

    QgsUnitTypes::RenderUnit unit() const;
%Docstring
Returns the current predefined selected unit (if applicable).

:return: selected output unit, or :py:class:`QgsUnitTypes`.RenderUnknownUnit if the widget was populated with custom unit types

.. versionadded:: 2.9
%End

    void setUnit( int unitIndex ) /PyName=setUnitIndex/;
%Docstring
Sets the selected unit index

:param unitIndex: index of unit to set as current

.. note::

   available in Python bindings as setUnitIndex
%End

    void setUnit( QgsUnitTypes::RenderUnit unit );
%Docstring
Sets the selected unit

:param unit: predefined unit to set as current
%End

    QgsMapUnitScale getMapUnitScale() const;
%Docstring
Returns the map unit scale
%End

    void setMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit scale
%End

    void setMapCanvas( QgsMapCanvas *canvas );
%Docstring
Sets the map canvas associated with the widget. This allows the widget to retrieve the current
map scale from the canvas.

:param canvas: map canvas

.. versionadded:: 2.12
%End

    bool showMapScaleButton() const;
%Docstring
Returns ``True`` if the widget can show the map scale button when the Map Units option is selected.

.. seealso:: :py:func:`setShowMapScaleButton`

.. versionadded:: 3.22
%End

    void setShowMapScaleButton( bool show );
%Docstring
Sets whether the widget can show the map scale button when the Map Units option is selected.

.. seealso:: :py:func:`showMapScaleButton`

.. versionadded:: 3.22
%End

  signals:
    void changed();

};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgsunitselectionwidget.h                                     *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/