28 #ifndef RTABMAP_STATSTOOLBOX_H_
29 #define RTABMAP_STATSTOOLBOX_H_
31 #include "rtabmap/gui/rtabmap_gui_export.h"
34 #include <QtCore/QMap>
44 class RTABMAP_GUI_EXPORT
StatItem :
public QWidget
49 StatItem(
const QString &
name,
bool cacheOn,
const std::vector<qreal> &
x,
const std::vector<qreal> &
y,
const QString & unit = QString(),
const QMenu * menu = 0, QGridLayout * grid = 0, QWidget * parent = 0);
53 void setValues(
const std::vector<qreal> &
x,
const std::vector<qreal> &
y);
54 QString
value()
const;
55 std::vector<qreal>
xValues()
const {
return _x;}
56 std::vector<qreal>
yValues()
const {
return _y;}
57 void setCacheOn(
bool on);
61 void updateMenu(
const QMenu * menu);
64 void valueAdded(qreal);
65 void valueAdded(qreal, qreal);
66 void valuesChanged(
const std::vector<qreal> &,
const std::vector<qreal> &);
67 void plotRequested(
const StatItem *,
const QString &);
70 void preparePlotRequest();
73 void setupUi(QGridLayout * grid);
83 std::vector<qreal>
_x;
84 std::vector<qreal>
_y;
98 void getFiguresSetup(QList<int> & curvesPerFigure, QStringList & curveNames, QStringList & curveThresholds);
99 void addCurve(
const QString &
name,
bool newFigure =
true,
bool cacheOn =
false);
100 void addThreshold(
const QString &
name, qreal
value);
101 void setWorkingDirectory(
const QString & workingDirectory);
104 void setCacheOn(
bool on);
107 void updateStat(
const QString & statFullName,
bool cacheOn);
108 void updateStat(
const QString & statFullName, qreal y,
bool cacheOn);
109 void updateStat(
const QString & statFullName, qreal x, qreal y,
bool cacheOn);
110 void updateStat(
const QString & statFullName,
const std::vector<qreal> & x,
const std::vector<qreal> & y,
bool cacheOn);
114 void menuChanged(
const QMenu *);
115 void figuresSetupChanged();
118 void plot(
const StatItem * stat,
const QString & plotName = QString());
119 void figureDeleted(QObject * obj);
122 virtual void contextMenuEvent(QContextMenuEvent * event);