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
|
2016-10-04 21:31:17 +10:00
|
|
|
{
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
A widget for customising text formatting settings.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
2016-10-04 21:31:17 +10:00
|
|
|
%End
|
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgstextformatwidget.h"
|
|
|
|
%End
|
2016-10-04 21:31:17 +10:00
|
|
|
public:
|
|
|
|
|
2017-05-02 07:21:20 +02:00
|
|
|
QgsTextFormatWidget( const QgsTextFormat &format = QgsTextFormat(), QgsMapCanvas *mapCanvas = 0, QWidget *parent /TransferThis/ = 0 );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Constructor for QgsTextFormatWidget.
|
|
|
|
\param format initial formatting settings to show in widget
|
|
|
|
\param mapCanvas associated map canvas
|
|
|
|
\param parent parent widget
|
|
|
|
%End
|
2016-10-04 21:31:17 +10:00
|
|
|
|
|
|
|
~QgsTextFormatWidget();
|
|
|
|
|
|
|
|
QgsTextFormat format() const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the current formatting settings defined by the widget.
|
|
|
|
:rtype: QgsTextFormat
|
|
|
|
%End
|
2016-10-04 21:31:17 +10:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
void setDockMode( bool enabled );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Sets whether the widget should be shown in a compact dock mode.
|
|
|
|
\param enabled set to true to show in dock mode.
|
|
|
|
%End
|
2016-10-04 21:31:17 +10:00
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
void widgetChanged();
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Emitted when the text format defined by the widget changes
|
|
|
|
%End
|
2016-10-04 21:31:17 +10:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
enum Mode
|
|
|
|
{
|
2017-06-08 11:26:03 +02:00
|
|
|
Text,
|
|
|
|
Labeling,
|
2016-10-04 21:31:17 +10:00
|
|
|
};
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
QgsTextFormatWidget( QgsMapCanvas *mapCanvas, QWidget *parent /TransferThis/, Mode mode );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Constructor for QgsTextFormatWidget.
|
|
|
|
\param mapCanvas associated map canvas
|
|
|
|
\param parent parent widget
|
|
|
|
\param mode widget mode
|
|
|
|
%End
|
2016-10-04 21:31:17 +10:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void updateWidgetForFormat( const QgsTextFormat &format );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Updates the widget's state to reflect the settings in a QgsTextFormat.
|
|
|
|
\param format source format
|
|
|
|
%End
|
2016-10-04 21:31:17 +10:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setPreviewBackground( const QColor &color );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Sets the background color for the text preview widget.
|
|
|
|
\param color background color
|
|
|
|
%End
|
2016-10-04 21:31:17 +10:00
|
|
|
|
|
|
|
void enableDataDefinedAlignment( bool enable );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Controls whether data defined alignment buttons are enabled.
|
|
|
|
\param enable set to true to enable alignment controls
|
|
|
|
%End
|
|
|
|
|
2016-10-04 21:31:17 +10:00
|
|
|
|
|
|
|
protected slots:
|
|
|
|
|
|
|
|
void updateLinePlacementOptions();
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Updates line placement options to reflect current state of widget
|
|
|
|
%End
|
2016-10-04 21:31:17 +10:00
|
|
|
|
|
|
|
void updatePlacementWidgets();
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Updates label placement options to reflect current state of widget
|
|
|
|
%End
|
|
|
|
|
2016-10-04 21:31:17 +10:00
|
|
|
};
|
2016-10-05 11:07:51 +10:00
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
|
2016-10-05 11:07:51 +10:00
|
|
|
|
|
|
|
class QgsTextFormatDialog : QDialog
|
|
|
|
{
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
A simple dialog for customising text formatting settings.
|
|
|
|
|
|
|
|
QgsTextFormatDialog provides a dialog for controlling the appearance of text rendered
|
|
|
|
using QgsTextRenderer. The dialog includes all settings contained within
|
|
|
|
a QgsTextFormat, including shadow, background and buffer.
|
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2016-10-05 11:07:51 +10:00
|
|
|
%TypeHeaderCode
|
2017-06-08 11:26:03 +02:00
|
|
|
#include "qgstextformatwidget.h"
|
2016-10-05 11:07:51 +10:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
2017-05-07 20:58:28 +10:00
|
|
|
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
|
|
|
|
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
|
|
|
|
%End
|
2016-10-05 11:07:51 +10:00
|
|
|
|
|
|
|
virtual ~QgsTextFormatDialog();
|
|
|
|
|
|
|
|
QgsTextFormat format() const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the current formatting settings defined by the widget.
|
|
|
|
:rtype: QgsTextFormat
|
|
|
|
%End
|
|
|
|
|
2016-10-05 11:07:51 +10:00
|
|
|
};
|
2016-10-12 10:49:30 +10:00
|
|
|
|
|
|
|
|
|
|
|
class QgsTextFormatPanelWidget : QgsPanelWidgetWrapper
|
|
|
|
{
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
A panel widget for customising text formatting settings.
|
|
|
|
|
|
|
|
QgsTextFormatPanelWidget provides a panel widget for controlling the appearance of text rendered
|
|
|
|
using QgsTextRenderer. The dialog includes all settings contained within
|
|
|
|
a QgsTextFormat, including shadow, background and buffer.
|
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2016-10-12 10:49:30 +10:00
|
|
|
%TypeHeaderCode
|
2017-06-08 11:26:03 +02:00
|
|
|
#include "qgstextformatwidget.h"
|
2016-10-12 10:49:30 +10:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
2017-05-02 07:21:20 +02:00
|
|
|
QgsTextFormatPanelWidget( const QgsTextFormat &format, QgsMapCanvas *mapCanvas = 0, QWidget *parent /TransferThis/ = 0 );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Constructor for QgsTextFormatPanelWidget.
|
|
|
|
\param format initial format settings to show in dialog
|
|
|
|
\param mapCanvas optional associated map canvas
|
|
|
|
\param parent parent widget
|
|
|
|
%End
|
2016-10-12 10:49:30 +10:00
|
|
|
|
|
|
|
QgsTextFormat format() const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the current formatting settings defined by the widget.
|
|
|
|
:rtype: QgsTextFormat
|
|
|
|
%End
|
2016-10-12 10:49:30 +10:00
|
|
|
|
|
|
|
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 *
|
|
|
|
************************************************************************/
|