QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
xmlprojectelementcollectionitem.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 The QElectroTech Team
3 This file is part of QElectroTech.
4
5 QElectroTech is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 QElectroTech is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef XMLPROJECTELEMENTCOLLECTIONITEM2_H
19#define XMLPROJECTELEMENTCOLLECTIONITEM2_H
20
22#include <QDomElement>
23
24class QETProject;
25
32{
33 public:
35
36 enum {Type = UserType+3};
37 int type() const override { return Type; }
38
39 bool isDir() const override;
40 bool isElement() const override;
41 QString localName() override;
42 QString name() const override;
43 QString collectionPath() const override;
44 virtual QString embeddedPath() const;
45 bool isCollectionRoot() const override;
46 void addChildAtPath(const QString &collection_name) override;
47 QETProject * project() const;
48
50 bool set_data = true,
51 bool hide_element = false);
52 void setUpData() override;
53 void setUpIcon() override;
54
55 private:
56 void populate(bool set_data = true, bool hide_element = false);
57 void setXmlElement(const QDomElement& element,
59 bool set_data = true,
60 bool hide_element = false);
61
62 private:
64 QDomElement m_dom_element;
65};
66
67#endif // XMLPROJECTELEMENTCOLLECTIONITEM2_H
The ElementCollectionItem class This class represent a item (a directory or an element) in a element ...
Definition elementcollectionitem.h:30
Definition qetproject.h:62
The XmlProjectElementCollectionItem class This class specialise ElementCollectionItem for manage an x...
Definition xmlprojectelementcollectionitem.h:32
QETProject * project() const
XmlProjectElementCollectionItem::project.
Definition xmlprojectelementcollectionitem.cpp:163
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 th...
Definition xmlprojectelementcollectionitem.cpp:176
void setUpData() override
XmlProjectElementCollectionItem::setUpData SetUp the data of this item.
Definition xmlprojectelementcollectionitem.cpp:192
@ Type
Definition xmlprojectelementcollectionitem.h:36
QETProject * m_project
Definition xmlprojectelementcollectionitem.h:63
QString localName() override
XmlProjectElementCollectionItem::localName.
Definition xmlprojectelementcollectionitem.cpp:55
void populate(bool set_data=true, bool hide_element=false)
XmlProjectElementCollectionItem::populate Create the childs of this item.
Definition xmlprojectelementcollectionitem.cpp:245
QString name() const override
XmlProjectElementCollectionItem::name.
Definition xmlprojectelementcollectionitem.cpp:78
bool isCollectionRoot() const override
XmlProjectElementCollectionItem::isCollectionRoot.
Definition xmlprojectelementcollectionitem.cpp:121
void setXmlElement(const QDomElement &element, QETProject *project, bool set_data=true, bool hide_element=false)
XmlProjectElementCollectionItem::setXmlElement Set the managed content of this item.
Definition xmlprojectelementcollectionitem.cpp:284
QDomElement m_dom_element
Definition xmlprojectelementcollectionitem.h:64
void setUpIcon() override
XmlProjectElementCollectionItem::setUpIcon SetUp the icon of this item. Because icon use several memo...
Definition xmlprojectelementcollectionitem.cpp:224
bool isElement() const override
XmlProjectElementCollectionItem::isElement.
Definition xmlprojectelementcollectionitem.cpp:45
void addChildAtPath(const QString &collection_name) override
XmlProjectElementCollectionItem::addChildAtPath Ask to this item item to add a new child with collect...
Definition xmlprojectelementcollectionitem.cpp:137
XmlProjectElementCollectionItem()
XmlProjectElementCollectionItem::XmlProjectElementCollectionItem Constructor.
Definition xmlprojectelementcollectionitem.cpp:28
QString collectionPath() const override
XmlProjectElementCollectionItem::collectionPath.
Definition xmlprojectelementcollectionitem.cpp:87
virtual QString embeddedPath() const
XmlProjectElementCollectionItem::embeddedPath.
Definition xmlprojectelementcollectionitem.cpp:101
int type() const override
Definition xmlprojectelementcollectionitem.h:37
bool isDir() const override
XmlProjectElementCollectionItem::isDir.
Definition xmlprojectelementcollectionitem.cpp:35