TextItem Class Reference

MathVizAnimator: TextItem Class Reference
MathVizAnimator  0.0.1
Inheritance diagram for TextItem:
[legend]
Collaboration diagram for TextItem:
[legend]

Signals

void latexSourceChanged (const QString &new_latex_source)
 
void svgFileChanged (const QFileInfo &new_svg_file)
 
void scaleTextChanged (const qreal new_scale_text)
 
- Signals inherited from AbstractItem
void nameChanged (const QString &new_name)
 

Public Member Functions

 TextItem (BasicItem *parent=nullptr)
 
QString svgFile () const
 
void setSvgFile (const QFileInfo &newSvgFile)
 
void setSvgFile (const QString &newSvgFile)
 
void paint (QPainter *painter) override
 
QString latexSource () const
 
void setLatexSource (const QString &newLatexSource)
 
qreal scaleText () const
 
void setScaleText (qreal newScaleText)
 
QStringList editableProperties () const override
 Returns the properties which can be edited by the user in a QStringList. More...
 
QStringList editablePropertiesParent () const override
 Returns the parents properties which can be edited by the user in a QStringList. More...
 
- Public Member Functions inherited from AbstractItem
 AbstractItem (const QString &qml_file, BasicItem *parent=nullptr)
 Constructor for MyClass. TODO. More...
 
QString name () const
 
void setName (const QString &name)
 
virtual QJsonObject toJson () const
 
PropertyMap allItemProperties () const
 
PropertyMap itemProperties () const
 
PropertyMap parentItemProperties () const
 
void paintItem (QPainter *painter)
 Short explanation. More...
 

Properties

QML_ELEMENTQString latexSource
 
QString svgFile
 
qreal scaleText
 
- Properties inherited from AbstractItem
QString name
 
QString file
 

Member Function Documentation

◆ editableProperties()

QStringList TextItem::editableProperties ( ) const
overridevirtual

Returns the properties which can be edited by the user in a QStringList.

When you derive an item from AbstractItem (directly or via multiple inheritance) and your item has a property which should be editable by the user, you have to override this function and return your own properties. Don't forget to add the properties of your base class. Take a look at the GeometryItem::editableProperties() source code for an example.

Returns
Returns the editable properties as QStrings

Reimplemented from AbstractItem.

◆ editablePropertiesParent()

QStringList TextItem::editablePropertiesParent ( ) const
overridevirtual

Returns the parents properties which can be edited by the user in a QStringList.

The position (x,y) and the width and height of an AbstractItem are determined by the parent which is an object of type BasicItem.The position (x,y) of the AbstractItem is relative to the parent, the BasicItem. So changing these values by the user is not intended. Since the AbstractItem should always fill the whole parent (search for "anchors.fill: parent" in the item qml files, for example CircleItem.qml) it is also reasonable to change width and height of the BasicItem by the user and not the width and height of the AbstractItem.

Returns
Returns the editable properties as QStrings

Reimplemented from AbstractItem.


The documentation for this class was generated from the following files:
  • /home/docs/checkouts/readthedocs.org/user_builds/mathvizanimator/checkouts/latest/libs/mva_gui/include/items/textitem.h
  • /home/docs/checkouts/readthedocs.org/user_builds/mathvizanimator/checkouts/latest/libs/mva_gui/src/items/textitem.cpp