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){
|
void WideGraph::setFilterEnabled(bool enabled){
|
||||||
m_filterEnabled = enabled;
|
m_filterEnabled = enabled;
|
||||||
|
|
||||||
// update the filter spinner
|
// update the filter ui
|
||||||
ui->filterMinSpinBox->setEnabled(enabled);
|
|
||||||
ui->filterCenterSpinBox->setEnabled(enabled);
|
ui->filterCenterSpinBox->setEnabled(enabled);
|
||||||
|
ui->filterCenterSyncButton->setEnabled(enabled);
|
||||||
ui->filterWidthSpinBox->setEnabled(enabled);
|
ui->filterWidthSpinBox->setEnabled(enabled);
|
||||||
|
ui->filterMinSpinBox->setEnabled(enabled);
|
||||||
|
|
||||||
// update the checkbox ui
|
// update the checkbox ui
|
||||||
bool blocked = ui->filterCheckBox->blockSignals(true);
|
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);
|
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){
|
void WideGraph::on_filterCheckBox_toggled(bool b){
|
||||||
setFilterEnabled(b);
|
setFilterEnabled(b);
|
||||||
}
|
}
|
||||||
|
@ -101,6 +101,7 @@ private slots:
|
|||||||
void on_filterMinSpinBox_valueChanged(int n);
|
void on_filterMinSpinBox_valueChanged(int n);
|
||||||
void on_filterCenterSpinBox_valueChanged(int n);
|
void on_filterCenterSpinBox_valueChanged(int n);
|
||||||
void on_filterWidthSpinBox_valueChanged(int n);
|
void on_filterWidthSpinBox_valueChanged(int n);
|
||||||
|
void on_filterCenterSyncButton_clicked();
|
||||||
void on_filterCheckBox_toggled(bool b);
|
void on_filterCheckBox_toggled(bool b);
|
||||||
void on_filterOpacitySpinBox_valueChanged(int n);
|
void on_filterOpacitySpinBox_valueChanged(int n);
|
||||||
|
|
||||||
|
34
widegraph.ui
34
widegraph.ui
@ -177,10 +177,10 @@
|
|||||||
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>-3</x>
|
||||||
<y>0</y>
|
<y>-163</y>
|
||||||
<width>267</width>
|
<width>270</width>
|
||||||
<height>370</height>
|
<height>372</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||||
@ -275,11 +275,22 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="filterCenterSpinBox">
|
<widget class="QSpinBox" name="filterCenterSpinBox">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
|
<horstretch>2</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="buttonSymbols">
|
<property name="buttonSymbols">
|
||||||
<enum>QAbstractSpinBox::PlusMinus</enum>
|
<enum>QAbstractSpinBox::PlusMinus</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -300,6 +311,21 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
<item>
|
||||||
<widget class="QSpinBox" name="filterWidthSpinBox">
|
<widget class="QSpinBox" name="filterWidthSpinBox">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
|
Loading…
Reference in New Issue
Block a user