38 #ifndef SCOPEGADGETWIDGET_H_
39 #define SCOPEGADGETWIDGET_H_
44 #include "qwt/src/qwt.h"
45 #include "qwt/src/qwt_legend.h"
46 #include "qwt/src/qwt_plot.h"
47 #include "qwt/src/qwt_plot_grid.h"
48 #include "qwt/src/qwt_plot_layout.h"
49 #include "qwt/src/qwt_scale_draw.h"
69 virtual QwtText
label(
double v)
const
71 uint seconds = (uint)(v);
72 QDateTime upTime = QDateTime::fromTime_t(seconds);
73 QTime timePart = upTime.time().addMSecs((v - seconds) * 1000);
74 upTime.setTime(timePart);
75 return upTime.toLocalTime().toString(
"hh:mm:ss");
97 m_dataSources.insert(stringVal, dataVal);
118 void replotNewData();
119 void showCurve(
const QVariant &itemInfo,
bool on,
int index);
120 void startPlotting();
122 void popUpMenu(
const QPoint &mousePosition);
124 void copyToClipboardAsImage();
125 void showOptionDialog();
128 int m_refreshInterval;
130 QMap<QString, PlotData *> m_dataSources;
131 double m_xWindowSize;
132 static QTimer *replotTimer;
This class is used to render the time values on the horizontal axis for the ChronoPlot.
void mouseDoubleClickEvent(QMouseEvent *e)
ScopeGadgetWidget::mouseDoubleClickEvent Turn legend on and off, then pass double-click even to QwtPl...
void connectUAVO(UAVDataObject *obj)
ScopeGadgetWidget::connectUAVO Connects UAVO update signal, but only if it hasn't yet been connected...
~ScopeGadgetWidget()
ScopeGadgetWidget::~ScopeGadgetWidget Destructor.
void deleteLegend()
ScopeGadgetWidget::deleteLegend Delete legend from plot.
void setScope(ScopeConfig *val)
void wheelEvent(QWheelEvent *e)
ScopeGadgetWidget::wheelEvent Zoom in or out, then pass mouse wheel event to QwtPlot.
void addLegend()
ScopeGadgetWidget::addLegend Add legend to plot.
void setScopeName(QString val)
ScopeGadgetWidget(QWidget *parent=nullptr)
void mouseReleaseEvent(QMouseEvent *e)
ScopeGadgetWidget::mouseReleaseEvent Pass mouse release event to QwtPlot.
The ScopeConfig class The parent class for scope configuration classes data sources.
virtual QwtText label(double v) const
QString getUavObjectFieldUnits(QString uavObjectName, QString uavObjectFieldName)
ScopeGadgetWidget::getUavObjectFieldUnits Gets the UAVOs units, as defined in the XML...
void insertDataSources(QString stringVal, PlotData *dataVal)
QMap< QString, PlotData * > getDataSources()
void clearPlotWidget()
ScopeGadgetWidget::clearPlotWidget.
void startTimer(int)
ScopeGadgetWidget::startTimer Starts timer.
void mousePressEvent(QMouseEvent *e)
ScopeGadgetWidget::mousePressEvent Pass mouse press event to QwtPlot.
void showEvent(QShowEvent *event)
ScopeGadgetWidget::showEvent Reimplemented from QwtPlot.
void mouseMoveEvent(QMouseEvent *e)
ScopeGadgetWidget::mouseMoveEvent Pass mouse move event to QwtPlot.