TextLabel

A label supporting rendering of HTML, Markdown and LaTeX formatted texts.

Public Types

  • enum BorderShape

  • enum Mode

  • enum Type

Public Methods

void

TextLabel(const QString &name, Type=Type::General)

void

TextLabel(const QString &name, CartesianPlot *, Type=Type::General)

Line*

borderLine() const

QPointF

findNearestGluePoint(QPointF scenePoint)

GluePoint

gluePointAt(int index)

int

gluePointCount()

void

handleResize(double horizontalRatio, double verticalRatio, bool pageResize) override

QIcon

icon() const override

bool

load(XmlStreamReader *, bool preview) override

void

loadThemeConfig(const KConfig &) override

void

retransform() override

void

save(QXmlStreamWriter *) const override

void

saveThemeConfig(const KConfig &) override

void

setFont(const QFont &)

void

setPlaceholderText(const TextWrapper &value)

void

setZoomFactor(double)

QRectF

size()

Detailed Description

class TextLabel : public WorksheetElement

A label supporting rendering of HTML, Markdown and LaTeX formatted texts.

The label is aligned relative to the specified position. The position can be either specified by providing the x- and y- coordinates in parent’s coordinate system, or by specifying one of the predefined position flags (HorizontalPosition, VerticalPosition).

Public Functions

virtual QIcon icon() const override

Returns an icon to be used in the project explorer.

virtual void save(QXmlStreamWriter*) const override

Save as XML.

virtual bool load(XmlStreamReader*, bool preview) override

Load from XML.

struct GluePoint
struct TextWrapper

Public Members

bool allowPlaceholder = {false}

Determines if the Textlabel can have a placeholder or not. Depending on this variable in the LabelWidget between the text and the placeholder text can be switched