QElectroTech  0.70
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
TitleBlockTemplateLocation Class Reference

#include <templatelocation.h>

Public Member Functions

 TitleBlockTemplateLocation (const QString &=QString(), TitleBlockTemplatesCollection *=nullptr)
 
virtual ~TitleBlockTemplateLocation ()
 
TitleBlockTemplateLocation locationFromString (const QString &)
 
TitleBlockTemplatesCollectionparentCollection () const
 
void setParentCollection (TitleBlockTemplatesCollection *)
 
QString name () const
 
void setName (const QString &)
 
bool isValid () const
 
void fromString (const QString &)
 
QString toString () const
 
QETProjectparentProject () const
 
QString protocol () const
 
QDomElement getTemplateXmlDescription () const
 
TitleBlockTemplategetTemplate () const
 
bool isReadOnly () const
 
bool operator== (const TitleBlockTemplateLocation &) const
 

Static Public Attributes

static int MetaTypeId = qRegisterMetaType<TitleBlockTemplateLocation>("TitleBlockTemplateLocation")
 Id of the corresponding Qt meta type. More...
 

Private Attributes

TitleBlockTemplatesCollectioncollection_
 Collection the template belongs to. More...
 
QString name_
 Name of the template. More...
 

Detailed Description

This class represents the location of a title block template.

Definition at line 29 of file templatelocation.h.

Constructor & Destructor Documentation

◆ TitleBlockTemplateLocation()

TitleBlockTemplateLocation::TitleBlockTemplateLocation ( const QString &  name = QString(),
TitleBlockTemplatesCollection collection = nullptr 
)

Constructor

Parameters
collectionParent collection of the title block template
nameName of the title block template within its parent project or collection

Definition at line 30 of file templatelocation.cpp.

◆ ~TitleBlockTemplateLocation()

TitleBlockTemplateLocation::~TitleBlockTemplateLocation ( )
virtual

Destructor

Definition at line 39 of file templatelocation.cpp.

Member Function Documentation

◆ fromString()

void TitleBlockTemplateLocation::fromString ( const QString &  loc_str)
Parameters
loc_strString describing the location of a title block template.

Definition at line 90 of file templatelocation.cpp.

References collection_, name_, and QETApp::titleBlockTemplatesCollection().

Referenced by DiagramView::handleTitleBlockDrop(), and locationFromString().

◆ getTemplate()

TitleBlockTemplate * TitleBlockTemplateLocation::getTemplate ( ) const

This is a convenience method equivalent to parentCollection() -> getTemplate(...).

Definition at line 143 of file templatelocation.cpp.

References collection_, and name_.

Referenced by QETTitleBlockTemplateEditor::edit().

◆ getTemplateXmlDescription()

QDomElement TitleBlockTemplateLocation::getTemplateXmlDescription ( ) const

This is a convenience method equivalent to parentCollection() -> getTemplateXmlDescription

Definition at line 134 of file templatelocation.cpp.

References collection_, and name_.

Referenced by QETProject::integrateTitleBlockTemplate(), and IntegrationMoveTitleBlockTemplatesHandler::templateAlreadyExists().

◆ isReadOnly()

bool TitleBlockTemplateLocation::isReadOnly ( ) const

This is a convenience method equivalent to parentCollection() -> isReadOnly(name())

Definition at line 152 of file templatelocation.cpp.

References collection_, and name_.

Referenced by QETTitleBlockTemplateEditor::edit(), QETTitleBlockTemplateEditor::save(), and ElementsPanelWidget::updateButtons().

◆ isValid()

bool TitleBlockTemplateLocation::isValid ( ) const

◆ locationFromString()

TitleBlockTemplateLocation TitleBlockTemplateLocation::locationFromString ( const QString &  loc_str)
Parameters
loc_strString describing the location of a title block template.

Definition at line 45 of file templatelocation.cpp.

References fromString().

◆ name()

QString TitleBlockTemplateLocation::name ( ) const

◆ operator==()

bool TitleBlockTemplateLocation::operator== ( const TitleBlockTemplateLocation location) const
Parameters
locationother location that should be compared to this one
Returns
true if locations are equal, false otherwise

Definition at line 161 of file templatelocation.cpp.

References collection_, and name_.

◆ parentCollection()

TitleBlockTemplatesCollection * TitleBlockTemplateLocation::parentCollection ( ) const

◆ parentProject()

QETProject * TitleBlockTemplateLocation::parentProject ( ) const

◆ protocol()

QString TitleBlockTemplateLocation::protocol ( ) const

This is a convenience method equivalent to parentCollection() -> protocol().

Definition at line 123 of file templatelocation.cpp.

References collection_.

Referenced by toString().

◆ setName()

void TitleBlockTemplateLocation::setName ( const QString &  name)
Parameters
nameThe new name of this template.

Definition at line 76 of file templatelocation.cpp.

References name(), and name_.

Referenced by QETTitleBlockTemplateEditor::edit().

◆ setParentCollection()

void TitleBlockTemplateLocation::setParentCollection ( TitleBlockTemplatesCollection collection)
Parameters
projectThe new parent collection of the template, or 0 if none applies.

Definition at line 62 of file templatelocation.cpp.

References collection_.

Referenced by QETTitleBlockTemplateEditor::edit().

◆ toString()

QString TitleBlockTemplateLocation::toString ( ) const

Member Data Documentation

◆ collection_

TitleBlockTemplatesCollection* TitleBlockTemplateLocation::collection_
private

◆ MetaTypeId

int TitleBlockTemplateLocation::MetaTypeId = qRegisterMetaType<TitleBlockTemplateLocation>("TitleBlockTemplateLocation")
static

Id of the corresponding Qt meta type.

Definition at line 61 of file templatelocation.h.

◆ name_

QString TitleBlockTemplateLocation::name_
private

Name of the template.

Definition at line 58 of file templatelocation.h.

Referenced by fromString(), getTemplate(), getTemplateXmlDescription(), isReadOnly(), isValid(), name(), operator==(), setName(), and toString().


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