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
|
2016-10-01 14:29:05 +10:00
|
|
|
{
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
A widget for previewing text formatting settings.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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().
|
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2016-10-01 14:29:05 +10:00
|
|
|
%TypeHeaderCode
|
2017-06-08 11:26:03 +02:00
|
|
|
#include "qgstextpreview.h"
|
2016-10-01 14:29:05 +10:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
2017-05-02 07:21:20 +02:00
|
|
|
QgsTextPreview( QWidget *parent = 0 );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Constructor for QgsTextPreview
|
|
|
|
\param parent parent widget
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual void paintEvent( QPaintEvent *e );
|
2016-10-01 14:29:05 +10:00
|
|
|
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setFormat( const QgsTextFormat &format );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Sets the text format for previewing in the widget.
|
|
|
|
\param format text format
|
|
|
|
.. seealso:: format()
|
|
|
|
%End
|
2016-10-01 14:29:05 +10:00
|
|
|
|
|
|
|
QgsTextFormat format() const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the text format used for previewing text in the widget.
|
|
|
|
.. seealso:: setFormat()
|
|
|
|
:rtype: QgsTextFormat
|
|
|
|
%End
|
2016-10-01 14:29:05 +10:00
|
|
|
|
|
|
|
void setScale( double scale );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Sets the scale to use for previewing format sizes in map units.
|
|
|
|
\param scale preview map scale
|
|
|
|
.. seealso:: scale()
|
|
|
|
.. seealso:: setMapUnits()
|
|
|
|
%End
|
2016-10-01 14:29:05 +10:00
|
|
|
|
|
|
|
double scale() const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the scale used for previewing format sizes in map units.
|
|
|
|
.. seealso:: setScale()
|
|
|
|
.. seealso:: mapUnits()
|
|
|
|
:rtype: float
|
|
|
|
%End
|
2016-10-01 14:29:05 +10:00
|
|
|
|
|
|
|
void setMapUnits( QgsUnitTypes::DistanceUnit unit );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Sets the map unit type for previewing format sizes in map units.
|
|
|
|
\param unit map units
|
|
|
|
.. seealso:: mapUnits()
|
|
|
|
.. seealso:: setScale()
|
|
|
|
%End
|
2016-10-01 14:29:05 +10:00
|
|
|
|
|
|
|
QgsUnitTypes::DistanceUnit mapUnits() const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the map unit type used for previewing format sizes in map units.
|
|
|
|
.. seealso:: setMapUnits()
|
|
|
|
.. seealso:: scale()
|
|
|
|
:rtype: QgsUnitTypes.DistanceUnit
|
|
|
|
%End
|
2016-10-01 14:29:05 +10:00
|
|
|
|
|
|
|
};
|
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 *
|
|
|
|
************************************************************************/
|