Skip to content
Snippets Groups Projects
Commit 3902dd32 authored by t.knopff's avatar t.knopff
Browse files

Make SpecularDataItem::P_XAXIS private

parent 9ff522bd
No related branches found
No related tags found
1 merge request!64Refactor model: DataItem and SpecularDataItem
......@@ -158,6 +158,11 @@ void SpecularDataItem::reset(ImportDataInfo data)
setAxesRangeToData();
}
bool SpecularDataItem::isXaxisPropertyName(const QString& name)
{
return name == P_XAXIS;
}
void SpecularDataItem::setLowerX(double value)
{
xAxisItem()->setLowerBound(value);
......
......@@ -28,9 +28,9 @@ const QString y_axis_default_name = "Signal [a.u.]";
class BA_CORE_API_ SpecularDataItem : public DataItem {
private:
static const QString P_TITLE;
static const QString P_XAXIS;
public:
static const QString P_XAXIS;
static const QString P_YAXIS;
SpecularDataItem();
......@@ -79,6 +79,8 @@ public:
//! data.
void reset(ImportDataInfo data) override;
static bool isXaxisPropertyName(const QString& name);
public slots:
void setLowerX(double value);
void setUpperX(double value);
......
......@@ -257,7 +257,7 @@ void SpecularPlot::modifyAxesProperties(const QString& axisName, const QString&
replot();
}
if (axisName == SpecularDataItem::P_XAXIS) {
if (SpecularDataItem::isXaxisPropertyName(axisName)) {
if (propertyName == BasicAxisItem::P_MIN_DEG || propertyName == BasicAxisItem::P_MAX_DEG) {
setAxesRangeConnected(false);
m_custom_plot->xAxis->setRange(specularItem()->getLowerX(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment