QElectroTech 0.100.0-dev
|
The BorderTitleBlock class This class represents the border and the titleblock which frame a particular electric diagram. More...
#include <bordertitleblock.h>
Inherits QObject.
Public Slots | |
void | titleBlockTemplateChanged (const QString &) |
BorderTitleBlock::titleBlockTemplateChanged This slot may be used to inform this class that the given title block template has changed. The title block-dedicated rendering cache will thus be flushed. | |
void | titleBlockTemplateRemoved (const QString &, const TitleBlockTemplate *=nullptr) |
BorderTitleBlock::titleBlockTemplateRemoved This slot has to be used to inform this class that the given title block template is about to be removed and is no longer accessible. This class will either use the provided optional TitleBlockTemplate or the default title block provided by QETApp::defaultTitleBlockTemplate() | |
void | displayTitleBlock (bool) |
BorderTitleBlock::displayTitleBlock. | |
void | displayColumns (bool) |
BorderTitleBlock::displayColumns. | |
void | displayRows (bool) |
BorderTitleBlock::displayRows. | |
void | displayBorder (bool) |
BorderTitleBlock::displayBorder. | |
Signals | |
void | borderChanged (QRectF old_border, QRectF new_border) |
borderChanged Signal emitted after the border has changed | |
void | displayChanged () |
displayChanged Signal emitted after display options have changed | |
void | titleBlockFolioChanged (const QString &) |
titleBlockFolioChanged Signal emitted after Folio has changed | |
void | needFolioData () |
needFolioData Signal emitted when the title block requires its data to be updated in order to generate the folio field. | |
void | needTitleBlockTemplate (const QString &) |
needTitleBlockTemplate Signal emitted when this object needs to set a specific title block template. This object cannot handle the job since it does not know of its parent project. | |
void | informationChanged () |
infoChanged Signal emitted when the informations changed. | |
Public Member Functions | |
BorderTitleBlock (QObject *=nullptr) | |
BorderTitleBlock::BorderTitleBlock Simple constructor: build a border by recovering the dimensions in the application configuration. | |
~BorderTitleBlock () override | |
BorderTitleBlock::~BorderTitleBlock. | |
void | draw (QPainter *painter) |
BorderTitleBlock::draw Draw the border and the titleblock. | |
void | drawDxf (QString &, int) |
BorderTitleBlock::drawDxf. | |
int | columnsCount () const |
qreal | columnsWidth () const |
qreal | columnsTotalWidth () const |
qreal | columnsHeaderHeight () const |
int | rowsCount () const |
qreal | rowsHeight () const |
qreal | rowsTotalHeight () const |
qreal | rowsHeaderWidth () const |
qreal | diagramWidth () const |
diagramWidth | |
qreal | diagramHeight () const |
diagramHeight | |
QRectF | titleBlockRect () const |
BorderTitleBlock::titleBlockRect. | |
DiagramContext | titleblockInformation () const |
BorderTitleBlock::titleblockInformation. | |
QRectF | borderAndTitleBlockRect () const |
BorderTitleBlock::borderAndTitleBlockRect. | |
QRectF | columnsRect () const |
BorderTitleBlock::columnsRect. | |
QRectF | rowsRect () const |
BorderTitleBlock::rowsRect. | |
QRectF | outsideBorderRect () const |
BorderTitleBlock::outsideBorderRect. | |
QRectF | insideBorderRect () const |
BorderTitleBlock::insideBorderRect. | |
QString | author () const |
QDate | date () const |
QString | title () const |
QString | folio () const |
QString | finalfolio () const |
QString | plant () const |
QString | locmach () const |
QString | indexrev () const |
QString | fileName () const |
QString | version () const |
DiagramContext | additionalFields () const |
QString | autoPageNum () const |
int | folioTotal () const |
bool | titleBlockIsDisplayed () const |
bool | columnsAreDisplayed () const |
bool | rowsAreDisplayed () const |
bool | borderIsDisplayed () const |
void | setColumnsCount (int) |
BorderTitleBlock::setColumnsCount Allows you to change the number of columns. If this number of columns is less than the minimum required, it is this minimum which is used. | |
void | setRowsCount (int) |
BorderTitleBlock::setRowsCount Allows you to change the number of lines. If this number of lines is lower than the minimum required, this function does nothing. | |
void | setColumnsWidth (const qreal &) |
BorderTitleBlock::setColumnsWidth Change the width of the columns. If the width indicated is less than the minimum required, it is this minimum which is used. | |
void | setRowsHeight (const qreal &) |
BorderTitleBlock::setRowsHeight Change the height of the lines. If the indicated height is lower than the minimum required, it is this minimum which is used. | |
void | setColumnsHeaderHeight (const qreal &) |
BorderTitleBlock::setColumnsHeaderHeight Change the height of the headers containing the column numbers. This must remain between 5 and 50 px. | |
void | setRowsHeaderWidth (const qreal &) |
BorderTitleBlock::setRowsHeaderWidth Change the width of the headers containing the line numbers. This must remain between 5 and 50 px. | |
void | setDiagramHeight (const qreal &) |
BorderTitleBlock::setDiagramHeight This method tries to get as close as possible to the given height as a parameter by modifying the number of rows in progress. | |
DiagramPosition | convertPosition (const QPointF &) |
BorderTitleBlock::convertPosition Convert a Point in cartesian coordinate (x : 12.5, 56.9) to a point in grid coordinate (ex : B2) | |
void | setFolio (const QString &folio) |
BorderTitleBlock::setFolio. | |
void | setFolioData (int, int, const QString &=nullptr, const DiagramContext &=DiagramContext()) |
BorderTitleBlock::setFolioData. | |
void | setPreviousFolioNum (const QString &previous) |
BorderTitleBlock::setPreviousFolioNum. | |
void | setNextFolioNum (const QString &next) |
BorderTitleBlock::setNextFolioNum. | |
void | titleBlockToXml (QDomElement &) |
BorderTitleBlock::titleBlockToXml Exports the title block current values to XML. | |
void | titleBlockFromXml (const QDomElement &) |
BorderTitleBlock::titleBlockFromXml Reads the title block values from XML. | |
void | borderToXml (QDomElement &) |
BorderTitleBlock::borderToXml Exports the border current settings to XML. | |
void | borderFromXml (const QDomElement &) |
BorderTitleBlock::borderFromXml Reads the border settings from XML. | |
TitleBlockProperties | exportTitleBlock () |
BorderTitleBlock::exportTitleBlock. | |
void | importTitleBlock (const TitleBlockProperties &) |
BorderTitleBlock::importTitleBlock. | |
BorderProperties | exportBorder () |
BorderTitleBlock::exportBorder. | |
void | importBorder (const BorderProperties &) |
BorderTitleBlock::importBorder. | |
const TitleBlockTemplate * | titleBlockTemplate () |
BorderTitleBlock::titleBlockTemplate. | |
void | setTitleBlockTemplate (const TitleBlockTemplate *) |
BorderTitleBlock::setTitleBlockTemplate. | |
QString | titleBlockTemplateName () const |
BorderTitleBlock::titleBlockTemplateName. | |
Private Member Functions | |
BorderTitleBlock (const BorderTitleBlock &) | |
QRectF | titleBlockRectForQPainter () const |
BorderTitleBlock::titleBlockRectForQPainter. | |
void | updateRectangles () |
BorderTitleBlock::updateRectangles This method update the diagram rect according to the value of rows and columns (number and size) | |
void | updateDiagramContextForTitleBlock (const DiagramContext &=DiagramContext()) |
BorderTitleBlock::updateDiagramContextForTitleBlock Update the informations given to the titleblock template by regenerating a DiagramContext object. | |
QString | incrementLetters (const QString &) |
BorderTitleBlock::incrementLetters increments string with Letters A to Z. | |
Private Attributes | |
QString | btb_author_ |
titleblock author | |
QDate | btb_date_ |
titleblock date | |
QString | btb_title_ |
titleblock title | |
QString | btb_folio_ |
titleblock folio | |
QString | btb_plant_ |
titleblock plant | |
QString | btb_locmach_ |
titleblock locmach | |
QString | btb_indexrev_ |
titleblock index rev | |
QString | btb_final_folio_ |
titleblock final folio | |
QString | btb_auto_page_num_ |
titleblock auto page num | |
int | folio_index_ |
titleblock index | |
int | folio_total_ |
titleblock total | |
QString | btb_filename_ |
titleblock filename | |
QString | btb_version_ |
DiagramContext | additional_fields_ |
titleblock additional fields | |
Qt::Edge | m_edge |
titleblock edge | |
QString | m_next_folio_num |
titleblock next folio num | |
QString | m_previous_folio_num |
titleblock previous folio num | |
int | columns_count_ |
columns count | |
qreal | columns_width_ |
columns width | |
qreal | columns_header_height_ |
columns header height | |
int | rows_count_ |
rows count | |
qreal | rows_height_ |
rows height | |
qreal | rows_header_width_ |
rows header width | |
qreal | titleblock_height_ |
QRectF | diagram_rect_ |
bool | display_titleblock_ |
bool | display_columns_ |
bool | display_rows_ |
bool | display_border_ |
TitleBlockTemplateRenderer * | m_titleblock_template_renderer |
The BorderTitleBlock class This class represents the border and the titleblock which frame a particular electric diagram.
BorderTitleBlock::BorderTitleBlock | ( | QObject * | parent = nullptr | ) |
BorderTitleBlock::BorderTitleBlock Simple constructor: build a border by recovering the dimensions in the application configuration.
parent | : |
|
override |
|
private |
|
inline |
|
inline |
|
inline |
QRectF BorderTitleBlock::borderAndTitleBlockRect | ( | ) | const |
BorderTitleBlock::borderAndTitleBlockRect.
|
signal |
borderChanged Signal emitted after the border has changed
old_border | Former border |
new_border | New border |
void BorderTitleBlock::borderFromXml | ( | const QDomElement & | xml_elmt | ) |
BorderTitleBlock::borderFromXml Reads the border settings from XML.
xml_elmt | the XML element values will be read from |
|
inline |
void BorderTitleBlock::borderToXml | ( | QDomElement & | xml_elmt | ) |
BorderTitleBlock::borderToXml Exports the border current settings to XML.
xml_elmt | the XML element attributes will be added to |
|
inline |
|
inline |
|
inline |
QRectF BorderTitleBlock::columnsRect | ( | ) | const |
BorderTitleBlock::columnsRect.
|
inline |
|
inline |
DiagramPosition BorderTitleBlock::convertPosition | ( | const QPointF & | pos | ) |
BorderTitleBlock::convertPosition Convert a Point in cartesian coordinate (x : 12.5, 56.9) to a point in grid coordinate (ex : B2)
pos | : position to convert |
|
inline |
|
inline |
diagramHeight
|
inline |
diagramWidth
|
slot |
BorderTitleBlock::displayBorder.
db | : true to display the border of the diagram, false otherwise |
|
signal |
displayChanged Signal emitted after display options have changed
|
slot |
BorderTitleBlock::displayColumns.
dc | : true to display the column headers, false otherwise |
|
slot |
BorderTitleBlock::displayRows.
dr | : true to display line headers, false otherwise |
|
slot |
BorderTitleBlock::displayTitleBlock.
di | : true to display the title block, false otherwise |
void BorderTitleBlock::draw | ( | QPainter * | painter | ) |
BorderTitleBlock::draw Draw the border and the titleblock.
painter | : QPainter to use for draw this. |
void BorderTitleBlock::drawDxf | ( | QString & | file_path, |
int | color | ||
) |
BorderProperties BorderTitleBlock::exportBorder | ( | ) |
BorderTitleBlock::exportBorder.
TitleBlockProperties BorderTitleBlock::exportTitleBlock | ( | ) |
BorderTitleBlock::exportTitleBlock.
|
inline |
|
inline |
|
inline |
|
inline |
void BorderTitleBlock::importBorder | ( | const BorderProperties & | bp | ) |
BorderTitleBlock::importBorder.
bp | : the new properties of the border |
void BorderTitleBlock::importTitleBlock | ( | const TitleBlockProperties & | ip | ) |
BorderTitleBlock::importTitleBlock.
ip | the new properties of titleblock |
|
private |
BorderTitleBlock::incrementLetters increments string with Letters A to Z.
string |
|
inline |
|
signal |
infoChanged Signal emitted when the informations changed.
QRectF BorderTitleBlock::insideBorderRect | ( | ) | const |
BorderTitleBlock::insideBorderRect.
|
inline |
|
signal |
needFolioData Signal emitted when the title block requires its data to be updated in order to generate the folio field.
|
signal |
needTitleBlockTemplate Signal emitted when this object needs to set a specific title block template. This object cannot handle the job since it does not know of its parent project.
QRectF BorderTitleBlock::outsideBorderRect | ( | ) | const |
BorderTitleBlock::outsideBorderRect.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
QRectF BorderTitleBlock::rowsRect | ( | ) | const |
|
inline |
void BorderTitleBlock::setColumnsCount | ( | int | nb_c | ) |
BorderTitleBlock::setColumnsCount Allows you to change the number of columns. If this number of columns is less than the minimum required, it is this minimum which is used.
nb_c | : new number of columns |
void BorderTitleBlock::setColumnsHeaderHeight | ( | const qreal & | new_chh | ) |
BorderTitleBlock::setColumnsHeaderHeight Change the height of the headers containing the column numbers. This must remain between 5 and 50 px.
new_chh | : new height of column headers |
void BorderTitleBlock::setColumnsWidth | ( | const qreal & | new_cw | ) |
BorderTitleBlock::setColumnsWidth Change the width of the columns. If the width indicated is less than the minimum required, it is this minimum which is used.
new_cw | : new column width |
void BorderTitleBlock::setDiagramHeight | ( | const qreal & | height | ) |
BorderTitleBlock::setDiagramHeight This method tries to get as close as possible to the given height as a parameter by modifying the number of rows in progress.
height | : |
void BorderTitleBlock::setFolio | ( | const QString & | folio | ) |
folio | the new value of the "Folio" field |
void BorderTitleBlock::setFolioData | ( | int | index, |
int | total, | ||
const QString & | autonum = nullptr , |
||
const DiagramContext & | project_properties = DiagramContext() |
||
) |
BorderTitleBlock::setFolioData.
index | : schema number (from 1 to total) |
total | : total number of diagrams in the project |
autonum | : |
project_properties | : Project-wide properties, to be merged with diagram-wide ones. |
void BorderTitleBlock::setNextFolioNum | ( | const QString & | next | ) |
BorderTitleBlock::setNextFolioNum.
next | the new value of the "next-folio-num" field |
void BorderTitleBlock::setPreviousFolioNum | ( | const QString & | previous | ) |
BorderTitleBlock::setPreviousFolioNum.
previous | the new value of the "previous-folio-num" field |
void BorderTitleBlock::setRowsCount | ( | int | nb_r | ) |
BorderTitleBlock::setRowsCount Allows you to change the number of lines. If this number of lines is lower than the minimum required, this function does nothing.
nb_r | : new number of lines |
void BorderTitleBlock::setRowsHeaderWidth | ( | const qreal & | new_rhw | ) |
BorderTitleBlock::setRowsHeaderWidth Change the width of the headers containing the line numbers. This must remain between 5 and 50 px.
new_rhw | : new width of line headers |
void BorderTitleBlock::setRowsHeight | ( | const qreal & | new_rh | ) |
BorderTitleBlock::setRowsHeight Change the height of the lines. If the indicated height is lower than the minimum required, it is this minimum which is used.
new_rh | : new row height |
void BorderTitleBlock::setTitleBlockTemplate | ( | const TitleBlockTemplate * | titleblock_template | ) |
BorderTitleBlock::setTitleBlockTemplate.
titleblock_template | The new titleblock template to use to render the titleblock |
|
inline |
|
signal |
titleBlockFolioChanged Signal emitted after Folio has changed
void BorderTitleBlock::titleBlockFromXml | ( | const QDomElement & | xml_elmt | ) |
BorderTitleBlock::titleBlockFromXml Reads the title block values from XML.
xml_elmt | the XML element values will be read from |
DiagramContext BorderTitleBlock::titleblockInformation | ( | ) | const |
BorderTitleBlock::titleblockInformation.
|
inline |
QRectF BorderTitleBlock::titleBlockRect | ( | ) | const |
BorderTitleBlock::titleBlockRect.
|
private |
BorderTitleBlock::titleBlockRectForQPainter.
const TitleBlockTemplate * BorderTitleBlock::titleBlockTemplate | ( | ) |
BorderTitleBlock::titleBlockTemplate.
|
slot |
BorderTitleBlock::titleBlockTemplateChanged This slot may be used to inform this class that the given title block template has changed. The title block-dedicated rendering cache will thus be flushed.
template_name | : Name of the title block template that has changed |
QString BorderTitleBlock::titleBlockTemplateName | ( | ) | const |
BorderTitleBlock::titleBlockTemplateName.
|
slot |
BorderTitleBlock::titleBlockTemplateRemoved This slot has to be used to inform this class that the given title block template is about to be removed and is no longer accessible. This class will either use the provided optional TitleBlockTemplate or the default title block provided by QETApp::defaultTitleBlockTemplate()
removed_template_name | : Name of the title block template that has changed |
new_template | (Optional) title block template to use instead |
void BorderTitleBlock::titleBlockToXml | ( | QDomElement & | xml_elmt | ) |
BorderTitleBlock::titleBlockToXml Exports the title block current values to XML.
xml_elmt | the XML element attributes will be added to |
|
private |
BorderTitleBlock::updateDiagramContextForTitleBlock Update the informations given to the titleblock template by regenerating a DiagramContext object.
initial_context | : Base diagram context that will be overridden by diagram-wide values |
|
private |
BorderTitleBlock::updateRectangles This method update the diagram rect according to the value of rows and columns (number and size)
|
inline |
|
private |
titleblock additional fields
|
private |
titleblock author
|
private |
titleblock auto page num
|
private |
titleblock date
|
private |
titleblock filename
|
private |
titleblock final folio
|
private |
titleblock folio
|
private |
titleblock index rev
|
private |
titleblock locmach
|
private |
titleblock plant
|
private |
titleblock title
|
private |
titleblock version
|
private |
columns count
|
private |
columns header height
|
private |
columns width
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
titleblock index
|
private |
titleblock total
|
private |
titleblock edge
|
private |
titleblock next folio num
|
private |
titleblock previous folio num
|
private |
|
private |
rows count
|
private |
rows header width
|
private |
rows height
|
private |