diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-01-29 03:09:09 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-01-29 03:09:09 +0100 |
commit | ff0d3aefe8d14796f636b890595f12b5b08d6d2f (patch) | |
tree | f9b2483b5926c6e7627f49aaf4121463b20a31b1 /gui | |
parent | cb5873922f4528b80d40e13b05bd7590421d79ee (diff) |
spline-widget: remove camel case
My eyes bleed a bit less
Diffstat (limited to 'gui')
-rw-r--r-- | gui/mapping-window.cpp | 36 | ||||
-rw-r--r-- | gui/mapping-window.hpp | 4 |
2 files changed, 19 insertions, 21 deletions
diff --git a/gui/mapping-window.cpp b/gui/mapping-window.cpp index 879541de..d1188e66 100644 --- a/gui/mapping-window.cpp +++ b/gui/mapping-window.cpp @@ -9,12 +9,12 @@ #include "mapping-window.hpp" #include "logic/main-settings.hpp" #include "spline-widget/spline-widget.hpp" -MapWidget::MapWidget(Mappings& m) : - m(m) + +MapWidget::MapWidget(Mappings& m) : m(m) { ui.setupUi(this); - reload(); + load(); connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); @@ -27,9 +27,8 @@ MapWidget::MapWidget(Mappings& m) : tie_setting(s.a_roll.altp, ui.rz_altp); } -void MapWidget::reload() +void MapWidget::load() { - struct { spline_widget* qfc; Axis axis; @@ -37,21 +36,20 @@ void MapWidget::reload() bool altp; } qfcs[] = { - { ui.rxconfig, Yaw, nullptr, false }, - { ui.ryconfig, Pitch, nullptr, false }, - { ui.rzconfig, Roll, nullptr, false }, - { ui.txconfig, TX, nullptr, false }, - { ui.tyconfig, TY, nullptr, false }, - { ui.tzconfig, TZ, nullptr, false }, - - { ui.rxconfig_alt, Yaw, ui.rx_altp, true }, - { ui.ryconfig_alt, Pitch, ui.ry_altp, true }, - { ui.rzconfig_alt, Roll, ui.rz_altp, true }, - { ui.txconfig_alt, TX, ui.tx_altp, true }, - { ui.tyconfig_alt, TY, ui.ty_altp, true }, - { ui.tzconfig_alt, TZ, ui.tz_altp, true }, + { ui.rxconfig, Yaw, nullptr, false, }, + { ui.ryconfig, Pitch, nullptr, false, }, + { ui.rzconfig, Roll, nullptr, false, }, + { ui.txconfig, TX, nullptr, false, }, + { ui.tyconfig, TY, nullptr, false, }, + { ui.tzconfig, TZ, nullptr, false, }, + { ui.rxconfig_alt, Yaw, ui.rx_altp, true, }, + { ui.ryconfig_alt, Pitch, ui.ry_altp, true, }, + { ui.rzconfig_alt, Roll, ui.rz_altp, true, }, + { ui.txconfig_alt, TX, ui.tx_altp, true, }, + { ui.tyconfig_alt, TY, ui.ty_altp, true, }, + { ui.tzconfig_alt, TZ, ui.tz_altp, true, }, { nullptr, Yaw, nullptr, false } -}; + }; for (int i = 0; qfcs[i].qfc; i++) { diff --git a/gui/mapping-window.hpp b/gui/mapping-window.hpp index 06d969cc..9403bfb5 100644 --- a/gui/mapping-window.hpp +++ b/gui/mapping-window.hpp @@ -14,15 +14,15 @@ class MapWidget final : public QDialog Q_OBJECT public: MapWidget(Mappings& m); - void reload(); private: Ui::mapping_window ui; Mappings& m; main_settings s; - void closeEvent(QCloseEvent*) override; + void load(); + void save_dialog(); void invalidate_dialog(); |