summaryrefslogtreecommitdiffstats
path: root/src/dialog
diff options
context:
space:
mode:
authorDaniel Poelzleithner <git@poelzi.org>2021-01-25 00:26:18 +0100
committerDaniel Poelzleithner <git@poelzi.org>2021-01-25 00:26:18 +0100
commite455161a09956ced6fdfb8314aa4e93d55670dfd (patch)
treea14c0e71d135000e9ce17cef0d95e44cdb6d6550 /src/dialog
parented533bb8889ced48ca031a2a79273e411e1d90f3 (diff)
Fix clazy problem with buttonbox
Diffstat (limited to 'src/dialog')
-rw-r--r--src/dialog/dlgkeywheel.cpp5
-rw-r--r--src/dialog/dlgkeywheel.h6
-rw-r--r--src/dialog/dlgkeywheel.ui94
3 files changed, 44 insertions, 61 deletions
diff --git a/src/dialog/dlgkeywheel.cpp b/src/dialog/dlgkeywheel.cpp
index f3269019e9..27dc67e7d8 100644
--- a/src/dialog/dlgkeywheel.cpp
+++ b/src/dialog/dlgkeywheel.cpp
@@ -37,6 +37,11 @@ DlgKeywheel::DlgKeywheel(QWidget* parent, const UserSettingsPointer& pConfig)
installEventFilter(this);
ui->graphic->installEventFilter(this);
+ connect(ui->closeButton,
+ &QAbstractButton::clicked,
+ this,
+ &QDialog::accept);
+
// load the user configured setting as default
const int notation = static_cast<int>(ControlObject::get(
ConfigKey("[Library]", "key_notation")));
diff --git a/src/dialog/dlgkeywheel.h b/src/dialog/dlgkeywheel.h
index a249020c18..b44fc56109 100644
--- a/src/dialog/dlgkeywheel.h
+++ b/src/dialog/dlgkeywheel.h
@@ -9,11 +9,7 @@
#include "dialog/ui_dlgkeywheel.h"
#include "track/keyutils.h"
-namespace Ui {
-class DlgKeywheel;
-}
-
-class DlgKeywheel : public QDialog {
+class DlgKeywheel : public QDialog, public Ui::DlgKeywheel {
Q_OBJECT
public:
diff --git a/src/dialog/dlgkeywheel.ui b/src/dialog/dlgkeywheel.ui
index 558ca0046c..ed6a28ff5c 100644
--- a/src/dialog/dlgkeywheel.ui
+++ b/src/dialog/dlgkeywheel.ui
@@ -28,28 +28,6 @@
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
- <item row="1" column="1">
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Close</set>
- </property>
- <property name="centerButtons">
- <bool>true</bool>
- </property>
- </widget>
- </item>
<item row="0" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
@@ -86,6 +64,43 @@
</property>
</spacer>
</item>
+ <item row="2" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="closeButton">
+ <property name="text">
+ <string>&amp;Close</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
</layout>
</item>
</layout>
@@ -98,38 +113,5 @@
</customwidget>
</customwidgets>
<resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>DlgKeywheel</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>248</x>
- <y>254</y>
- </hint>
- <hint type="destinationlabel">
- <x>157</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>buttonBox</sender>
- <signal>rejected()</signal>
- <receiver>DlgKeywheel</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>316</x>
- <y>260</y>
- </hint>
- <hint type="destinationlabel">
- <x>286</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- </connections>
+ <connections/>
</ui>