fast::TextWidget class

A text widget.

Constructors, destructors, conversion operators

TextWidget(std::string text, QWidget* parent = nullptr)
Create a text widget.

Public functions

void setText(std::string text)
Set text.
auto getText() const -> std::string
void setVariable(std::string name, std::string value)
Set a variable.
void setVariables(std::map<std::string, std::string> variables)
Set multiple variables.
auto getVariable(std::string name) const -> std::string
void repaintSlot()

Signals

void repaintSignal()

Function documentation

fast::TextWidget::TextWidget(std::string text, QWidget* parent = nullptr)

Create a text widget.

Parameters
text The text to display. Can contain HTML and also variables, e.g. {this_var}. The values of the variables can be set with TextWidget::setVariable("this_var", "value");
parent

void fast::TextWidget::setText(std::string text)

Set text.

Parameters
text

void fast::TextWidget::setVariable(std::string name, std::string value)

Set a variable.

Parameters
name Name of variable, should exist as {<name>} in the text, and will be replaced with
value Value of variable

void fast::TextWidget::setVariables(std::map<std::string, std::string> variables)

Set multiple variables.

Parameters
variables map of name and values of the variables