QElectroTech  0.8-dev
Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
TitleBlockTemplateCellWidget Class Reference

The TitleBlockTemplateCellWidget class This class implements an edition widget for cells that compose a title block template. More...

#include <templatecellwidget.h>

Inherits QWidget.

Collaboration diagram for TitleBlockTemplateCellWidget:
Collaboration graph

Public Slots

void updateFormType (int)
 
void edit (TitleBlockCell *)
 
void editType ()
 
void editName ()
 
void editLabelDisplayed ()
 
void editLabel ()
 
void editValue ()
 
void editAlignment ()
 
void editFontSize ()
 
void editAdjust ()
 
void editLogo ()
 
void updateLogosComboBox (const TitleBlockTemplate *)
 
void setReadOnly (bool)
 

Signals

void logoEditionRequested ()
 
void cellModified (ModifyTitleBlockCellCommand *) const
 

Public Member Functions

 TitleBlockTemplateCellWidget (TitleBlockTemplate *=nullptr, QWidget *=nullptr)
 TitleBlockTemplateCellWidget::TitleBlockTemplateCellWidget Constructor. More...
 
 ~TitleBlockTemplateCellWidget () override
 
int horizontalAlignment () const
 
int verticalAlignment () const
 
int alignment () const
 
bool isReadOnly () const
 

Protected Member Functions

void editTranslatableValue (NamesList &, const QString &, const QString &) const
 
void emitModification (const QString &, const QVariant &) const
 
QString defaultVariablesString () const
 
QString labelValueInformationString () const
 

Private Member Functions

 TitleBlockTemplateCellWidget (const TitleBlockTemplateCellWidget &)
 
void initWidgets ()
 

Private Attributes

bool read_only_
 is the template read-only? More...
 
QLabel * cell_type_label_
 
QComboBox * cell_type_input_
 
QLabel * empty_label_
 
QLabel * logo_label_
 
QComboBox * logo_input_
 
QPushButton * add_logo_input_
 
QLabel * name_label_
 
QLineEdit * name_input_
 
QCheckBox * label_checkbox_
 
QLineEdit * label_input_
 
QPushButton * label_edit_
 
QLabel * value_label_
 
QLineEdit * value_input_
 
QPushButton * value_edit_
 
QLabel * align_label_
 
QLabel * horiz_align_label_
 
QComboBox * horiz_align_input_
 
QHash< int, int > horiz_align_indexes_
 
QLabel * vert_align_label_
 
QComboBox * vert_align_input_
 
QHash< int, int > vert_align_indexes_
 
QLabel * font_size_label_
 
QSpinBox * font_size_input_
 
QCheckBox * font_adjust_input_
 
QVBoxLayout * cell_editor_layout_
 
QHBoxLayout * cell_editor_type_and_name_layout_
 
QGridLayout * cell_editor_text_layout_
 
QHBoxLayout * cell_editor_image_layout_
 
TitleBlockCelledited_cell_
 

Detailed Description

The TitleBlockTemplateCellWidget class This class implements an edition widget for cells that compose a title block template.

Constructor & Destructor Documentation

◆ TitleBlockTemplateCellWidget() [1/2]

TitleBlockTemplateCellWidget::TitleBlockTemplateCellWidget ( TitleBlockTemplate parent_template = nullptr,
QWidget *  parent = nullptr 
)

TitleBlockTemplateCellWidget::TitleBlockTemplateCellWidget Constructor.

Parameters
parent_template: TitleBlockTemplate
parent: QWidget
Here is the call graph for this function:

◆ ~TitleBlockTemplateCellWidget()

TitleBlockTemplateCellWidget::~TitleBlockTemplateCellWidget ( )
override

Destructor

◆ TitleBlockTemplateCellWidget() [2/2]

TitleBlockTemplateCellWidget::TitleBlockTemplateCellWidget ( const TitleBlockTemplateCellWidget )
private

Member Function Documentation

◆ alignment()

int TitleBlockTemplateCellWidget::alignment ( ) const
Returns
the currently selected alignment.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cellModified

void TitleBlockTemplateCellWidget::cellModified ( ModifyTitleBlockCellCommand ) const
signal
Here is the caller graph for this function:

◆ defaultVariablesString()

QString TitleBlockTemplateCellWidget::defaultVariablesString ( ) const
protected
Returns
a string describing the various variables provided by default by the application.
Here is the caller graph for this function:

◆ edit

void TitleBlockTemplateCellWidget::edit ( TitleBlockCell cell)
slot

Set the title block cell to be edited. The cell pointer is stored by this class; however, modifications made by the user are packaged as ModifyTitleBlockCellCommand objects and emitted through the cellModified() signal.

Parameters
cellTitle block cell to be edited
Here is the call graph for this function:

◆ editAdjust

void TitleBlockTemplateCellWidget::editAdjust ( )
slot

Emit a modification command stating whether the text should be adjusted if needed.

See also
ModifyTitleBlockCellCommand
Here is the call graph for this function:
Here is the caller graph for this function:

◆ editAlignment

void TitleBlockTemplateCellWidget::editAlignment ( )
slot

Emit an alignment modification command.

See also
ModifyTitleBlockCellCommand
Here is the call graph for this function:
Here is the caller graph for this function:

◆ editFontSize

void TitleBlockTemplateCellWidget::editFontSize ( )
slot

Emit a font size modification command.

See also
ModifyTitleBlockCellCommand
Here is the call graph for this function:
Here is the caller graph for this function:

◆ editLabel

void TitleBlockTemplateCellWidget::editLabel ( )
slot

Emit a label modification command.

See also
ModifyTitleBlockCellCommand
Here is the call graph for this function:
Here is the caller graph for this function:

◆ editLabelDisplayed

void TitleBlockTemplateCellWidget::editLabelDisplayed ( )
slot

Emit a modification command stating whether the label should be displayed or not.

See also
ModifyTitleBlockCellCommand
Here is the call graph for this function:
Here is the caller graph for this function:

◆ editLogo

void TitleBlockTemplateCellWidget::editLogo ( )
slot

Emit a logo modification command.

See also
ModifyTitleBlockCellCommand
Here is the call graph for this function:
Here is the caller graph for this function:

◆ editName

void TitleBlockTemplateCellWidget::editName ( )
slot

Emit a name modification command.

See also
ModifyTitleBlockCellCommand
Here is the call graph for this function:
Here is the caller graph for this function:

◆ editTranslatableValue()

void TitleBlockTemplateCellWidget::editTranslatableValue ( NamesList names,
const QString &  attribute,
const QString &  title 
) const
protected

Allow the user to edit a translatable string (e.g. value or label). If the user modified the string, this method emits a ModifyTitleBlockCellCommand object through the cellModified() signal.

Parameters
namesTranslatable string to be edited
attributeName of the edited cell attribute
titleTitle of the dialog window
Here is the call graph for this function:
Here is the caller graph for this function:

◆ editType

void TitleBlockTemplateCellWidget::editType ( )
slot

Emit a type modification command.

See also
ModifyTitleBlockCellCommand
Here is the call graph for this function:
Here is the caller graph for this function:

◆ editValue

void TitleBlockTemplateCellWidget::editValue ( )
slot

Emit a value modification command.

See also
ModifyTitleBlockCellCommand
Here is the call graph for this function:
Here is the caller graph for this function:

◆ emitModification()

void TitleBlockTemplateCellWidget::emitModification ( const QString &  attribute,
const QVariant &  new_value 
) const
protected

Create a ModifyTitleBlockCellCommand object to change attribute to new_value. This object is then emitted through the cellModified() signal.

See also
ModifyTitleBlockCellCommand
Parameters
attributeModified cell attribute
new_valueNew value for the modified cell attribute
Here is the call graph for this function:
Here is the caller graph for this function:

◆ horizontalAlignment()

int TitleBlockTemplateCellWidget::horizontalAlignment ( ) const

Emit a horizontal alignment modification command.

See also
ModifyTitleBlockCellCommand
Here is the caller graph for this function:

◆ initWidgets()

void TitleBlockTemplateCellWidget::initWidgets ( )
private

Initialize layout and widgets.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isReadOnly()

bool TitleBlockTemplateCellWidget::isReadOnly ( ) const
Returns
whether this edition widget is read only

◆ labelValueInformationString()

QString TitleBlockTemplateCellWidget::labelValueInformationString ( ) const
protected
Returns
a string describing what the user may enter as cell label / value.
Here is the caller graph for this function:

◆ logoEditionRequested

void TitleBlockTemplateCellWidget::logoEditionRequested ( )
signal
Here is the caller graph for this function:

◆ setReadOnly

void TitleBlockTemplateCellWidget::setReadOnly ( bool  read_only)
slot
Parameters
read_onlywhether this edition widget should be read only
Here is the caller graph for this function:

◆ updateFormType

void TitleBlockTemplateCellWidget::updateFormType ( int  cell_type)
slot

Shows or hides various widgets depending on the selected cell type

Here is the caller graph for this function:

◆ updateLogosComboBox

void TitleBlockTemplateCellWidget::updateLogosComboBox ( const TitleBlockTemplate parent_template)
slot

Updates the list of available logos

Parameters
parent_templateThe title block template which contains the currently edited cell
Here is the caller graph for this function:

◆ verticalAlignment()

int TitleBlockTemplateCellWidget::verticalAlignment ( ) const

Emit a vertical alignment modification command.

See also
ModifyTitleBlockCellCommand
Here is the caller graph for this function:

Member Data Documentation

◆ add_logo_input_

QPushButton* TitleBlockTemplateCellWidget::add_logo_input_
private

◆ align_label_

QLabel* TitleBlockTemplateCellWidget::align_label_
private

◆ cell_editor_image_layout_

QHBoxLayout* TitleBlockTemplateCellWidget::cell_editor_image_layout_
private

◆ cell_editor_layout_

QVBoxLayout* TitleBlockTemplateCellWidget::cell_editor_layout_
private

◆ cell_editor_text_layout_

QGridLayout* TitleBlockTemplateCellWidget::cell_editor_text_layout_
private

◆ cell_editor_type_and_name_layout_

QHBoxLayout* TitleBlockTemplateCellWidget::cell_editor_type_and_name_layout_
private

◆ cell_type_input_

QComboBox* TitleBlockTemplateCellWidget::cell_type_input_
private

◆ cell_type_label_

QLabel* TitleBlockTemplateCellWidget::cell_type_label_
private

◆ edited_cell_

TitleBlockCell* TitleBlockTemplateCellWidget::edited_cell_
private

◆ empty_label_

QLabel* TitleBlockTemplateCellWidget::empty_label_
private

◆ font_adjust_input_

QCheckBox* TitleBlockTemplateCellWidget::font_adjust_input_
private

◆ font_size_input_

QSpinBox* TitleBlockTemplateCellWidget::font_size_input_
private

◆ font_size_label_

QLabel* TitleBlockTemplateCellWidget::font_size_label_
private

◆ horiz_align_indexes_

QHash<int, int> TitleBlockTemplateCellWidget::horiz_align_indexes_
private

◆ horiz_align_input_

QComboBox* TitleBlockTemplateCellWidget::horiz_align_input_
private

◆ horiz_align_label_

QLabel* TitleBlockTemplateCellWidget::horiz_align_label_
private

◆ label_checkbox_

QCheckBox* TitleBlockTemplateCellWidget::label_checkbox_
private

◆ label_edit_

QPushButton* TitleBlockTemplateCellWidget::label_edit_
private

◆ label_input_

QLineEdit* TitleBlockTemplateCellWidget::label_input_
private

◆ logo_input_

QComboBox* TitleBlockTemplateCellWidget::logo_input_
private

◆ logo_label_

QLabel* TitleBlockTemplateCellWidget::logo_label_
private

◆ name_input_

QLineEdit* TitleBlockTemplateCellWidget::name_input_
private

◆ name_label_

QLabel* TitleBlockTemplateCellWidget::name_label_
private

◆ read_only_

bool TitleBlockTemplateCellWidget::read_only_
private

is the template read-only?

◆ value_edit_

QPushButton* TitleBlockTemplateCellWidget::value_edit_
private

◆ value_input_

QLineEdit* TitleBlockTemplateCellWidget::value_input_
private

◆ value_label_

QLabel* TitleBlockTemplateCellWidget::value_label_
private

◆ vert_align_indexes_

QHash<int, int> TitleBlockTemplateCellWidget::vert_align_indexes_
private

◆ vert_align_input_

QComboBox* TitleBlockTemplateCellWidget::vert_align_input_
private

◆ vert_align_label_

QLabel* TitleBlockTemplateCellWidget::vert_align_label_
private

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