QElectroTech
0.70
|
#include <titleblockcell.h>
Public Types | |
enum | TemplateCellType { EmptyCell, TextCell, LogoCell } |
enum | TemplateCellSpanState { Disabled, Enabled, Restricted } |
Public Member Functions | |
TitleBlockCell () | |
virtual | ~TitleBlockCell () |
TemplateCellType | type () const |
int | horizontalAlign () const |
int | verticalAlign () const |
void | setAttribute (const QString &, const QVariant &) |
QVariant | attribute (const QString &) |
bool | spans () const |
void | loadContentFromCell (const TitleBlockCell &) |
void | loadContentFromXml (const QDomElement &) |
void | saveContentToXml (QDomElement &) |
Static Public Member Functions | |
static QString | attributeName (const QString &) |
Public Attributes | |
TemplateCellType | cell_type |
Cell type: empty, text, logo? More... | |
int | num_row |
y coordinate of the cell within its parent title block template grid More... | |
int | num_col |
x coordinate of the cell within its parent title block template grid More... | |
int | row_span |
number of extra rows spanned by this cell More... | |
int | col_span |
number of extra columns spanned by this cell More... | |
int | span_state |
how should row_span and col_span be applied given other cells in the parent template More... | |
int | applied_row_span |
Actually applied row span. More... | |
int | applied_col_span |
Actually applied column span. More... | |
TitleBlockCell * | spanner_cell |
Cell spanning this cell, if any. More... | |
QString | value_name |
name of the cell; not displayed when the title block template is rendered More... | |
NamesList | value |
Text displayed by the cell. More... | |
NamesList | label |
Label displayed by the cell. More... | |
bool | display_label |
Whether to display the label or not. More... | |
int | alignment |
Where the label+text should be displayed within the visual cell. More... | |
int | font_size |
Font size the text should be rendered with. More... | |
bool | hadjust |
Whether to reduce the font size if the text does not fit in the cell. More... | |
QString | logo_reference |
Logo displayed by this cell, it it is a logo cell. More... | |
This class is a container for the various parameters of a titleblock cell
Definition at line 26 of file titleblockcell.h.
Definition at line 33 of file titleblockcell.h.
Enumerator | |
---|---|
EmptyCell | |
TextCell | |
LogoCell |
Definition at line 28 of file titleblockcell.h.
TitleBlockCell::TitleBlockCell | ( | ) |
Constructor
Definition at line 6 of file titleblockcell.cpp.
References alignment, applied_col_span, applied_row_span, cell_type, col_span, display_label, EmptyCell, Enabled, font_size, hadjust, logo_reference, num_col, num_row, row_span, span_state, and spanner_cell.
|
virtual |
Destructor
Definition at line 23 of file titleblockcell.cpp.
QVariant TitleBlockCell::attribute | ( | const QString & | attribute | ) |
attribute | Name of the cell attribute which value is wanted |
Definition at line 81 of file titleblockcell.cpp.
References alignment, display_label, TitleBlockTemplate::fontForCell(), hadjust, label, logo_reference, type(), value, and value_name.
Referenced by attributeName(), and setAttribute().
|
static |
attribute | Name of the cell attribute which we want the human, translated name |
Definition at line 108 of file titleblockcell.cpp.
References attribute(), and QET::Icons::tr.
Referenced by TitleBlockTemplateCellWidget::emitModification().
int TitleBlockCell::horizontalAlign | ( | ) | const |
Definition at line 36 of file titleblockcell.cpp.
References alignment.
void TitleBlockCell::loadContentFromCell | ( | const TitleBlockCell & | other_cell | ) |
Copy the content of another cell.
other_cell | Another cell |
Definition at line 142 of file titleblockcell.cpp.
References alignment, cell_type, display_label, font_size, hadjust, label, logo_reference, value, and value_name.
void TitleBlockCell::loadContentFromXml | ( | const QDomElement & | cell_element | ) |
cell_element | XML element from which cell content will be read |
Definition at line 157 of file titleblockcell.cpp.
References alignment, QET::attributeIsAnInteger(), cell_type, display_label, font_size, NamesList::fromXml(), hadjust, label, logo_reference, LogoCell, NamesList::name(), TextCell, value, and value_name.
Referenced by TitleBlockTemplateView::pastedCells().
void TitleBlockCell::saveContentToXml | ( | QDomElement & | cell_elmt | ) |
xml_element | XML element to which cell content will be exported |
Definition at line 222 of file titleblockcell.cpp.
References alignment, display_label, EmptyCell, font_size, hadjust, label, logo_reference, LogoCell, NamesList::toXml(), type(), value, and value_name.
void TitleBlockCell::setAttribute | ( | const QString & | attribute, |
const QVariant & | attr_value | ||
) |
Set the new value attr_value to the attribute named attribute.
attribute | Name of the cell attribute which value is to be changed |
attr_value | New value of the changed attribute |
Definition at line 52 of file titleblockcell.cpp.
References alignment, attribute(), cell_type, display_label, font_size, hadjust, label, logo_reference, LogoCell, value, and value_name.
bool TitleBlockCell::spans | ( | ) | const |
Definition at line 134 of file titleblockcell.cpp.
TitleBlockCell::TemplateCellType TitleBlockCell::type | ( | ) | const |
Definition at line 29 of file titleblockcell.cpp.
References cell_type.
Referenced by attribute(), TitleBlockTemplate::renderCell(), and saveContentToXml().
int TitleBlockCell::verticalAlign | ( | ) | const |
Definition at line 43 of file titleblockcell.cpp.
References alignment.
int TitleBlockCell::alignment |
Where the label+text should be displayed within the visual cell.
Definition at line 73 of file titleblockcell.h.
Referenced by attribute(), horizontalAlign(), loadContentFromCell(), loadContentFromXml(), TitleBlockTemplate::renderTextCell(), TitleBlockTemplate::renderTextCellDxf(), saveContentToXml(), setAttribute(), TitleBlockCell(), and verticalAlign().
int TitleBlockCell::applied_col_span |
Actually applied column span.
Definition at line 67 of file titleblockcell.h.
Referenced by TitleBlockCell().
int TitleBlockCell::applied_row_span |
Actually applied row span.
Definition at line 66 of file titleblockcell.h.
Referenced by TitleBlockCell().
TemplateCellType TitleBlockCell::cell_type |
Cell type: empty, text, logo?
Definition at line 60 of file titleblockcell.h.
Referenced by loadContentFromCell(), loadContentFromXml(), setAttribute(), TitleBlockCell(), and type().
int TitleBlockCell::col_span |
number of extra columns spanned by this cell
Definition at line 64 of file titleblockcell.h.
Referenced by TitleBlockTemplateView::pastedCells(), PasteTemplateCellsCommand::redo(), spans(), and TitleBlockCell().
bool TitleBlockCell::display_label |
Whether to display the label or not.
Definition at line 72 of file titleblockcell.h.
Referenced by attribute(), TitleBlockTemplate::finalTextForCell(), loadContentFromCell(), loadContentFromXml(), saveContentToXml(), setAttribute(), and TitleBlockCell().
int TitleBlockCell::font_size |
Font size the text should be rendered with.
Definition at line 74 of file titleblockcell.h.
Referenced by TitleBlockTemplate::fontForCell(), loadContentFromCell(), loadContentFromXml(), saveContentToXml(), setAttribute(), and TitleBlockCell().
bool TitleBlockCell::hadjust |
Whether to reduce the font size if the text does not fit in the cell.
Definition at line 75 of file titleblockcell.h.
Referenced by attribute(), loadContentFromCell(), loadContentFromXml(), TitleBlockTemplate::renderTextCell(), TitleBlockTemplate::renderTextCellDxf(), saveContentToXml(), setAttribute(), and TitleBlockCell().
NamesList TitleBlockCell::label |
Label displayed by the cell.
Definition at line 71 of file titleblockcell.h.
Referenced by attribute(), TitleBlockTemplate::finalTextForCell(), loadContentFromCell(), loadContentFromXml(), saveContentToXml(), and setAttribute().
QString TitleBlockCell::logo_reference |
Logo displayed by this cell, it it is a logo cell.
Definition at line 76 of file titleblockcell.h.
Referenced by attribute(), loadContentFromCell(), loadContentFromXml(), TitleBlockTemplate::renderCell(), saveContentToXml(), setAttribute(), and TitleBlockCell().
int TitleBlockCell::num_col |
x coordinate of the cell within its parent title block template grid
Definition at line 62 of file titleblockcell.h.
Referenced by TitleBlockTemplateView::paste(), TitleBlockTemplateView::pastedCells(), and TitleBlockCell().
int TitleBlockCell::num_row |
y coordinate of the cell within its parent title block template grid
Definition at line 61 of file titleblockcell.h.
Referenced by TitleBlockTemplateView::paste(), TitleBlockTemplateView::pastedCells(), and TitleBlockCell().
int TitleBlockCell::row_span |
number of extra rows spanned by this cell
Definition at line 63 of file titleblockcell.h.
Referenced by TitleBlockTemplateView::pastedCells(), PasteTemplateCellsCommand::redo(), spans(), and TitleBlockCell().
int TitleBlockCell::span_state |
how should row_span and col_span be applied given other cells in the parent template
Definition at line 65 of file titleblockcell.h.
Referenced by TitleBlockCell().
TitleBlockCell* TitleBlockCell::spanner_cell |
Cell spanning this cell, if any.
Definition at line 68 of file titleblockcell.h.
Referenced by TitleBlockCell().
NamesList TitleBlockCell::value |
Text displayed by the cell.
Definition at line 70 of file titleblockcell.h.
Referenced by attribute(), TitleBlockTemplate::finalTextForCell(), loadContentFromCell(), loadContentFromXml(), saveContentToXml(), and setAttribute().
QString TitleBlockCell::value_name |
name of the cell; not displayed when the title block template is rendered
Definition at line 69 of file titleblockcell.h.
Referenced by attribute(), loadContentFromCell(), loadContentFromXml(), saveContentToXml(), and setAttribute().