QElectroTech  0.8-dev
titleblockproperties.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_PROPERTIES_H
19 #define TITLEBLOCK_PROPERTIES_H
20 #include <QtXml>
21 #include "diagramcontext.h"
22 #include "qet.h"
23 
30  public:
32  virtual ~TitleBlockProperties();
37  };
38 
39  bool operator==(const TitleBlockProperties &);
40  bool operator!=(const TitleBlockProperties &);
41 
42  void toXml(QDomElement &) const;
43  void fromXml(const QDomElement &);
44  void toSettings(QSettings &, const QString & = QString()) const;
45  void fromSettings(QSettings &, const QString & = QString());
46 
48 
50 
51  QDate finalDate() const ;
52 
53  // attributes
54  QString title;
55  QString author;
56  QDate date;
57  QString filename;
58  QString plant;
59  QString locmach;
60  QString indexrev;
61  QString version;
62  QString folio;
63  QString auto_page_num;
65  QString template_name;
67  Qt::Edge display_at;
69 
70  private:
71  QString exportDate() const;
72  void setDateFromString(const QString &);
73 };
74 #endif
DiagramContext::keys
QList< QString > keys(KeyOrder=None) const
Definition: diagramcontext.cpp:49
TitleBlockProperties::setDateFromString
void setDateFromString(const QString &)
Definition: titleblockproperties.cpp:226
DiagramContext::fromXml
void fromXml(const QDomElement &, const QString &="property")
Definition: diagramcontext.cpp:157
TitleBlockProperties::operator!=
bool operator!=(const TitleBlockProperties &)
Definition: titleblockproperties.cpp:67
DiagramContext::fromSettings
void fromSettings(QSettings &, const QString &)
Definition: diagramcontext.cpp:201
titleblockproperties.h
TitleBlockProperties::collection
QET::QetCollection collection
Specify the location of the title block.
Definition: titleblockproperties.h:68
QET::QetCollection
QetCollection
Enum used to specify the origin of a collection of thing (title block, element etc....
Definition: qet.h:152
TitleBlockProperties::DateManagement
DateManagement
Lists the various ways to handle the date.
Definition: titleblockproperties.h:34
TitleBlockProperties::auto_page_num
QString auto_page_num
Definition: titleblockproperties.h:63
TitleBlockProperties::fromXml
void fromXml(const QDomElement &)
Definition: titleblockproperties.cpp:105
TitleBlockProperties::TitleBlockProperties
TitleBlockProperties()
Definition: titleblockproperties.cpp:26
TitleBlockProperties::date
QDate date
Date (displayed by the default template)
Definition: titleblockproperties.h:56
QET::findInDomElement
QList< QDomElement > findInDomElement(const QDomElement &, const QString &)
Definition: qet.cpp:333
TitleBlockProperties::fromSettings
void fromSettings(QSettings &, const QString &=QString())
Definition: titleblockproperties.cpp:161
qetapp.h
TitleBlockProperties::context
DiagramContext context
Container for the additional, user-defined fields.
Definition: titleblockproperties.h:66
TitleBlockProperties::~TitleBlockProperties
virtual ~TitleBlockProperties()
Definition: titleblockproperties.cpp:37
TitleBlockProperties::title
QString title
Folio title (displayed by the default template)
Definition: titleblockproperties.h:54
qet.h
TitleBlockProperties
Definition: titleblockproperties.h:29
TitleBlockProperties::toXml
void toXml(QDomElement &) const
Definition: titleblockproperties.cpp:76
TitleBlockProperties::operator==
bool operator==(const TitleBlockProperties &)
Definition: titleblockproperties.cpp:44
TitleBlockProperties::locmach
QString locmach
Location(displayed by the default template)
Definition: titleblockproperties.h:59
QET::qetCollectionToString
QString qetCollectionToString(const QetCollection &c)
QET::qetCollectionToString.
Definition: qet.cpp:637
TitleBlockProperties::version
QString version
Version (displayed by the default template)
Definition: titleblockproperties.h:61
TitleBlockProperties::plant
QString plant
Plant (displayed by the default template)
Definition: titleblockproperties.h:58
TitleBlockProperties::defaultProperties
static TitleBlockProperties defaultProperties()
TitleBlockProperties::defaultProperties Return the default properties stored in the setting file.
Definition: titleblockproperties.cpp:182
TitleBlockProperties::exportDate
QString exportDate() const
Definition: titleblockproperties.cpp:210
TitleBlockProperties::finalDate
QDate finalDate() const
Definition: titleblockproperties.cpp:195
TitleBlockProperties::filename
QString filename
Filename (displayed by the default template)
Definition: titleblockproperties.h:57
QET::qetCollectionFromString
QetCollection qetCollectionFromString(const QString &str)
QET::qetCollectionFromString.
Definition: qet.cpp:658
TitleBlockProperties::display_at
Qt::Edge display_at
Edge to display the titleblock.
Definition: titleblockproperties.h:67
TitleBlockProperties::author
QString author
Author of the diagram/folio (displayed by the default template)
Definition: titleblockproperties.h:55
DiagramContext::toXml
void toXml(QDomElement &, const QString &="property") const
Definition: diagramcontext.cpp:142
DiagramContext::toSettings
void toSettings(QSettings &, const QString &) const
Definition: diagramcontext.cpp:185
TitleBlockProperties::useDate
DateManagement useDate
Wheter to use the date attribute.
Definition: titleblockproperties.h:64
DiagramContext::clear
void clear()
Definition: diagramcontext.cpp:107
diagramcontext.h
TitleBlockProperties::template_name
QString template_name
Name of the template used to render the title block - an empty string means "the default template pro...
Definition: titleblockproperties.h:65
TitleBlockProperties::toSettings
void toSettings(QSettings &, const QString &=QString()) const
TitleBlockProperties::toSettings Export the TitleBlockProperties into a QSettings.
Definition: titleblockproperties.cpp:139
TitleBlockProperties::setAutoPageNum
void setAutoPageNum(QString autonum)
Definition: titleblockproperties.h:47
TitleBlockProperties::indexrev
QString indexrev
Revision Index (displayed by the default template)
Definition: titleblockproperties.h:60
autonum
Definition: assignvariables.cpp:30
QET::Common
@ Common
From common collection.
Definition: qet.h:153
QET
Definition: qet.h:30
TitleBlockProperties::folio
QString folio
Folio information (displayed by the default template)
Definition: titleblockproperties.h:62
DiagramContext
Definition: diagramcontext.h:56
TitleBlockProperties::UseDateValue
@ UseDateValue
use the date attribute
Definition: titleblockproperties.h:35
TitleBlockProperties::CurrentDate
@ CurrentDate
use the current date
Definition: titleblockproperties.h:36