QElectroTech  0.8-dev
templatelocation.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef TITLEBLOCK_SLASH_TEMPLATE_LOCATION_H
19 #define TITLEBLOCK_SLASH_TEMPLATE_LOCATION_H
20 #include <QtCore>
21 #include <QDomElement>
22 class QETProject;
23 class TitleBlockTemplate;
25 
30  // constructor, destructor
31  public:
32  TitleBlockTemplateLocation(const QString & = QString(),
33  TitleBlockTemplatesCollection * = nullptr);
35 
36  // static methods
37  public:
39 
40  // methods
41  public:
44  QString name() const;
45  void setName(const QString &);
46  bool isValid() const;
47  void fromString(const QString &);
48  QString toString() const;
49  QETProject *parentProject() const;
50  QString protocol() const;
51  QDomElement getTemplateXmlDescription() const;
53  bool isReadOnly() const;
54  bool operator==(const TitleBlockTemplateLocation &) const;
55 
56  // attributes
57  private:
60  QString name_;
61 
62  public:
63  static int MetaTypeId;
64 };
66 uint qHash(const TitleBlockTemplateLocation &);
67 #endif
qHash
uint qHash(const TitleBlockTemplateLocation &)
Definition: templatelocation.cpp:174
TitleBlockTemplateLocation::getTemplateXmlDescription
QDomElement getTemplateXmlDescription() const
Definition: templatelocation.cpp:138
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(NamesList)
TitleBlockTemplateLocation::TitleBlockTemplateLocation
TitleBlockTemplateLocation(const QString &=QString(), TitleBlockTemplatesCollection *=nullptr)
Definition: templatelocation.cpp:30
TitleBlockTemplateLocation::setName
void setName(const QString &)
Definition: templatelocation.cpp:80
TitleBlockTemplateLocation::setParentCollection
void setParentCollection(TitleBlockTemplatesCollection *)
TitleBlockTemplateLocation::setParentCollection.
Definition: templatelocation.cpp:65
qetapp.h
TitleBlockTemplateLocation::MetaTypeId
static int MetaTypeId
Id of the corresponding Qt meta type.
Definition: templatelocation.h:63
TitleBlockTemplate
The TitleBlockTemplate class This class represents an title block template for an electric diagram....
Definition: titleblocktemplate.h:36
TitleBlockTemplateLocation::parentProject
QETProject * parentProject() const
Definition: templatelocation.cpp:116
TitleBlockTemplateLocation::isReadOnly
bool isReadOnly() const
Definition: templatelocation.cpp:156
TitleBlockTemplateLocation::isValid
bool isValid() const
Definition: templatelocation.cpp:87
TitleBlockTemplateLocation
Definition: templatelocation.h:29
TitleBlockTemplateLocation::toString
QString toString() const
Definition: templatelocation.cpp:108
templatescollection.h
TitleBlockTemplateLocation::operator==
bool operator==(const TitleBlockTemplateLocation &) const
Definition: templatelocation.cpp:165
TitleBlockTemplateLocation::collection_
TitleBlockTemplatesCollection * collection_
Collection the template belongs to.
Definition: templatelocation.h:59
TitleBlockTemplateLocation::locationFromString
TitleBlockTemplateLocation locationFromString(const QString &)
Definition: templatelocation.cpp:47
QETProject
Definition: qetproject.h:51
TitleBlockTemplateLocation::parentCollection
TitleBlockTemplatesCollection * parentCollection() const
Definition: templatelocation.cpp:57
TitleBlockTemplateLocation::fromString
void fromString(const QString &)
Definition: templatelocation.cpp:94
TitleBlockTemplateLocation::getTemplate
TitleBlockTemplate * getTemplate() const
Definition: templatelocation.cpp:147
TitleBlockTemplatesCollection
Definition: templatescollection.h:34
qHash
uint qHash(const TitleBlockTemplateLocation &location)
Definition: templatelocation.cpp:174
templatelocation.h
TitleBlockTemplateLocation::~TitleBlockTemplateLocation
virtual ~TitleBlockTemplateLocation()
Definition: templatelocation.cpp:41
TitleBlockTemplateLocation::protocol
QString protocol() const
Definition: templatelocation.cpp:127
TitleBlockTemplateLocation::name_
QString name_
Name of the template.
Definition: templatelocation.h:60
TitleBlockTemplateLocation::name
QString name() const
Definition: templatelocation.cpp:73
QETApp::titleBlockTemplatesCollection
static TitleBlockTemplatesCollection * titleBlockTemplatesCollection(const QString &)
QETApp::titleBlockTemplatesCollection.
Definition: qetapp.cpp:579