Linecharts.h 1.01 KB
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 9 10 11 12

#include "LinechartWidget.h"
#include "UASInterface.h"

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 24 25 26

public slots:
    /** @brief Select plot for one system */
    void selectSystem(int systemid);
    /** @brief Add a new system to the list of plots */
    void addSystem(UASInterface* uas);
lm's avatar
lm committed
27 28
    /** @brief Add a new generic message source (not a system) */
    void addSource(QObject* obj);
29 30

protected:
LM's avatar
LM committed
31

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

40 41 42
};

#endif // LINECHARTS_H