JoystickButton.h 702 Bytes
Newer Older
1 2 3 4 5
#ifndef JOYSTICKBUTTON_H
#define JOYSTICKBUTTON_H

#include <QWidget>

6 7
#include "UASInterface.h"

8 9 10 11 12 13 14 15
namespace Ui
{
class JoystickButton;
}

class JoystickButton : public QWidget
{
    Q_OBJECT
16

17 18 19
public:
    explicit JoystickButton(int id, QWidget *parent = 0);
    virtual ~JoystickButton();
20

21 22 23 24 25 26 27 28
public slots:
    /** @brief Specify the UAS that this axis should track for displaying throttle properly. */
    void setActiveUAS(UASInterface* uas);

signals:
    /** @brief Signal a change in this buttons' action mapping */
    void actionChanged(int id, int index);

29 30 31
private:
    int id;
    Ui::JoystickButton *m_ui;
32 33 34

private slots:
    void actionComboBoxChanged(int index);
35 36
};
#endif // JOYSTICKBUTTON_H