QElectroTech  0.8-dev
Public Types | Public Member Functions | List of all members
ElementCollectionItem Class Referenceabstract

The ElementCollectionItem class This class represent a item (a directory or an element) in a element collection. This class must be herited for specialisation. This item is used by ElementsCollectionModel for manage the elements collection. More...

#include <elementcollectionitem.h>

Inheritance diagram for ElementCollectionItem:
Inheritance graph
Collaboration diagram for ElementCollectionItem:
Collaboration graph

Public Types

enum  { Type = UserType+1 }
 

Public Member Functions

 ElementCollectionItem ()
 ElementCollectionItem::ElementCollectionItem Constructor. More...
 
int type () const override
 
virtual bool isDir () const =0
 
virtual bool isElement () const =0
 
virtual QString localName ()=0
 
virtual QString name () const =0
 
virtual QString collectionPath () const =0
 
virtual bool isCollectionRoot () const =0
 
virtual void addChildAtPath (const QString &collection_name)=0
 
virtual void setUpData ()=0
 
virtual void setUpIcon ()=0
 
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...
 

Detailed Description

The ElementCollectionItem class This class represent a item (a directory or an element) in a element collection. This class must be herited for specialisation. This item is used by ElementsCollectionModel for manage the elements collection.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Constructor & Destructor Documentation

◆ ElementCollectionItem()

ElementCollectionItem::ElementCollectionItem ( )

Member Function Documentation

◆ addChildAtPath()

virtual void ElementCollectionItem::addChildAtPath ( const QString &  collection_name)
pure virtual

Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.

Here is the caller graph for this function:

◆ childWithCollectionName()

ElementCollectionItem * ElementCollectionItem::childWithCollectionName ( const QString &  name) const

ElementCollectionItem::childWithCollectionName Return the child with the collection name name, else return nullptr.

Parameters
name
Returns
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearData()

void ElementCollectionItem::clearData ( )
virtual

ElementCollectionItem::clearData Reset the data.

Here is the caller graph for this function:

◆ collectionPath()

virtual QString ElementCollectionItem::collectionPath ( ) const
pure virtual

Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.

Here is the caller graph for this function:

◆ directChilds()

QList< QStandardItem * > ElementCollectionItem::directChilds ( ) const

ElementCollectionItem::directChilds Return the direct child of this item.

Returns
Here is the caller graph for this function:

◆ directoriesChild()

QList< ElementCollectionItem * > ElementCollectionItem::directoriesChild ( ) const

ElementCollectionItem::directoriesChild.

Returns
Every directories child (direct and indirect) of this item
Here is the call graph for this function:
Here is the caller graph for this function:

◆ directoriesDirectChild()

QList< ElementCollectionItem * > ElementCollectionItem::directoriesDirectChild ( ) const

ElementCollectionItem::directoriesDirectChild.

Returns
the direct directory child of this item
Here is the call graph for this function:
Here is the caller graph for this function:

◆ elementsChild()

QList< ElementCollectionItem * > ElementCollectionItem::elementsChild ( ) const

ElementCollectionItem::elementsChild.

Returns
Every elements child (direct and indirect) of this item
Here is the call graph for this function:
Here is the caller graph for this function:

◆ elementsDirectChild()

QList< ElementCollectionItem * > ElementCollectionItem::elementsDirectChild ( ) const

ElementCollectionItem::elementsDirectChild.

Returns
The direct element child of this item
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isCollectionRoot()

virtual bool ElementCollectionItem::isCollectionRoot ( ) const
pure virtual

Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.

Here is the caller graph for this function:

◆ isDir()

virtual bool ElementCollectionItem::isDir ( ) const
pure virtual

Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.

Here is the caller graph for this function:

◆ isElement()

virtual bool ElementCollectionItem::isElement ( ) const
pure virtual

Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.

Here is the caller graph for this function:

◆ itemAtPath()

ElementCollectionItem * ElementCollectionItem::itemAtPath ( const QString &  path)

ElementCollectionItem::itemAtPath.

Parameters
path
Returns
the item at path or nullptr if doesn't exist
Here is the call graph for this function:
Here is the caller graph for this function:

◆ items()

QList< ElementCollectionItem * > ElementCollectionItem::items ( ) const

ElementCollectionItem::items.

Returns
every childs of this item (direct and indirect childs)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lastItemForPath()

ElementCollectionItem * ElementCollectionItem::lastItemForPath ( 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.

Parameters
path: The path to find last item. The path must be in form : path/otherPath/.../.../myElement.elmt.
no_found_path: The first item that not exist in this hierarchy
Returns
: The last item that exist in this hierarchy, or nullptr can't find (an error was occurred, or path already exist)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ localName()

virtual QString ElementCollectionItem::localName ( )
pure virtual

Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.

Here is the caller graph for this function:

◆ name()

virtual QString ElementCollectionItem::name ( ) const
pure virtual

Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.

Here is the caller graph for this function:

◆ rowForInsertItem()

int ElementCollectionItem::rowForInsertItem ( const QString &  name)

ElementCollectionItem::rowForInsertItem Return the row for insert a new child item to this item with name.

Parameters
name
Returns
If row can't be found (name is null, or already exist) return -1;
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setUpData()

virtual void ElementCollectionItem::setUpData ( )
pure virtual

Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.

Here is the caller graph for this function:

◆ setUpIcon()

virtual void ElementCollectionItem::setUpIcon ( )
pure virtual

◆ type()

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

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