QGIS/python/gui/qgstextformatwidget.sip.in

206 lines
5.5 KiB
Plaintext
Raw Normal View History

2017-06-08 11:26:03 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgstextformatwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsTextFormatWidget : QWidget, protected Ui::QgsTextFormatWidgetBase
{
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
A widget for customising text formatting settings.
2017-06-08 11:26:03 +02:00
2017-12-15 10:36:55 -04:00
QgsTextFormatWidget provides a widget for controlling the appearance of text rendered
using QgsTextRenderer. The widget includes all settings contained within
a QgsTextFormat, including shadow, background and buffer.
2017-06-08 11:26:03 +02:00
2017-12-15 10:36:55 -04:00
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 QgsTextFormatWidget and calling the protected constructor with a mode
of Labeling.
2017-06-08 11:26:03 +02:00
.. versionadded:: 3.0
%End
2017-06-08 11:26:03 +02:00
%TypeHeaderCode
#include "qgstextformatwidget.h"
%End
public:
QgsTextFormatWidget( const QgsTextFormat &format = QgsTextFormat(), QgsMapCanvas *mapCanvas = 0, QWidget *parent /TransferThis/ = 0 );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTextFormatWidget.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param format: initial formatting settings to show in widget
:param mapCanvas: associated map canvas
:param parent: parent widget
2017-06-08 11:26:03 +02:00
%End
~QgsTextFormatWidget();
QgsTextFormat format() const;
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the current formatting settings defined by the widget.
2017-06-08 11:26:03 +02:00
%End
public slots:
void setDockMode( bool enabled );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the widget should be shown in a compact dock mode.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param enabled: set to true to show in dock mode.
2017-06-08 11:26:03 +02:00
%End
signals:
void widgetChanged();
2017-06-08 11:26:03 +02:00
%Docstring
Emitted when the text format defined by the widget changes
%End
protected:
enum Mode
{
2017-06-08 11:26:03 +02:00
Text,
Labeling,
};
QgsTextFormatWidget( QgsMapCanvas *mapCanvas, QWidget *parent /TransferThis/, Mode mode );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTextFormatWidget.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param mapCanvas: associated map canvas
:param parent: parent widget
:param mode: widget mode
2017-06-08 11:26:03 +02:00
%End
void updateWidgetForFormat( const QgsTextFormat &format );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-19 11:43:52 -04:00
Updates the widget's state to reflect the settings in a :py:class:`QgsTextFormat`.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param format: source format
2017-06-08 11:26:03 +02:00
%End
void setPreviewBackground( const QColor &color );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the background color for the text preview widget.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param color: background color
2017-06-08 11:26:03 +02:00
%End
void enableDataDefinedAlignment( bool enable );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Controls whether data defined alignment buttons are enabled.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param enable: set to true to enable alignment controls
2017-06-08 11:26:03 +02:00
%End
protected slots:
void updateLinePlacementOptions();
2017-06-08 11:26:03 +02:00
%Docstring
Updates line placement options to reflect current state of widget
%End
void updatePlacementWidgets();
2017-06-08 11:26:03 +02:00
%Docstring
Updates label placement options to reflect current state of widget
%End
};
2017-06-08 11:26:03 +02:00
class QgsTextFormatDialog : QDialog
{
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
A simple dialog for customising text formatting settings.
2017-06-08 11:26:03 +02:00
2017-12-15 10:36:55 -04:00
QgsTextFormatDialog provides a dialog for controlling the appearance of text rendered
2017-12-19 11:43:52 -04:00
using :py:class:`QgsTextRenderer`. The dialog includes all settings contained within
a :py:class:`QgsTextFormat`, including shadow, background and buffer.
2017-06-08 11:26:03 +02:00
.. versionadded:: 3.0
%End
%TypeHeaderCode
2017-06-08 11:26:03 +02:00
#include "qgstextformatwidget.h"
%End
public:
QgsTextFormatDialog( const QgsTextFormat &format, QgsMapCanvas *mapCanvas = 0, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTextFormatDialog.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
: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
2017-06-08 11:26:03 +02:00
%End
~QgsTextFormatDialog();
QgsTextFormat format() const;
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the current formatting settings defined by the widget.
2017-06-08 11:26:03 +02:00
%End
};
class QgsTextFormatPanelWidget : QgsPanelWidgetWrapper
{
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
A panel widget for customising text formatting settings.
2017-06-08 11:26:03 +02:00
2017-12-15 10:36:55 -04:00
QgsTextFormatPanelWidget provides a panel widget for controlling the appearance of text rendered
2017-12-19 11:43:52 -04:00
using :py:class:`QgsTextRenderer`. The dialog includes all settings contained within
a :py:class:`QgsTextFormat`, including shadow, background and buffer.
2017-06-08 11:26:03 +02:00
.. versionadded:: 3.0
%End
%TypeHeaderCode
2017-06-08 11:26:03 +02:00
#include "qgstextformatwidget.h"
%End
public:
QgsTextFormatPanelWidget( const QgsTextFormat &format, QgsMapCanvas *mapCanvas = 0, QWidget *parent /TransferThis/ = 0 );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTextFormatPanelWidget.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param format: initial format settings to show in dialog
:param mapCanvas: optional associated map canvas
:param parent: parent widget
2017-06-08 11:26:03 +02:00
%End
QgsTextFormat format() const;
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the current formatting settings defined by the widget.
2017-06-08 11:26:03 +02:00
%End
virtual void setDockMode( bool dockMode );
};
2017-06-08 11:26:03 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgstextformatwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/