1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 09:48:45 -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(); 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: private slots:
void accept(); void accept();
void on_inputVolume_valueChanged(int value);
}; };
#endif // INCLUDE_AUDIODIALOG_H #endif // INCLUDE_AUDIODIALOG_H

View File

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