aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2019-07-01 00:13:56 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2019-07-01 00:13:56 +0800
commiteb82292b5d8818a5ef1a0c92e35390bd4e22674e (patch)
treeba0aa0171654fdb51af89460b11284c395f13597
parent19c89fc7baa299e523e152a14066ebc8ce23af21 (diff)
downloadQMidiPlayer-eb82292b5d8818a5ef1a0c92e35390bd4e22674e.tar.xz
Use splitter in preset selection dialog.
Device initialization settings are no longer lost if QMidiPlayer starts with the device disconnected.
-rw-r--r--ChangeLog6
-rw-r--r--qmidiplayer-desktop/qmpdevpropdialog.cpp11
-rw-r--r--qmidiplayer-desktop/qmppresetselect.ui28
3 files changed, 37 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index cd993dd..441d9c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-06-30 0.8.7 indev
+Use splitter in preset selection dialog.
+
+Device initialization settings are no longer lost if QMidiPlayer starts with
+the device disconnected.
+
2019-06-17 0.8.7 indev
Device initialization file implementation (part 1).
diff --git a/qmidiplayer-desktop/qmpdevpropdialog.cpp b/qmidiplayer-desktop/qmpdevpropdialog.cpp
index 0159a63..150f54b 100644
--- a/qmidiplayer-desktop/qmpdevpropdialog.cpp
+++ b/qmidiplayer-desktop/qmpdevpropdialog.cpp
@@ -73,7 +73,16 @@ void qmpDevPropDialog::setupRow(const QString&dn,const QString&din)
if(s==QString::fromStdString(ds)){conn=true;break;}
((QCheckBox*)ui->twProps->cellWidget(r,1))->setChecked(conn);
});
- if(dn.length())cb->setCurrentText(dn);
+ if(dn.length())
+ {
+ cb->setCurrentText(dn);
+ if(cb->currentText()!=dn)
+ {
+ cb->setEditable(true);
+ cb->setCurrentText(dn);
+ cb->setEnabled(false);
+ }
+ }
emit cb->currentTextChanged(cb->currentText());
connect(pb,&QPushButton::clicked,this,[this,lb,fw]{
lb->setText(QFileDialog::getOpenFileUrl(this,"Select Device Initialization File",QUrl()).path());
diff --git a/qmidiplayer-desktop/qmppresetselect.ui b/qmidiplayer-desktop/qmppresetselect.ui
index 0168d19..1c70ee0 100644
--- a/qmidiplayer-desktop/qmppresetselect.ui
+++ b/qmidiplayer-desktop/qmppresetselect.ui
@@ -1,7 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>qmpPresetSelector</class>
- <widget class="QDialog" name="qmpPresetSelector">\
+ <widget class="QDialog" name="qmpPresetSelector">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>668</width>
+ <height>393</height>
+ </rect>
+ </property>
<property name="minimumSize">
<size>
<width>480</width>
@@ -19,8 +27,14 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
+ <widget class="QSplitter" name="splitter">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="childrenCollapsible">
+ <bool>false</bool>
+ </property>
+ <widget class="QWidget" name="">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="lbBnk">
@@ -46,8 +60,8 @@
</widget>
</item>
</layout>
- </item>
- <item>
+ </widget>
+ <widget class="QWidget" name="">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="lbPst">
@@ -60,8 +74,8 @@
<widget class="QListWidget" name="lwPresetSelect"/>
</item>
</layout>
- </item>
- </layout>
+ </widget>
+ </widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">