summaryrefslogtreecommitdiffhomepage
path: root/tracker-kinect-face
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-04-13 19:02:25 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-04-13 19:02:25 +0200
commit1171842c5df3ed1c396d572b1022018250b1926c (patch)
tree3d64e6cd982e1261305f9733841e52b4c8ab2abd /tracker-kinect-face
parentcd9d8e4f1bfc95dd21f6de87cdaa86acfbb6572a (diff)
tracker/kinect: display license terms
Diffstat (limited to 'tracker-kinect-face')
-rw-r--r--tracker-kinect-face/kinect_face_settings.cpp27
-rw-r--r--tracker-kinect-face/kinect_face_settings.h5
-rw-r--r--tracker-kinect-face/lang/nl_NL.ts7
-rw-r--r--tracker-kinect-face/lang/ru_RU.ts7
-rw-r--r--tracker-kinect-face/lang/stub.ts7
-rw-r--r--tracker-kinect-face/lang/zh_CN.ts7
6 files changed, 42 insertions, 18 deletions
diff --git a/tracker-kinect-face/kinect_face_settings.cpp b/tracker-kinect-face/kinect_face_settings.cpp
index ebdf22cc..d8012aa3 100644
--- a/tracker-kinect-face/kinect_face_settings.cpp
+++ b/tracker-kinect-face/kinect_face_settings.cpp
@@ -10,30 +10,29 @@
#include "kinect_face_tracker.h"
#include "api/plugin-api.hpp"
#include "compat/math-imports.hpp"
-
-#include <QPushButton>
+#include "compat/library-path.hpp"
#include <cmath>
-#include <QDebug>
+#include <QDesktopServices>
+#include <QUrl>
+#include <QPushButton>
+#include <QDebug>
KinectFaceSettings::KinectFaceSettings()
{
ui.setupUi(this);
- connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
- connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
-}
+ connect(ui.buttonBox, &QDialogButtonBox::accepted, this, &KinectFaceSettings::close);
+ connect(ui.buttonBox, &QDialogButtonBox::rejected, this, &KinectFaceSettings::close);
-void KinectFaceSettings::doOK()
-{
- //s.b->save();
- close();
-}
+ static const QUrl path {"file:///" + application_base_path() + OPENTRACK_DOC_PATH "/3rdparty-notices/Kinect-V2-SDK-Eula.rtf" };
-void KinectFaceSettings::doCancel()
-{
- close();
+ connect(ui.buttonBox, &QDialogButtonBox::helpRequested, [] {
+ QDesktopServices::openUrl(path);
+ });
+
+ ui.buttonBox->addButton(tr("Kinect license"), QDialogButtonBox::HelpRole);
}
OPENTRACK_DECLARE_TRACKER(KinectFaceTracker, KinectFaceSettings, KinectFaceMetadata)
diff --git a/tracker-kinect-face/kinect_face_settings.h b/tracker-kinect-face/kinect_face_settings.h
index 6a828969..40af1eb7 100644
--- a/tracker-kinect-face/kinect_face_settings.h
+++ b/tracker-kinect-face/kinect_face_settings.h
@@ -11,19 +11,16 @@
#include "compat/macros.hpp"
#include "api/plugin-api.hpp"
-
class KinectFaceSettings : public ITrackerDialog
{
Q_OBJECT
Ui::KinectFaceUi ui;
+
public:
KinectFaceSettings();
void register_tracker(ITracker *) override {}
void unregister_tracker() override {}
-private slots:
- void doOK();
- void doCancel();
};
class KinectFaceMetadata : public Metadata
diff --git a/tracker-kinect-face/lang/nl_NL.ts b/tracker-kinect-face/lang/nl_NL.ts
index 9d0a713b..fb421cd4 100644
--- a/tracker-kinect-face/lang/nl_NL.ts
+++ b/tracker-kinect-face/lang/nl_NL.ts
@@ -9,6 +9,13 @@
</message>
</context>
<context>
+ <name>KinectFaceSettings</name>
+ <message>
+ <source>Kinect license</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>KinectFaceUi</name>
<message>
<source>Kinect Face Tracker</source>
diff --git a/tracker-kinect-face/lang/ru_RU.ts b/tracker-kinect-face/lang/ru_RU.ts
index 2d5fc446..47531728 100644
--- a/tracker-kinect-face/lang/ru_RU.ts
+++ b/tracker-kinect-face/lang/ru_RU.ts
@@ -9,6 +9,13 @@
</message>
</context>
<context>
+ <name>KinectFaceSettings</name>
+ <message>
+ <source>Kinect license</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>KinectFaceUi</name>
<message>
<source>Kinect Face Tracker</source>
diff --git a/tracker-kinect-face/lang/stub.ts b/tracker-kinect-face/lang/stub.ts
index 6ebeb02c..37ac0d60 100644
--- a/tracker-kinect-face/lang/stub.ts
+++ b/tracker-kinect-face/lang/stub.ts
@@ -9,6 +9,13 @@
</message>
</context>
<context>
+ <name>KinectFaceSettings</name>
+ <message>
+ <source>Kinect license</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>KinectFaceUi</name>
<message>
<source>Kinect Face Tracker</source>
diff --git a/tracker-kinect-face/lang/zh_CN.ts b/tracker-kinect-face/lang/zh_CN.ts
index 6ebeb02c..37ac0d60 100644
--- a/tracker-kinect-face/lang/zh_CN.ts
+++ b/tracker-kinect-face/lang/zh_CN.ts
@@ -9,6 +9,13 @@
</message>
</context>
<context>
+ <name>KinectFaceSettings</name>
+ <message>
+ <source>Kinect license</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>KinectFaceUi</name>
<message>
<source>Kinect Face Tracker</source>