QGIS/python/gui/auto_generated/qgstextpreview.sip.in

107 lines
3.0 KiB
Plaintext
Raw Normal View History

2017-06-08 11:26:03 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgstextpreview.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsTextPreview : QLabel
{
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
A widget for previewing text formatting settings.
2017-06-08 11:26:03 +02:00
2017-12-15 10:36:55 -04:00
QgsTextPreview provides a widget for previewing the appearance of text rendered
using QgsTextRenderer. The preview 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
In order to preview the exact appearance of text which uses sizes in map units,
the scale and map units must be set by calling setScale() and setMapUnits().
2017-06-08 11:26:03 +02:00
.. versionadded:: 3.0
%End
%TypeHeaderCode
2017-06-08 11:26:03 +02:00
#include "qgstextpreview.h"
%End
public:
QgsTextPreview( QWidget *parent = 0 );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsTextPreview
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param parent: parent widget
2017-06-08 11:26:03 +02:00
%End
virtual void paintEvent( QPaintEvent *e );
void setFormat( const QgsTextFormat &format );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the text format for previewing in the widget.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param format: text format
.. seealso:: :py:func:`format`
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 text format used for previewing text in the widget.
.. seealso:: :py:func:`setFormat`
2017-06-08 11:26:03 +02:00
%End
void setScale( double scale );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``scale`` to use for previewing format sizes in map units.
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
.. seealso:: :py:func:`scale`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setMapUnits`
2017-06-08 11:26:03 +02:00
%End
double scale() const;
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the scale used for previewing format sizes in map units.
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
.. seealso:: :py:func:`setScale`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`mapUnits`
2017-06-08 11:26:03 +02:00
%End
void setMapUnits( QgsUnitTypes::DistanceUnit unit );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the map unit type for previewing format sizes in map units.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: map units
.. seealso:: :py:func:`mapUnits`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setScale`
2017-06-08 11:26:03 +02:00
%End
QgsUnitTypes::DistanceUnit mapUnits() const;
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the map unit type used for previewing format sizes in map units.
.. seealso:: :py:func:`setMapUnits`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`scale`
2017-06-08 11:26:03 +02:00
%End
};
2017-06-08 11:26:03 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgstextpreview.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/