Skip to content
Snippets Groups Projects
JoystickAxis.h 1.08 KiB
Newer Older
  • Learn to ignore specific revisions
  • #ifndef JOYSTICKAXIS_H
    #define JOYSTICKAXIS_H
    
    #include <QWidget>
    
    
    namespace Ui {
    class JoystickAxis;
    }
    
    class JoystickAxis : public QWidget
    {
        Q_OBJECT
        
    public:
        explicit JoystickAxis(int id, QWidget *parent = 0);
        ~JoystickAxis();
    
    
    signals:
        /** @brief Signal a change in this axis' yaw/pitch/roll mapping */
    
        void mappingChanged(int id, JoystickInput::JOYSTICK_INPUT_MAPPING newMapping);
    
        /** @brief Signal a change in this axis' inversion status */
        void inversionChanged(int id, bool);
    
        /** @brief Update the displayed value of the included progressbar.
         * @param value A value between -1.0 and 1.0.
         */
        void setValue(float value);
    
        int id; ///< The ID for this axis. Corresponds to the IDs used by JoystickInput.
    
    
    private slots:
        /** @brief Handle changes to the mapping dropdown bar. */
        void mappingComboBoxChanged(int newMapping);
    
        /** @brief Handle changes to the inversion checkbox. */
        void inversionCheckBoxChanged(bool inverted);