summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-21 08:03:39 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-21 08:03:39 +0200
commit1ca44ebf2600402db9a44f3b3baa1fda224a6dae (patch)
tree59068533286c66c2d5564eb3f874c4a6f8c28fe0 /facetracknoir
parent31a0400bb07424e371bc7504a5147ae9fcced683 (diff)
replace manual QWidget::move() with dialog flag
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/curve-config.cpp6
-rw-r--r--facetracknoir/curve-config.h2
-rw-r--r--facetracknoir/facetracknoir.cpp8
3 files changed, 6 insertions, 10 deletions
diff --git a/facetracknoir/curve-config.cpp b/facetracknoir/curve-config.cpp
index ebf43a8d..f00d3657 100644
--- a/facetracknoir/curve-config.cpp
+++ b/facetracknoir/curve-config.cpp
@@ -1,8 +1,7 @@
#include "./facetracknoir.h"
#include "./curve-config.h"
#include "opentrack/main-settings.hpp"
-MapWidget::MapWidget(Mappings& m, main_settings& s, QWidget *parent) :
- QWidget(parent, Qt::Dialog),
+MapWidget::MapWidget(Mappings& m, main_settings& s) :
m(m)
{
ui.setupUi( this );
@@ -45,9 +44,6 @@ MapWidget::MapWidget(Mappings& m, main_settings& s, QWidget *parent) :
}
setFont(qApp->font());
- QPoint offsetpos(120, 30);
- this->move(parent->pos() + offsetpos);
-
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
diff --git a/facetracknoir/curve-config.h b/facetracknoir/curve-config.h
index 244cf6df..2104b7fa 100644
--- a/facetracknoir/curve-config.h
+++ b/facetracknoir/curve-config.h
@@ -7,7 +7,7 @@ class MapWidget: public QWidget
{
Q_OBJECT
public:
- MapWidget(Mappings &m, main_settings &s, QWidget *parent );
+ MapWidget(Mappings &m, main_settings &s);
private:
Ui::UICCurveConfigurationDialog ui;
Mappings& m;
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index c3de12ba..0333c120 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -364,14 +364,14 @@ void FaceTrackNoIR::showFilterSettings() {
void FaceTrackNoIR::showKeyboardShortcuts() {
shortcuts_widget = std::make_shared<KeyboardShortcutDialog>();
- shortcuts_widget->show();
- shortcuts_widget->raise();
+ shortcuts_widget->setWindowFlags(Qt::Dialog);
connect(shortcuts_widget.get(), SIGNAL(reload()), this, SLOT(bindKeyboardShortcuts()));
+ shortcuts_widget->show();
}
void FaceTrackNoIR::showCurveConfiguration() {
- mapping_widget = std::make_shared<MapWidget>(pose, s, this);
- mapping_widget->show();
+ mapping_widget = std::make_shared<MapWidget>(pose, s);
+ mapping_widget->setWindowFlags(Qt::Dialog);
mapping_widget->raise();
}