Commit a300dcc8 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: Equalizer: rework (fix #7923)

parent a52e23c7
......@@ -104,19 +104,18 @@ public:
void setValue( float f );
protected:
float initialValue();
public slots:
void onValueChanged( int i );
void updateText( int i );
void writeToConfig();
private:
intf_thread_t *p_intf;
FilterSliderData( QObject *parent, QSlider *slider );
virtual float initialValue();
QSlider *slider;
QLabel *valueLabel;
QLabel *nameLabel;
const slider_data_t *p_data;
intf_thread_t *p_intf;
public slots:
virtual void onValueChanged( int i ) const;
virtual void updateText( int i );
virtual void writeToConfig() const;
};
class AudioFilterControlWidget : public QWidget
......@@ -136,38 +135,47 @@ protected:
int i_smallfont;
protected slots:
void enable();
void enable( bool ) const;
};
class Equalizer: public QWidget
class EqualizerSliderData : public FilterSliderData
{
Q_OBJECT
friend class ExtendedDialog;
public:
EqualizerSliderData( QObject *parent, intf_thread_t *p_intf,
QSlider *slider,
QLabel *valueLabel, QLabel *nameLabel,
const slider_data_t *p_data, int index );
protected:
virtual float initialValue();
int index;
QStringList getBandsFromAout() const;
public slots:
virtual void onValueChanged( int i ) const;
virtual void writeToConfig() const;
};
class Equalizer: public AudioFilterControlWidget
{
Q_OBJECT
public:
Equalizer( intf_thread_t *, QWidget * );
QComboBox *presetsComboBox;
char * createValuesFromPreset( int i_preset );
void updateUIFromCore();
void changeFreqLabels( bool );
private:
Ui::EqualizerWidget ui;
QSlider *bands[BANDS];
QLabel *band_texts[BANDS];
bool b_vlcBands;
protected:
virtual void build();
void delCallbacks( vlc_object_t * );
void addCallbacks( vlc_object_t * );
private:
QVector<FilterSliderData *> eqSliders;
FilterSliderData *preamp;
FilterSliderData::slider_data_t preamp_values;
intf_thread_t *p_intf;
void clean() { enable(); }
private slots:
void enable(bool);
void enable();
void set2Pass();
void setPreamp();
void setCoreBands();
void setCorePreset(int);
void setCorePreset( int );
void enable2Pass( bool ) const;
};
class Compressor: public AudioFilterControlWidget
......
......@@ -136,5 +136,4 @@ void ExtendedDialog::changedItem( int i_status )
if( i_status != END_S ) return;
syncW->clean();
videoEffect->clean();
equal->clean();
}
......@@ -19,7 +19,16 @@
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
......@@ -87,7 +96,7 @@
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="preampLabel">
<property name="text">
<string>Preamp</string>
......@@ -113,7 +122,7 @@
</property>
</spacer>
</item>
<item row="1" column="2" rowspan="2">
<item row="1" column="2" rowspan="4">
<widget class="QWidget" name="slidersPlaceholder" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
......@@ -123,6 +132,13 @@
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QLabel" name="preampValue">
<property name="text">
<string>0.00 dB</string>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment