From ff0d3aefe8d14796f636b890595f12b5b08d6d2f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 29 Jan 2017 03:09:09 +0100 Subject: spline-widget: remove camel case My eyes bleed a bit less --- gui/mapping-window.cpp | 36 +++++++++++++++++------------------- gui/mapping-window.hpp | 4 ++-- 2 files changed, 19 insertions(+), 21 deletions(-) (limited to 'gui') 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(); -- cgit v1.2.3