diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-01-04 13:08:06 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-01-23 14:16:33 +0100 |
commit | d9a88a7a56f0ba41f2505b9b5756a4a0c26fa786 (patch) | |
tree | 78fafeecbec98cd7ed9a8044edf6e20cca6416d6 /tracker-neuralnet | |
parent | 8ff5c1a349781810a9166128e7840e0ee281e8ae (diff) |
[MERGE] tracker/nn: make dialog embeddable
Diffstat (limited to 'tracker-neuralnet')
-rw-r--r-- | tracker-neuralnet/ftnoir_tracker_neuralnet.cpp | 20 | ||||
-rw-r--r-- | tracker-neuralnet/ftnoir_tracker_neuralnet.h | 5 |
2 files changed, 24 insertions, 1 deletions
diff --git a/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp b/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp index b56b4e96..59e17063 100644 --- a/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp +++ b/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp @@ -747,10 +747,19 @@ NeuralNetDialog::NeuralNetDialog() : tracker_status_poll_timer_.start(); } +void NeuralNetDialog::save() +{ + settings_.b->save(); +} + +void NeuralNetDialog::reload() +{ + settings_.b->reload(); +} void NeuralNetDialog::doOK() { - settings_.b->save(); + save(); close(); } @@ -793,6 +802,15 @@ void NeuralNetDialog::unregister_tracker() ui_.tcalib_button->setEnabled(false); } +bool NeuralNetDialog::embeddable() noexcept +{ + return true; +} + +void NeuralNetDialog::set_buttons_visible(bool x) +{ + ui_.buttonBox->setVisible(x); +} void NeuralNetDialog::status_poll() { diff --git a/tracker-neuralnet/ftnoir_tracker_neuralnet.h b/tracker-neuralnet/ftnoir_tracker_neuralnet.h index 9e0374da..3548335e 100644 --- a/tracker-neuralnet/ftnoir_tracker_neuralnet.h +++ b/tracker-neuralnet/ftnoir_tracker_neuralnet.h @@ -166,6 +166,9 @@ public: NeuralNetDialog(); void register_tracker(ITracker * x) override; void unregister_tracker() override; + + bool embeddable() noexcept override; + void set_buttons_visible(bool x) override; private: void make_fps_combobox(); void make_resolution_combobox(); @@ -180,6 +183,8 @@ private: NeuralNetTracker* tracker_ = nullptr; private Q_SLOTS: + void save() override; + void reload() override; void doOK(); void doCancel(); void camera_settings(); |