Reorganize the HRTF group box

The three radio buttons are moved to a combo box, which gives a bit more width
for the file list contents.
This commit is contained in:
Chris Robinson
2015-10-12 05:52:34 -07:00
parent ed0f3bc1b1
commit b4bc36c4a0
3 changed files with 54 additions and 65 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ void MixHrtf_C(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
const struct HrtfParams *hrtfparams, struct HrtfState *hrtfstate,
ALuint BufferSize);
void Mix_C(const ALfloat *data, ALuint OutChans, ALfloat (*restrict OutBuffer)[BUFFERSIZE],
struct MixGains *Gains, ALuint Counter, ALuint OutPos, ALuint BufferSize);
struct MixGains *Gains, ALuint Counter, ALuint OutPos, ALuint BufferSize);
/* SSE mixers */
void MixHrtf_SSE(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
+7 -5
View File
@@ -190,6 +190,8 @@ MainWindow::MainWindow(QWidget *parent) :
ui->stereoModeCombo->addItem(stereoModeList[i].name);
ui->stereoModeCombo->adjustSize();
ui->hrtfStateComboBox->adjustSize();
#if !defined(HAVE_NEON) && !defined(HAVE_SSE)
ui->cpuExtDisabledLabel->move(ui->cpuExtDisabledLabel->x(), ui->cpuExtDisabledLabel->y() - 60);
#else
@@ -433,13 +435,13 @@ void MainWindow::loadConfig(const QString &fname)
ui->enableNeonCheckBox->setChecked(!disabledCpuExts.contains("neon", Qt::CaseInsensitive));
if(settings.value("hrtf").toString() == QString())
ui->hrtfAutoButton->setChecked(true);
ui->hrtfStateComboBox->setCurrentIndex(0);
else
{
if(settings.value("hrtf", true).toBool())
ui->hrtfForceButton->setChecked(true);
ui->hrtfStateComboBox->setCurrentIndex(1);
else
ui->hrtfDisableButton->setChecked(true);
ui->hrtfStateComboBox->setCurrentIndex(2);
}
QStringList hrtf_tables = settings.value("hrtf_tables").toStringList();
@@ -602,9 +604,9 @@ void MainWindow::saveConfig(const QString &fname) const
strlist.append("neon");
settings.setValue("disable-cpu-exts", strlist.join(QChar(',')));
if(ui->hrtfForceButton->isChecked())
if(ui->hrtfStateComboBox->currentIndex() == 1)
settings.setValue("hrtf", "true");
else if(ui->hrtfDisableButton->isChecked())
else if(ui->hrtfStateComboBox->currentIndex() == 2)
settings.setValue("hrtf", "false");
else
settings.setValue("hrtf", QString());
+46 -59
View File
@@ -215,67 +215,13 @@ to stereo output.</string>
<property name="title">
<string>HRTF (Stereo only)</string>
</property>
<widget class="QRadioButton" name="hrtfAutoButton">
<property name="geometry">
<rect>
<x>20</x>
<y>30</y>
<width>71</width>
<height>21</height>
</rect>
</property>
<property name="toolTip">
<string>Allows applications to request HRTF mixing, or for HRTF
mixing to be enabled when headphones are detected.</string>
</property>
<property name="text">
<string>Auto</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QRadioButton" name="hrtfDisableButton">
<property name="geometry">
<rect>
<x>20</x>
<y>70</y>
<width>71</width>
<height>21</height>
</rect>
</property>
<property name="toolTip">
<string>Does not allow HRTF mixing, even when requested.</string>
</property>
<property name="text">
<string>Disable</string>
</property>
</widget>
<widget class="QRadioButton" name="hrtfForceButton">
<property name="geometry">
<rect>
<x>20</x>
<y>50</y>
<width>71</width>
<height>21</height>
</rect>
</property>
<property name="toolTip">
<string>Attempts to force HRTF mixing, even if applications request not
to do it. This may override the channel configuration and
sample rate.</string>
</property>
<property name="text">
<string>Force</string>
</property>
</widget>
<widget class="QListWidget" name="hrtfFileList">
<property name="geometry">
<rect>
<x>110</x>
<x>20</x>
<y>30</y>
<width>301</width>
<height>141</height>
<width>391</width>
<height>121</height>
</rect>
</property>
<property name="toolTip">
@@ -304,7 +250,7 @@ contain these markers, which will be replaced as needed:
<widget class="QPushButton" name="hrtfAddButton">
<property name="geometry">
<rect>
<x>419</x>
<x>420</x>
<y>30</y>
<width>81</width>
<height>25</height>
@@ -325,7 +271,7 @@ contain these markers, which will be replaced as needed:
<widget class="QPushButton" name="hrtfRemoveButton">
<property name="geometry">
<rect>
<x>419</x>
<x>420</x>
<y>60</y>
<width>81</width>
<height>25</height>
@@ -340,6 +286,47 @@ contain these markers, which will be replaced as needed:
</iconset>
</property>
</widget>
<widget class="QComboBox" name="hrtfStateComboBox">
<property name="geometry">
<rect>
<x>110</x>
<y>160</y>
<width>161</width>
<height>22</height>
</rect>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContentsOnFirstShow</enum>
</property>
<item>
<property name="text">
<string>Application preference</string>
</property>
</item>
<item>
<property name="text">
<string>On</string>
</property>
</item>
<item>
<property name="text">
<string>Off</string>
</property>
</item>
</widget>
<widget class="QLabel" name="label_15">
<property name="geometry">
<rect>
<x>30</x>
<y>160</y>
<width>71</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>HRTF Mode:</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_3">
<property name="geometry">