diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-11 14:36:07 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-11 14:36:07 +0100 |
commit | e1d6232217120be879bb639681f61e46e2d48580 (patch) | |
tree | d186ffc3dd72de6e4703d584a41971107ca8389b /gui/mapping-dialog.cpp | |
parent | 98ef185a5c9075720acb54ec1c2e5fec6e4ab440 (diff) |
cmake, gui, main: make user interface reusable
The work isn't complete. We need moving out all non-reusable parts away
and only keeping user interface logic in a class.
Diffstat (limited to 'gui/mapping-dialog.cpp')
-rw-r--r-- | gui/mapping-dialog.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gui/mapping-dialog.cpp b/gui/mapping-dialog.cpp index fbe274e0..5f884607 100644 --- a/gui/mapping-dialog.cpp +++ b/gui/mapping-dialog.cpp @@ -10,7 +10,7 @@ #include "logic/main-settings.hpp" #include "spline/spline-widget.hpp" -MapWidget::MapWidget(Mappings& m) : m(m), widgets{} +mapping_dialog::mapping_dialog(Mappings& m) : m(m), widgets{} { ui.setupUi(this); @@ -66,7 +66,7 @@ MapWidget::MapWidget(Mappings& m) : m(m), widgets{} tie_setting(s.a_pitch.clamp_y_, ui.max_pitch_output); } -void MapWidget::load() +void mapping_dialog::load() { struct { spline_widget* qfc; @@ -145,12 +145,12 @@ void MapWidget::load() } } -void MapWidget::closeEvent(QCloseEvent*) +void mapping_dialog::closeEvent(QCloseEvent*) { invalidate_dialog(); } -void MapWidget::refresh_tab() +void mapping_dialog::refresh_tab() { if (!isVisible()) return; @@ -166,7 +166,7 @@ void MapWidget::refresh_tab() qDebug() << "map-widget: bad index" << idx; } -void MapWidget::save_dialog() +void mapping_dialog::save_dialog() { s.b_map->save(); @@ -181,7 +181,7 @@ void MapWidget::save_dialog() } } -void MapWidget::invalidate_dialog() +void mapping_dialog::invalidate_dialog() { s.b_map->reload(); @@ -193,13 +193,13 @@ void MapWidget::invalidate_dialog() }); } -void MapWidget::doOK() +void mapping_dialog::doOK() { save_dialog(); close(); } -void MapWidget::doCancel() +void mapping_dialog::doCancel() { invalidate_dialog(); close(); |