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

#include <dimensionwidget.h>

Inherits QDialog.

Collaboration diagram for TitleBlockDimensionWidget:
Collaboration graph

Public Member Functions

 TitleBlockDimensionWidget (bool, QWidget *parent=nullptr)
 
 ~TitleBlockDimensionWidget () override
 
bool isComplete () const
 
QLabel * label () const
 
QSpinBox * spinbox () const
 
TitleBlockDimension value () const
 
void setValue (const TitleBlockDimension &)
 
bool isReadOnly () const
 
void setReadOnly (bool)
 

Private Slots

void updateSpinBoxSuffix ()
 

Private Member Functions

 TitleBlockDimensionWidget (const TitleBlockDimensionWidget &)
 
void initWidgets ()
 
void initLayouts ()
 

Private Attributes

bool complete_
 Whether or not this dialog is required to be complete, i.e. displaying also. More...
 
QSpinBox * spinbox_
 Spinbox displaying the length. More...
 
QLabel * spinbox_label_
 Label shown right before the spinbox. More...
 
QRadioButton * absolute_button_
 Radio button to indicate the length is absolute. More...
 
QRadioButton * relative_button_
 Radio button to indicate the length is relative to the total length. More...
 
QRadioButton * remaining_button_
 Radio button to indicate the length is relative to the remaining length. More...
 
QButtonGroup * dimension_type_
 QButtonGroup for the three radio buttons. More...
 
QDialogButtonBox * buttons_
 Buttons to validate the dialog. More...
 
bool read_only_
 Whether or not this widget allow edition of the displayed dimension. More...
 

Detailed Description

This class represents a dialog for the user to input a dimension: a row height, a column width, etc.

Constructor & Destructor Documentation

◆ TitleBlockDimensionWidget() [1/2]

TitleBlockDimensionWidget::TitleBlockDimensionWidget ( bool  complete,
QWidget *  parent = nullptr 
)

Constructor

Parameters
completeTrue for this dialog to show the radio buttons that allow the user to specify whether the dimension is absolute, relative to the total width or relative to the remaining width.
parentParent QWidget
Here is the call graph for this function:

◆ ~TitleBlockDimensionWidget()

TitleBlockDimensionWidget::~TitleBlockDimensionWidget ( )
override

Destructor

◆ TitleBlockDimensionWidget() [2/2]

TitleBlockDimensionWidget::TitleBlockDimensionWidget ( const TitleBlockDimensionWidget )
private

Member Function Documentation

◆ initLayouts()

void TitleBlockDimensionWidget::initLayouts ( )
private

Initialize the layout of the dialog.

Here is the caller graph for this function:

◆ initWidgets()

void TitleBlockDimensionWidget::initWidgets ( )
private

Initialize the widgets composing the dialog.

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

◆ isComplete()

bool TitleBlockDimensionWidget::isComplete ( ) const
Returns
true if this dialog shows the optional radio buttons

◆ isReadOnly()

bool TitleBlockDimensionWidget::isReadOnly ( ) const
Returns
Whether or not this widget should allow edition of the displayed dimension.

◆ label()

QLabel * TitleBlockDimensionWidget::label ( ) const
Returns
a pointer to the label displayed right before the spinbox. Useful to specify a custom text.
Here is the caller graph for this function:

◆ setReadOnly()

void TitleBlockDimensionWidget::setReadOnly ( bool  read_only)
Parameters
read_onlyWhether or not this widget should allow edition of the displayed dimension.
Here is the caller graph for this function:

◆ setValue()

void TitleBlockDimensionWidget::setValue ( const TitleBlockDimension dim)
Parameters
dimDimension to be displayed and edited by this dialog
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spinbox()

QSpinBox * TitleBlockDimensionWidget::spinbox ( ) const
Returns
a pointer to the spinbox Useful to specify custom parameters, such as the minimum value

◆ updateSpinBoxSuffix

void TitleBlockDimensionWidget::updateSpinBoxSuffix ( )
privateslot

Ensure the suffix displayed by the spinbox matches the selected kind of length.

Here is the caller graph for this function:

◆ value()

TitleBlockDimension TitleBlockDimensionWidget::value ( ) const
Returns
The dimension as currently shown by the dialog
Here is the caller graph for this function:

Member Data Documentation

◆ absolute_button_

QRadioButton* TitleBlockDimensionWidget::absolute_button_
private

Radio button to indicate the length is absolute.

◆ buttons_

QDialogButtonBox* TitleBlockDimensionWidget::buttons_
private

Buttons to validate the dialog.

◆ complete_

bool TitleBlockDimensionWidget::complete_
private

Whether or not this dialog is required to be complete, i.e. displaying also.

◆ dimension_type_

QButtonGroup* TitleBlockDimensionWidget::dimension_type_
private

QButtonGroup for the three radio buttons.

◆ read_only_

bool TitleBlockDimensionWidget::read_only_
private

Whether or not this widget allow edition of the displayed dimension.

◆ relative_button_

QRadioButton* TitleBlockDimensionWidget::relative_button_
private

Radio button to indicate the length is relative to the total length.

◆ remaining_button_

QRadioButton* TitleBlockDimensionWidget::remaining_button_
private

Radio button to indicate the length is relative to the remaining length.

◆ spinbox_

QSpinBox* TitleBlockDimensionWidget::spinbox_
private

Spinbox displaying the length.

◆ spinbox_label_

QLabel* TitleBlockDimensionWidget::spinbox_label_
private

Label shown right before the spinbox.


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