qgraphpainter.h
Go to the documentation of this file.
1 /*****************************************************************
2  *
3  * This file is part of the GMAPPING project
4  *
5  * GMAPPING Copyright (c) 2004 Giorgio Grisetti,
6  * Cyrill Stachniss, and Wolfram Burgard
7  *
8  * This software is licensed under the 3-Clause BSD License
9  * and is copyrighted by Giorgio Grisetti, Cyrill Stachniss,
10  * and Wolfram Burgard.
11  *
12  * Further information on this license can be found at:
13  * https://opensource.org/licenses/BSD-3-Clause
14  *
15  * GMAPPING is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied
17  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18  * PURPOSE.
19  *
20  *****************************************************************/
21 
22 
23 #ifndef QGRAPHPAINTER_H
24 #define QGRAPHPAINTER_H
25 
26 #include <qpainter.h>
27 #include <qpixmap.h>
28 #include <qstring.h>
29 #include <qwidget.h>
30 #include <qwmatrix.h>
31 #include <deque>
32 #include <gmapping/utils/gvalues.h>
33 
34 typedef std::deque<double> DoubleDeque;
35 
36 class QGraphPainter : public QWidget{
37  Q_OBJECT
38  public:
39  QGraphPainter( QWidget * parent = 0, const char * name = 0, WFlags f = 0);
40  virtual ~QGraphPainter();
41  public slots:
42  void clear();
43  void valueAdded(double);
44  void valueAdded(double, double, double);
45  void setYReference(double y);
46  void disableYReference();
47  void setRange(double min, double max);
48  void start(int period);
49  void setTitle(const char* title);
50  void setAutoscale(bool a);
51  bool getAutoscale() const;
52  protected:
53  virtual void timerEvent(QTimerEvent * te);
54  virtual void resizeEvent(QResizeEvent *);
55  double min, max, reference;
57  bool autoscale;
59  int timer;
60  virtual void paintEvent ( QPaintEvent *paintevent );
61  QPixmap * m_pixmap;
62  QString title;
63 };
64 
65 #endif
66 
QGraphPainter(QWidget *parent=0, const char *name=0, WFlags f=0)
void setRange(double min, double max)
virtual void timerEvent(QTimerEvent *te)
virtual ~QGraphPainter()
void disableYReference()
double reference
Definition: qgraphpainter.h:55
bool getAutoscale() const
void setYReference(double y)
bool m_useYReference
Definition: qgraphpainter.h:58
DoubleDeque values
Definition: qgraphpainter.h:56
virtual void resizeEvent(QResizeEvent *)
QPixmap * m_pixmap
Definition: qgraphpainter.h:61
void valueAdded(double)
void setAutoscale(bool a)
void setTitle(const char *title)
virtual void paintEvent(QPaintEvent *paintevent)
std::deque< double > DoubleDeque
Definition: qgraphpainter.h:34
void start(int period)


openslam_gmapping
Author(s): Cyrill Stachniss, Udo Frese, Giorgio Grisetti, Wolfram Burgard
autogenerated on Mon Feb 28 2022 22:59:20