QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
titleblockcell.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 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_CELL_H
19#define TITLEBLOCK_CELL_H
20#include "NameList/nameslist.h"
21
27 public:
38
39 // Constructor, destructor
40 public:
42 virtual ~TitleBlockCell();
43
44 // methods
45 public:
46 TemplateCellType type() const;
47 int horizontalAlign() const;
48 int verticalAlign() const;
49 void setAttribute(const QString &, const QVariant &);
50 QVariant attribute(const QString &);
51 static QString attributeName(const QString &);
52 bool spans() const;
54 void loadContentFromXml(const QDomElement &);
55 void saveContentToXml(QDomElement &);
56
57
58 // attributes
59 public:
61 int num_row;
62 int num_col;
69 QString value_name;
75 bool hadjust;
77};
78#endif
Definition nameslist.h:31
Definition titleblockcell.h:26
void saveContentToXml(QDomElement &)
TitleBlockCell::saveContentToXml.
Definition titleblockcell.cpp:229
bool hadjust
Whether to reduce the font size if the text does not fit in the cell.
Definition titleblockcell.h:75
TitleBlockCell * spanner_cell
Cell spanning this cell, if any.
Definition titleblockcell.h:68
int num_row
y coordinate of the cell within its parent title block template grid
Definition titleblockcell.h:61
TemplateCellType
Definition titleblockcell.h:28
@ LogoCell
Definition titleblockcell.h:31
@ TextCell
Definition titleblockcell.h:30
@ EmptyCell
Definition titleblockcell.h:29
static QString attributeName(const QString &)
Definition titleblockcell.cpp:113
int verticalAlign() const
Definition titleblockcell.cpp:47
int horizontalAlign() const
Definition titleblockcell.cpp:39
bool spans() const
Definition titleblockcell.cpp:139
QString value_name
name of the cell; not displayed when the title block template is rendered
Definition titleblockcell.h:69
int row_span
number of extra rows spanned by this cell
Definition titleblockcell.h:63
int num_col
x coordinate of the cell within its parent title block template grid
Definition titleblockcell.h:62
QString logo_reference
Logo displayed by this cell, it it is a logo cell.
Definition titleblockcell.h:76
TemplateCellType type() const
Definition titleblockcell.cpp:31
TemplateCellSpanState
Definition titleblockcell.h:33
@ Disabled
the cell span parameters should not applied at all
Definition titleblockcell.h:34
@ Enabled
the cell span parameters should be applied without restriction
Definition titleblockcell.h:35
@ Restricted
the cell span parameters should be applied with some restrictions
Definition titleblockcell.h:36
NamesList label
Label displayed by the cell.
Definition titleblockcell.h:71
int alignment
Where the label+text should be displayed within the visual cell.
Definition titleblockcell.h:73
int span_state
how should row_span and col_span be applied given other cells in the parent template
Definition titleblockcell.h:65
int font_size
Font size the text should be rendered with.
Definition titleblockcell.h:74
NamesList value
Text displayed by the cell.
Definition titleblockcell.h:70
void loadContentFromCell(const TitleBlockCell &)
Definition titleblockcell.cpp:148
bool display_label
Whether to display the label or not.
Definition titleblockcell.h:72
int applied_row_span
Actually applied row span.
Definition titleblockcell.h:66
virtual ~TitleBlockCell()
Definition titleblockcell.cpp:24
int applied_col_span
Actually applied column span.
Definition titleblockcell.h:67
QVariant attribute(const QString &)
Definition titleblockcell.cpp:86
void loadContentFromXml(const QDomElement &)
Definition titleblockcell.cpp:163
void setAttribute(const QString &, const QVariant &)
Definition titleblockcell.cpp:57
TemplateCellType cell_type
Cell type: empty, text, logo?
Definition titleblockcell.h:60
int col_span
number of extra columns spanned by this cell
Definition titleblockcell.h:64
TitleBlockCell()
Definition titleblockcell.cpp:6