QElectroTech
0.70
|
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>
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... | |||
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. More... | |||
, else return nullptr | |||
ElementCollectionItem::childWithCollectionName Return the child with the collection name
| |||
ElementCollectionItem * | childWithCollectionName (const QString &name) const | ||
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 . If row can't be found (collection_name is null, or already exist) return -1;. More... | |||
ElementCollectionItem * | itemAtPath (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... | |||
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.
Definition at line 29 of file elementcollectionitem.h.
anonymous enum |
Enumerator | |
---|---|
Type |
Definition at line 34 of file elementcollectionitem.h.
ElementCollectionItem::ElementCollectionItem | ( | ) |
ElementCollectionItem::ElementCollectionItem Constructor.
Definition at line 25 of file elementcollectionitem.cpp.
|
pure virtual |
Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.
Referenced by ElementsCollectionModel::addLocation(), and ElementsCollectionModel::elementIntegratedToCollection().
ElementCollectionItem * ElementCollectionItem::childWithCollectionName | ( | const QString & | name | ) | const |
Definition at line 75 of file elementcollectionitem.cpp.
References directChilds(), and name().
Referenced by itemAtPath(), and lastItemForPath().
|
virtual |
ElementCollectionItem::clearData Reset the data.
Definition at line 32 of file elementcollectionitem.cpp.
Referenced by ElementsCollectionWidget::editDirectory(), and ElementsCollectionModel::updateItem().
|
pure virtual |
Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.
Referenced by FileElementCollectionItem::collectionPath(), ElementsCollectionWidget::deleteDirectory(), ElementsCollectionWidget::deleteElement(), ElementsCollectionWidget::dirProperties(), ElementsCollectionWidget::editElement(), ElementDialog::indexClicked(), ElementsCollectionModel::mimeData(), and NewElementWizard::validStep1().
QList< QStandardItem * > ElementCollectionItem::directChilds | ( | ) | const |
ElementCollectionItem::directChilds Return the direct child of this item.
Definition at line 92 of file elementcollectionitem.cpp.
Referenced by childWithCollectionName(), directoriesDirectChild(), and elementsDirectChild().
QList< ElementCollectionItem * > ElementCollectionItem::directoriesChild | ( | ) | const |
ElementCollectionItem::directoriesChild.
Definition at line 214 of file elementcollectionitem.cpp.
References directoriesChild(), and directoriesDirectChild().
Referenced by directoriesChild(), ElementsCollectionWidget::dirProperties(), and elementsChild().
QList< ElementCollectionItem * > ElementCollectionItem::directoriesDirectChild | ( | ) | const |
ElementCollectionItem::directoriesDirectChild.
Definition at line 183 of file elementcollectionitem.cpp.
References directChilds(), and isDir().
Referenced by directoriesChild(), and rowForInsertItem().
QList< ElementCollectionItem * > ElementCollectionItem::elementsChild | ( | ) | const |
ElementCollectionItem::elementsChild.
Definition at line 200 of file elementcollectionitem.cpp.
References directoriesChild(), and elementsDirectChild().
Referenced by ElementsCollectionWidget::dirProperties().
QList< ElementCollectionItem * > ElementCollectionItem::elementsDirectChild | ( | ) | const |
ElementCollectionItem::elementsDirectChild.
Definition at line 166 of file elementcollectionitem.cpp.
References directChilds(), and isElement().
Referenced by elementsChild(), and rowForInsertItem().
|
pure virtual |
Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.
Referenced by FileElementCollectionItem::collectionPath().
|
pure virtual |
|
pure virtual |
ElementCollectionItem * ElementCollectionItem::itemAtPath | ( | const QString & | path | ) |
ElementCollectionItem::itemAtPath.
path |
Definition at line 144 of file elementcollectionitem.cpp.
References childWithCollectionName().
Referenced by ElementsCollectionModel::indexFromLocation().
QList< ElementCollectionItem * > ElementCollectionItem::items | ( | ) | const |
Definition at line 230 of file elementcollectionitem.cpp.
References items().
Referenced by ElementsCollectionModel::items(), items(), and ElementsCollectionModel::projectItems().
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.
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 |
Definition at line 48 of file elementcollectionitem.cpp.
References childWithCollectionName().
Referenced by ElementsCollectionModel::addLocation(), and ElementsCollectionModel::elementIntegratedToCollection().
|
pure virtual |
Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.
Referenced by ElementsCollectionWidget::dirProperties(), and ElementsCollectionWidget::setUpConnection().
|
pure virtual |
Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.
Referenced by childWithCollectionName(), and rowForInsertItem().
int ElementCollectionItem::rowForInsertItem | ( | const QString & | name | ) |
ElementCollectionItem::rowForInsertItem Return the row for insert a new child item to this item with name . If row can't be found (collection_name is null, or already exist) return -1;.
collection_name |
Definition at line 109 of file elementcollectionitem.cpp.
References directoriesDirectChild(), elementsDirectChild(), and name().
Referenced by XmlProjectElementCollectionItem::addChildAtPath(), and FileElementCollectionItem::addChildAtPath().
|
pure virtual |
Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.
Referenced by setUpData(), and ElementsCollectionModel::updateItem().
|
pure virtual |
Implemented in FileElementCollectionItem, and XmlProjectElementCollectionItem.
|
inlineoverride |
Definition at line 35 of file elementcollectionitem.h.
References Type.
Referenced by ElementsCollectionModel::addLocation(), ElementsCollectionWidget::customContextMenu(), ElementsCollectionWidget::dirProperties(), ElementsCollectionWidget::editDirectory(), ElementsCollectionModel::indexFromLocation(), ElementsCollectionWidget::newDirectory(), ElementsCollectionWidget::newElement(), and ElementsCollectionWidget::openDir().