summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-01-04 13:08:06 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-01 22:47:07 +0100
commitbd90aaa53751610b5b49ab9042b4612af2816f88 (patch)
treebf7695e74aef8ddf7d9c545310c2a64a32ba5099
parent58f2a78fa1563f8b05b4895809a99cb3208e30e6 (diff)
tracker/nn: make dialog embeddable
-rw-r--r--tracker-neuralnet/ftnoir_tracker_neuralnet.cpp20
-rw-r--r--tracker-neuralnet/ftnoir_tracker_neuralnet.h5
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();