Added sync button for filter center
This commit is contained in:
parent
0fe4a3d7fb
commit
1847ebdd5a
@ -459,10 +459,11 @@ void WideGraph::setFilterMinimumBandwidth(int width){
|
||||
void WideGraph::setFilterEnabled(bool enabled){
|
||||
m_filterEnabled = enabled;
|
||||
|
||||
// update the filter spinner
|
||||
ui->filterMinSpinBox->setEnabled(enabled);
|
||||
// update the filter ui
|
||||
ui->filterCenterSpinBox->setEnabled(enabled);
|
||||
ui->filterCenterSyncButton->setEnabled(enabled);
|
||||
ui->filterWidthSpinBox->setEnabled(enabled);
|
||||
ui->filterMinSpinBox->setEnabled(enabled);
|
||||
|
||||
// update the checkbox ui
|
||||
bool blocked = ui->filterCheckBox->blockSignals(true);
|
||||
@ -753,6 +754,10 @@ void WideGraph::on_filterWidthSpinBox_valueChanged(int n){
|
||||
setFilter(m_filterCenter - n/2, m_filterCenter - n/2 + n);
|
||||
}
|
||||
|
||||
void WideGraph::on_filterCenterSyncButton_clicked(){
|
||||
setFilterCenter(ui->offsetSpinBox->value());
|
||||
}
|
||||
|
||||
void WideGraph::on_filterCheckBox_toggled(bool b){
|
||||
setFilterEnabled(b);
|
||||
}
|
||||
|
@ -101,6 +101,7 @@ private slots:
|
||||
void on_filterMinSpinBox_valueChanged(int n);
|
||||
void on_filterCenterSpinBox_valueChanged(int n);
|
||||
void on_filterWidthSpinBox_valueChanged(int n);
|
||||
void on_filterCenterSyncButton_clicked();
|
||||
void on_filterCheckBox_toggled(bool b);
|
||||
void on_filterOpacitySpinBox_valueChanged(int n);
|
||||
|
||||
|
78
widegraph.ui
78
widegraph.ui
@ -177,10 +177,10 @@
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>267</width>
|
||||
<height>370</height>
|
||||
<x>-3</x>
|
||||
<y>-163</y>
|
||||
<width>270</width>
|
||||
<height>372</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
@ -276,29 +276,55 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="filterCenterSpinBox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::PlusMinus</enum>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> Hz</string>
|
||||
</property>
|
||||
<property name="prefix">
|
||||
<string>Center: </string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>5000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1500</number>
|
||||
</property>
|
||||
</widget>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="filterCenterSpinBox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>2</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::PlusMinus</enum>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> Hz</string>
|
||||
</property>
|
||||
<property name="prefix">
|
||||
<string>Center: </string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>5000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1500</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="filterCenterSyncButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Synchronize the filter center to the audio offset</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sync</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="filterWidthSpinBox">
|
||||
|
Loading…
Reference in New Issue
Block a user