diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-04-13 19:02:25 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-04-13 19:02:25 +0200 |
commit | 1171842c5df3ed1c396d572b1022018250b1926c (patch) | |
tree | 3d64e6cd982e1261305f9733841e52b4c8ab2abd /tracker-kinect-face/kinect_face_settings.cpp | |
parent | cd9d8e4f1bfc95dd21f6de87cdaa86acfbb6572a (diff) |
tracker/kinect: display license terms
Diffstat (limited to 'tracker-kinect-face/kinect_face_settings.cpp')
-rw-r--r-- | tracker-kinect-face/kinect_face_settings.cpp | 27 |
1 files changed, 13 insertions, 14 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) |