QElectroTech  0.8-dev
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
TitleBlockCell Class Reference

#include <titleblockcell.h>

Collaboration diagram for TitleBlockCell:
Collaboration graph

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 &)
 TitleBlockCell::saveContentToXml. More...
 

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...
 
TitleBlockCellspanner_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...
 

Detailed Description

This class is a container for the various parameters of a titleblock cell

See also
TitleBlockColumnLength

Member Enumeration Documentation

◆ TemplateCellSpanState

Enumerator
Disabled 

the cell span parameters should not applied at all

Enabled 

the cell span parameters should be applied without restriction

Restricted 

the cell span parameters should be applied with some restrictions

◆ TemplateCellType

Enumerator
EmptyCell 
TextCell 
LogoCell 

Constructor & Destructor Documentation

◆ TitleBlockCell()

TitleBlockCell::TitleBlockCell ( )

Constructor

◆ ~TitleBlockCell()

TitleBlockCell::~TitleBlockCell ( )
virtual

Destructor

Member Function Documentation

◆ attribute()

QVariant TitleBlockCell::attribute ( const QString &  attribute)
Parameters
attributeName of the cell attribute which value is wanted
Returns
the value of the required attribute
Here is the call graph for this function:
Here is the caller graph for this function:

◆ attributeName()

QString TitleBlockCell::attributeName ( const QString &  attribute)
static
Parameters
attributeName of the cell attribute which we want the human, translated name
Returns
the human, translated name for this attribute.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ horizontalAlign()

int TitleBlockCell::horizontalAlign ( ) const
Returns
the horizontal alignment of this cell

◆ loadContentFromCell()

void TitleBlockCell::loadContentFromCell ( const TitleBlockCell other_cell)

Copy the content of another cell.

Parameters
other_cellAnother cell

◆ loadContentFromXml()

void TitleBlockCell::loadContentFromXml ( const QDomElement &  cell_element)
Parameters
cell_elementXML element from which cell content will be read
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveContentToXml()

void TitleBlockCell::saveContentToXml ( QDomElement &  cell_elmt)

TitleBlockCell::saveContentToXml.

Parameters
cell_elmt: XML element to which cell content will be exported
Here is the call graph for this function:

◆ setAttribute()

void TitleBlockCell::setAttribute ( const QString &  attribute,
const QVariant &  attr_value 
)

Set the new value attr_value to the attribute named attribute.

Parameters
attributeName of the cell attribute which value is to be changed
attr_valueNew value of the changed attribute
Here is the call graph for this function:

◆ spans()

bool TitleBlockCell::spans ( ) const
Returns
true if this cell spans over other cells, false otherwise.

◆ type()

TitleBlockCell::TemplateCellType TitleBlockCell::type ( ) const
Returns
the type of this cell
Here is the caller graph for this function:

◆ verticalAlign()

int TitleBlockCell::verticalAlign ( ) const
Returns
the vertical alignment of this cell

Member Data Documentation

◆ alignment

int TitleBlockCell::alignment

Where the label+text should be displayed within the visual cell.

◆ applied_col_span

int TitleBlockCell::applied_col_span

Actually applied column span.

◆ applied_row_span

int TitleBlockCell::applied_row_span

Actually applied row span.

◆ cell_type

TemplateCellType TitleBlockCell::cell_type

Cell type: empty, text, logo?

◆ col_span

int TitleBlockCell::col_span

number of extra columns spanned by this cell

◆ display_label

bool TitleBlockCell::display_label

Whether to display the label or not.

◆ font_size

int TitleBlockCell::font_size

Font size the text should be rendered with.

◆ hadjust

bool TitleBlockCell::hadjust

Whether to reduce the font size if the text does not fit in the cell.

◆ label

NamesList TitleBlockCell::label

Label displayed by the cell.

◆ logo_reference

QString TitleBlockCell::logo_reference

Logo displayed by this cell, it it is a logo cell.

◆ num_col

int TitleBlockCell::num_col

x coordinate of the cell within its parent title block template grid

◆ num_row

int TitleBlockCell::num_row

y coordinate of the cell within its parent title block template grid

◆ row_span

int TitleBlockCell::row_span

number of extra rows spanned by this cell

◆ span_state

int TitleBlockCell::span_state

how should row_span and col_span be applied given other cells in the parent template

◆ spanner_cell

TitleBlockCell* TitleBlockCell::spanner_cell

Cell spanning this cell, if any.

◆ value

NamesList TitleBlockCell::value

Text displayed by the cell.

◆ value_name

QString TitleBlockCell::value_name

name of the cell; not displayed when the title block template is rendered


The documentation for this class was generated from the following files: