|
QElectroTech
0.8-dev
|
Go to the documentation of this file.
18 #ifndef TITLEBLOCK_SLASH_TEMPLATES_COLLECTION_H
19 #define TITLEBLOCK_SLASH_TEMPLATES_COLLECTION_H
20 #define TITLEBLOCKS_FILE_EXTENSION ".titleblock"
54 virtual bool isReadOnly(
const QString & = QString())
const = 0;
55 virtual QString
title()
const;
56 virtual void setTitle(
const QString &);
95 QString
title()
const override;
106 bool isReadOnly(
const QString & = QString())
const override;
107 virtual void fromXml(
const QDomElement &);
136 QString
path(
const QString & = QString())
const;
145 bool isReadOnly(
const QString & = QString())
const override;
QStringList templates() override
Definition: templatescollection.cpp:182
TitleBlockTemplatesProjectCollection(QETProject *, QObject *parent=nullptr)
Definition: templatescollection.cpp:113
virtual bool hasFilePath()=0
QDomElement getTemplateXmlDescription(const QString &) override
Definition: templatescollection.cpp:217
virtual QString filePath()=0
QFileSystemWatcher watcher_
File System Watcher object to track the files changes made outside the application.
Definition: templatescollection.h:156
bool setTemplateXmlDescription(const QString &, const QDomElement &) override
Definition: templatescollection.cpp:235
virtual QET::QetCollection collection() const
TitleBlockTemplatesCollection::collection.
Definition: templatescollection.cpp:74
~TitleBlockTemplatesProjectCollection() override
Definition: templatescollection.cpp:123
TitleBlockTemplatesFilesCollection(const TitleBlockTemplatesFilesCollection &)
static QString toFileName(const QString &)
Definition: templatescollection.cpp:535
~TitleBlockTemplatesCollection() override
Definition: templatescollection.cpp:36
virtual void deleteUnusedTitleBlocKTemplates()
Definition: templatescollection.cpp:341
virtual QString protocol() const
Definition: templatescollection.cpp:58
void changed(TitleBlockTemplatesCollection *, const QString &=QString())
QetCollection
Enum used to specify the origin of a collection of thing (title block, element etc....
Definition: qet.h:152
TitleBlockTemplatesCollection(QObject *parent)
Definition: templatescollection.cpp:27
TitleBlockTemplateLocation location(const QString &=QString()) override
Definition: templatescollection.cpp:487
QDir dir_
Collection real directory.
Definition: templatescollection.h:158
QET::QetCollection m_collection
Definition: templatescollection.h:74
TitleBlockTemplate * getTemplate(const QString &) override
Definition: templatescollection.cpp:191
void aboutToRemove(TitleBlockTemplatesCollection *, const QString &)
~TitleBlockTemplatesFilesCollection() override
Definition: templatescollection.cpp:374
virtual TitleBlockTemplate * getTemplate(const QString &)=0
TitleBlockTemplateLocation location(const QString &=QString()) override
Definition: templatescollection.cpp:287
bool hasFilePath() override
Definition: templatescollection.cpp:295
void fileSystemChanged(const QString &str)
Definition: templatescollection.cpp:543
QList< QDomElement > findInDomElement(const QDomElement &, const QString &)
Definition: qet.cpp:333
void removeTemplate(const QString &) override
Definition: templatescollection.cpp:470
QHash< QString, QDomElement > titleblock_templates_xml_
XML descriptions of embedded titleblock templates.
Definition: templatescollection.h:117
TitleBlockTemplatesProjectCollection(const TitleBlockTemplatesProjectCollection &)
@ TitleBlockTemplate
Definition: qet.h:105
static QString toTemplateName(const QString &)
Definition: templatescollection.cpp:525
The TitleBlockTemplate class This class represents an title block template for an electric diagram....
Definition: titleblocktemplate.h:36
Definition: templatescollection.h:124
QETProject * parentProject() override
Definition: templatescollection.cpp:175
void removeTemplate(const QString &) override
Definition: templatescollection.cpp:272
virtual QETProject * parentProject()
Definition: templatescollection.cpp:91
TitleBlockTemplatesFilesCollection(const QString &, QObject *=nullptr)
Definition: templatescollection.cpp:356
TitleBlockTemplatesCollection(const TitleBlockTemplatesCollection &)
Definition: templatelocation.h:29
QString protocol_
Protocol used to designate this collection.
Definition: templatescollection.h:73
bool setTemplateXmlDescription(const QString &, const QDomElement &) override
Definition: templatescollection.cpp:449
static int projectId(const QETProject *)
QETApp::projectId.
Definition: qetapp.cpp:2433
bool writeXmlFile(QDomDocument &xml_doc, const QString &filepath, QString *error_message=nullptr)
Definition: qet.cpp:584
virtual QString title() const
Definition: templatescollection.cpp:42
virtual QStringList templates()=0
virtual void removeTemplate(const QString &)=0
virtual void fromXml(const QDomElement &)
Definition: templatescollection.cpp:323
QString title_
Human-readable title for this collection.
Definition: templatescollection.h:71
Definition: qetproject.h:51
virtual QList< TitleBlockTemplateLocation > templatesLocations()
Definition: templatescollection.cpp:100
virtual void setTitle(const QString &)
TitleBlockTemplatesCollection::setTitle.
Definition: templatescollection.cpp:50
QString path(const QString &=QString()) const
Definition: templatescollection.cpp:380
virtual void setProtocol(const QString &)
Definition: templatescollection.cpp:66
QString filePath() override
Definition: templatescollection.cpp:303
virtual QDomElement getTemplateXmlDescription(const QString &)=0
QString title() const override
Definition: templatescollection.cpp:129
@ Embedded
From an embedded collection (a project for exemple)
Definition: qet.h:155
bool isReadOnly(const QString &=QString()) const override
Definition: templatescollection.cpp:511
virtual void setCollection(QET::QetCollection)
TitleBlockTemplatesCollection::setCollection Set the storage of this collection.
Definition: templatescollection.cpp:83
bool isReadOnly(const QString &=QString()) const override
Definition: templatescollection.cpp:312
Definition: templatescollection.h:34
virtual bool setTemplateXmlDescription(const QString &, const QDomElement &)=0
QDomElement getTemplateXmlDescription(const QString &) override
Definition: templatescollection.cpp:422
QString protocol() const override
Definition: templatescollection.cpp:161
#define TITLEBLOCKS_FILE_EXTENSION
Definition: templatescollection.h:20
QDomDocument xml_document_
Parent QDomDocument for stored QDomElements.
Definition: templatescollection.h:115
QString filePath() override
Definition: templatescollection.cpp:502
TitleBlockTemplate * getTemplate(const QString &) override
Definition: templatescollection.cpp:404
bool hasFilePath() override
Definition: templatescollection.cpp:495
virtual bool isReadOnly(const QString &=QString()) const =0
QETProject * project_
Parent project.
Definition: templatescollection.h:113
Definition: templatescollection.h:83
QIcon tr
Definition: qeticons.cpp:206
QStringList templates() override
Definition: templatescollection.cpp:391
QHash< QString, TitleBlockTemplate * > titleblock_templates_
Already parsed embedded titleblock templates.
Definition: templatescollection.h:76
virtual TitleBlockTemplateLocation location(const QString &=QString())=0