28 #ifndef RTABMAP_STATSTOOLBOX_H_ 29 #define RTABMAP_STATSTOOLBOX_H_ 34 #include <QtCore/QMap> 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);
99 void addCurve(
const QString & name,
bool newFigure =
true,
bool cacheOn =
false);
100 void setWorkingDirectory(
const QString & workingDirectory);
103 void setCacheOn(
bool on);
106 void updateStat(
const QString & statFullName,
bool cacheOn);
107 void updateStat(
const QString & statFullName, qreal y,
bool cacheOn);
108 void updateStat(
const QString & statFullName, qreal x, qreal y,
bool cacheOn);
109 void updateStat(
const QString & statFullName,
const std::vector<qreal> & x,
const std::vector<qreal> & y,
bool cacheOn);
113 void menuChanged(
const QMenu *);
114 void figuresSetupChanged();
117 void plot(
const StatItem * stat,
const QString & plotName = QString());
118 void figureDeleted(QObject * obj);
121 virtual void contextMenuEvent(QContextMenuEvent * event);
std::vector< qreal > yValues() const
void addValue(int pos, float val, float *vals, T *point, T *points, int n)
std::vector< qreal > xValues() const