Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mlz
BornAgain
Commits
50cd36f7
Commit
50cd36f7
authored
Jun 10, 2022
by
Mikhail Svechnikov
Committed by
Mikhail Svechnikov
Jun 13, 2022
Browse files
gradient and interpolation are not stored in QSettings anymore
parent
e0b1a4db
Changes
3
Hide whitespace changes
Inline
Side-by-side
GUI/View/Plot2D/IntensityDataCanvas.cpp
View file @
50cd36f7
...
...
@@ -66,7 +66,6 @@ void IntensityDataCanvas::setItem(SessionItem* intensityItem)
SessionItemWidget
::
setItem
(
intensityItem
);
m_colorMap
->
setItem
(
intensityDataItem
());
applyPersistentSettings
();
if
(
!
m_rotateDataAction
)
initRotation
();
}
...
...
@@ -106,12 +105,6 @@ void IntensityDataCanvas::onMousePress(QMouseEvent* event)
emit
customContextMenuRequested
(
event
->
globalPos
());
}
void
IntensityDataCanvas
::
subscribeToItem
()
{
intensityDataItem
()
->
mapper
()
->
setOnPropertyChange
(
[
this
](
const
QString
&
name
)
{
onPropertyChanged
(
name
);
},
this
);
}
void
IntensityDataCanvas
::
rotateData
()
{
auto
*
realDataItem
=
dynamic_cast
<
RealDataItem
*>
(
intensityDataItem
()
->
parentItem
());
...
...
@@ -169,38 +162,3 @@ void IntensityDataCanvas::initRotation()
connect
(
m_rotateDataAction
,
&
QAction
::
triggered
,
this
,
&
IntensityDataCanvas
::
rotateData
);
}
}
//! Reads gradient/ interpolation settings from IntensityDataItem and writes to persistant
//! project settings.
void
IntensityDataCanvas
::
onPropertyChanged
(
const
QString
&
name
)
{
// if (IntensityDataItem::isGradientPropertyName(name)) {
// QSettings settings;
// settings.setValue(SettingsKeyGradient, intensityDataItem()->getGradientValue());
// } else if (IntensityDataItem::isInterpolatedPropertyName(name)) {
// QSettings settings;
// settings.setValue(SettingsKeyInterpolation, intensityDataItem()->isInterpolated());
// }
}
//! Apply persistent settings (gradient, interpolation) to IntensityDataItem.
void
IntensityDataCanvas
::
applyPersistentSettings
()
{
// QSettings settings;
// if (settings.contains(SettingsKeyGradient)) {
// ComboProperty combo = intensityDataItem()->getGradient();
// QString persistentGradient = settings.value(SettingsKeyGradient).toString();
// if (combo.getValue() != persistentGradient) {
// combo.setValue(persistentGradient);
// intensityDataItem()->setGradient(combo);
// }
// }
// if (settings.contains(SettingsKeyInterpolation)) {
// bool value = settings.value(SettingsKeyInterpolation).toBool();
// intensityDataItem()->setInterpolated(value);
// }
}
GUI/View/Plot2D/IntensityDataCanvas.h
View file @
50cd36f7
...
...
@@ -45,15 +45,12 @@ public slots:
void
onMousePress
(
QMouseEvent
*
event
);
protected:
void
subscribeToItem
()
override
;
void
rotateData
();
private:
IntensityDataItem
*
intensityDataItem
();
void
initActions
();
void
initRotation
();
void
onPropertyChanged
(
const
QString
&
name
);
void
applyPersistentSettings
();
ColorMapCanvas
*
m_colorMap
;
QAction
*
m_resetViewAction
;
...
...
GUI/View/PlotUtil/IntensityDataPropertyWidget.cpp
View file @
50cd36f7
...
...
@@ -159,7 +159,7 @@ void IntensityDataPropertyWidget::setItem(QVector<IntensityDataItem*> itemsVec)
#else
FOR_EACH_ITEM
connect
(
item
,
&
IntensityDataItem
::
axesUnitsChanged
,
this
,
[
=
](){
connect
(
item
,
&
IntensityDataItem
::
axesUnitsChanged
,
this
,
[
=
]()
{
if
(
jobItem
())
{
item
->
blockSignals
(
true
);
item
->
updateCoords
(
jobItem
()
->
instrumentItem
());
...
...
Write
Preview
Supports
Markdown
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