QElectroTech
0.70
|
The XmlProjectElementCollectionItem class This class specialise ElementCollectionItem for manage an xml collection embedded in a project. More...
#include <xmlprojectelementcollectionitem.h>
Public Types | |
enum | { Type = UserType+3 } |
![]() | |
enum | { Type = UserType+1 } |
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 | |
QETProject * | m_project = nullptr |
QDomElement | m_dom_element |
The XmlProjectElementCollectionItem class This class specialise ElementCollectionItem for manage an xml collection embedded in a project.
Definition at line 30 of file xmlprojectelementcollectionitem.h.
anonymous enum |
Enumerator | |
---|---|
Type |
Definition at line 35 of file xmlprojectelementcollectionitem.h.
XmlProjectElementCollectionItem::XmlProjectElementCollectionItem | ( | ) |
XmlProjectElementCollectionItem::XmlProjectElementCollectionItem Constructor.
Definition at line 27 of file xmlprojectelementcollectionitem.cpp.
Referenced by addChildAtPath(), and populate().
|
overridevirtual |
XmlProjectElementCollectionItem::addChildAtPath Ask to this item item to add a new child with collection name (the child must exist in the xml element collection)
collection_name | : name of the child item to add. |
Implements ElementCollectionItem.
Definition at line 136 of file xmlprojectelementcollectionitem.cpp.
References m_dom_element, m_project, ElementCollectionItem::rowForInsertItem(), setUpData(), setXmlElement(), and XmlProjectElementCollectionItem().
|
overridevirtual |
XmlProjectElementCollectionItem::collectionPath.
Implements ElementCollectionItem.
Definition at line 86 of file xmlprojectelementcollectionitem.cpp.
References embeddedPath(), m_project, ElementsLocation::projectCollectionPath(), and QET::Icons::tr.
Referenced by ElementsCollectionModel::dropMimeData(), and setUpData().
|
virtual |
XmlProjectElementCollectionItem::embeddedPath.
Definition at line 100 of file xmlprojectelementcollectionitem.cpp.
References embeddedPath(), isCollectionRoot(), and name().
Referenced by collectionPath(), embeddedPath(), localName(), setUpData(), and setUpIcon().
|
overridevirtual |
XmlProjectElementCollectionItem::isCollectionRoot.
Implements ElementCollectionItem.
Definition at line 120 of file xmlprojectelementcollectionitem.cpp.
Referenced by ElementsCollectionWidget::customContextMenu(), embeddedPath(), localName(), and setUpIcon().
|
overridevirtual |
XmlProjectElementCollectionItem::isDir.
Implements ElementCollectionItem.
Definition at line 34 of file xmlprojectelementcollectionitem.cpp.
References m_dom_element.
Referenced by setUpData(), and setUpIcon().
|
overridevirtual |
XmlProjectElementCollectionItem::isElement.
Implements ElementCollectionItem.
Definition at line 44 of file xmlprojectelementcollectionitem.cpp.
References m_dom_element.
Referenced by ElementsCollectionModel::dropMimeData().
|
overridevirtual |
XmlProjectElementCollectionItem::localName.
Implements ElementCollectionItem.
Definition at line 54 of file xmlprojectelementcollectionitem.cpp.
References embeddedPath(), isCollectionRoot(), m_project, ElementsLocation::name(), QETProject::title(), and QET::Icons::tr.
Referenced by setUpData().
|
overridevirtual |
XmlProjectElementCollectionItem::name.
Implements ElementCollectionItem.
Definition at line 77 of file xmlprojectelementcollectionitem.cpp.
References m_dom_element.
Referenced by embeddedPath().
|
private |
XmlProjectElementCollectionItem::populate Create the childs of this item.
set_data | : if true, call setUpData for every child of this item |
Definition at line 239 of file xmlprojectelementcollectionitem.cpp.
References XmlElementCollection::directories(), XmlElementCollection::elements(), QETProject::embeddedElementCollection(), m_dom_element, m_project, setUpData(), setXmlElement(), and XmlProjectElementCollectionItem().
Referenced by setProject(), and setXmlElement().
QETProject * XmlProjectElementCollectionItem::project | ( | ) | const |
XmlProjectElementCollectionItem::project.
Definition at line 161 of file xmlprojectelementcollectionitem.cpp.
References m_project.
Referenced by setProject(), and setXmlElement().
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.
project | : project to manage the collection |
set_data | : if true, call setUpData for every child of this item |
Definition at line 173 of file xmlprojectelementcollectionitem.cpp.
References QETProject::embeddedElementCollection(), m_dom_element, m_project, populate(), project(), and XmlElementCollection::root().
Referenced by ElementsCollectionModel::addProject().
|
overridevirtual |
XmlProjectElementCollectionItem::setUpData SetUp the data of this item.
Implements ElementCollectionItem.
Definition at line 187 of file xmlprojectelementcollectionitem.cpp.
References collectionPath(), ElementsLocation::elementInformations(), embeddedPath(), isDir(), DiagramContext::keys(), localName(), m_project, and DiagramContext::value().
Referenced by addChildAtPath(), ElementsCollectionModel::addProject(), and populate().
|
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.
Definition at line 219 of file xmlprojectelementcollectionitem.cpp.
References embeddedPath(), QET::Icons::Folder, ElementsLocation::icon(), isCollectionRoot(), isDir(), m_project, and QET::Icons::ProjectFileGP.
|
private |
XmlProjectElementCollectionItem::setXmlElement Set the managed content of this item.
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 |
Definition at line 276 of file xmlprojectelementcollectionitem.cpp.
References m_dom_element, m_project, populate(), and project().
Referenced by addChildAtPath(), and populate().
|
inlineoverride |
Definition at line 36 of file xmlprojectelementcollectionitem.h.
References Type.
Referenced by ElementsCollectionModel::dropMimeData(), and isCollectionRoot().
|
private |
Definition at line 58 of file xmlprojectelementcollectionitem.h.
Referenced by addChildAtPath(), isDir(), isElement(), name(), populate(), setProject(), and setXmlElement().
|
private |
Definition at line 57 of file xmlprojectelementcollectionitem.h.
Referenced by addChildAtPath(), collectionPath(), localName(), populate(), project(), setProject(), setUpData(), setUpIcon(), and setXmlElement().