Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
185ddd42
Commit
185ddd42
authored
1 year ago
by
Wuttke, Joachim
Committed by
Wuttke, Joachim
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
private fct -> lambda
parent
e0560656
No related branches found
No related tags found
1 merge request
!2205
rewrite DoubleSpinBox; use DoubleSpinBox for intensity; simplify RealLimits (#870)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/View/Numeric/DoubleSpinBox.cpp
+5
-9
5 additions, 9 deletions
GUI/View/Numeric/DoubleSpinBox.cpp
GUI/View/Numeric/DoubleSpinBox.h
+0
-2
0 additions, 2 deletions
GUI/View/Numeric/DoubleSpinBox.h
with
5 additions
and
11 deletions
GUI/View/Numeric/DoubleSpinBox.cpp
+
5
−
9
View file @
185ddd42
...
...
@@ -49,8 +49,11 @@ DoubleSpinBox::DoubleSpinBox(DoubleProperty& d)
QSignalBlocker
b
(
this
);
lineEdit
()
->
setText
(
toString
(
m_valueProperty
.
value
()));
QObject
::
connect
(
this
,
&
QAbstractSpinBox
::
editingFinished
,
this
,
&
DoubleSpinBox
::
onDisplayValueChanged
);
QObject
::
connect
(
this
,
&
QAbstractSpinBox
::
editingFinished
,
[
this
]()
{
double
val
;
ASSERT
(
Base
::
String
::
to_double
(
lineEdit
()
->
text
().
toStdString
(),
&
val
));
setValue
(
val
);
});
// setSingleStep(m_valueProperty.step());
}
...
...
@@ -82,13 +85,6 @@ void DoubleSpinBox::stepBy(int steps)
setValue
(
m_valueProperty
/
1.2
);
}
void
DoubleSpinBox
::
onDisplayValueChanged
()
{
double
val
;
ASSERT
(
Base
::
String
::
to_double
(
lineEdit
()
->
text
().
toStdString
(),
&
val
));
setValue
(
val
);
}
void
DoubleSpinBox
::
updateValue
()
{
QSignalBlocker
_
(
this
);
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Numeric/DoubleSpinBox.h
+
0
−
2
View file @
185ddd42
...
...
@@ -31,7 +31,6 @@ public:
//! unnoticed changes would take place when just scrolling through the form.
DoubleSpinBox
(
DoubleProperty
&
d
);
//! Update the shown value to the one contained in the value descriptor.
//!
//! No signal will be emitted if the new value has changed.
...
...
@@ -46,7 +45,6 @@ private:
void
setValue
(
double
val
);
void
wheelEvent
(
QWheelEvent
*
event
)
override
;
void
stepBy
(
int
steps
)
override
;
void
onDisplayValueChanged
();
DoubleProperty
&
m_valueProperty
;
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment