apmtoolbar.h 1.35 KB
Newer Older
1 2 3 4
#ifndef APMTOOLBAR_H
#define APMTOOLBAR_H

#include <QAction>
5
#include <QQuickView>
6
#include "UASInterface.h"
7

8 9
class LinkInterface;

10
class APMToolBar : public QQuickView
11 12 13
{
    Q_OBJECT
public:
14
    explicit APMToolBar();
15
    ~APMToolBar();
16 17 18 19 20 21 22

    void setFlightViewAction(QAction *action);
    void setFlightPlanViewAction(QAction *action);
    void setHardwareViewAction(QAction *action);
    void setSoftwareViewAction(QAction *action);
    void setSimulationViewAction(QAction *action);
    void setTerminalViewAction(QAction *action);
23
    void setConnectMAVAction(QAction *action);
24 25 26 27 28 29 30 31 32
    
signals:
    void triggerFlightView();
    void triggerFlightPlanView();
    void triggerHardwareView();
    void triggerSoftwareView();
    void triggerSimulationView();
    void triggerTerminalView();

33 34
    void MAVConnected(bool connected);

35 36 37 38 39 40 41 42 43
public slots:
    void selectFlightView();
    void selectFlightPlanView();
    void selectHardwareView();
    void selectSoftwareView();
    void selectSimulationView();
    void selectTerminalView();

    void connectMAV();
44
    void showConnectionDialog();
45
    void setConnection(bool connection);
46

47 48 49 50
    void activeUasSet(UASInterface *uas);
    void armingChanged(int sysId, QString armingState);
    void armingChanged(bool armed);

51
    void updateLinkDisplay(LinkInterface *newLink);
52 53 54

private:
    UASInterface *m_uas;
55 56 57
};

#endif // APMTOOLBAR_H