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
c37e9a6c
Commit
c37e9a6c
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
GUI::Util::createScientificSpinBoxRow rm unused argument 'slot'
parent
e5b442b2
No related branches found
No related tags found
1 merge request
!2058
GUI instrument editor: detector section made more compact
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/View/Numeric/NumWidgetUtil.cpp
+1
-5
1 addition, 5 deletions
GUI/View/Numeric/NumWidgetUtil.cpp
GUI/View/Numeric/NumWidgetUtil.h
+2
-4
2 additions, 4 deletions
GUI/View/Numeric/NumWidgetUtil.h
with
3 additions
and
9 deletions
GUI/View/Numeric/NumWidgetUtil.cpp
+
1
−
5
View file @
c37e9a6c
...
@@ -34,8 +34,7 @@ DoubleSpinBox* GUI::Util::createDoubleSpinBoxRow(QFormLayout* parentLayout, Doub
...
@@ -34,8 +34,7 @@ DoubleSpinBox* GUI::Util::createDoubleSpinBoxRow(QFormLayout* parentLayout, Doub
ScientificSpinBox
*
GUI
::
Util
::
createScientificSpinBox
(
QFormLayout
*
parentLayout
,
ScientificSpinBox
*
GUI
::
Util
::
createScientificSpinBox
(
QFormLayout
*
parentLayout
,
const
DoubleProperty
&
d
,
const
DoubleProperty
&
d
)
function
<
void
(
double
)
>
slot
)
{
{
auto
*
spinBox
=
new
ScientificSpinBox
(
parentLayout
->
parentWidget
());
auto
*
spinBox
=
new
ScientificSpinBox
(
parentLayout
->
parentWidget
());
spinBox
->
setFocusPolicy
(
Qt
::
StrongFocus
);
spinBox
->
setFocusPolicy
(
Qt
::
StrongFocus
);
...
@@ -45,9 +44,6 @@ ScientificSpinBox* GUI::Util::createScientificSpinBox(QFormLayout* parentLayout,
...
@@ -45,9 +44,6 @@ ScientificSpinBox* GUI::Util::createScientificSpinBox(QFormLayout* parentLayout,
spinBox
->
setValue
(
d
.
value
());
spinBox
->
setValue
(
d
.
value
());
parentLayout
->
addRow
(
d
.
label
()
+
":"
,
spinBox
);
parentLayout
->
addRow
(
d
.
label
()
+
":"
,
spinBox
);
if
(
slot
)
QObject
::
connect
(
spinBox
,
&
ScientificSpinBox
::
valueChanged
,
[
=
](
double
v
)
{
slot
(
v
);
});
return
spinBox
;
return
spinBox
;
}
}
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Numeric/NumWidgetUtil.h
+
2
−
4
View file @
c37e9a6c
...
@@ -47,10 +47,8 @@ DoubleSpinBox* createDoubleSpinBoxRow(QFormLayout* parentLayout, DoubleProperty&
...
@@ -47,10 +47,8 @@ DoubleSpinBox* createDoubleSpinBoxRow(QFormLayout* parentLayout, DoubleProperty&
//! would take place when just scrolling through the form.
//! would take place when just scrolling through the form.
//!
//!
//! No connections to update the property will be established! Therefore changes in the spin box
//! No connections to update the property will be established! Therefore changes in the spin box
//! will *not* be notified to the property. The additional (and optional) slot can be used to be
//! will *not* be notified to the property.
//! notified about a value change.
ScientificSpinBox
*
createScientificSpinBox
(
QFormLayout
*
parentLayout
,
const
DoubleProperty
&
d
);
ScientificSpinBox
*
createScientificSpinBox
(
QFormLayout
*
parentLayout
,
const
DoubleProperty
&
d
,
std
::
function
<
void
(
double
)
>
slot
=
nullptr
);
//! Creates an updatable checkbox
//! Creates an updatable checkbox
QCheckBox
*
createCheckBox
(
const
QString
&
title
,
std
::
function
<
bool
()
>
getter
,
QCheckBox
*
createCheckBox
(
const
QString
&
title
,
std
::
function
<
bool
()
>
getter
,
...
...
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