PdfPlot.h
Go to the documentation of this file.
1 // Taken from RTAB-Map library r606 [www.rtabmap.googlecode.com]
2 
3 /*
4  * Copyright (C) 2010-2011, Mathieu Labbe and IntRoLab - Universite de Sherbrooke
5  *
6  * This file is part of RTAB-Map.
7  *
8  * RTAB-Map is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * RTAB-Map is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with RTAB-Map. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef PDFPLOT_H_
23 #define PDFPLOT_H_
24 
25 #include "utilite/UPlot.h"
26 
27 namespace rtabmap {
28 
29 class PdfPlotItem : public UPlotItem
30 {
31 public:
32  PdfPlotItem(float dataX, float dataY, float width, int childCount = -1);
33  virtual ~PdfPlotItem();
34 
35  void setLikelihood(int id, float value, int childCount);
36  void setImagesRef(const QMap<int, QByteArray> * imagesRef) {_imagesRef = imagesRef;}
37 
38  float value() const {return this->data().y();}
39  int id() const {return this->data().x();}
40 
41 protected:
42  virtual void showDescription(bool shown);
43 
44 private:
45  QGraphicsTextItem * _text;
46  QGraphicsPixmapItem * _img;
48  const QMap<int, QByteArray> * _imagesRef;
49 
50 };
51 
52 class PdfPlotCurve : public UPlotCurve
53 {
54  Q_OBJECT
55 
56 public:
57  PdfPlotCurve(const QString & name, const QMap<int, QByteArray> * imagesMapRef, QObject * parent = 0);
58  virtual ~PdfPlotCurve();
59 
60  virtual void clear();
61  void setData(const QMap<int, int> & dataMap, const QMap<int, int> & weightsMap);
62 
63 private:
64  const QMap<int, QByteArray> * _imagesMapRef;
65 };
66 
67 }
68 
69 #endif /* PDFPLOT_H_ */
void setLikelihood(int id, float value, int childCount)
Definition: PdfPlot.cpp:42
void setImagesRef(const QMap< int, QByteArray > *imagesRef)
Definition: PdfPlot.h:36
QGraphicsPixmapItem * _img
Definition: PdfPlot.h:46
const QPointF & data() const
Definition: UPlot.h:67
PdfPlotItem(float dataX, float dataY, float width, int childCount=-1)
Definition: PdfPlot.cpp:27
float value() const
Definition: PdfPlot.h:38
const QMap< int, QByteArray > * _imagesMapRef
Definition: PdfPlot.h:64
virtual void showDescription(bool shown)
Definition: PdfPlot.cpp:53
int id() const
Definition: PdfPlot.h:39
QGraphicsTextItem * _text
Definition: PdfPlot.h:45
void setData(const QPointF &data)
Definition: UPlot.cpp:99
const QMap< int, QByteArray > * _imagesRef
Definition: PdfPlot.h:48
virtual ~PdfPlotItem()
Definition: PdfPlot.cpp:37


find_object_2d
Author(s): Mathieu Labbe
autogenerated on Thu Jun 6 2019 19:22:26