[Simulator] Virtual joystick tweaks. (#4666)

* [Simulator] Create a reusable RadioTrimWidget; Move all trim-related enums to boards.h; Make sure aux trims are accounted for in SimulatorInterface; Trims now use toolbuttons with icons instead of pushbuttons with text.

* [Simulator] New buttons & icons for virtual joystick axis hold/fix toggles; Joystick ball is now slightly scaled to stick area.

* [Simulator] Virtual joystick now "follows" mouse clicks within the stick area (left-click on empty space will attract the control node).
This commit is contained in:
Max Paperno
2017-03-22 21:05:27 +01:00
committed by Bertrand Songis
parent 919e8eb962
commit d68778ec81
23 changed files with 556 additions and 254 deletions
+3 -5
View File
@@ -140,16 +140,14 @@ class SimulatorWidget : public QWidget
#endif
private slots:
//virtual void showEvent(QShowEvent *);
//virtual void closeEvent(QCloseEvent *);
virtual void mousePressEvent(QMouseEvent *event);
virtual void mouseReleaseEvent(QMouseEvent *event);
virtual void wheelEvent(QWheelEvent *event);
void onTimerEvent();
void onTrimPressed(int which);
void onTrimReleased();
void onTrimSliderMoved(int which, int value);
void onTrimPressed(int index);
void onTrimReleased(int);
void onTrimSliderMoved(int index, int value);
void centerSticks();
void onjoystickAxisValueChanged(int axis, int value);