summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-10-17 14:32:03 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-03-29 00:04:48 +0200
commit377a965bbb2661d6fa08dfc05e37c43ee172452f (patch)
tree0fbcba36f2a8b21a405cab14626c8047de58b587
parent69c19d1f9f272fda7d66c0ece3e8d6adc5bfc628 (diff)
tracker/trackhat: better tracking status
-rw-r--r--tracker-trackhat/dialog.cpp18
-rw-r--r--tracker-trackhat/lang/nl_NL.ts14
-rw-r--r--tracker-trackhat/lang/ru_RU.ts14
-rw-r--r--tracker-trackhat/lang/stub.ts14
-rw-r--r--tracker-trackhat/lang/zh_CN.ts14
5 files changed, 45 insertions, 29 deletions
diff --git a/tracker-trackhat/dialog.cpp b/tracker-trackhat/dialog.cpp
index bbeb792c..89e0e427 100644
--- a/tracker-trackhat/dialog.cpp
+++ b/tracker-trackhat/dialog.cpp
@@ -85,15 +85,17 @@ trackhat_dialog::trackhat_dialog()
connect(ui.buttonBox, &QDialogButtonBox::rejected, this, &trackhat_dialog::doCancel);
}
-void trackhat_dialog::register_tracker(ITracker* tracker)
+void trackhat_dialog::register_tracker(ITracker* tracker_)
{
- tracker = static_cast<Tracker_PT*>(tracker);
+ tracker = static_cast<Tracker_PT*>(tracker_);
+ poll_tracker_info();
poll_timer.start();
}
void trackhat_dialog::unregister_tracker()
{
tracker = nullptr;
+ poll_tracker_info();
poll_timer.stop();
}
@@ -112,13 +114,11 @@ void trackhat_dialog::doCancel()
void trackhat_dialog::poll_tracker_info()
{
if (!tracker)
- {
- poll_timer.stop();
- ui.status_label->setText(tr("Tracking stopped."));
- return;
- }
-
- ui.status_label->setText(tr("Tracking. %1 points detected.").arg(tracker->get_n_points()));
+ ui.status_label->setText(tr("Status: Tracking stopped."));
+ else if (tracker->get_n_points() == 3)
+ ui.status_label->setText(tr("Status: %1 points detected. Good!").arg(tracker->get_n_points()));
+ else
+ ui.status_label->setText(tr("Status: %1 points detected. BAD!").arg(tracker->get_n_points()));
}
trackhat_dialog::~trackhat_dialog() = default;
diff --git a/tracker-trackhat/lang/nl_NL.ts b/tracker-trackhat/lang/nl_NL.ts
index d23b6528..f5de5702 100644
--- a/tracker-trackhat/lang/nl_NL.ts
+++ b/tracker-trackhat/lang/nl_NL.ts
@@ -48,23 +48,27 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Tracking stopped.</source>
+ <source>Status</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Tracking. %1 points detected.</source>
+ <source>Gain</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Status</source>
+ <source>Fuzz</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Gain</source>
+ <source>Status: Tracking stopped.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Fuzz</source>
+ <source>Status: %1 points detected. Good!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Status: %1 points detected. BAD!</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/tracker-trackhat/lang/ru_RU.ts b/tracker-trackhat/lang/ru_RU.ts
index d23b6528..f5de5702 100644
--- a/tracker-trackhat/lang/ru_RU.ts
+++ b/tracker-trackhat/lang/ru_RU.ts
@@ -48,23 +48,27 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Tracking stopped.</source>
+ <source>Status</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Tracking. %1 points detected.</source>
+ <source>Gain</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Status</source>
+ <source>Fuzz</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Gain</source>
+ <source>Status: Tracking stopped.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Fuzz</source>
+ <source>Status: %1 points detected. Good!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Status: %1 points detected. BAD!</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/tracker-trackhat/lang/stub.ts b/tracker-trackhat/lang/stub.ts
index d23b6528..f5de5702 100644
--- a/tracker-trackhat/lang/stub.ts
+++ b/tracker-trackhat/lang/stub.ts
@@ -48,23 +48,27 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Tracking stopped.</source>
+ <source>Status</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Tracking. %1 points detected.</source>
+ <source>Gain</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Status</source>
+ <source>Fuzz</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Gain</source>
+ <source>Status: Tracking stopped.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Fuzz</source>
+ <source>Status: %1 points detected. Good!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Status: %1 points detected. BAD!</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/tracker-trackhat/lang/zh_CN.ts b/tracker-trackhat/lang/zh_CN.ts
index d23b6528..f5de5702 100644
--- a/tracker-trackhat/lang/zh_CN.ts
+++ b/tracker-trackhat/lang/zh_CN.ts
@@ -48,23 +48,27 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Tracking stopped.</source>
+ <source>Status</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Tracking. %1 points detected.</source>
+ <source>Gain</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Status</source>
+ <source>Fuzz</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Gain</source>
+ <source>Status: Tracking stopped.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Fuzz</source>
+ <source>Status: %1 points detected. Good!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Status: %1 points detected. BAD!</source>
<translation type="unfinished"></translation>
</message>
</context>