QElectroTech
0.8-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. More... | |
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() More... | |
void | displayTitleBlock (bool) |
BorderTitleBlock::displayTitleBlock. More... | |
void | displayColumns (bool) |
BorderTitleBlock::displayColumns. More... | |
void | displayRows (bool) |
BorderTitleBlock::displayRows. More... | |
void | displayBorder (bool) |
BorderTitleBlock::displayBorder. More... | |
void | slot_setAutoPageNum (QString) |
BorderTitleBlock::slot_setAutoPageNum. More... | |
Signals | |
void | borderChanged (QRectF old_border, QRectF new_border) |
borderChanged Signal emitted after the border has changed More... | |
void | displayChanged () |
displayChanged Signal emitted after display options have changed More... | |
void | diagramTitleChanged (const QString &) |
diagramTitleChanged Signal emitted after the title has changed More... | |
void | titleBlockFolioChanged (const QString &) |
titleBlockFolioChanged Signal emitted after Folio has changed More... | |
void | needFolioData () |
needFolioData Signal emitted when the title block requires its data to be updated in order to generate the folio field. More... | |
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. More... | |
Private Member Functions | |
BorderTitleBlock (const BorderTitleBlock &) | |
QRectF | titleBlockRectForQPainter () const |
BorderTitleBlock::titleBlockRectForQPainter. More... | |
void | updateRectangles () |
BorderTitleBlock::updateRectangles This method update the diagram rect according to the value of rows and columns (number and size) More... | |
void | updateDiagramContextForTitleBlock (const DiagramContext &=DiagramContext()) |
BorderTitleBlock::updateDiagramContextForTitleBlock Update the informations given to the titleblock template by regenerating a DiagramContext object. More... | |
QString | incrementLetters (const QString &) |
BorderTitleBlock::incrementLetters increments string with Letters A to Z. More... | |
Private Attributes | |
QString | btb_author_ |
titleblock author More... | |
QDate | btb_date_ |
titleblock date More... | |
QString | btb_title_ |
titleblock title More... | |
QString | btb_folio_ |
titleblock folio More... | |
QString | btb_plant_ |
titleblock plant More... | |
QString | btb_locmach_ |
titleblock locmach More... | |
QString | btb_indexrev_ |
titleblock index rev More... | |
QString | btb_final_folio_ |
titleblock final folio More... | |
QString | btb_auto_page_num_ |
titleblock auto page num More... | |
int | folio_index_ |
titleblock index More... | |
int | folio_total_ |
titleblock total More... | |
QString | btb_filename_ |
titleblock filename More... | |
QString | btb_version_ |
DiagramContext | additional_fields_ |
titleblock additional fields More... | |
Qt::Edge | m_edge |
titleblock edge More... | |
QString | m_next_folio_num |
titleblock next folio num More... | |
QString | m_previous_folio_num |
titleblock previous folio num More... | |
int | columns_count_ |
columns count More... | |
qreal | columns_width_ |
columns width More... | |
qreal | columns_header_height_ |
columns header height More... | |
int | rows_count_ |
rows count More... | |
qreal | rows_height_ |
rows height More... | |
qreal | rows_header_width_ |
rows header width More... | |
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
|
signal |
diagramTitleChanged Signal emitted after the title has changed
|
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 | ( | int | width, |
int | height, | ||
bool | keep_aspect_ratio, | ||
QString & | file_path, | ||
int | color | ||
) |
width | |
height | |
keep_aspect_ratio | |
file_path | |
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 |
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::setAuthor | ( | const QString & | author | ) |
author | the new value of the "Author" field |
void BorderTitleBlock::setAutoPageNum | ( | const QString & | auto_page_num | ) |
BorderTitleBlock::setAutoPageNum.
auto_page_num | the new value of the "auto_page_num" field |
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::setDate | ( | const QDate & | date | ) |
date | the new value of the "Date" field |
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::setFileName | ( | const QString & | filename | ) |
BorderTitleBlock::setFileName.
filename | the new value of the "filename" field |
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::setIndicerev | ( | const QString & | indexrev | ) |
BorderTitleBlock::setIndicerev.
indexrev | the new value of the "indexrev" field |
void BorderTitleBlock::setLocMach | ( | const QString & | locmach | ) |
locmach | the new value of the "locmach" field |
void BorderTitleBlock::setNextFolioNum | ( | const QString & | next | ) |
BorderTitleBlock::setNextFolioNum.
next | the new value of the "next-folio-num" field |
void BorderTitleBlock::setPlant | ( | const QString & | plant | ) |
plant | the new value of the "plant" 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::setTitle | ( | const QString & | title | ) |
title | the new value of the "Title" field |
void BorderTitleBlock::setTitleBlockTemplate | ( | const TitleBlockTemplate * | titleblock_template | ) |
BorderTitleBlock::setTitleBlockTemplate.
titleblock_template | The new titleblock template to use to render the titleblock |
void BorderTitleBlock::setVersion | ( | const QString & | version | ) |
version | the new value of the "version" field |
|
slot |
BorderTitleBlock::slot_setAutoPageNum.
pageAutoNum | : Set Page (Folio) Auto Num |
|
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 |