summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-10-25 15:27:59 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-10-25 15:27:59 +0200
commitda211b0012045548eab180ff769c6da4b942ba10 (patch)
tree211d90c92315dadc4ab0ce06a8a3bdf1b8949003
parent2558cd7659e33297003adffa17c5771320bca2bf (diff)
use qbuttonbox in curve config
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
-rw-r--r--facetracknoir/curve-config.cpp4
-rw-r--r--facetracknoir/ftnoir_curves.ui78
2 files changed, 15 insertions, 67 deletions
diff --git a/facetracknoir/curve-config.cpp b/facetracknoir/curve-config.cpp
index 5622e076..d06e1f6c 100644
--- a/facetracknoir/curve-config.cpp
+++ b/facetracknoir/curve-config.cpp
@@ -11,8 +11,8 @@ CurveConfigurationDialog::CurveConfigurationDialog(FaceTrackNoIR *ftnoir, QWidge
this->move(parent->pos() + offsetpos);
// Connect Qt signals to member-functions
- connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
- connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
+ connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
+ connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
connect(ui.checkBox, SIGNAL(stateChanged(int)), this, SLOT(curveChanged(int)));
// Load the settings from the current .INI-file
diff --git a/facetracknoir/ftnoir_curves.ui b/facetracknoir/ftnoir_curves.ui
index 0c269c70..77399a68 100644
--- a/facetracknoir/ftnoir_curves.ui
+++ b/facetracknoir/ftnoir_curves.ui
@@ -29,71 +29,6 @@
<property name="styleSheet">
<string notr="true">background-color: #ccc;</string>
</property>
- <widget class="QPushButton" name="btnOK">
- <property name="geometry">
- <rect>
- <x>810</x>
- <y>625</y>
- <width>72</width>
- <height>24</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string>OK</string>
- </property>
- </widget>
- <widget class="QPushButton" name="btnCancel">
- <property name="geometry">
- <rect>
- <x>886</x>
- <y>625</y>
- <width>69</width>
- <height>24</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Cancel</string>
- </property>
- </widget>
<widget class="QTabWidget" name="tabWidget">
<property name="geometry">
<rect>
@@ -881,6 +816,19 @@
</widget>
</widget>
</widget>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="geometry">
+ <rect>
+ <x>800</x>
+ <y>630</y>
+ <width>164</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
</widget>
<customwidgets>
<customwidget>