mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
replace 4 spaces by a tab
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
/*
|
||||
Copyright 2006-2020 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
QElectroTech is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
Copyright 2006-2020 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
QElectroTech is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef TITLEBLOCK_PROPERTIES_H
|
||||
#define TITLEBLOCK_PROPERTIES_H
|
||||
@@ -24,54 +24,54 @@
|
||||
#include "propertiesinterface.h"
|
||||
|
||||
/**
|
||||
This class provides a container for the properties of a particular title
|
||||
block, i.e. title, author, date, filename, folio, template, custom
|
||||
properties, ...
|
||||
This class provides a container for the properties of a particular title
|
||||
block, i.e. title, author, date, filename, folio, template, custom
|
||||
properties, ...
|
||||
*/
|
||||
class TitleBlockProperties: public PropertiesInterface {
|
||||
public:
|
||||
TitleBlockProperties();
|
||||
virtual ~TitleBlockProperties();
|
||||
/// Lists the various ways to handle the date
|
||||
enum DateManagement {
|
||||
UseDateValue, ///< use the date attribute
|
||||
CurrentDate ///< use the current date
|
||||
};
|
||||
|
||||
bool operator==(const TitleBlockProperties &);
|
||||
bool operator!=(const TitleBlockProperties &);
|
||||
|
||||
QDomElement toXml(QDomDocument &e) const override;
|
||||
void toXml(QDomElement &e) const;
|
||||
bool fromXml(const QDomElement &) override;
|
||||
void toSettings(QSettings &, const QString & = QString()) const override;
|
||||
void fromSettings(const QSettings &, const QString & = QString()) override;
|
||||
public:
|
||||
TitleBlockProperties();
|
||||
virtual ~TitleBlockProperties();
|
||||
/// Lists the various ways to handle the date
|
||||
enum DateManagement {
|
||||
UseDateValue, ///< use the date attribute
|
||||
CurrentDate ///< use the current date
|
||||
};
|
||||
|
||||
bool operator==(const TitleBlockProperties &);
|
||||
bool operator!=(const TitleBlockProperties &);
|
||||
|
||||
QDomElement toXml(QDomDocument &e) const override;
|
||||
void toXml(QDomElement &e) const;
|
||||
bool fromXml(const QDomElement &) override;
|
||||
void toSettings(QSettings &, const QString & = QString()) const override;
|
||||
void fromSettings(const QSettings &, const QString & = QString()) override;
|
||||
|
||||
void setAutoPageNum(QString autonum) {auto_page_num = autonum;}
|
||||
void setAutoPageNum(QString autonum) {auto_page_num = autonum;}
|
||||
|
||||
static TitleBlockProperties defaultProperties();
|
||||
|
||||
QDate finalDate() const ;
|
||||
|
||||
// attributes
|
||||
QString title; ///< Folio title (displayed by the default template)
|
||||
QString author; ///< Author of the diagram/folio (displayed by the default template)
|
||||
QDate date; ///< Date (displayed by the default template)
|
||||
QString filename; ///< Filename (displayed by the default template)
|
||||
QString plant; ///< Plant (displayed by the default template)
|
||||
QString locmach; ///< Location(displayed by the default template)
|
||||
QString indexrev; ///< Revision Index (displayed by the default template)
|
||||
QString version; ///< Version (displayed by the default template)
|
||||
QString folio; ///< Folio information (displayed by the default template)
|
||||
QString auto_page_num;
|
||||
DateManagement useDate{UseDateValue}; ///< Wheter to use the date attribute
|
||||
QString template_name; ///< Name of the template used to render the title block - an empty string means "the default template provided by the application"
|
||||
DiagramContext context; ///< Container for the additional, user-defined fields
|
||||
Qt::Edge display_at{Qt::Edge::BottomEdge}; ///< Edge to display the titleblock
|
||||
QET::QetCollection collection{QET::QetCollection::Common}; ///<Specify the location of the title block
|
||||
static TitleBlockProperties defaultProperties();
|
||||
|
||||
QDate finalDate() const ;
|
||||
|
||||
// attributes
|
||||
QString title; ///< Folio title (displayed by the default template)
|
||||
QString author; ///< Author of the diagram/folio (displayed by the default template)
|
||||
QDate date; ///< Date (displayed by the default template)
|
||||
QString filename; ///< Filename (displayed by the default template)
|
||||
QString plant; ///< Plant (displayed by the default template)
|
||||
QString locmach; ///< Location(displayed by the default template)
|
||||
QString indexrev; ///< Revision Index (displayed by the default template)
|
||||
QString version; ///< Version (displayed by the default template)
|
||||
QString folio; ///< Folio information (displayed by the default template)
|
||||
QString auto_page_num;
|
||||
DateManagement useDate{UseDateValue}; ///< Wheter to use the date attribute
|
||||
QString template_name; ///< Name of the template used to render the title block - an empty string means "the default template provided by the application"
|
||||
DiagramContext context; ///< Container for the additional, user-defined fields
|
||||
Qt::Edge display_at{Qt::Edge::BottomEdge}; ///< Edge to display the titleblock
|
||||
QET::QetCollection collection{QET::QetCollection::Common}; ///<Specify the location of the title block
|
||||
|
||||
private:
|
||||
QString exportDate() const;
|
||||
void setDateFromString(const QString &);
|
||||
private:
|
||||
QString exportDate() const;
|
||||
void setDateFromString(const QString &);
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user