QElectroTech 0.100.0-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. | |
QSpinBox * | spinbox_ |
Spinbox displaying the length. | |
QLabel * | spinbox_label_ |
Label shown right before the spinbox. | |
QRadioButton * | absolute_button_ |
Radio button to indicate the length is absolute. | |
QRadioButton * | relative_button_ |
Radio button to indicate the length is relative to the total length. | |
QRadioButton * | remaining_button_ |
Radio button to indicate the length is relative to the remaining length. | |
QButtonGroup * | dimension_type_ |
QButtonGroup for the three radio buttons. | |
QDialogButtonBox * | buttons_ |
Buttons to validate the dialog. | |
bool | read_only_ |
Whether or not this widget allow edition of the displayed dimension. | |
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.