Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dtk
dtk-widgets
Commits
87ed984e
Commit
87ed984e
authored
Apr 24, 2020
by
LE BRETON Come
Browse files
Provide the whole fix.
There is more to say about this class..
parent
8006e89f
Pipeline
#139883
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/dtkWidgets/dtkWidgetsSpinBoxDouble.cpp
View file @
87ed984e
...
...
@@ -50,9 +50,11 @@ public:
void
dtkWidgetsSpinBoxDoublePrivate
::
update
(
void
)
{
double
new_value
=
valueFromText
(
q
->
text
());
if
(
new_value
!=
this
->
value
)
{
this
->
value
=
new_value
;
double
old_value
=
this
->
value
;
this
->
valueFromText
(
q
->
text
());
if
(
old_value
!=
this
->
value
)
{
this
->
touch
();
}
}
...
...
@@ -148,13 +150,10 @@ QValidator::State dtkWidgetsSpinBoxDoublePrivate::validate(QString &text, int &p
//
// ///////////////////////////////////////////////////////////////////
dtkWidgetsSpinBoxDouble
::
dtkWidgetsSpinBoxDouble
(
QDoubleValidator
::
Notation
notation
,
QWidget
*
parent
)
dtkWidgetsSpinBoxDouble
::
dtkWidgetsSpinBoxDouble
(
QDoubleValidator
::
Notation
notation
,
QWidget
*
parent
)
:
dtkWidgetsBaseSpinBox
(
parent
),
d
(
new
dtkWidgetsSpinBoxDoublePrivate
)
{
d
->
q
=
this
;
d
->
value
=
0.0
;
...
...
@@ -172,11 +171,8 @@ dtkWidgetsSpinBoxDouble::dtkWidgetsSpinBoxDouble(QDoubleValidator::Notation nota
this
->
lineEdit
()
->
setValidator
(
d
->
validator
);
connect
(
this
,
SIGNAL
(
editingFinished
()),
d
,
SLOT
(
update
()));
QObject
::
connect
(
this
,
&
dtkWidgetsBaseSpinBox
::
editingFinished
,
d
,
&
dtkWidgetsSpinBoxDoublePrivate
::
update
);
}
dtkWidgetsSpinBoxDouble
::~
dtkWidgetsSpinBoxDouble
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment