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

Re #11422 Added GUI elements to select X^n scaling and input "n"

parent 58bfc9f8
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,13 @@ ScaleDetails::ScaleDetails(ApplicationWindow* app, Graph* graph, int mappedaxis, ...@@ -99,6 +99,13 @@ ScaleDetails::ScaleDetails(ApplicationWindow* app, Graph* graph, int mappedaxis,
middleLayout->addWidget(m_lblScaleTypeLabel, 2, 0); middleLayout->addWidget(m_lblScaleTypeLabel, 2, 0);
middleLayout->addWidget(m_cmbScaleType, 2, 1); 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 = new QCheckBox();
m_chkInvert->setText(tr("Inverted")); m_chkInvert->setText(tr("Inverted"));
m_chkInvert->setChecked(false); m_chkInvert->setChecked(false);
......
...@@ -74,13 +74,13 @@ private: ...@@ -74,13 +74,13 @@ private:
ApplicationWindow* m_app; ApplicationWindow* m_app;
Graph* m_graph; 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; QCheckBox *m_chkInvert, *m_chkLog10AfterBreak, *m_chkBreakDecoration;
QRadioButton *m_radStep, *m_radMajor; QRadioButton *m_radStep, *m_radMajor;
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; QLabel *m_lblScaleTypeLabel, *m_lblMinorBox, *m_lblStart, *m_lblEnd, *m_lblN;
QDateTimeEdit *m_dteStartDateTime, *m_dteEndDateTime; QDateTimeEdit *m_dteStartDateTime, *m_dteEndDateTime;
QTimeEdit *m_timStartTime, *m_timEndTime; QTimeEdit *m_timStartTime, *m_timEndTime;
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
class PowerScaleTransformation: public ScaleTransformation class PowerScaleTransformation: public ScaleTransformation
{ {
public: 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 xForm(double x, double, double, double p1, double p2) const;
virtual double invXForm(double x, double s1, double s2, double p1, double p2) const; virtual double invXForm(double x, double s1, double s2, double p1, double p2) const;
QwtScaleTransformation* copy() const; QwtScaleTransformation* copy() const;
......
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