Skip to content
Snippets Groups Projects
Commit 565d3d43 authored by Matthew D Jones's avatar Matthew D Jones
Browse files

Re #11422 Add warning message to GUI about axis range

parent e95efbc7
No related merge requests found
...@@ -106,6 +106,10 @@ ScaleDetails::ScaleDetails(ApplicationWindow* app, Graph* graph, int mappedaxis, ...@@ -106,6 +106,10 @@ ScaleDetails::ScaleDetails(ApplicationWindow* app, Graph* graph, int mappedaxis,
middleLayout->addWidget(m_lblN, 3, 0); middleLayout->addWidget(m_lblN, 3, 0);
middleLayout->addWidget(m_dspnN, 3, 1); middleLayout->addWidget(m_dspnN, 3, 1);
m_lblWarn = new QLabel(tr("Ensure axis and data ranges are\ncompatible with chosen axis scale."));
middleLayout->addWidget(m_lblWarn, 4, 0, 1, 2);
m_lblWarn->setVisible(false);
m_chkInvert = new QCheckBox(); m_chkInvert = new QCheckBox();
m_chkInvert->setText(tr("Inverted")); m_chkInvert->setText(tr("Inverted"));
m_chkInvert->setChecked(false); m_chkInvert->setChecked(false);
...@@ -638,7 +642,8 @@ void ScaleDetails::checkstep() ...@@ -638,7 +642,8 @@ void ScaleDetails::checkstep()
} }
/* /*
* Enable the "n =" widget if X^n scale type is selected * Enable the "n =" widget and display warning message
* if power scale type is selected
*/ */
void ScaleDetails::checkscaletype() void ScaleDetails::checkscaletype()
{ {
...@@ -646,10 +651,12 @@ void ScaleDetails::checkscaletype() ...@@ -646,10 +651,12 @@ void ScaleDetails::checkscaletype()
if (m_cmbScaleType->currentIndex() == 2) if (m_cmbScaleType->currentIndex() == 2)
{ {
m_dspnN->setEnabled(true); m_dspnN->setEnabled(true);
m_lblWarn->setVisible(true);
} }
else else
{ {
m_dspnN->setEnabled(false); m_dspnN->setEnabled(false);
m_lblWarn->setVisible(false);
} }
} }
......
...@@ -81,7 +81,7 @@ private: ...@@ -81,7 +81,7 @@ private:
QSpinBox *m_spnMajorValue, *m_spnBreakPosition, *m_spnBreakWidth; QSpinBox *m_spnMajorValue, *m_spnBreakPosition, *m_spnBreakWidth;
QGroupBox *m_grpAxesBreaks; QGroupBox *m_grpAxesBreaks;
QComboBox *m_cmbMinorTicksBeforeBreak, *m_cmbMinorTicksAfterBreak, *m_cmbScaleType, *m_cmbMinorValue, *m_cmbUnit; QComboBox *m_cmbMinorTicksBeforeBreak, *m_cmbMinorTicksAfterBreak, *m_cmbScaleType, *m_cmbMinorValue, *m_cmbUnit;
QLabel *m_lblScaleTypeLabel, *m_lblMinorBox, *m_lblStart, *m_lblEnd, *m_lblN; QLabel *m_lblScaleTypeLabel, *m_lblMinorBox, *m_lblStart, *m_lblEnd, *m_lblN, *m_lblWarn;
QDateTimeEdit *m_dteStartDateTime, *m_dteEndDateTime; QDateTimeEdit *m_dteStartDateTime, *m_dteEndDateTime;
QTimeEdit *m_timStartTime, *m_timEndTime; QTimeEdit *m_timStartTime, *m_timEndTime;
......
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