YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
plotmanager.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: GPL-3.0-or-later
4 */
5
6#ifndef PLOTMANAGER_H
7#define PLOTMANAGER_H
8
9#include <QObject>
10#include "plotter.h"
11#include <QTimer>
12
18class PlotManager : public QObject
19{
20 Q_OBJECT
21
22public:
23 explicit PlotManager(QObject *parent = 0);
24 static PlotManager *instance();
26 Plotter * addPlot(const QString &title,
27 int gridx,
28 int gridy,
29 int hspan,
30 int vspan,
31 float minval,
32 float maxval,
33 int size,
34 const QString &bgcolor,
35 bool autorescale);
36
37
38
39 QList <QObject*>* getPlotters();
40 void setInterval(int interval);
41 void setMainCustomPlot(QCustomPlot*);
42 void playPressed(bool check);
43 void clear();
44 void rescale();
45
46
47private:
48 QList <QObject*> plotterList;
49 QTimer timer;
50
51signals:
54public slots:
55 void onTimeout();
56
57};
58
59#endif // PLOTMANAGER_H
The Manager of the plotters.
Definition plotmanager.h:19
void playPressed(bool check)
Sets the play or pause state.
void setInterval(int interval)
Sets the refresh interval.
void clear()
Clear all plotters datas.
void setMainCustomPlot(QCustomPlot *)
QList< QObject * > * getPlotters()
Returns a list of all plotters.
static PlotManager * instance()
Returns an instance of the class (Singleton).
Plotter * addPlot(const QString &title, int gridx, int gridy, int hspan, int vspan, float minval, float maxval, int size, const QString &bgcolor, bool autorescale)
Adds a new Plotter.
void requestRepaint()
void onTimeout()
Timeout of the refresh timer.
void rescale()
Rescale all plotters.
void plottersChanged()
Class representing a Plotter.
Definition plotter.h:115