QElectroTech
0.70
|
#include <templatelocation.h>
Public Member Functions | |
TitleBlockTemplateLocation (const QString &=QString(), TitleBlockTemplatesCollection *=nullptr) | |
virtual | ~TitleBlockTemplateLocation () |
TitleBlockTemplateLocation | locationFromString (const QString &) |
TitleBlockTemplatesCollection * | parentCollection () const |
void | setParentCollection (TitleBlockTemplatesCollection *) |
QString | name () const |
void | setName (const QString &) |
bool | isValid () const |
void | fromString (const QString &) |
QString | toString () const |
QETProject * | parentProject () const |
QString | protocol () const |
QDomElement | getTemplateXmlDescription () const |
TitleBlockTemplate * | getTemplate () 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 | |
TitleBlockTemplatesCollection * | collection_ |
Collection the template belongs to. More... | |
QString | name_ |
Name of the template. More... | |
This class represents the location of a title block template.
Definition at line 29 of file templatelocation.h.
TitleBlockTemplateLocation::TitleBlockTemplateLocation | ( | const QString & | name = QString() , |
TitleBlockTemplatesCollection * | collection = nullptr |
||
) |
Constructor
collection | Parent collection of the title block template |
name | Name of the title block template within its parent project or collection |
Definition at line 30 of file templatelocation.cpp.
|
virtual |
Destructor
Definition at line 39 of file templatelocation.cpp.
void TitleBlockTemplateLocation::fromString | ( | const QString & | loc_str | ) |
loc_str | String 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().
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().
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().
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().
bool TitleBlockTemplateLocation::isValid | ( | ) | const |
Definition at line 83 of file templatelocation.cpp.
References name_.
Referenced by GenericPanel::addTemplate(), TitleBlockTemplateDeleter::exec(), GenericPanel::getItemForTemplate(), DiagramView::handleTitleBlockDrop(), QETTitleBlockTemplateEditor::open(), QETTitleBlockTemplateEditor::save(), QETTitleBlockTemplateEditor::saveAs(), and ElementsPanel::startDrag().
TitleBlockTemplateLocation TitleBlockTemplateLocation::locationFromString | ( | const QString & | loc_str | ) |
loc_str | String describing the location of a title block template. |
Definition at line 45 of file templatelocation.cpp.
References fromString().
QString TitleBlockTemplateLocation::name | ( | ) | const |
Definition at line 69 of file templatelocation.cpp.
References name_.
Referenced by QETTitleBlockTemplateEditor::canClose(), QETTitleBlockTemplateEditor::currentlyEditedTitle(), QETTitleBlockTemplateEditor::duplicateCurrentLocation(), QETTitleBlockTemplateEditor::edit(), TitleBlockTemplateDeleter::exec(), DiagramView::handleTitleBlockDrop(), QETProject::integrateTitleBlockTemplate(), IntegrationMoveTitleBlockTemplatesHandler::newNameForTemplate(), QETTitleBlockTemplateEditor::saveAs(), TitleBlockTemplateLocationSaver::setLocation(), TitleBlockTemplateLocationChooser::setLocation(), setName(), IntegrationMoveTitleBlockTemplatesHandler::templateAlreadyExists(), GenericPanel::updateTemplateItem(), and QETProject::usesTitleBlockTemplate().
bool TitleBlockTemplateLocation::operator== | ( | const TitleBlockTemplateLocation & | location | ) | const |
location | other location that should be compared to this one |
Definition at line 161 of file templatelocation.cpp.
References collection_, and name_.
TitleBlockTemplatesCollection * TitleBlockTemplateLocation::parentCollection | ( | ) | const |
Definition at line 54 of file templatelocation.cpp.
References collection_.
Referenced by QETTitleBlockTemplateEditor::duplicateCurrentLocation(), TitleBlockTemplateDeleter::exec(), ElementsPanel::filePathForItem(), QETTitleBlockTemplateEditor::firstActivation(), QETTitleBlockTemplateEditor::saveAs(), TitleBlockTemplateLocationSaver::setLocation(), TitleBlockTemplateLocationChooser::setLocation(), IntegrationMoveTitleBlockTemplatesHandler::templateAlreadyExists(), and ElementsPanelWidget::updateButtons().
QETProject * TitleBlockTemplateLocation::parentProject | ( | ) | const |
This is a convenience method equivalent to parentCollection() -> parentProject().
Definition at line 112 of file templatelocation.cpp.
References collection_.
Referenced by DiagramView::handleTitleBlockDrop(), DiagramView::mustIntegrateTitleBlockTemplate(), GenericPanel::updateTemplateItem(), and QETProject::usesTitleBlockTemplate().
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().
void TitleBlockTemplateLocation::setName | ( | const QString & | name | ) |
name | The new name of this template. |
Definition at line 76 of file templatelocation.cpp.
Referenced by QETTitleBlockTemplateEditor::edit().
void TitleBlockTemplateLocation::setParentCollection | ( | TitleBlockTemplatesCollection * | collection | ) |
project | The 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().
QString TitleBlockTemplateLocation::toString | ( | ) | const |
Definition at line 104 of file templatelocation.cpp.
References name_, and protocol().
Referenced by IntegrationMoveTitleBlockTemplatesHandler::errorWithATemplate(), QETTitleBlockTemplateEditor::isEditing(), qHash(), ElementsPanel::startTitleBlockTemplateDrag(), and GenericPanel::updateTemplateItem().
|
private |
Collection the template belongs to.
Definition at line 57 of file templatelocation.h.
Referenced by fromString(), getTemplate(), getTemplateXmlDescription(), isReadOnly(), operator==(), parentCollection(), parentProject(), protocol(), and setParentCollection().
|
static |
Id of the corresponding Qt meta type.
Definition at line 61 of file templatelocation.h.
|
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().