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


Public Member Functions | |
| TitleBlockTemplatesFilesCollection (const QString &, QObject *=nullptr) | |
| ~TitleBlockTemplatesFilesCollection () override | |
| QString | path (const QString &=QString()) const |
| 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 |
Public Member Functions inherited from TitleBlockTemplatesCollection | |
| TitleBlockTemplatesCollection (QObject *parent) | |
| ~TitleBlockTemplatesCollection () override | |
| virtual QString | title () const |
| virtual void | setTitle (const QString &) |
| TitleBlockTemplatesCollection::setTitle. | |
| virtual QString | protocol () const |
| virtual void | setProtocol (const QString &) |
| virtual QET::QetCollection | collection () const |
| TitleBlockTemplatesCollection::collection. | |
| virtual void | setCollection (QET::QetCollection) |
| TitleBlockTemplatesCollection::setCollection Set the storage of this collection. | |
| virtual QETProject * | parentProject () |
| virtual QList< TitleBlockTemplateLocation > | templatesLocations () |
Static Public Member Functions | |
| static QString | toTemplateName (const QString &) |
| static QString | toFileName (const QString &) |
Private Slots | |
| void | fileSystemChanged (const QString &str) |
Private Member Functions | |
| TitleBlockTemplatesFilesCollection (const TitleBlockTemplatesFilesCollection &) | |
Private Attributes | |
| QFileSystemWatcher | watcher_ |
| File System Watcher object to track the files changes made outside the application. | |
| QDir | dir_ |
| Collection real directory. | |
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. | |
| QString | protocol_ |
| Protocol used to designate this collection. | |
| QET::QetCollection | m_collection |
| QHash< QString, TitleBlockTemplate * > | titleblock_templates_ |
| Already parsed embedded titleblock templates. | |
This classe represents a simple abastraction layer for a file-based title block templates directory.
| TitleBlockTemplatesFilesCollection::TitleBlockTemplatesFilesCollection | ( | const QString & | path, |
| QObject * | parent = nullptr |
||
| ) |
Constructor
| path | Path of the directory containing the collection |
| parent | Parent QObject |

|
override |
Destructor
|
private |
|
overridevirtual |
Implements TitleBlockTemplatesCollection.
|
privateslot |
Handle the changes occurring on the file system.
| str | Path of the directory that changed. |


|
overridevirtual |
Implements TitleBlockTemplatesCollection.

|
overridevirtual |
| template_name | Name of a template (which has to already exist) |
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 a template supposed to be contained within this collection. |
Implements TitleBlockTemplatesCollection.
| QString TitleBlockTemplatesFilesCollection::path | ( | const QString & | template_name = QString() | ) | const |


|
overridevirtual |
Remove the template_name template.
Implements TitleBlockTemplatesCollection.

|
overridevirtual |
Set the XML description of the template_name template to xml_element.
| template_name | Name of a template (which does not have to already exist) |
| xml_element | XML element describing the template |
Implements TitleBlockTemplatesCollection.

|
overridevirtual |
Implements TitleBlockTemplatesCollection.

|
static |
| template_name | A template name |

|
static |
| file_name | A file name |
|
private |
Collection real directory.
|
private |
File System Watcher object to track the files changes made outside the application.