QElectroTech  0.70
templatelocation.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 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(), TitleBlockTemplatesCollection * = nullptr);
34 
35  // static methods
36  public:
38 
39  // methods
40  public:
43  QString name() const;
44  void setName(const QString &);
45  bool isValid() const;
46  void fromString(const QString &);
47  QString toString() const;
48  QETProject *parentProject() const;
49  QString protocol() const;
50  QDomElement getTemplateXmlDescription() const;
52  bool isReadOnly() const;
53  bool operator==(const TitleBlockTemplateLocation &) const;
54 
55  // attributes
56  private:
58  QString name_;
59 
60  public:
61  static int MetaTypeId;
62 };
64 uint qHash(const TitleBlockTemplateLocation &);
65 #endif
TitleBlockTemplatesCollection * collection_
Collection the template belongs to.
void setName(const QString &)
QDomElement getTemplateXmlDescription() const
QString name_
Name of the template.
void fromString(const QString &)
TitleBlockTemplateLocation locationFromString(const QString &)
uint qHash(const TitleBlockTemplateLocation &)
QETProject * parentProject() const
void setParentCollection(TitleBlockTemplatesCollection *)
TitleBlockTemplatesCollection * parentCollection() const
Q_DECLARE_METATYPE(NamesList)
static int MetaTypeId
Id of the corresponding Qt meta type.
TitleBlockTemplate * getTemplate() const
bool operator==(const TitleBlockTemplateLocation &) const
TitleBlockTemplateLocation(const QString &=QString(), TitleBlockTemplatesCollection *=nullptr)