]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/extended_panels.hpp
Fix most of the issues of the Equalizer.
[vlc] / modules / gui / qt4 / components / extended_panels.hpp
index de5e25b57dce808a32750e733eddd79a22d7467c..fd56a253314e23b7cdaa3c4847cd9fe66e8c2765 100644 (file)
@@ -1,10 +1,11 @@
 /*****************************************************************************
- * preferences_tree.hpp : Tree of modules for preferences
+ * extended_panels.hpp : Exentended Panels
  ****************************************************************************
  * Copyright (C) 2006 the VideoLAN team
- * $Id: preferences.hpp 16643 2006-09-13 12:45:46Z zorglub $
+ * $Id$
  *
  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
+ *          Antoine Cellerier <dionoea at videolan dot org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #ifndef _EQUALIZER_H_
 #define _EQUALIZER_H_
 
-#include <vlc/vlc.h>
-#include <vlc/aout.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_aout.h>
+#include "../../audio_filter/equalizer_presets.h"
+
 #include "ui/equalizer.h"
+#include "ui/video_effects.h"
+#include "ui/v4l2.h"
+
+
+#include <QTabWidget>
+
+#define BANDS EQZ_BANDS_MAX
+#define NUM_SP_CTRL 5
+
+class QSignalMapper;
+
+class ExtVideo: public QObject
+{
+    Q_OBJECT
+public:
+    ExtVideo( intf_thread_t *, QTabWidget * );
+    virtual ~ExtVideo();
+    /*void gotoConf( QObject* );*/
+private:
+    Ui::ExtVideoWidget ui;
+    QSignalMapper* filterMapper;
+    intf_thread_t *p_intf;
+    vout_thread_t *p_vout;
+    void initComboBoxItems( QObject* );
+    void setWidgetValue( QObject* );
+    void ChangeVFiltersString( char *psz_name, bool b_add );
+private slots:
+    void updateFilters();
+    void updateFilterOptions();
+    void cropChange();
+};
+
+class ExtV4l2 : public QWidget
+{
+    Q_OBJECT
+public:
+    ExtV4l2( intf_thread_t *, QWidget * );
+    virtual ~ExtV4l2();
+
+    virtual void showEvent( QShowEvent *event );
+
+private:
+    intf_thread_t *p_intf;
+    Ui::ExtV4l2Widget ui;
+    QGroupBox *box;
 
-#define BANDS 10
+private slots:
+    void Refresh( void );
+    void ValueChange( int value );
+    void ValueChange( bool value );
+};
 
 class Equalizer: public QWidget
 {
@@ -36,7 +92,10 @@ class Equalizer: public QWidget
 public:
     Equalizer( intf_thread_t *, QWidget * );
     virtual ~Equalizer();
+    QComboBox *presetsComboBox;
 
+    char * createValuesFromPreset( int i_preset );
+    void updateUIFromCore();
 private:
     Ui::EqualizerWidget ui;
     QSlider *bands[BANDS];
@@ -44,7 +103,6 @@ private:
 
     void delCallbacks( aout_instance_t * );
     void addCallbacks( aout_instance_t * );
-    void setValues( char *, float );
 
     intf_thread_t *p_intf;
 private slots:
@@ -52,8 +110,35 @@ private slots:
     void enable();
     void set2Pass();
     void setPreamp();
-    void setBand();
-    void setPreset(int);
+    void setCoreBands();
+    void setCorePreset(int);
+    void updateUISliderValues( int );
+};
+
+class Spatializer: public QWidget
+{
+    Q_OBJECT
+public:
+    Spatializer( intf_thread_t *, QWidget * );
+    virtual ~Spatializer();
+
+private:
+    QSlider *spatCtrl[NUM_SP_CTRL];
+    QLabel *ctrl_texts[NUM_SP_CTRL];
+    QLabel *ctrl_readout[NUM_SP_CTRL];
+    float controlVars[5];
+    float oldControlVars[5];
+
+    QCheckBox *enableCheck;
+
+    void delCallbacks( aout_instance_t * );
+    void addCallbacks( aout_instance_t * );
+    intf_thread_t *p_intf;
+private slots:
+    void enable(bool);
+    void enable();
+    void setValues(float *);
+    void setInitValues();
 };
 
 class ExtendedControls: public QWidget
@@ -72,4 +157,23 @@ private slots:
     void snapshot() {};
 };
 
+class SyncControls : public QWidget
+{
+    Q_OBJECT
+public:
+    SyncControls( intf_thread_t *, QWidget * );
+    virtual ~SyncControls() {};
+private:
+    intf_thread_t *p_intf;
+    QDoubleSpinBox *AVSpin;
+    QDoubleSpinBox *subsSpin;
+    QDoubleSpinBox *subSpeedSpin;
+public slots:
+    void update();
+private slots:
+    void advanceAudio( double );
+    void advanceSubs( double );
+    void adjustSubsSpeed( double );
+};
+
 #endif