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

#include <QAction>
#include <QDeclarativeView>
6
#include "UASInterface.h"
7

8 9
class LinkInterface;

10 11 12 13 14
class APMToolBar : public QDeclarativeView
{
    Q_OBJECT
public:
    explicit APMToolBar(QWidget *parent = 0);
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