Skip to content

Commit

Permalink
Re #11422 Added GUI elements to select X^n scaling and input "n"
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew D Jones authored and Matthew D Jones committed Aug 10, 2015
1 parent 58bfc9f commit f2312c5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions Code/Mantid/MantidPlot/src/ScaleDetails.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ ScaleDetails::ScaleDetails(ApplicationWindow* app, Graph* graph, int mappedaxis,
middleLayout->addWidget(m_lblScaleTypeLabel, 2, 0);
middleLayout->addWidget(m_cmbScaleType, 2, 1);

m_lblN = new QLabel(tr("n ="));
m_dspnN = new DoubleSpinBox();
m_dspnN->setLocale(m_app->locale());
m_dspnN->setDecimals(m_app->d_graphing_digits);
middleLayout->addWidget(m_lblN, 3, 0);
middleLayout->addWidget(m_dspnN, 3, 1);

m_chkInvert = new QCheckBox();
m_chkInvert->setText(tr("Inverted"));
m_chkInvert->setChecked(false);
Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/MantidPlot/src/ScaleDetails.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ private slots:
ApplicationWindow* m_app;
Graph* m_graph;

DoubleSpinBox *m_dspnEnd, *m_dspnStart, *m_dspnStep, *m_dspnBreakStart, *m_dspnBreakEnd, *m_dspnStepBeforeBreak, *m_dspnStepAfterBreak;
DoubleSpinBox *m_dspnEnd, *m_dspnStart, *m_dspnStep, *m_dspnBreakStart, *m_dspnBreakEnd, *m_dspnStepBeforeBreak, *m_dspnStepAfterBreak, *m_dspnN;
QCheckBox *m_chkInvert, *m_chkLog10AfterBreak, *m_chkBreakDecoration;
QRadioButton *m_radStep, *m_radMajor;
QSpinBox *m_spnMajorValue, *m_spnBreakPosition, *m_spnBreakWidth;
QGroupBox *m_grpAxesBreaks;
QComboBox *m_cmbMinorTicksBeforeBreak, *m_cmbMinorTicksAfterBreak, *m_cmbScaleType, *m_cmbMinorValue, *m_cmbUnit;
QLabel *m_lblScaleTypeLabel, *m_lblMinorBox, *m_lblStart, *m_lblEnd;
QLabel *m_lblScaleTypeLabel, *m_lblMinorBox, *m_lblStart, *m_lblEnd, *m_lblN;
QDateTimeEdit *m_dteStartDateTime, *m_dteEndDateTime;
QTimeEdit *m_timStartTime, *m_timEndTime;

Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/MantidPlot/src/plot2D/PowerScaleEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
class PowerScaleTransformation: public ScaleTransformation
{
public:
PowerScaleTransformation(const ScaleEngine *engine):ScaleTransformation(engine){nth_power = 2.0;};
PowerScaleTransformation(const ScaleEngine *engine):ScaleTransformation(engine){nth_power = -1.0;};
virtual double xForm(double x, double, double, double p1, double p2) const;
virtual double invXForm(double x, double s1, double s2, double p1, double p2) const;
QwtScaleTransformation* copy() const;
Expand Down

0 comments on commit f2312c5

Please sign in to comment.