QElectroTech  0.70
titleblockcell.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 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 "nameslist.h"
21 
27  public:
32  };
37  };
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;
53  void loadContentFromCell(const TitleBlockCell &);
54  void loadContentFromXml(const QDomElement &);
55  void saveContentToXml(QDomElement &);
56 
57 
58  // attributes
59  public:
61  int num_row;
62  int num_col;
63  int row_span;
64  int col_span;
65  int span_state;
69  QString value_name;
73  int alignment;
74  int font_size;
75  bool hadjust;
76  QString logo_reference;
77 };
78 #endif
NamesList value
Text displayed by the cell.
int applied_row_span
Actually applied row span.
virtual ~TitleBlockCell()
bool spans() const
void setAttribute(const QString &, const QVariant &)
int num_col
x coordinate of the cell within its parent title block template grid
int alignment
Where the label+text should be displayed within the visual cell.
void loadContentFromCell(const TitleBlockCell &)
int row_span
number of extra rows spanned by this cell
bool display_label
Whether to display the label or not.
the cell span parameters should be applied without restriction
int font_size
Font size the text should be rendered with.
the cell span parameters should be applied with some restrictions
TemplateCellType cell_type
Cell type: empty, text, logo?
int verticalAlign() const
NamesList label
Label displayed by the cell.
bool hadjust
Whether to reduce the font size if the text does not fit in the cell.
static QString attributeName(const QString &)
the cell span parameters should not applied at all
QVariant attribute(const QString &)
TitleBlockCell * spanner_cell
Cell spanning this cell, if any.
QString logo_reference
Logo displayed by this cell, it it is a logo cell.
int horizontalAlign() const
void loadContentFromXml(const QDomElement &)
int span_state
how should row_span and col_span be applied given other cells in the parent template ...
TemplateCellType type() const
void saveContentToXml(QDomElement &)
int col_span
number of extra columns spanned by this cell
QString value_name
name of the cell; not displayed when the title block template is rendered
int num_row
y coordinate of the cell within its parent title block template grid
int applied_col_span
Actually applied column span.