QElectroTech  0.8-dev
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
XmlProjectElementCollectionItem Class Reference

The XmlProjectElementCollectionItem class This class specialise ElementCollectionItem for manage an xml collection embedded in a project. More...

#include <xmlprojectelementcollectionitem.h>

Inheritance diagram for XmlProjectElementCollectionItem:
Inheritance graph
Collaboration diagram for XmlProjectElementCollectionItem:
Collaboration graph

Public Types

enum  { Type = UserType+3 }
 
- Public Types inherited from ElementCollectionItem
enum  { Type = UserType+1 }
 

Public Member Functions

 XmlProjectElementCollectionItem ()
 XmlProjectElementCollectionItem::XmlProjectElementCollectionItem Constructor. More...
 
int type () const override
 
bool isDir () const override
 XmlProjectElementCollectionItem::isDir. More...
 
bool isElement () const override
 XmlProjectElementCollectionItem::isElement. More...
 
QString localName () override
 XmlProjectElementCollectionItem::localName. More...
 
QString name () const override
 XmlProjectElementCollectionItem::name. More...
 
QString collectionPath () const override
 XmlProjectElementCollectionItem::collectionPath. More...
 
virtual QString embeddedPath () const
 XmlProjectElementCollectionItem::embeddedPath. More...
 
bool isCollectionRoot () const override
 XmlProjectElementCollectionItem::isCollectionRoot. More...
 
void addChildAtPath (const QString &collection_name) override
 XmlProjectElementCollectionItem::addChildAtPath Ask to this item item to add a new child with collection name collection_name (the child must exist in the xml element collection) More...
 
QETProjectproject () const
 XmlProjectElementCollectionItem::project. More...
 
void setProject (QETProject *project, bool set_data=true, bool hide_element=false)
 XmlProjectElementCollectionItem::setProject Set the project for this item. Use this method for set this item the root of the collection. More...
 
void setUpData () override
 XmlProjectElementCollectionItem::setUpData SetUp the data of this item. More...
 
void setUpIcon () override
 XmlProjectElementCollectionItem::setUpIcon SetUp the icon of this item. Because icon use several memory, we use this method for setup icon instead setUpData. More...
 
- Public Member Functions inherited from ElementCollectionItem
 ElementCollectionItem ()
 ElementCollectionItem::ElementCollectionItem Constructor. More...
 
int type () const override
 
virtual void clearData ()
 ElementCollectionItem::clearData Reset the data. More...
 
ElementCollectionItemlastItemForPath (const QString &path, QString &no_found_path)
 ElementCollectionItem::lastItemForPath Return the last existing item in this ElementCollectionItem hierarchy according to the given path. Next_item is the first non existing item in this hierarchy according to the given path. More...
 
ElementCollectionItemchildWithCollectionName (const QString &name) const
 ElementCollectionItem::childWithCollectionName Return the child with the collection name name, else return nullptr. More...
 
QList< QStandardItem * > directChilds () const
 ElementCollectionItem::directChilds Return the direct child of this item. More...
 
int rowForInsertItem (const QString &name)
 ElementCollectionItem::rowForInsertItem Return the row for insert a new child item to this item with name. More...
 
ElementCollectionItemitemAtPath (const QString &path)
 ElementCollectionItem::itemAtPath. More...
 
QList< ElementCollectionItem * > elementsDirectChild () const
 ElementCollectionItem::elementsDirectChild. More...
 
QList< ElementCollectionItem * > directoriesDirectChild () const
 ElementCollectionItem::directoriesDirectChild. More...
 
QList< ElementCollectionItem * > elementsChild () const
 ElementCollectionItem::elementsChild. More...
 
QList< ElementCollectionItem * > directoriesChild () const
 ElementCollectionItem::directoriesChild. More...
 
QList< ElementCollectionItem * > items () const
 ElementCollectionItem::items. More...
 

Private Member Functions

void populate (bool set_data=true, bool hide_element=false)
 XmlProjectElementCollectionItem::populate Create the childs of this item. More...
 
void setXmlElement (const QDomElement &element, QETProject *project, bool set_data=true, bool hide_element=false)
 XmlProjectElementCollectionItem::setXmlElement Set the managed content of this item. More...
 

Private Attributes

QETProjectm_project = nullptr
 
QDomElement m_dom_element
 

Detailed Description

The XmlProjectElementCollectionItem class This class specialise ElementCollectionItem for manage an xml collection embedded in a project.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Constructor & Destructor Documentation

◆ XmlProjectElementCollectionItem()

XmlProjectElementCollectionItem::XmlProjectElementCollectionItem ( )

XmlProjectElementCollectionItem::XmlProjectElementCollectionItem Constructor.

Here is the caller graph for this function:

Member Function Documentation

◆ addChildAtPath()

void XmlProjectElementCollectionItem::addChildAtPath ( const QString &  collection_name)
overridevirtual

XmlProjectElementCollectionItem::addChildAtPath Ask to this item item to add a new child with collection name collection_name (the child must exist in the xml element collection)

Parameters
collection_name: name of the child item to add.

Implements ElementCollectionItem.

Here is the call graph for this function:

◆ collectionPath()

QString XmlProjectElementCollectionItem::collectionPath ( ) const
overridevirtual

XmlProjectElementCollectionItem::collectionPath.

Returns
The path of this item relative to the collection.

Implements ElementCollectionItem.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ embeddedPath()

QString XmlProjectElementCollectionItem::embeddedPath ( ) const
virtual

XmlProjectElementCollectionItem::embeddedPath.

Returns
The embedde path of this item The path is in form : embed://dir/subdir/myElement.elmt
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isCollectionRoot()

bool XmlProjectElementCollectionItem::isCollectionRoot ( ) const
overridevirtual

XmlProjectElementCollectionItem::isCollectionRoot.

Returns
true if this item represent the root of collection

Implements ElementCollectionItem.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isDir()

bool XmlProjectElementCollectionItem::isDir ( ) const
overridevirtual

XmlProjectElementCollectionItem::isDir.

Returns
true if this item represent a directory

Implements ElementCollectionItem.

Here is the caller graph for this function:

◆ isElement()

bool XmlProjectElementCollectionItem::isElement ( ) const
overridevirtual

XmlProjectElementCollectionItem::isElement.

Returns
true if this item represent an element

Implements ElementCollectionItem.

Here is the caller graph for this function:

◆ localName()

QString XmlProjectElementCollectionItem::localName ( )
overridevirtual

XmlProjectElementCollectionItem::localName.

Returns
the located name of this item

Implements ElementCollectionItem.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

QString XmlProjectElementCollectionItem::name ( ) const
overridevirtual

XmlProjectElementCollectionItem::name.

Returns
The collection name of this item

Implements ElementCollectionItem.

Here is the caller graph for this function:

◆ populate()

void XmlProjectElementCollectionItem::populate ( bool  set_data = true,
bool  hide_element = false 
)
private

XmlProjectElementCollectionItem::populate Create the childs of this item.

Parameters
set_data: if true, call setUpData for every child of this item
hide_element: bool
Here is the call graph for this function:
Here is the caller graph for this function:

◆ project()

QETProject * XmlProjectElementCollectionItem::project ( ) const

XmlProjectElementCollectionItem::project.

Returns
the paretn project of the managed collection
Here is the caller graph for this function:

◆ setProject()

void XmlProjectElementCollectionItem::setProject ( QETProject project,
bool  set_data = true,
bool  hide_element = false 
)

XmlProjectElementCollectionItem::setProject Set the project for this item. Use this method for set this item the root of the collection.

Parameters
project: project to manage the collection
set_data: if true, call setUpData for every child of this item
hide_element: bool
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setUpData()

void XmlProjectElementCollectionItem::setUpData ( )
overridevirtual

XmlProjectElementCollectionItem::setUpData SetUp the data of this item.

Implements ElementCollectionItem.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setUpIcon()

void XmlProjectElementCollectionItem::setUpIcon ( )
overridevirtual

XmlProjectElementCollectionItem::setUpIcon SetUp the icon of this item. Because icon use several memory, we use this method for setup icon instead setUpData.

Implements ElementCollectionItem.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setXmlElement()

void XmlProjectElementCollectionItem::setXmlElement ( const QDomElement &  element,
QETProject project,
bool  set_data = true,
bool  hide_element = false 
)
private

XmlProjectElementCollectionItem::setXmlElement Set the managed content of this item.

Parameters
element: the dom element (directory or element), to be managed by this item
project: the parent project of managed collection
set_data: if true, call setUpData for every child of this item
hide_element: bool
Here is the call graph for this function:
Here is the caller graph for this function:

◆ type()

int XmlProjectElementCollectionItem::type ( ) const
inlineoverride
Here is the caller graph for this function:

Member Data Documentation

◆ m_dom_element

QDomElement XmlProjectElementCollectionItem::m_dom_element
private

◆ m_project

QETProject* XmlProjectElementCollectionItem::m_project = nullptr
private

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