Contains information about the context of a rendering operation.
void setScale(double scale)
Sets the scale to use for previewing format sizes in map units.
void paintEvent(QPaintEvent *e) override
QgsTextPreview(QWidget *parent=nullptr)
Constructor for QgsTextPreview.
Qgis::DistanceUnit mapUnits() const
Returns the map unit type used for previewing format sizes in map units.
double scale() const
Returns the scale used for previewing format sizes in map units.
void setMapUnits(Qgis::DistanceUnit unit)
Sets the map unit type for previewing format sizes in map units.
Qgis::DistanceUnit mapUnits
void setFormat(const QgsTextFormat &format)
Sets the text format for previewing in the widget.