QElectroTech
0.100.0-dev
Loading...
Searching...
No Matches
sources
titleblock
dimensionwidget.h
Go to the documentation of this file.
1
/*
2
Copyright 2006-2024 The QElectroTech Team
3
This file is part of QElectroTech.
4
5
QElectroTech is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 2 of the License, or
8
(at your option) any later version.
9
10
QElectroTech is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
#ifndef TITLEBLOCK_SLASH_DIMENSION_WIDGET_H
19
#define TITLEBLOCK_SLASH_DIMENSION_WIDGET_H
20
#include <QtWidgets>
21
#include "
dimension.h
"
22
27
class
TitleBlockDimensionWidget
:
public
QDialog {
28
Q_OBJECT
29
30
// constructors, destructor
31
public
:
32
TitleBlockDimensionWidget
(
bool
, QWidget * parent =
nullptr
);
33
~TitleBlockDimensionWidget
()
override
;
34
private
:
35
TitleBlockDimensionWidget
(
const
TitleBlockDimensionWidget
&);
36
37
// methods
38
public
:
39
bool
isComplete
()
const
;
40
QLabel *
label
()
const
;
41
QSpinBox *
spinbox
()
const
;
42
TitleBlockDimension
value
()
const
;
43
void
setValue
(
const
TitleBlockDimension
&);
44
bool
isReadOnly
()
const
;
45
void
setReadOnly
(
bool
);
46
47
private
:
48
void
initWidgets
();
49
void
initLayouts
();
50
51
private
slots:
52
void
updateSpinBoxSuffix
();
53
54
// attributes
55
private
:
56
bool
complete_
;
57
QSpinBox *
spinbox_
;
58
QLabel *
spinbox_label_
;
59
QRadioButton *
absolute_button_
;
60
QRadioButton *
relative_button_
;
61
QRadioButton *
remaining_button_
;
62
QButtonGroup *
dimension_type_
;
63
QDialogButtonBox *
buttons_
;
64
bool
read_only_
;
65
};
66
#endif
TitleBlockDimensionWidget
Definition
dimensionwidget.h:27
TitleBlockDimensionWidget::remaining_button_
QRadioButton * remaining_button_
Radio button to indicate the length is relative to the remaining length.
Definition
dimensionwidget.h:61
TitleBlockDimensionWidget::~TitleBlockDimensionWidget
~TitleBlockDimensionWidget() override
Definition
dimensionwidget.cpp:39
TitleBlockDimensionWidget::spinbox_label_
QLabel * spinbox_label_
Label shown right before the spinbox.
Definition
dimensionwidget.h:58
TitleBlockDimensionWidget::read_only_
bool read_only_
Whether or not this widget allow edition of the displayed dimension.
Definition
dimensionwidget.h:64
TitleBlockDimensionWidget::buttons_
QDialogButtonBox * buttons_
Buttons to validate the dialog.
Definition
dimensionwidget.h:63
TitleBlockDimensionWidget::spinbox
QSpinBox * spinbox() const
Definition
dimensionwidget.cpp:64
TitleBlockDimensionWidget::complete_
bool complete_
Whether or not this dialog is required to be complete, i.e. displaying also.
Definition
dimensionwidget.h:56
TitleBlockDimensionWidget::label
QLabel * label() const
Definition
dimensionwidget.cpp:55
TitleBlockDimensionWidget::updateSpinBoxSuffix
void updateSpinBoxSuffix()
Definition
dimensionwidget.cpp:179
TitleBlockDimensionWidget::initLayouts
void initLayouts()
Definition
dimensionwidget.cpp:160
TitleBlockDimensionWidget::isReadOnly
bool isReadOnly() const
Definition
dimensionwidget.cpp:98
TitleBlockDimensionWidget::relative_button_
QRadioButton * relative_button_
Radio button to indicate the length is relative to the total length.
Definition
dimensionwidget.h:60
TitleBlockDimensionWidget::isComplete
bool isComplete() const
Definition
dimensionwidget.cpp:46
TitleBlockDimensionWidget::value
TitleBlockDimension value() const
Definition
dimensionwidget.cpp:72
TitleBlockDimensionWidget::setReadOnly
void setReadOnly(bool)
Definition
dimensionwidget.cpp:107
TitleBlockDimensionWidget::dimension_type_
QButtonGroup * dimension_type_
QButtonGroup for the three radio buttons.
Definition
dimensionwidget.h:62
TitleBlockDimensionWidget::spinbox_
QSpinBox * spinbox_
Spinbox displaying the length.
Definition
dimensionwidget.h:57
TitleBlockDimensionWidget::initWidgets
void initWidgets()
Definition
dimensionwidget.cpp:122
TitleBlockDimensionWidget::setValue
void setValue(const TitleBlockDimension &)
Definition
dimensionwidget.cpp:84
TitleBlockDimensionWidget::TitleBlockDimensionWidget
TitleBlockDimensionWidget(const TitleBlockDimensionWidget &)
TitleBlockDimensionWidget::absolute_button_
QRadioButton * absolute_button_
Radio button to indicate the length is absolute.
Definition
dimensionwidget.h:59
dimension.h
TitleBlockDimension
Definition
dimension.h:26
Generated by
1.9.8