QElectroTech
0.8-dev
|
#include <dimensionwidget.h>
Inherits QDialog.
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... | |
This class represents a dialog for the user to input a dimension: a row height, a column width, etc.
TitleBlockDimensionWidget::TitleBlockDimensionWidget | ( | bool | complete, |
QWidget * | parent = nullptr |
||
) |
Constructor
complete | True 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. |
parent | Parent QWidget |
|
override |
Destructor
|
private |
|
private |
Initialize the layout of the dialog.
|
private |
Initialize the widgets composing the dialog.
bool TitleBlockDimensionWidget::isComplete | ( | ) | const |
bool TitleBlockDimensionWidget::isReadOnly | ( | ) | const |
QLabel * TitleBlockDimensionWidget::label | ( | ) | const |
void TitleBlockDimensionWidget::setReadOnly | ( | bool | read_only | ) |
read_only | Whether or not this widget should allow edition of the displayed dimension. |
void TitleBlockDimensionWidget::setValue | ( | const TitleBlockDimension & | dim | ) |
dim | Dimension to be displayed and edited by this dialog |
QSpinBox * TitleBlockDimensionWidget::spinbox | ( | ) | const |
|
privateslot |
Ensure the suffix displayed by the spinbox matches the selected kind of length.
TitleBlockDimension TitleBlockDimensionWidget::value | ( | ) | const |
|
private |
Radio button to indicate the length is absolute.
|
private |
Buttons to validate the dialog.
|
private |
Whether or not this dialog is required to be complete, i.e. displaying also.
|
private |
QButtonGroup for the three radio buttons.
|
private |
Whether or not this widget allow edition of the displayed dimension.
|
private |
Radio button to indicate the length is relative to the total length.
|
private |
Radio button to indicate the length is relative to the remaining length.
|
private |
Spinbox displaying the length.
|
private |
Label shown right before the spinbox.