8 #include <qwt_plot_zoomer.h>
9 #include <qwt_plot_curve.h>
10 #include <qwt_legend.h>
11 #include <qwt_legend_label.h>
27 qRegisterMetaType< QVector<double> >(
"QVector<double>");
37 insertLegend(
m_Legend, QwtPlot::BottomLegend);
64 QString units = data->get_XUnitsLabel();
76 QString title = (img ? img -> get_Title() : data -> get_Title());
79 if (data->get_Oversample() > 1) {
80 tooltip = tr(
"%1\nPlotted vs %2\n%3 x oversampled")
83 .arg(data->get_Oversample());
85 tooltip = tr(
"%1\nPlotted vs %2\nNo oversampling")
91 pc -> setSamples(data->x(), data->y(), data->size());
94 pc -> setLegendAttribute(QwtPlotCurve::LegendShowSymbol,
true);
95 pc -> setLegendAttribute(QwtPlotCurve::LegendShowLine,
true);
102 proc -> updateEstimatedTime(proc -> prop_DisplayIntegratedDataTime(), tic.restart());
105 QWidget *legend =
m_Legend->legendWidget(itemToInfo(pc));
108 legend->setToolTip(tooltip);
121 detachItems(QwtPlotItem::Rtti_PlotCurve);
122 detachItems(QwtPlotItem::Rtti_PlotMarker);
129 QList<QwtPlotCurve*> toDelete;
131 foreach(QwtPlotItem* item, itemList()) {
132 QwtPlotCurve *pc =
dynamic_cast<QwtPlotCurve*
>(item);
134 QWidget *wid =
m_Legend->legendWidget(itemToInfo(pc));
137 QwtLegendLabel *itm = qobject_cast<QwtLegendLabel*>(wid);
140 if (itm->isChecked()) {
148 foreach(QwtPlotCurve *curve, toDelete) {
QxrdIntegratorWPtr m_Integrator
QWeakPointer< QxrdDataProcessor > QxrdDataProcessorWPtr
QWeakPointer< QcepPlotSettings > QcepPlotSettingsWPtr
void onNewIntegrationAvailable(QcepIntegratedDataPtr data)
QSharedPointer< QxrdDataProcessor > QxrdDataProcessorPtr
void setPlotCurveStyle(int index, QwtPlotCurve *curve)
QSharedPointer< QcepIntegratedData > QcepIntegratedDataPtr
void printMeasuredPolygon(QVector< QPointF > poly)
A class which draws piecewise curves.
void init(QcepPlotSettingsWPtr settings)
void setDataProcessor(QxrdDataProcessorWPtr proc)
QxrdIntegratorPlot(QWidget *parent=0)
void init(QcepPlotSettingsWPtr settings)
QcepPlotMeasurerPtr m_Measurer
QxrdDataProcessorWPtr m_DataProcessor
void clearSelectedCurves()
QSharedPointer< QcepDoubleImageData > QcepDoubleImageDataPtr