An Entity is the main class of the internal Composer core.
More...
#include <Entity.h>
|
QString | getAttribute (QString name) |
| This method is used to get an specific attribute of the element. More...
|
|
void | getAttributeIterator (QMap< QString, QString >::iterator &begin, QMap< QString, QString >::iterator &end) |
| This method is used to get the iterator in the <map> of attributes. More...
|
|
bool | hasAttribute (const QString &name) |
| This method is used to verify if this element has certain attribute. More...
|
|
QString | getUniqueId () |
|
QString | getType () |
|
Entity * | getParent () |
|
QString | getParentUniqueId () |
|
void | setDeleteChildren (bool mustDelete) |
| Tell if the children should be deleted when this entity is deleted through destructor. More...
|
|
QVector< Entity * > | getChildren () |
|
QString | toString (int ntabs, bool writeuid=true) |
| Convert the current Entity to a XML String. More...
|
|
Entity * | cloneEntity () |
| Creates a clone of the current entity. More...
|
|
|
class | composer::core::model::Project |
|
class | composer::core::MessageControl |
|
class | composer::core::ProjectReader |
|
class | composer::core::util::EditCommand |
|
class | composer::core::util::AddCommand |
|
class | composer::core::util::RemoveCommand |
|
An Entity is the main class of the internal Composer core.
The internal model Composer model is a tree of Entities.
Definition at line 45 of file Entity.h.
composer::core::model::Entity::Entity |
( |
QObject * |
parent = 0 ) | |
|
|
explicitprotected |
Constructor.
- Parameters
-
parent | The QObject parent. |
Definition at line 16 of file Entity.cpp.
composer::core::model::Entity::Entity |
( |
QMap< QString, QString > & |
atts, |
|
|
QObject * |
parent = 0 |
|
) |
| |
|
explicitprotected |
Constructor.
- Parameters
-
atts | attributes to be set to this Entity. |
parent | the QObject parent. |
Definition at line 25 of file Entity.cpp.
composer::core::model::Entity::Entity |
( |
QString |
uniqueId, |
|
|
QString |
type, |
|
|
QMap< QString, QString > & |
atts, |
|
|
QObject * |
parent = 0 |
|
) |
| |
|
explicitprotected |
Contructor.
- Parameters
-
uniqueId | the uniqueId of this Entiy. |
type | the type of the Entity. |
atts | attributes to be set to this Entity. |
parent | the QObject parent. |
Definition at line 36 of file Entity.cpp.
Entity * composer::core::model::Entity::cloneEntity |
( |
) | |
|
Creates a clone of the current entity.
All the content of the entity will be cloned, including its uniqueId.
Definition at line 246 of file Entity.cpp.
bool composer::core::model::Entity::deleteChild |
( |
Entity * |
entity) | |
|
|
protected |
This call deletes the child and his children in a recursive way.
Deletes the child and its children in a recursive way.
- Parameters
-
entity | The Entity child to be removed. |
Definition at line 113 of file Entity.cpp.
QString composer::core::model::Entity::getAttribute |
( |
QString |
name) | |
|
This method is used to get an specific attribute of the element.
- Parameters
-
name | - The name of the attribute been requested |
- Returns
- A string with the requested attribute.
Definition at line 130 of file Entity.cpp.
void composer::core::model::Entity::getAttributeIterator |
( |
QMap< QString, QString >::iterator & |
begin, |
|
|
QMap< QString, QString >::iterator & |
end |
|
) |
| |
This method is used to get the iterator in the <map> of attributes.
- Parameters
-
begin | - a reference to be filled with the begin of the map. |
end | - a reference to be filled with the end of the map. |
Definition at line 136 of file Entity.cpp.
bool composer::core::model::Entity::hasAttribute |
( |
const QString & |
name) | |
|
This method is used to verify if this element has certain attribute.
- Parameters
-
name | - The name of the attribute to be verified. |
- Returns
- an boolean depending of the existence of the attribute.
Definition at line 144 of file Entity.cpp.
bool composer::core::model::Entity::removeChildAppendChildren |
( |
Entity * |
entity) | |
|
|
protected |
This call removes the child and append his children to his parent.
Removes the child and append his children to his parent.
- Parameters
-
Definition at line 185 of file Entity.cpp.
void composer::core::model::Entity::setAtrributes |
( |
QMap< QString, QString > & |
newatts) | |
|
|
protected |
Set the attributes of the current entity to the value passed as parameter.
- Parameters
-
newAtts | the new value of entity's attributes. |
Definition at line 68 of file Entity.cpp.
void composer::core::model::Entity::setAttribute |
( |
QString |
name, |
|
|
QString |
value |
|
) |
| |
|
protected |
This method is used to set an specific attribute of the element.
- Parameters
-
name | - The name of the attribute to be set |
value | - The value this attribute is going to be set |
Definition at line 62 of file Entity.cpp.
void composer::core::model::Entity::setDeleteChildren |
( |
bool |
mustDelete) | |
|
Tell if the children should be deleted when this entity is deleted through destructor.
- Parameters
-
mustDelete | tell if the children also must be deleted. |
Definition at line 173 of file Entity.cpp.
void composer::core::model::Entity::setParent |
( |
Entity * |
parent) | |
|
|
protected |
void composer::core::model::Entity::setType |
( |
QString |
type) | |
|
|
protected |
Set the entity's type to the value passed as parameter.
- Parameters
-
type | The type of the entity. |
Definition at line 79 of file Entity.cpp.
void composer::core::model::Entity::setUniqueID |
( |
QString |
uniqueId) | |
|
|
protected |
Set the unique identifier of the entity to the value passed as parameter.
- Parameters
-
_id | The new uniqueId of the entity. |
Definition at line 85 of file Entity.cpp.
QString composer::core::model::Entity::toString |
( |
int |
ntabs, |
|
|
bool |
writeuid = true |
|
) |
| |
Convert the current Entity to a XML String.
- Parameters
-
ntabs | the number of tabs to be inserted before the current entity. |
Definition at line 210 of file Entity.cpp.
The documentation for this class was generated from the following files: