#9161 QtCharts: Refactor to make QtCharts optional again.

This commit is contained in:
Kristian Bendiksen
2022-08-08 11:31:43 +02:00
parent a87e05035d
commit eedebd71a5
7 changed files with 625 additions and 579 deletions

View File

@@ -37,10 +37,12 @@
#include "RiuPlotMainWindow.h"
#include "RiuPlotObjectPicker.h"
#include "RiuPlotWidget.h"
#include "RiuQtChartsPlotWidget.h"
#include "RiuQwtPlotLegend.h"
#include "RiuQwtPlotTools.h"
#include "RiuQwtPlotWidget.h"
#ifdef USE_QTCHARTS
#include "RiuQtChartsPlotWidget.h"
#endif
#include "cafCmdFeatureMenuBuilder.h"
#include "cafSelectionManager.h"
@@ -183,10 +185,12 @@ void RiuMultiPlotPage::insertPlot( RiuPlotWidget* plotWidget, size_t index )
}
else
{
#ifdef USE_QTCHARTS
auto qtchartPlotWidget = dynamic_cast<RiuQtChartsPlotWidget*>( plotWidget );
legend->connect( qtchartPlotWidget,
SIGNAL( legendDataChanged( const QList<QwtLegendData>& ) ),
SLOT( updateLegend( const QList<QwtLegendData>& ) ) );
#endif
}
QObject::connect( legend, SIGNAL( legendUpdated() ), this, SLOT( onLegendUpdated() ) );