JoystickAxis.h 1.08 KB
Newer Older
1 2 3 4
#ifndef JOYSTICKAXIS_H
#define JOYSTICKAXIS_H

#include <QWidget>
5
#include "JoystickInput.h"
6 7 8 9 10 11 12 13 14 15 16 17 18

namespace Ui {
class JoystickAxis;
}

class JoystickAxis : public QWidget
{
    Q_OBJECT
    
public:
    explicit JoystickAxis(int id, QWidget *parent = 0);
    ~JoystickAxis();

19 20
signals:
    /** @brief Signal a change in this axis' yaw/pitch/roll mapping */
21
    void mappingChanged(int id, JoystickInput::JOYSTICK_INPUT_MAPPING newMapping);
22 23
    /** @brief Signal a change in this axis' inversion status */
    void inversionChanged(int id, bool);
24

25
public slots:
26 27 28 29
    /** @brief Update the displayed value of the included progressbar.
     * @param value A value between -1.0 and 1.0.
     */
    void setValue(float value);
30 31
    
private:
32
    int id; ///< The ID for this axis. Corresponds to the IDs used by JoystickInput.
33
    Ui::JoystickAxis *ui;
34 35 36 37

private slots:
    /** @brief Handle changes to the mapping dropdown bar. */
    void mappingComboBoxChanged(int newMapping);
38 39
    /** @brief Handle changes to the inversion checkbox. */
    void inversionCheckBoxChanged(bool inverted);
40 41 42
};

#endif // JOYSTICKAXIS_H