QElectroTech  0.70
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | List of all members
TitleBlockProperties Class Reference

#include <titleblockproperties.h>

Public Types

enum  DateManagement { UseDateValue, CurrentDate }
 Lists the various ways to handle the date. More...
 

Public Member Functions

 TitleBlockProperties ()
 
virtual ~TitleBlockProperties ()
 
bool operator== (const TitleBlockProperties &)
 
bool operator!= (const TitleBlockProperties &)
 
void toXml (QDomElement &) const
 
void fromXml (const QDomElement &)
 
void toSettings (QSettings &, const QString &=QString()) const
 TitleBlockProperties::toSettings Export the TitleBlockProperties into a QSettings. More...
 
void fromSettings (QSettings &, const QString &=QString())
 
void setAutoPageNum (QString autonum)
 
QDate finalDate () const
 

Static Public Member Functions

static TitleBlockProperties defaultProperties ()
 TitleBlockProperties::defaultProperties Return the default properties stored in the setting file. More...
 

Public Attributes

QString title
 Folio title (displayed by the default template) More...
 
QString author
 Author of the diagram/folio (displayed by the default template) More...
 
QDate date
 Date (displayed by the default template) More...
 
QString filename
 Filename (displayed by the default template) More...
 
QString plant
 Plant (displayed by the default template) More...
 
QString locmach
 Location(displayed by the default template) More...
 
QString indexrev
 Revision Index (displayed by the default template) More...
 
QString version
 Version (displayed by the default template) More...
 
QString folio
 Folio information (displayed by the default template) More...
 
QString auto_page_num
 
QString location
 
DateManagement useDate
 Wheter to use the date attribute. More...
 
QString template_name
 Name of the template used to render the title block - an empty string means "the default template provided by the application". More...
 
DiagramContext context
 Container for the additional, user-defined fields. More...
 
Qt::Edge display_at
 Edge to display the titleblock. More...
 
QET::QetCollection collection
 Specify the location of the title block. More...
 

Private Member Functions

QString exportDate () const
 
void setDateFromString (const QString &)
 

Detailed Description

This class provides a container for the properties of a particular title block, i.e. title, author, date, filename, folio, template, custom properties, ...

Definition at line 28 of file titleblockproperties.h.

Member Enumeration Documentation

◆ DateManagement

Lists the various ways to handle the date.

Enumerator
UseDateValue 

use the date attribute

CurrentDate 

use the current date

Definition at line 33 of file titleblockproperties.h.

Constructor & Destructor Documentation

◆ TitleBlockProperties()

TitleBlockProperties::TitleBlockProperties ( )

Constructeur. Initialise un objet TitleBlockProperties avec tous les champs vides (date vide + useDate a UseDateValue).

Definition at line 26 of file titleblockproperties.cpp.

◆ ~TitleBlockProperties()

TitleBlockProperties::~TitleBlockProperties ( )
virtual

Destructeur

Definition at line 37 of file titleblockproperties.cpp.

Member Function Documentation

◆ defaultProperties()

TitleBlockProperties TitleBlockProperties::defaultProperties ( )
static

TitleBlockProperties::defaultProperties Return the default properties stored in the setting file.

Definition at line 182 of file titleblockproperties.cpp.

References fromSettings().

Referenced by NewDiagramPage::NewDiagramPage(), QETDiagramEditor::newProject(), and QETProject::readDefaultPropertiesXml().

◆ exportDate()

QString TitleBlockProperties::exportDate ( ) const
private
Returns
une chaine de caracteres decrivant comment gerer la date dans le cartouche : la chaine peut valoir : null pour ne pas afficher de date now pour afficher la date courante (a la creation du schema) une date au format yyyyMMdd pour utiliser une date fixe

Definition at line 210 of file titleblockproperties.cpp.

References date, useDate, and UseDateValue.

Referenced by toSettings(), and toXml().

◆ finalDate()

QDate TitleBlockProperties::finalDate ( ) const
Returns
La date a utiliser

Definition at line 195 of file titleblockproperties.cpp.

References date, useDate, and UseDateValue.

◆ fromSettings()

void TitleBlockProperties::fromSettings ( QSettings &  settings,
const QString &  prefix = QString() 
)

Importe le cartouche depuis une configuration.

Parameters
settingsParametres a lire
prefixprefixe a ajouter devant les noms des parametres

Definition at line 161 of file titleblockproperties.cpp.

References author, auto_page_num, collection, context, display_at, filename, folio, DiagramContext::fromSettings(), indexrev, locmach, plant, QET::qetCollectionFromString(), setDateFromString(), template_name, title, and version.

Referenced by defaultProperties().

◆ fromXml()

void TitleBlockProperties::fromXml ( const QDomElement &  e)

◆ operator!=()

bool TitleBlockProperties::operator!= ( const TitleBlockProperties ip)
Parameters
ipautre conteneur TitleBlockProperties
Returns
false si ip et ce conteneur sont identiques, true sinon

Definition at line 67 of file titleblockproperties.cpp.

◆ operator==()

bool TitleBlockProperties::operator== ( const TitleBlockProperties ip)
Parameters
ipautre conteneur TitleBlockProperties
Returns
true si ip et ce conteneur sont identiques, false sinon

Definition at line 44 of file titleblockproperties.cpp.

References author, auto_page_num, collection, context, date, display_at, filename, folio, indexrev, locmach, plant, template_name, title, and version.

◆ setAutoPageNum()

void TitleBlockProperties::setAutoPageNum ( QString  autonum)
inline

Definition at line 46 of file titleblockproperties.h.

References auto_page_num.

Referenced by AutoNumberingDockWidget::on_m_folio_cb_activated().

◆ setDateFromString()

void TitleBlockProperties::setDateFromString ( const QString &  date_string)
private

Charge les attributs date et useDate a partir d'une chaine de caracteres.

Parameters
date_stringChaine de caracteres a analyser
See also
exportDate

Definition at line 226 of file titleblockproperties.cpp.

References CurrentDate, date, useDate, and UseDateValue.

Referenced by fromSettings(), and fromXml().

◆ toSettings()

void TitleBlockProperties::toSettings ( QSettings &  settings,
const QString &  prefix = QString() 
) const

TitleBlockProperties::toSettings Export the TitleBlockProperties into a QSettings.

Parameters
settings: setting to use
prefix: name to use as prefix for this property

Definition at line 139 of file titleblockproperties.cpp.

References author, auto_page_num, collection, context, display_at, exportDate(), filename, folio, indexrev, locmach, plant, QET::qetCollectionToString(), template_name, title, DiagramContext::toSettings(), and version.

◆ toXml()

void TitleBlockProperties::toXml ( QDomElement &  e) const

Exporte le cartouche sous formes d'attributs XML ajoutes a l'element e.

Parameters
eElement XML auquel seront ajoutes des attributs

Definition at line 76 of file titleblockproperties.cpp.

References author, auto_page_num, collection, context, display_at, exportDate(), filename, folio, indexrev, DiagramContext::keys(), locmach, plant, QET::qetCollectionToString(), template_name, title, DiagramContext::toXml(), and version.

Referenced by BorderTitleBlock::titleBlockToXml(), and QETProject::writeDefaultPropertiesXml().

Member Data Documentation

◆ author

QString TitleBlockProperties::author

◆ auto_page_num

QString TitleBlockProperties::auto_page_num

◆ collection

QET::QetCollection TitleBlockProperties::collection

◆ context

DiagramContext TitleBlockProperties::context

◆ date

QDate TitleBlockProperties::date

◆ display_at

Qt::Edge TitleBlockProperties::display_at

◆ filename

QString TitleBlockProperties::filename

◆ folio

QString TitleBlockProperties::folio

◆ indexrev

QString TitleBlockProperties::indexrev

◆ location

QString TitleBlockProperties::location

Definition at line 63 of file titleblockproperties.h.

◆ locmach

QString TitleBlockProperties::locmach

◆ plant

QString TitleBlockProperties::plant

◆ template_name

QString TitleBlockProperties::template_name

◆ title

QString TitleBlockProperties::title

◆ useDate

DateManagement TitleBlockProperties::useDate

◆ version

QString TitleBlockProperties::version

Version (displayed by the default template)

Definition at line 60 of file titleblockproperties.h.

Referenced by BorderTitleBlock::exportTitleBlock(), fromSettings(), fromXml(), operator==(), toSettings(), and toXml().


The documentation for this class was generated from the following files: