#8779 Summary Multi Plot : Add flag to control visibility of axis number values

Useful for making plots anonymized
This commit is contained in:
Magne Sjaastad
2022-04-07 14:06:57 +02:00
parent a0507c85f4
commit f099a8c89f
8 changed files with 43 additions and 2 deletions

View File

@@ -92,8 +92,9 @@ public:
bool titleBold = false,
int alignment = (int)Qt::AlignCenter ) = 0;
virtual void enableAxis( RiuPlotAxis axis, bool isEnabled ) = 0;
virtual bool axisEnabled( RiuPlotAxis axis ) const = 0;
virtual void enableAxisNumberLabels( RiuPlotAxis axis, bool isEnabled ) = 0;
virtual void enableAxis( RiuPlotAxis axis, bool isEnabled ) = 0;
virtual bool axisEnabled( RiuPlotAxis axis ) const = 0;
virtual void setAxisScale( RiuPlotAxis axis, double min, double max ) = 0;
virtual void setAxisAutoScale( RiuPlotAxis axis, bool enable ) = 0;

View File

@@ -197,6 +197,13 @@ void RiuQtChartsPlotWidget::setAxesFontsAndAlignment( int titleFontSize, int val
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuQtChartsPlotWidget::enableAxisNumberLabels( RiuPlotAxis axis, bool isEnabled )
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -86,6 +86,7 @@ public:
bool titleBold = false,
int alignment = (int)Qt::AlignCenter ) override;
void enableAxisNumberLabels( RiuPlotAxis axis, bool isEnabled ) override;
void enableAxis( RiuPlotAxis axis, bool isEnabled ) override;
bool axisEnabled( RiuPlotAxis axis ) const override;

View File

@@ -1129,6 +1129,14 @@ void RiuQwtPlotWidget::enableAxis( RiuPlotAxis axis, bool isEnabled )
m_plot->setAxisVisible( toQwtPlotAxis( axis ), isEnabled );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuQwtPlotWidget::enableAxisNumberLabels( RiuPlotAxis axis, bool isEnabled )
{
m_plot->axisScaleDraw( toQwtPlotAxis( axis ) )->enableComponent( QwtAbstractScaleDraw::Labels, isEnabled );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -79,6 +79,7 @@ public:
int alignment = (int)Qt::AlignCenter ) override;
void enableAxis( RiuPlotAxis axis, bool isEnabled ) override;
void enableAxisNumberLabels( RiuPlotAxis axis, bool isEnabled ) override;
bool axisEnabled( RiuPlotAxis axis ) const override;
void setAxisScale( RiuPlotAxis axis, double min, double max ) override;