QElectroTech  0.70
Signals | Public Member Functions | Protected Attributes | Private Member Functions | List of all members
TitleBlockTemplatesCollection Class Referenceabstract

#include <templatescollection.h>

Signals

void changed (TitleBlockTemplatesCollection *, const QString &=QString())
 
void aboutToRemove (TitleBlockTemplatesCollection *, const QString &)
 

Public Member Functions

 TitleBlockTemplatesCollection (QObject *parent)
 
 ~TitleBlockTemplatesCollection () override
 
virtual QStringList templates ()=0
 
virtual TitleBlockTemplategetTemplate (const QString &)=0
 
virtual QDomElement getTemplateXmlDescription (const QString &)=0
 
virtual bool setTemplateXmlDescription (const QString &, const QDomElement &)=0
 
virtual void removeTemplate (const QString &)=0
 
virtual TitleBlockTemplateLocation location (const QString &=QString())=0
 
virtual bool hasFilePath ()=0
 
virtual QString filePath ()=0
 
virtual bool isReadOnly (const QString &=QString()) const =0
 
virtual QString title () const
 
virtual void setTitle (const QString &)
 
virtual QString protocol () const
 
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 QETProjectparentProject ()
 
virtual QList< TitleBlockTemplateLocationtemplatesLocations ()
 

Protected Attributes

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...
 

Private Member Functions

 TitleBlockTemplatesCollection (const TitleBlockTemplatesCollection &)
 

Detailed Description

This abstract class represents a generic collection of title block templates. Unlike elements collections, title block templates collections do not provide a tree structure. Instead, they provide a simple, flat list of available templates.

Definition at line 34 of file templatescollection.h.

Constructor & Destructor Documentation

◆ TitleBlockTemplatesCollection() [1/2]

TitleBlockTemplatesCollection::TitleBlockTemplatesCollection ( QObject *  parent)

Constructor

Parameters
parentParent QObject

Definition at line 27 of file templatescollection.cpp.

◆ ~TitleBlockTemplatesCollection()

TitleBlockTemplatesCollection::~TitleBlockTemplatesCollection ( )
override

Destructor

Definition at line 36 of file templatescollection.cpp.

◆ TitleBlockTemplatesCollection() [2/2]

TitleBlockTemplatesCollection::TitleBlockTemplatesCollection ( const TitleBlockTemplatesCollection )
private

Member Function Documentation

◆ aboutToRemove

void TitleBlockTemplatesCollection::aboutToRemove ( TitleBlockTemplatesCollection ,
const QString &   
)
signal

◆ changed

void TitleBlockTemplatesCollection::changed ( TitleBlockTemplatesCollection ,
const QString &  = QString() 
)
signal

◆ collection()

QET::QetCollection TitleBlockTemplatesCollection::collection ( ) const
virtual

TitleBlockTemplatesCollection::collection.

Returns
the collection where is stored this collection.

Definition at line 73 of file templatescollection.cpp.

References m_collection.

◆ filePath()

virtual QString TitleBlockTemplatesCollection::filePath ( )
pure virtual

◆ getTemplate()

virtual TitleBlockTemplate* TitleBlockTemplatesCollection::getTemplate ( const QString &  )
pure virtual

◆ getTemplateXmlDescription()

virtual QDomElement TitleBlockTemplatesCollection::getTemplateXmlDescription ( const QString &  )
pure virtual

◆ hasFilePath()

virtual bool TitleBlockTemplatesCollection::hasFilePath ( )
pure virtual

◆ isReadOnly()

virtual bool TitleBlockTemplatesCollection::isReadOnly ( const QString &  = QString()) const
pure virtual

◆ location()

virtual TitleBlockTemplateLocation TitleBlockTemplatesCollection::location ( const QString &  = QString())
pure virtual

◆ parentProject()

QETProject * TitleBlockTemplatesCollection::parentProject ( )
virtual
Returns
the project this collection is affiliated to, or 0 if this collection is not related to any project.

Reimplemented in TitleBlockTemplatesProjectCollection.

Definition at line 90 of file templatescollection.cpp.

◆ protocol()

QString TitleBlockTemplatesCollection::protocol ( ) const
virtual
Returns
the protocol used by this collection ; examples: commontbt, customtbt, embedtbt, ...

Reimplemented in TitleBlockTemplatesProjectCollection.

Definition at line 57 of file templatescollection.cpp.

References protocol_.

Referenced by TitleBlockTemplatesProjectCollection::protocol(), and setProtocol().

◆ removeTemplate()

virtual void TitleBlockTemplatesCollection::removeTemplate ( const QString &  )
pure virtual

◆ setCollection()

void TitleBlockTemplatesCollection::setCollection ( QET::QetCollection  c)
virtual

TitleBlockTemplatesCollection::setCollection Set the storage of this collection.

Parameters
c

Definition at line 82 of file templatescollection.cpp.

References m_collection.

◆ setProtocol()

void TitleBlockTemplatesCollection::setProtocol ( const QString &  protocol)
virtual

Define the protocol for this collection

Parameters
protocolNew protocol for this collection

Definition at line 65 of file templatescollection.cpp.

References protocol(), and protocol_.

◆ setTemplateXmlDescription()

virtual bool TitleBlockTemplatesCollection::setTemplateXmlDescription ( const QString &  ,
const QDomElement &   
)
pure virtual

◆ setTitle()

void TitleBlockTemplatesCollection::setTitle ( const QString &  title)
virtual

title New title for this collection

Definition at line 49 of file templatescollection.cpp.

References title(), and title_.

◆ templates()

virtual QStringList TitleBlockTemplatesCollection::templates ( )
pure virtual

◆ templatesLocations()

QList< TitleBlockTemplateLocation > TitleBlockTemplatesCollection::templatesLocations ( )
virtual
Returns
the templates contained within this collection, as a list of location objects.
See also
templates()

Definition at line 99 of file templatescollection.cpp.

References location(), and templates().

◆ title()

QString TitleBlockTemplatesCollection::title ( ) const
virtual
Returns
the title of this collection

Reimplemented in TitleBlockTemplatesProjectCollection.

Definition at line 42 of file templatescollection.cpp.

References title_.

Referenced by setTitle().

Member Data Documentation

◆ m_collection

QET::QetCollection TitleBlockTemplatesCollection::m_collection
protected

◆ protocol_

QString TitleBlockTemplatesCollection::protocol_
protected

Protocol used to designate this collection.

Definition at line 73 of file templatescollection.h.

Referenced by protocol(), and setProtocol().

◆ title_

QString TitleBlockTemplatesCollection::title_
protected

Human-readable title for this collection.

Definition at line 71 of file templatescollection.h.

Referenced by setTitle(), title(), and TitleBlockTemplatesProjectCollection::title().

◆ titleblock_templates_

QHash<QString, TitleBlockTemplate *> TitleBlockTemplatesCollection::titleblock_templates_
protected

The documentation for this class was generated from the following files: