![]() |
QElectroTech
0.8-dev
|
#include <templatescollection.h>


Public Member Functions | |
| TitleBlockTemplatesProjectCollection (QETProject *, QObject *parent=nullptr) | |
| ~TitleBlockTemplatesProjectCollection () override | |
| QString | title () const override |
| QString | protocol () const override |
| QETProject * | parentProject () override |
| QStringList | templates () override |
| TitleBlockTemplate * | getTemplate (const QString &) override |
| QDomElement | getTemplateXmlDescription (const QString &) override |
| bool | setTemplateXmlDescription (const QString &, const QDomElement &) override |
| void | removeTemplate (const QString &) override |
| TitleBlockTemplateLocation | location (const QString &=QString()) override |
| bool | hasFilePath () override |
| QString | filePath () override |
| bool | isReadOnly (const QString &=QString()) const override |
| virtual void | fromXml (const QDomElement &) |
| virtual void | deleteUnusedTitleBlocKTemplates () |
Public Member Functions inherited from TitleBlockTemplatesCollection | |
| TitleBlockTemplatesCollection (QObject *parent) | |
| ~TitleBlockTemplatesCollection () override | |
| virtual void | setTitle (const QString &) |
| TitleBlockTemplatesCollection::setTitle. More... | |
| virtual void | setProtocol (const QString &) |
| virtual QET::QetCollection | collection () const |
| TitleBlockTemplatesCollection::collection. More... | |
| virtual void | setCollection (QET::QetCollection) |
| TitleBlockTemplatesCollection::setCollection Set the storage of this collection. More... | |
| virtual QList< TitleBlockTemplateLocation > | templatesLocations () |
Private Member Functions | |
| TitleBlockTemplatesProjectCollection (const TitleBlockTemplatesProjectCollection &) | |
Private Attributes | |
| QETProject * | project_ |
| Parent project. More... | |
| QDomDocument | xml_document_ |
| Parent QDomDocument for stored QDomElements. More... | |
| QHash< QString, QDomElement > | titleblock_templates_xml_ |
| XML descriptions of embedded titleblock templates. More... | |
Additional Inherited Members | |
Signals inherited from TitleBlockTemplatesCollection | |
| void | changed (TitleBlockTemplatesCollection *, const QString &=QString()) |
| void | aboutToRemove (TitleBlockTemplatesCollection *, const QString &) |
Protected Attributes inherited from TitleBlockTemplatesCollection | |
| QString | title_ |
| Human-readable title for this collection. More... | |
| QString | protocol_ |
| Protocol used to designate this collection. More... | |
| QET::QetCollection | m_collection |
| QHash< QString, TitleBlockTemplate * > | titleblock_templates_ |
| Already parsed embedded titleblock templates. More... | |
This class represents a simple abastraction layer for a collection of title block templates embedded within a project.
| TitleBlockTemplatesProjectCollection::TitleBlockTemplatesProjectCollection | ( | QETProject * | project, |
| QObject * | parent = nullptr |
||
| ) |
Constructor
| project | Parent project |
| parent | Parent QObject |
|
override |
Destructor
|
private |
|
virtual |
Delete all title block templates not used within the parent project


|
overridevirtual |
Implements TitleBlockTemplatesCollection.
|
virtual |
| xml_element | XML element to be parsed to load title block templates |


|
overridevirtual |
| template_name | Name of the requested template |
Implements TitleBlockTemplatesCollection.

|
overridevirtual |
| template_name | Name of the requested template |
Implements TitleBlockTemplatesCollection.

|
overridevirtual |
Implements TitleBlockTemplatesCollection.
|
overridevirtual |
| template_name | Either an empty QString to know whether the collection itself is read only, or a specific template name. |
Implements TitleBlockTemplatesCollection.
|
overridevirtual |
| template_name | Name of the requested template |
Implements TitleBlockTemplatesCollection.

|
overridevirtual |
Reimplemented from TitleBlockTemplatesCollection.
|
overridevirtual |
Reimplemented from TitleBlockTemplatesCollection.

|
overridevirtual |
This methods allows removing a template embedded within the project. This method emits the signal changed() if necessary.
| template_name | Name of the template to be removed |
Implements TitleBlockTemplatesCollection.

|
overridevirtual |
This methods allows adding or modifying a template embedded within the project. This method emits the signal changed() if necessary.
| template_name | Name / Identifier of the template - will be used to determine whether the given description will be added or will replace an existing one. |
| xml_elmt | An <titleblocktemplate> XML element describing the template. Its "name" attribute must equal to template_name. |
Implements TitleBlockTemplatesCollection.

|
overridevirtual |
Implements TitleBlockTemplatesCollection.

|
overridevirtual |
Reimplemented from TitleBlockTemplatesCollection.

|
private |
Parent project.
|
private |
XML descriptions of embedded titleblock templates.
|
private |
Parent QDomDocument for stored QDomElements.
1.8.18