QElectroTech  0.8-dev
titleblocktemplate.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 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_TEMPLATE_H
19 #define TITLEBLOCK_TEMPLATE_H
20 #include <QtXml>
21 #include <QtSvg>
22 #include "diagramcontext.h"
23 #include "titleblockcell.h"
24 #include "dimension.h"
25 #include "qet.h"
26 
36 class TitleBlockTemplate : public QObject {
37  Q_OBJECT
38 
39  // constructors, destructor
40  public:
41  TitleBlockTemplate(QObject * = nullptr);
42  ~TitleBlockTemplate() override;
43  private:
45 
46  // methods
47  public:
48  TitleBlockCell *createCell(const TitleBlockCell * = nullptr);
49  static QFont fontForCell(const TitleBlockCell &);
50  bool loadFromXmlFile(const QString &);
51  bool loadFromXmlElement(const QDomElement &);
52  bool saveToXmlFile(const QString &);
53  bool saveToXmlElement(QDomElement &) const;
54  void exportCellToXml(TitleBlockCell *,QDomElement &) const;
55  TitleBlockTemplate *clone() const;
56  QString name() const;
57  QString information() const;
58  void setInformation(const QString &);
59  int rowDimension(int);
60  void setRowDimension(int, const TitleBlockDimension &);
62  void setColumnDimension(int, const TitleBlockDimension &);
63  int columnsCount() const;
64  int rowsCount() const;
65  QList<int> columnsWidth(int) const;
66  QList<int> rowsHeights() const;
69  int minimumWidth();
70  int maximumWidth();
71  int width(int);
72  int height() const;
73 
74  bool moveRow(int, int);
75  void addRow(int = -1);
76  bool insertRow(int, const QList<TitleBlockCell *> &, int = -1);
77  QList<TitleBlockCell *> takeRow(int);
78  QList<TitleBlockCell *> createRow();
79 
80  bool moveColumn(int, int);
81  void addColumn(int = -1);
82  bool insertColumn(const TitleBlockDimension &,
83  const QList<TitleBlockCell *> &, int = -1);
84  QList<TitleBlockCell *> takeColumn(int);
85  QList<TitleBlockCell *> createColumn();
86 
87  TitleBlockCell *cell(int, int) const;
88  QSet<TitleBlockCell *> spannedCells(const TitleBlockCell *,
89  bool = false) const;
90  QHash<TitleBlockCell *, QPair<int, int> > getAllSpans() const;
91  void setAllSpans(const QHash<TitleBlockCell *, QPair<int, int> > &);
92  bool addLogo(const QString &,
93  QByteArray *,
94  const QString & = "svg",
95  const QString & = "xml");
96  bool addLogoFromFile(const QString &, const QString & = QString());
97  bool saveLogoToFile(const QString &, const QString &);
98  bool removeLogo(const QString &);
99  bool renameLogo(const QString &, const QString &);
100  void setLogoStorage(const QString &, const QString &);
101  QList<QString> logos() const;
102  QString logoType(const QString &) const;
103  QSvgRenderer *vectorLogo(const QString &) const;
104  QPixmap bitmapLogo(const QString &) const;
105 
106  void render(QPainter &, const DiagramContext &, int) const;
107  void renderDxf(QRectF &,
108  const DiagramContext &,
109  int,
110  QString &,
111  int) const;
112  void renderCell(QPainter &,
113  const TitleBlockCell &,
114  const DiagramContext &,
115  const QRect &) const;
116  void applyCellSpans();
117  void forgetSpanning();
118  void forgetSpanning(TitleBlockCell *, bool = true);
121  void applyRowColNums();
122  void rowColsChanged();
123  QStringList listOfVariables();
124 
125  protected:
126  void loadInformation(const QDomElement &);
127  bool loadLogos(const QDomElement &, bool = false);
128  bool loadLogo(const QDomElement &);
129  bool loadGrid(const QDomElement &);
130  bool loadCells(const QDomElement &);
131  void loadCell(const QDomElement &);
132  void saveInformation(QDomElement &) const;
133  void saveLogos(QDomElement &) const;
134  void saveLogo(const QString &, QDomElement &) const;
135  void saveGrid(QDomElement &) const;
136  void saveCells(QDomElement &) const;
137  void saveCell(TitleBlockCell *, QDomElement &, bool = false) const;
138  QList<TitleBlockCell *> createCellsList(int);
139 
140  private:
141  void parseRows(const QString &);
142  void parseColumns(const QString &);
143  bool checkCell(const QDomElement &, TitleBlockCell ** = nullptr);
144  void flushCells();
145  void initCells();
146  int lengthRange(int, int, const QList<int> &) const;
147  QString finalTextForCell(const TitleBlockCell &,
148  const DiagramContext &) const;
149  QString interpreteVariables(const QString &,
150  const DiagramContext &) const;
151  void renderTextCell(QPainter &,
152  const QString &,
153  const TitleBlockCell &,
154  const QRectF &) const;
155  void renderTextCellDxf(QString &,
156  const QString &,
157  const TitleBlockCell &,
158  qreal,
159  qreal,
160  qreal,
161  qreal,
162  int) const;
163 
164  // attributes
165  private:
170  QString name_;
171  QString information_;
175  QHash<QString, QByteArray > data_logos_;
180  QHash<QString, QString> storage_logos_;
185  QHash<QString, QString> type_logos_;
189  QHash<QString, QSvgRenderer *> vector_logos_;
193  QHash<QString, QPixmap> bitmap_logos_;
194 
195  QList<int> rows_heights_;
196 
200  QList<TitleBlockDimension> columns_width_;
205  QList<TitleBlockCell *> registered_cells_;
206  QList< QList<TitleBlockCell *> > cells_;
207 };
208 #endif
TitleBlockTemplate::~TitleBlockTemplate
~TitleBlockTemplate() override
TitleBlockTemplate::~TitleBlockTemplate Destructor.
Definition: titleblocktemplate.cpp:40
TitleBlockTemplate::applyCellSpan
void applyCellSpan(TitleBlockCell *)
TitleBlockTemplate::applyCellSpan Ensure the spans of the provided cell are applied within the grid s...
Definition: titleblocktemplate.cpp:1983
TitleBlockTemplate::takeColumn
QList< TitleBlockCell * > takeColumn(int)
TitleBlockTemplate::takeColumn Removes the column at index i.
Definition: titleblocktemplate.cpp:1118
Createdxf::sheetHeight
static const double sheetHeight
Definition: createdxf.h:112
TitleBlockTemplate::type_logos_
QHash< QString, QString > type_logos_
type_logos_ : Logos types (e.g. "png", "jpeg", "svg")
Definition: titleblocktemplate.h:185
TitleBlockTemplate::rowsCount
int rowsCount() const
TitleBlockTemplate::rowsCount.
Definition: titleblocktemplate.cpp:814
DiagramContext::keys
QList< QString > keys(KeyOrder=None) const
Definition: diagramcontext.cpp:49
QET::RelativeToTotalLength
@ RelativeToTotalLength
the length is just a fraction of the total available length
Definition: qet.h:147
TitleBlockTemplate::height
int height() const
TitleBlockTemplate::height.
Definition: titleblocktemplate.cpp:983
TitleBlockTemplate::removeLogo
bool removeLogo(const QString &)
TitleBlockTemplate::removeLogo.
Definition: titleblocktemplate.cpp:1343
TitleBlockTemplate::TitleBlockTemplate
TitleBlockTemplate(const TitleBlockTemplate &)
Createdxf::yScale
static double yScale
Definition: createdxf.h:114
TitleBlockCell::hadjust
bool hadjust
Whether to reduce the font size if the text does not fit in the cell.
Definition: titleblockcell.h:75
TitleBlockTemplate::clone
TitleBlockTemplate * clone() const
TitleBlockTemplate::clone.
Definition: titleblocktemplate.cpp:190
nameslist.h
TitleBlockTemplate::applyCellSpans
void applyCellSpans()
TitleBlockTemplate::applyCellSpans Forget any previously applied span, then apply again all spans def...
Definition: titleblocktemplate.cpp:1905
TitleBlockDimension::value
int value
Numeric value.
Definition: dimension.h:34
TitleBlockTemplate::loadLogos
bool loadLogos(const QDomElement &, bool=false)
TitleBlockTemplate::loadLogos Import the logos from a given XML titleblock template.
Definition: titleblocktemplate.cpp:273
TitleBlockTemplate::renderDxf
void renderDxf(QRectF &, const DiagramContext &, int, QString &, int) const
TitleBlockTemplate::renderDxf Render the titleblock in DXF.
Definition: titleblocktemplate.cpp:1523
NamesList::isEmpty
bool isEmpty() const
Definition: nameslist.cpp:73
TitleBlockDimension::type
QET::TitleBlockColumnLength type
Kind of length.
Definition: dimension.h:33
TitleBlockTemplate::name
QString name() const
TitleBlockTemplate::name.
Definition: titleblocktemplate.cpp:727
TitleBlockTemplate::addRow
void addRow(int=-1)
TitleBlockTemplate::addRow Add a new 25px-wide row at the provided index.
Definition: titleblocktemplate.cpp:1015
TitleBlockTemplate::finalTextForCell
QString finalTextForCell(const TitleBlockCell &, const DiagramContext &) const
TitleBlockTemplate::finalTextForCell.
Definition: titleblocktemplate.cpp:1660
TitleBlockTemplate::interpreteVariables
QString interpreteVariables(const QString &, const DiagramContext &) const
TitleBlockTemplate::interpreteVariables.
Definition: titleblocktemplate.cpp:1686
TitleBlockTemplate::loadFromXmlFile
bool loadFromXmlFile(const QString &)
TitleBlockTemplate::loadFromXmlFile Load a titleblock template from an XML file.
Definition: titleblocktemplate.cpp:90
TitleBlockTemplate::columnTypeCount
int columnTypeCount(QET::TitleBlockColumnLength)
TitleBlockTemplate::columnTypeCount.
Definition: titleblocktemplate.cpp:902
TitleBlockTemplate::moveRow
bool moveRow(int, int)
TitleBlockTemplate::moveRow Move a row within this template.
Definition: titleblocktemplate.cpp:998
TitleBlockTemplate::columnDimension
TitleBlockDimension columnDimension(int)
TitleBlockTemplate::columnDimension.
Definition: titleblocktemplate.cpp:779
TitleBlockTemplate::insertRow
bool insertRow(int, const QList< TitleBlockCell * > &, int=-1)
TitleBlockTemplate::insertRow.
Definition: titleblocktemplate.cpp:1029
TitleBlockTemplate::saveInformation
void saveInformation(QDomElement &) const
TitleBlockTemplate::saveInformation Export this template's extra information.
Definition: titleblocktemplate.cpp:503
TitleBlockTemplate::exportCellToXml
void exportCellToXml(TitleBlockCell *, QDomElement &) const
TitleBlockTemplate::exportCellToXml.
Definition: titleblocktemplate.cpp:179
TitleBlockTemplate::forgetSpanning
void forgetSpanning()
TitleBlockTemplate::forgetSpanning Set the spanner_cell attribute of every cell to 0.
Definition: titleblocktemplate.cpp:1868
TitleBlockTemplate::rowColsChanged
void rowColsChanged()
TitleBlockTemplate::rowColsChanged Take care of consistency and span-related problematics when adding...
Definition: titleblocktemplate.cpp:2030
TitleBlockTemplate::storage_logos_
QHash< QString, QString > storage_logos_
storage_logos_ : Logos applied storage type (e.g. "xml" or "base64")
Definition: titleblocktemplate.h:180
QET::TitleBlockColumnLength
TitleBlockColumnLength
enum used to specify the type of a length
Definition: qet.h:145
dimension.h
TitleBlockTemplate::TitleBlockTemplate
TitleBlockTemplate(QObject *=nullptr)
TitleBlockTemplate::TitleBlockTemplate Constructor.
Definition: titleblocktemplate.cpp:31
TitleBlockTemplate::setAllSpans
void setAllSpans(const QHash< TitleBlockCell *, QPair< int, int > > &)
TitleBlockTemplate::setAllSpans Restore a set of span parameters.
Definition: titleblocktemplate.cpp:1221
TitleBlockTemplate::initCells
void initCells()
TitleBlockTemplate::initCells Initialize the internal cells grid with the row and column counts....
Definition: titleblocktemplate.cpp:709
TitleBlockTemplate::createRow
QList< TitleBlockCell * > createRow()
TitleBlockTemplate::createRow.
Definition: titleblocktemplate.cpp:1064
TitleBlockTemplate::registered_cells_
QList< TitleBlockCell * > registered_cells_
registered_cells_ : Cells objects created rattached to this template, but not mandatorily used
Definition: titleblocktemplate.h:205
TitleBlockTemplate::setColumnDimension
void setColumnDimension(int, const TitleBlockDimension &)
TitleBlockTemplate::setColumnDimension Set the width of a column.
Definition: titleblocktemplate.cpp:793
TitleBlockTemplate::saveToXmlElement
bool saveToXmlElement(QDomElement &) const
TitleBlockTemplate::saveToXmlElement Save the title block template as XML.
Definition: titleblocktemplate.cpp:161
TitleBlockTemplate::name_
QString name_
name_ : name identifying the Title Block Template within its parent collection
Definition: titleblocktemplate.h:170
TitleBlockCell::TextCell
@ TextCell
Definition: titleblockcell.h:30
TitleBlockTemplate::setInformation
void setInformation(const QString &)
TitleBlockTemplate::setInformation.
Definition: titleblocktemplate.cpp:743
TitleBlockDimension
Definition: dimension.h:26
TitleBlockTemplate::lengthRange
int lengthRange(int, int, const QList< int > &) const
TitleBlockTemplate::lengthRange.
Definition: titleblocktemplate.cpp:2044
qetapp.h
TitleBlockTemplate::fontForCell
static QFont fontForCell(const TitleBlockCell &)
TitleBlockTemplate::fontForCell.
Definition: titleblocktemplate.cpp:80
TitleBlockTemplate::renderTextCell
void renderTextCell(QPainter &, const QString &, const TitleBlockCell &, const QRectF &) const
TitleBlockTemplate::renderTextCell This method uses a painter to render the text of a cell into the c...
Definition: titleblocktemplate.cpp:1738
TitleBlockTemplate::renameLogo
bool renameLogo(const QString &, const QString &)
TitleBlockTemplate::renameLogo Rename the logo_name logo to new_name.
Definition: titleblocktemplate.cpp:1367
TitleBlockTemplate::spannedCells
QSet< TitleBlockCell * > spannedCells(const TitleBlockCell *, bool=false) const
TitleBlockTemplate::spannedCells.
Definition: titleblocktemplate.cpp:1161
TitleBlockTemplate::flushCells
void flushCells()
TitleBlockTemplate::renderTextCellDxf
void renderTextCellDxf(QString &, const QString &, const TitleBlockCell &, qreal, qreal, qreal, qreal, int) const
TitleBlockTemplate::renderTextCellDxf.
Definition: titleblocktemplate.cpp:1792
TitleBlockTemplate
The TitleBlockTemplate class This class represents an title block template for an electric diagram....
Definition: titleblocktemplate.h:36
TitleBlockCell::value
NamesList value
Text displayed by the cell.
Definition: titleblockcell.h:70
TitleBlockTemplate::cell
TitleBlockCell * cell(int, int) const
TitleBlockTemplate::cell.
Definition: titleblocktemplate.cpp:1143
TitleBlockCell::Disabled
@ Disabled
the cell span parameters should not applied at all
Definition: titleblockcell.h:34
TitleBlockTemplate::renderCell
void renderCell(QPainter &, const TitleBlockCell &, const DiagramContext &, const QRect &) const
TitleBlockTemplate::renderCell Render a titleblock cell.
Definition: titleblocktemplate.cpp:1609
qet.h
TitleBlockDimension::toShortString
QString toShortString() const
Definition: dimension.cpp:49
TitleBlockTemplate::addLogoFromFile
bool addLogoFromFile(const QString &, const QString &=QString())
TitleBlockTemplate::addLogoFromFile.
Definition: titleblocktemplate.cpp:1293
TitleBlockCell::EmptyCell
@ EmptyCell
Definition: titleblockcell.h:29
TitleBlockCell::type
TemplateCellType type() const
Definition: titleblockcell.cpp:29
QET::Absolute
@ Absolute
the length is absolute and should be applied as is
Definition: qet.h:146
TitleBlockTemplate::createCellsList
QList< TitleBlockCell * > createCellsList(int)
TitleBlockTemplate::createCellsList.
Definition: titleblocktemplate.cpp:68
titleblockcell.h
TitleBlockTemplate::getAllSpans
QHash< TitleBlockCell *, QPair< int, int > > getAllSpans() const
TitleBlockTemplate::getAllSpans Export the span parameters of all cell in the current grid.
Definition: titleblocktemplate.cpp:1199
TitleBlockCell::label
NamesList label
Label displayed by the cell.
Definition: titleblockcell.h:71
TitleBlockTemplate::createCell
TitleBlockCell * createCell(const TitleBlockCell *=nullptr)
TitleBlockTemplate::createCell Create a new cell and associate it with this template,...
Definition: titleblocktemplate.cpp:52
NamesList::name
QString name(const QString &=QString()) const
Definition: nameslist.cpp:231
TitleBlockTemplate::saveCell
void saveCell(TitleBlockCell *, QDomElement &, bool=false) const
TitleBlockTemplate::saveCell Export a specific cell as XML.
Definition: titleblocktemplate.cpp:611
TitleBlockTemplate::loadFromXmlElement
bool loadFromXmlElement(const QDomElement &)
TitleBlockTemplate::loadFromXmlElement.
Definition: titleblocktemplate.cpp:117
QET::writeXmlFile
bool writeXmlFile(QDomDocument &xml_doc, const QString &filepath, QString *error_message=nullptr)
Definition: qet.cpp:584
TitleBlockTemplate::loadInformation
void loadInformation(const QDomElement &)
TitleBlockTemplate::loadInformation Import text informations from a given XML title block template.
Definition: titleblocktemplate.cpp:255
TitleBlockTemplate::setLogoStorage
void setLogoStorage(const QString &, const QString &)
TitleBlockTemplate::setLogoStorage Set the kind of storage for the logo_name logo.
Definition: titleblocktemplate.cpp:1394
TitleBlockCell::display_label
bool display_label
Whether to display the label or not.
Definition: titleblockcell.h:72
TitleBlockCell::Enabled
@ Enabled
the cell span parameters should be applied without restriction
Definition: titleblockcell.h:35
TitleBlockTemplate::bitmap_logos_
QHash< QString, QPixmap > bitmap_logos_
bitmap_logos_ : Pixmaps for bitmap logos
Definition: titleblocktemplate.h:193
TitleBlockTemplate::saveLogos
void saveLogos(QDomElement &) const
TitleBlockTemplate::saveLogos Export this template's logos as XML.
Definition: titleblocktemplate.cpp:519
TitleBlockTemplate::parseRows
void parseRows(const QString &)
TitleBlockTemplate::parseRows Parse the rows heights.
Definition: titleblocktemplate.cpp:382
TitleBlockTemplate::logos
QList< QString > logos() const
TitleBlockTemplate::logos.
Definition: titleblocktemplate.cpp:1405
TitleBlockTemplate::loadLogo
bool loadLogo(const QDomElement &)
TitleBlockTemplate::loadLogo Import the logo from a given XML logo description.
Definition: titleblocktemplate.cpp:312
Createdxf::drawRectangle
static void drawRectangle(const QString &filepath, double, double, double, double, const int &colorcode)
Definition: createdxf.cpp:565
Createdxf::xScale
static double xScale
Definition: createdxf.h:113
TitleBlockTemplate::saveToXmlFile
bool saveToXmlFile(const QString &)
TitleBlockTemplate::saveToXmlFile Save the title block template into an XML file.
Definition: titleblocktemplate.cpp:141
TitleBlockCell::LogoCell
@ LogoCell
Definition: titleblockcell.h:31
TitleBlockTemplate::rows_heights_
QList< int > rows_heights_
rows heights – simple integers
Definition: titleblocktemplate.h:195
TitleBlockTemplate::columnTypeTotal
int columnTypeTotal(QET::TitleBlockColumnLength)
TitleBlockTemplate::columnTypeTotal.
Definition: titleblocktemplate.cpp:917
TitleBlockTemplate::saveLogoToFile
bool saveLogoToFile(const QString &, const QString &)
TitleBlockTemplate::saveLogoToFile.
Definition: titleblocktemplate.cpp:1322
TitleBlockTemplate::applyRowColNums
void applyRowColNums()
TitleBlockTemplate::applyRowColNums Ensure all cells have the right col+row numbers.
Definition: titleblocktemplate.cpp:2016
TitleBlockTemplate::rowDimension
int rowDimension(int)
TitleBlockTemplate::rowDimension.
Definition: titleblocktemplate.cpp:752
TitleBlockTemplate::addLogo
bool addLogo(const QString &, QByteArray *, const QString &="svg", const QString &="xml")
TitleBlockTemplate::addLogo.
Definition: titleblocktemplate.cpp:1239
TitleBlockTemplate::minimumWidth
int minimumWidth()
Definition: titleblocktemplate.cpp:932
TitleBlockTemplate::vectorLogo
QSvgRenderer * vectorLogo(const QString &) const
TitleBlockTemplate::vectorLogo.
Definition: titleblocktemplate.cpp:1430
TitleBlockTemplate::render
void render(QPainter &, const DiagramContext &, int) const
TitleBlockTemplate::render Render the titleblock.
Definition: titleblocktemplate.cpp:1461
TitleBlockTemplate::setRowDimension
void setRowDimension(int, const TitleBlockDimension &)
TitleBlockTemplate::setRowDimension Set the height of a row.
Definition: titleblocktemplate.cpp:766
TitleBlockTemplate::data_logos_
QHash< QString, QByteArray > data_logos_
data_logos_ : Logos raw data
Definition: titleblocktemplate.h:175
TitleBlockTemplate::vector_logos_
QHash< QString, QSvgRenderer * > vector_logos_
vector_logos_ : Rendered objects for vector logos
Definition: titleblocktemplate.h:189
QETApp::diagramTextsFont
static QFont diagramTextsFont(qreal=-1.0)
QETApp::diagramTextsFont The font to use By default the font is "sans Serif" and size 9.
Definition: qetapp.cpp:1111
TitleBlockTemplate::columns_width_
QList< TitleBlockDimension > columns_width_
columns_width_ : columns widths –
Definition: titleblocktemplate.h:200
QET::attributeIsAnInteger
bool attributeIsAnInteger(const QDomElement &, const QString &, int *=nullptr)
Definition: qet.cpp:210
diagramcontext.h
Createdxf::drawTextAligned
static void drawTextAligned(const QString &fileName, const QString &text, double x, double y, double height, double rotation, double oblique, int hAlign, int vAlign, double xAlign, double xScale, int colour, bool leftAlign=false, float scale=0)
Definition: createdxf.cpp:781
TitleBlockTemplate::bitmapLogo
QPixmap bitmapLogo(const QString &) const
TitleBlockTemplate::bitmapLogo.
Definition: titleblocktemplate.cpp:1444
TitleBlockTemplate::logoType
QString logoType(const QString &) const
TitleBlockTemplate::logoType.
Definition: titleblocktemplate.cpp:1416
TitleBlockTemplate::rowsHeights
QList< int > rowsHeights() const
TitleBlockTemplate::rowsHeights.
Definition: titleblocktemplate.cpp:893
TitleBlockTemplate::maximumWidth
int maximumWidth()
TitleBlockTemplate::maximumWidth.
Definition: titleblocktemplate.cpp:957
TitleBlockTemplate::saveCells
void saveCells(QDomElement &) const
TitleBlockTemplate::saveCells Export this template's cells as XML (without the grid-related informati...
Definition: titleblocktemplate.cpp:591
TitleBlockTemplate::loadGrid
bool loadGrid(const QDomElement &)
Definition: titleblocktemplate.cpp:350
TitleBlockTemplate::information
QString information() const
TitleBlockTemplate::information.
Definition: titleblocktemplate.cpp:735
TitleBlockTemplate::listOfVariables
QStringList listOfVariables()
TitleBlockTemplate::listOfVariables Get list of variables.
Definition: titleblocktemplate.cpp:1705
createdxf.h
titleblocktemplate.h
TitleBlockTemplate::moveColumn
bool moveColumn(int, int)
TitleBlockTemplate::moveColumn Move the column at index "from" to index "to".
Definition: titleblocktemplate.cpp:1075
TitleBlockCell::Restricted
@ Restricted
the cell span parameters should be applied with some restrictions
Definition: titleblockcell.h:36
TitleBlockTemplate::parseColumns
void parseColumns(const QString &)
TitleBlockTemplate::parseColumns Parse the columns widths.
Definition: titleblocktemplate.cpp:416
TitleBlockTemplate::information_
QString information_
Definition: titleblocktemplate.h:171
TitleBlockTemplate::checkCell
bool checkCell(const QDomElement &, TitleBlockCell **=nullptr)
TitleBlockTemplate::checkCell Load the essential attributes of a cell: row and column indices and spa...
Definition: titleblocktemplate.cpp:648
TitleBlockTemplate::columnsCount
int columnsCount() const
TitleBlockTemplate::columnsCount.
Definition: titleblocktemplate.cpp:806
TitleBlockTemplate::addColumn
void addColumn(int=-1)
TitleBlockTemplate::addColumn Add a new 50px-wide column at the provided index.
Definition: titleblocktemplate.cpp:1090
TitleBlockCell::font_size
int font_size
Font size the text should be rendered with.
Definition: titleblockcell.h:74
TitleBlockTemplate::saveGrid
void saveGrid(QDomElement &) const
TitleBlockTemplate::saveGrid Export this template's cells grid as XML.
Definition: titleblocktemplate.cpp:567
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
TitleBlockTemplate::cells_
QList< QList< TitleBlockCell * > > cells_
Cells grid.
Definition: titleblocktemplate.h:206
TitleBlockTemplate::saveLogo
void saveLogo(const QString &, QDomElement &) const
TitleBlockTemplate::saveLogo Export a specific logo as XML.
Definition: titleblocktemplate.cpp:537
TitleBlockTemplate::insertColumn
bool insertColumn(const TitleBlockDimension &, const QList< TitleBlockCell * > &, int=-1)
TitleBlockTemplate::insertColumn.
Definition: titleblocktemplate.cpp:1102
TitleBlockTemplate::createColumn
QList< TitleBlockCell * > createColumn()
TitleBlockTemplate::createColumn.
Definition: titleblocktemplate.cpp:1133
DiagramContext
Definition: diagramcontext.h:56
TitleBlockCell::logo_reference
QString logo_reference
Logo displayed by this cell, it it is a logo cell.
Definition: titleblockcell.h:76
TitleBlockCell
Definition: titleblockcell.h:26
TitleBlockTemplate::columnsWidth
QList< int > columnsWidth(int) const
TitleBlockTemplate::columnsWidth.
Definition: titleblocktemplate.cpp:823
TitleBlockTemplate::width
int width(int)
TitleBlockTemplate::width.
Definition: titleblocktemplate.cpp:971
TitleBlockTemplate::takeRow
QList< TitleBlockCell * > takeRow(int)
TitleBlockTemplate::takeRow Removes the row at index i.
Definition: titleblocktemplate.cpp:1048
TitleBlockTemplate::loadCell
void loadCell(const QDomElement &)
TitleBlockTemplate::loadCell Load a cell into this template.
Definition: titleblocktemplate.cpp:491
TitleBlockCell::alignment
int alignment
Where the label+text should be displayed within the visual cell.
Definition: titleblockcell.h:73
QET::RelativeToRemainingLength
@ RelativeToRemainingLength
the length is just a fraction of the length that is still available when other types of lengths have ...
Definition: qet.h:148
TitleBlockTemplate::loadCells
bool loadCells(const QDomElement &)
TitleBlockTemplate::loadCells Analyze an XML element, looking for grid cells. The grid cells are chec...
Definition: titleblocktemplate.cpp:469
TitleBlockTemplate::checkCellSpan
bool checkCellSpan(TitleBlockCell *)
TitleBlockTemplate::checkCellSpan Check whether a given cell can be spanned according to its row_span...
Definition: titleblocktemplate.cpp:1927
DiagramContext::DecreasingLength
@ DecreasingLength
Definition: diagramcontext.h:61