Linecharts.h 945 Bytes
Newer Older
1 2 3 4 5
#ifndef LINECHARTS_H
#define LINECHARTS_H

#include <QStackedWidget>
#include <QMap>
lm's avatar
lm committed
6
#include <QVector>
7 8

#include "LinechartWidget.h"
9
#include "Vehicle.h"
10 11 12

class Linecharts : public QStackedWidget
{
13
    Q_OBJECT
14 15 16 17
public:
    explicit Linecharts(QWidget *parent = 0);

signals:
18 19
    /** @brief This signal is emitted once a logfile has been finished writing */
    void logfileWritten(QString fileName);
LM's avatar
LM committed
20
    void visibilityChanged(bool visible);
21 22 23

public slots:
    /** @brief Add a new system to the list of plots */
24
    void addVehicle(Vehicle* vehicle);
lm's avatar
lm committed
25 26
    /** @brief Add a new generic message source (not a system) */
    void addSource(QObject* obj);
27 28

protected:
LM's avatar
LM committed
29

30
    QMap<int, LinechartWidget*> plots;
lm's avatar
lm committed
31
    QVector<QObject*> genericSources;
32
    bool active;
33
    /** @brief Start updating widget */
34
    void showEvent(QShowEvent* event);
35 36
    /** @brief Stop updating widget */
    void hideEvent(QHideEvent* event);
37

38 39 40
};

#endif // LINECHARTS_H