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 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgstextformatwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsTextFormatWidget : QWidget, QgsExpressionContextGenerator
{
%Docstring(signature="appended")
A widget for customizing text formatting settings.
:py:class:`QgsTextFormatWidget` provides a widget for controlling the
appearance of text rendered using :py:class:`QgsTextRenderer`. The
widget includes all settings contained within a
:py:class:`QgsTextFormat`, including shadow, background and buffer.
Additionally, the widget can handle labeling settings due to the large
overlap between the text renderer settings and the labeling settings.
This mode is possible by subclassing :py:class:`QgsTextFormatWidget` and
calling the protected constructor with a mode of Labeling.
%End
%TypeHeaderCode
#include "qgstextformatwidget.h"
%End
public:
QgsTextFormatWidget( const QgsTextFormat &format = QgsTextFormat(), QgsMapCanvas *mapCanvas = 0, QWidget *parent /TransferThis/ = 0, QgsMapLayer *layer = 0 );
%Docstring
Constructor for QgsTextFormatWidget.
:param format: initial formatting settings to show in widget
:param mapCanvas: associated map canvas
:param parent: parent widget
:param layer: associated layer (vector or mesh)
%End
~QgsTextFormatWidget();
QgsTextFormat format( bool includeDataDefinedProperties = true ) const;
%Docstring
Returns the current formatting settings defined by the widget.
If ``includateDataDefinedProperties`` is ``True``, then data defined
properties specified in the widget will be included in the format
definition.
%End
void setFormat( const QgsTextFormat &format );
%Docstring
Sets the current formatting settings
.. versionadded:: 3.2
%End
virtual void setContext( const QgsSymbolWidgetContext &context );
%Docstring
Sets the ``context`` in which the widget is shown, e.g., the associated
map canvas and expression contexts.
.. seealso:: :py:func:`context`
.. versionadded:: 3.10
%End
QgsSymbolWidgetContext context() const;
%Docstring
Returns the context in which the widget is shown, e.g., the associated
map canvas and expression contexts.
.. seealso:: :py:func:`setContext`
.. versionadded:: 3.10
%End
void deactivateField( QgsPalLayerSettings::Property key );
%Docstring
Deactivate a field from data defined properties and update the
corresponding button.
:param key: The property key to deactivate
%End
public slots:
void setDockMode( bool enabled );
%Docstring
Sets whether the widget should be shown in a compact dock mode.
:param enabled: set to ``True`` to show in dock mode.
%End
signals:
void widgetChanged();
%Docstring
Emitted when the text format defined by the widget changes
%End
void auxiliaryFieldCreated();
%Docstring
Emitted when an auxiliary field is created in the widget.
.. versionadded:: 3.10
%End
protected:
enum Mode /BaseType=IntEnum/
{
Text,
Labeling,
};
QgsTextFormatWidget( QgsMapCanvas *mapCanvas, QWidget *parent /TransferThis/, Mode mode, QgsMapLayer *layer = 0 );
%Docstring
Constructor for QgsTextFormatWidget.
:param mapCanvas: associated map canvas
:param parent: parent widget
:param mode: widget mode
:param layer: associated vector layer
%End
void updateWidgetForFormat( const QgsTextFormat &format );
%Docstring
Updates the widget's state to reflect the settings in a
:py:class:`QgsTextFormat`.
:param format: source format
%End
void setPreviewBackground( const QColor &color );
%Docstring
Sets the background color for the text preview widget.
:param color: background color
%End
void enableDataDefinedAlignment( bool enable ) /Deprecated/;
%Docstring
Update the enabled state of the data defined alignment buttons.
.. deprecated:: 3.24
%End
virtual QgsExpressionContext createExpressionContext() const;
Qgis::GeometryType labelGeometryType() const;
%Docstring
Returns the geometry type which will be used by the labeling engine when
registering labels for the labeling settings currently defined by the
widget.
.. versionadded:: 3.16
%End
protected slots:
void updateLinePlacementOptions();
%Docstring
Updates line placement options to reflect current state of widget
%End
void updatePlacementWidgets();
%Docstring
Updates label placement options to reflect current state of widget
%End
virtual void setFormatFromStyle( const QString &name, QgsStyle::StyleEntity type, const QString &stylePath );
%Docstring
Sets the current text settings from a style entry.
.. versionadded:: 3.10
%End
virtual void saveFormat();
%Docstring
Saves the current text settings to a style entry.
%End
void updatePreview();
%Docstring
Updates the text preview.
.. versionadded:: 3.10
%End
};
class QgsTextFormatDialog : QDialog
{
%Docstring(signature="appended")
A simple dialog for customizing text formatting settings.
:py:class:`QgsTextFormatDialog` provides a dialog for controlling the
appearance of text rendered using :py:class:`QgsTextRenderer`. The
dialog includes all settings contained within a
:py:class:`QgsTextFormat`, including shadow, background and buffer.
%End
%TypeHeaderCode
#include "qgstextformatwidget.h"
%End
public:
QgsTextFormatDialog( const QgsTextFormat &format, QgsMapCanvas *mapCanvas = 0, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, QgsMapLayer *layer = 0 );
%Docstring
Constructor for QgsTextFormatDialog.
:param format: initial format settings to show in dialog
:param mapCanvas: optional associated map canvas
:param parent: parent widget
:param fl: window flags for dialog
:param layer: associated vector layer
%End
QgsTextFormat format() const;
%Docstring
Returns the current formatting settings defined by the widget.
%End
void setContext( const QgsSymbolWidgetContext &context );
%Docstring
Sets the ``context`` in which the widget is shown, e.g., the associated
map canvas and expression contexts.
.. versionadded:: 3.10
%End
QDialogButtonBox *buttonBox() const;
%Docstring
Returns a reference to the dialog's button box.
.. versionadded:: 3.10
%End
};
class QgsTextFormatPanelWidget : QgsPanelWidgetWrapper
{
%Docstring(signature="appended")
A panel widget for customizing text formatting settings.
:py:class:`QgsTextFormatPanelWidget` provides a panel widget for
controlling the appearance of text rendered using
:py:class:`QgsTextRenderer`. The dialog includes all settings contained
within a :py:class:`QgsTextFormat`, including shadow, background and
buffer.
%End
%TypeHeaderCode
#include "qgstextformatwidget.h"
%End
public:
QgsTextFormatPanelWidget( const QgsTextFormat &format, QgsMapCanvas *mapCanvas = 0, QWidget *parent /TransferThis/ = 0, QgsMapLayer *layer = 0 );
%Docstring
Constructor for QgsTextFormatPanelWidget.
:param format: initial format settings to show in dialog
:param mapCanvas: optional associated map canvas
:param parent: parent widget
:param layer: associated layer
%End
QgsTextFormat format() const;
%Docstring
Returns the current formatting settings defined by the widget.
%End
void setFormat( const QgsTextFormat &format );
%Docstring
Sets the ``format`` to show in the widget.
.. versionadded:: 3.16
%End
void setContext( const QgsSymbolWidgetContext &context );
%Docstring
Sets the ``context`` in which the widget is shown, e.g., the associated
map canvas and expression contexts.
.. versionadded:: 3.10
%End
virtual void setDockMode( bool dockMode );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgstextformatwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|