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
fc2aa50f
Commit
fc2aa50f
authored
2 years ago
by
Mikhail Svechnikov
Browse files
Options
Downloads
Patches
Plain Diff
FitParameterItem: add limits
parent
b13b15cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1120
GUI: FitParameterModel and fit items are refactored
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/Model/Job/FitParameterItem.cpp
+20
-9
20 additions, 9 deletions
GUI/Model/Job/FitParameterItem.cpp
GUI/Model/Job/FitParameterItem.h
+10
-6
10 additions, 6 deletions
GUI/Model/Job/FitParameterItem.h
with
30 additions
and
15 deletions
GUI/Model/Job/FitParameterItem.cpp
+
20
−
9
View file @
fc2aa50f
...
...
@@ -320,14 +320,14 @@ FitComboItem::FitComboItem(const ComboProperty& combo, QObject *parent)
{
}
ComboProperty
FitComboItem
::
combo
()
ComboProperty
FitComboItem
::
combo
()
const
{
return
m_combo
;
}
void
FitComboItem
::
setCombo
(
const
ComboProperty
&
c
)
void
FitComboItem
::
setCombo
(
const
ComboProperty
&
c
ombo
)
{
m_combo
=
c
;
m_combo
=
c
ombo
;
}
//------------------------------------------------------------------------------------------------
...
...
@@ -335,6 +335,7 @@ void FitComboItem::setCombo(const ComboProperty &c)
FitDoubleItem
::
FitDoubleItem
(
QObject
*
parent
)
:
QObject
(
parent
)
,
m_value
(
0.0
)
,
m_limits
(
RealLimits
::
limitless
())
{
}
...
...
@@ -344,14 +345,24 @@ FitDoubleItem::FitDoubleItem(double value, QObject *parent)
{
}
double
FitDoubleItem
::
value
()
double
FitDoubleItem
::
value
()
const
{
return
m_value
;
}
void
FitDoubleItem
::
setValue
(
double
v
)
void
FitDoubleItem
::
setValue
(
double
v
alue
)
{
m_value
=
v
;
m_value
=
value
;
}
RealLimits
FitDoubleItem
::
limits
()
const
{
return
m_limits
;
}
SessionItem
&
FitDoubleItem
::
setLimits
(
const
RealLimits
&
limits
)
{
m_limits
=
limits
;
}
//------------------------------------------------------------------------------------------------
...
...
@@ -368,12 +379,12 @@ FitEditableDoubleItem::FitEditableDoubleItem(double value, bool isEnabled, QObje
{
}
bool
FitEditableDoubleItem
::
isEnabled
()
bool
FitEditableDoubleItem
::
isEnabled
()
const
{
return
m_isEnabled
;
}
void
FitEditableDoubleItem
::
setEnabled
(
bool
b
)
void
FitEditableDoubleItem
::
setEnabled
(
bool
enabled
)
{
m_isEnabled
=
b
;
m_isEnabled
=
enabled
;
}
This diff is collapsed.
Click to expand it.
GUI/Model/Job/FitParameterItem.h
+
10
−
6
View file @
fc2aa50f
...
...
@@ -27,8 +27,8 @@ public:
FitComboItem
(
QObject
*
parent
=
nullptr
);
FitComboItem
(
const
ComboProperty
&
combo
,
QObject
*
parent
=
nullptr
);
ComboProperty
combo
();
void
setCombo
(
const
ComboProperty
&
c
);
ComboProperty
combo
()
const
;
void
setCombo
(
const
ComboProperty
&
c
ombo
);
private:
ComboProperty
m_combo
;
...
...
@@ -40,11 +40,15 @@ public:
FitDoubleItem
(
QObject
*
parent
=
nullptr
);
FitDoubleItem
(
double
value
,
QObject
*
parent
=
nullptr
);
double
value
();
void
setValue
(
double
v
);
double
value
()
const
;
void
setValue
(
double
value
);
RealLimits
limits
()
const
;
SessionItem
&
setLimits
(
const
RealLimits
&
limits
);
private:
double
m_value
;
RealLimits
m_limits
;
};
//! Holds double values which can be enabled or disabled.
...
...
@@ -53,8 +57,8 @@ public:
FitEditableDoubleItem
(
QObject
*
parent
=
nullptr
);
FitEditableDoubleItem
(
double
value
,
bool
isEnabled
,
QObject
*
parent
=
nullptr
);
bool
isEnabled
();
void
setEnabled
(
bool
b
);
bool
isEnabled
()
const
;
void
setEnabled
(
bool
enabled
);
private:
bool
m_isEnabled
;
...
...
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