mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-31 00:06:02 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			309 lines
		
	
	
		
			8.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			309 lines
		
	
	
		
			8.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /************************************************************************
 | |
|  * 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, protected Ui::QgsTextFormatWidgetBase
 | |
| {
 | |
| %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   *
 | |
|  ************************************************************************/
 |