1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

Audio preferences dialog: animate input volume control text

This commit is contained in:
f4exb 2017-01-06 03:13:53 +01:00
parent 751bf6973e
commit c3b69007af
3 changed files with 12 additions and 2 deletions

View File

@ -69,3 +69,9 @@ void AudioDialog::accept()
{
QDialog::accept();
}
void AudioDialog::on_inputVolume_valueChanged(int value)
{
float inputVolume = (float) value / 100.0f;
ui->inputVolumeText->setText(QString("%1").arg(inputVolume, 0, 'f', 2));
}

View File

@ -29,6 +29,7 @@ private:
private slots:
void accept();
void on_inputVolume_valueChanged(int value);
};
#endif // INCLUDE_AUDIODIALOG_H

View File

@ -23,7 +23,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="tab_2">
<attribute name="title">
@ -84,6 +84,9 @@
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>50</number>
</property>
</widget>
</item>
<item>
@ -95,7 +98,7 @@
</size>
</property>
<property name="text">
<string>1.00</string>
<string>0.50</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>