QElectroTech  0.70
titleblockproperties.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_PROPERTIES_H
19 #define TITLEBLOCK_PROPERTIES_H
20 #include <QtXml>
21 #include "diagramcontext.h"
22 #include "qet.h"
29  public:
31  virtual ~TitleBlockProperties();
36  };
37 
38  bool operator==(const TitleBlockProperties &);
39  bool operator!=(const TitleBlockProperties &);
40 
41  void toXml(QDomElement &) const;
42  void fromXml(const QDomElement &);
43  void toSettings(QSettings &, const QString & = QString()) const;
44  void fromSettings(QSettings &, const QString & = QString());
45 
47 
49 
50  QDate finalDate() const ;
51 
52  // attributes
53  QString title;
54  QString author;
55  QDate date;
56  QString filename;
57  QString plant;
58  QString locmach;
59  QString indexrev;
60  QString version;
61  QString folio;
62  QString auto_page_num;
63  QString location;
65  QString template_name;
67  Qt::Edge display_at;
69 
70  private:
71  QString exportDate() const;
72  void setDateFromString(const QString &);
73 };
74 #endif
QString locmach
Location(displayed by the default template)
QString plant
Plant (displayed by the default template)
Qt::Edge display_at
Edge to display the titleblock.
void setDateFromString(const QString &)
void toSettings(QSettings &, const QString &=QString()) const
TitleBlockProperties::toSettings Export the TitleBlockProperties into a QSettings.
void toXml(QDomElement &) const
void fromSettings(QSettings &, const QString &=QString())
QDate date
Date (displayed by the default template)
QetCollection
Enum used to specify the origin of a collection of thing (title block, element etc...)
Definition: qet.h:150
QString filename
Filename (displayed by the default template)
DateManagement
Lists the various ways to handle the date.
DiagramContext context
Container for the additional, user-defined fields.
void fromXml(const QDomElement &)
bool operator==(const TitleBlockProperties &)
QString version
Version (displayed by the default template)
DateManagement useDate
Wheter to use the date attribute.
bool operator!=(const TitleBlockProperties &)
QString author
Author of the diagram/folio (displayed by the default template)
QString indexrev
Revision Index (displayed by the default template)
void setAutoPageNum(QString autonum)
QET::QetCollection collection
Specify the location of the title block.
QString folio
Folio information (displayed by the default template)
QString title
Folio title (displayed by the default template)
static TitleBlockProperties defaultProperties()
TitleBlockProperties::defaultProperties Return the default properties stored in the setting file...
QString template_name
Name of the template used to render the title block - an empty string means "the default template pro...