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

private slots:
    /** @brief Handle changes to the mapping dropdown bar. */
    void mappingComboBoxChanged(int newMapping);
36 37 38
};

#endif // JOYSTICKAXIS_H