LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Text Class Referencefinal

The Text class. More...

#include <text.h>

+ Inheritance diagram for Text:
+ Collaboration diagram for Text:

Public Member Functions

 Text ()=delete
 
 Text (const Text &other) noexcept
 
 Text (const Uuid &uuid, const Text &other) noexcept
 
 Text (const Uuid &uuid, const GraphicsLayerName &layerName, const QString &text, const Point &pos, const Angle &rotation, const PositiveLength &height, const Alignment &align) noexcept
 
 Text (const SExpression &node)
 
 ~Text () noexcept
 
const UuidgetUuid () const noexcept
 
const GraphicsLayerNamegetLayerName () const noexcept
 
const PointgetPosition () const noexcept
 
const AnglegetRotation () const noexcept
 
const PositiveLengthgetHeight () const noexcept
 
const AlignmentgetAlign () const noexcept
 
const QString & getText () const noexcept
 
void setLayerName (const GraphicsLayerName &name) noexcept
 
void setText (const QString &text) noexcept
 
void setPosition (const Point &pos) noexcept
 
void setRotation (const Angle &rotation) noexcept
 
void setHeight (const PositiveLength &height) noexcept
 
void setAlign (const Alignment &align) noexcept
 
void registerObserver (IF_TextObserver &object) const noexcept
 
void unregisterObserver (IF_TextObserver &object) const noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const Text &rhs) const noexcept
 
bool operator!= (const Text &rhs) const noexcept
 
Textoperator= (const Text &rhs) noexcept
 
- Public Member Functions inherited from SerializableObject
 SerializableObject () noexcept
 
virtual ~SerializableObject () noexcept
 
SExpression serializeToDomElement (const QString &name) const
 Serialize the object to a new S-Expression node. More...
 

Private Attributes

Uuid mUuid
 
GraphicsLayerName mLayerName
 
QString mText
 
Point mPosition
 
Angle mRotation
 
PositiveLength mHeight
 
Alignment mAlign
 
QSet< IF_TextObserver * > mObservers
 A list of all observer objects. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from SerializableObject
template<typename T >
static void serializeObjectContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainerUuidSorted (SExpression &root, const T &container, const QString &itemName)
 

Detailed Description

The Text class.

Constructor & Destructor Documentation

Text ( )
delete
Text ( const Text other)
noexcept
Text ( const Uuid uuid,
const Text other 
)
noexcept
Text ( const Uuid uuid,
const GraphicsLayerName layerName,
const QString &  text,
const Point pos,
const Angle rotation,
const PositiveLength height,
const Alignment align 
)
noexcept
Text ( const SExpression node)
explicit

+ Here is the call graph for this function:

~Text ( )
noexcept

Member Function Documentation

const Uuid& getUuid ( ) const
inlinenoexcept
const GraphicsLayerName& getLayerName ( ) const
inlinenoexcept
const Point& getPosition ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const Angle& getRotation ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const PositiveLength& getHeight ( ) const
inlinenoexcept
const Alignment& getAlign ( ) const
inlinenoexcept
const QString& getText ( ) const
inlinenoexcept
void setLayerName ( const GraphicsLayerName name)
noexcept

+ Here is the caller graph for this function:

void setText ( const QString &  text)
noexcept

+ Here is the caller graph for this function:

void setPosition ( const Point pos)
noexcept

+ Here is the caller graph for this function:

void setRotation ( const Angle rotation)
noexcept

+ Here is the caller graph for this function:

void setHeight ( const PositiveLength height)
noexcept

+ Here is the caller graph for this function:

void setAlign ( const Alignment align)
noexcept

+ Here is the caller graph for this function:

void registerObserver ( IF_TextObserver object) const
noexcept
void unregisterObserver ( IF_TextObserver object) const
noexcept

+ Here is the caller graph for this function:

void serialize ( SExpression root) const
overridevirtual

Serialize the object into an existing S-Expression node.

This method inserts/appends all attributes and childs of the object to an existing S-Expression node. The content which already exists in the given S-Expression node will not be removed.

Note
The generated S-Expression node has always the format of the application's major version (it's not possible to generate DOMs of older versions).
Parameters
rootThe target DOM root node
Exceptions
ExceptionThis method throws an exception if an error occurs.

Implements SerializableObject.

+ Here is the call graph for this function:

bool operator== ( const Text rhs) const
noexcept
bool operator!= ( const Text rhs) const
inlinenoexcept
Text & operator= ( const Text rhs)
noexcept

Member Data Documentation

Uuid mUuid
private
GraphicsLayerName mLayerName
private
QString mText
private
Point mPosition
private
Angle mRotation
private
PositiveLength mHeight
private
Alignment mAlign
private
QSet<IF_TextObserver*> mObservers
mutableprivate

A list of all observer objects.


The documentation for this class was generated from the following files: