#include <UPlot.h>
Public Slots | |
void | clearData () |
void | frameData (bool xAxis=true, bool yAxis=false) |
void | removeCurve (const UPlotCurve *curve) |
void | showCurve (const UPlotCurve *curve, bool shown) |
void | updateAxis () |
Public Member Functions | |
UPlotCurve * | addCurve (const QString &curveName, const QColor &color=QColor()) |
bool | addCurve (UPlotCurve *curve, bool ownershipTransferred=true) |
UPlotCurveThreshold * | addThreshold (const QString &name, qreal value, Qt::Orientation orientation=Qt::Horizontal) |
bool | contains (const QString &curveName) const |
QStringList | curveNames () const |
QString | getAllCurveDataAsText () const |
QPen | getRandomPenColored () |
double | getThresholdValue (const QString &curveName) const |
bool | isThreshold (const QString &curveName) const |
void | keepAllData (bool kept) |
void | removeCurves () |
QRectF | sceneRect () const |
void | setBackgroundColor (const QColor &color) |
void | setFixedXAxis (qreal x1, qreal x2) |
void | setFixedYAxis (qreal y1, qreal y2) |
void | setGraphicsView (bool on) |
void | setMaxVisibleItems (int maxVisibleItems) |
void | setTitle (const QString &text) |
void | setVariableXAxis () |
void | setVariableYAxis () |
void | setWorkingDirectory (const QString &workingDirectory) |
void | setXLabel (const QString &text) |
void | setYLabel (const QString &text, Qt::Orientation orientation=Qt::Vertical) |
void | showGrid (bool shown) |
void | showLegend (bool shown) |
void | showRefreshRate (bool shown) |
void | showXAxis (bool shown) |
void | showYAxis (bool shown) |
QString | title () const |
void | trackMouse (bool tracking) |
UPlot (QWidget *parent=0) | |
virtual | ~UPlot () |
Protected Member Functions | |
virtual void | contextMenuEvent (QContextMenuEvent *event) |
virtual void | mouseDoubleClickEvent (QMouseEvent *event) |
virtual void | mouseMoveEvent (QMouseEvent *event) |
virtual void | mousePressEvent (QMouseEvent *event) |
virtual void | mouseReleaseEvent (QMouseEvent *event) |
virtual void | paintEvent (QPaintEvent *event) |
virtual void | resizeEvent (QResizeEvent *event) |
Private Slots | |
void | captureScreen () |
void | moveCurve (const UPlotCurve *, int index) |
void | updateAxis (const UPlotCurve *curve) |
Private Member Functions | |
void | addItem (QGraphicsItem *item) |
void | createActions () |
void | createMenus () |
bool | mousePosToValue (const QPoint &pos, qreal &x, qreal &y) |
void | replot (QPainter *painter) |
void | selectScreenCaptureFormat () |
void | setupUi () |
bool | updateAxis (qreal x, qreal y) |
bool | updateAxis (qreal x1, qreal x2, qreal y1, qreal y2) |
Friends | |
class | UPlotCurve |
UPlot is a QWidget to create a plot like MATLAB, and incrementally add new values like a scope using Qt signals/slots. Many customizations can be done at runtime with the right-click menu.
Example:
UPlotCurve * UPlot::addCurve | ( | const QString & | curveName, |
const QColor & | color = QColor() |
||
) |
bool UPlot::addCurve | ( | UPlotCurve * | curve, |
bool | ownershipTransferred = true |
||
) |
UPlotCurveThreshold * UPlot::addThreshold | ( | const QString & | name, |
qreal | value, | ||
Qt::Orientation | orientation = Qt::Horizontal |
||
) |
|
protectedvirtual |
QStringList UPlot::curveNames | ( | ) | const |
double UPlot::getThresholdValue | ( | const QString & | curveName | ) | const |
bool UPlot::isThreshold | ( | const QString & | curveName | ) | const |
|
protectedvirtual |
|
protectedvirtual |
|
private |
|
protectedvirtual |
|
protectedvirtual |
|
privateslot |
|
protectedvirtual |
|
slot |
|
protectedvirtual |
void UPlot::setWorkingDirectory | ( | const QString & | workingDirectory | ) |
void UPlot::setYLabel | ( | const QString & | text, |
Qt::Orientation | orientation = Qt::Vertical |
||
) |
|
slot |
|
privateslot |
|
private |
|
friend |
|
private |
|
private |
|
private |