Commit 3f8d1856 authored by Antoine Cellerier's avatar Antoine Cellerier

Skeleton for modules list widgets in the prefs. I'm not working on it atm so i...

Skeleton for modules list widgets in the prefs. I'm not working on it atm so i figure that it's best to commit what's already done.
parent bcbf3337
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <QDoubleSpinBox> #include <QDoubleSpinBox>
#include <QComboBox> #include <QComboBox>
#include <QCheckBox> #include <QCheckBox>
#include <QVector>
#include "ui/input_stats.h" #include "ui/input_stats.h"
#include "qt4.hpp" #include "qt4.hpp"
#include <assert.h> #include <assert.h>
...@@ -61,7 +62,7 @@ public: ...@@ -61,7 +62,7 @@ public:
module_config_t*,QWidget* ); module_config_t*,QWidget* );
static ConfigControl * createControl( vlc_object_t*, static ConfigControl * createControl( vlc_object_t*,
module_config_t*,QWidget*, module_config_t*,QWidget*,
QGridLayout *, int); QGridLayout *, int& );
void doApply( intf_thread_t *); void doApply( intf_thread_t *);
protected: protected:
vlc_object_t *p_this; vlc_object_t *p_this;
...@@ -92,7 +93,7 @@ class IntegerConfigControl : public VIntConfigControl ...@@ -92,7 +93,7 @@ class IntegerConfigControl : public VIntConfigControl
{ {
public: public:
IntegerConfigControl( vlc_object_t *, module_config_t *, QWidget *, IntegerConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int ); QGridLayout *, int& );
IntegerConfigControl( vlc_object_t *, module_config_t *, IntegerConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QSpinBox* ); QLabel*, QSpinBox* );
virtual ~IntegerConfigControl() {}; virtual ~IntegerConfigControl() {};
...@@ -112,7 +113,7 @@ class IntegerRangeConfigControl : public IntegerConfigControl ...@@ -112,7 +113,7 @@ class IntegerRangeConfigControl : public IntegerConfigControl
{ {
public: public:
IntegerRangeConfigControl( vlc_object_t *, module_config_t *, QWidget *, IntegerRangeConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int ); QGridLayout *, int& );
IntegerRangeConfigControl( vlc_object_t *, module_config_t *, IntegerRangeConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QSpinBox* ); QLabel*, QSpinBox* );
private: private:
...@@ -123,7 +124,7 @@ class IntegerListConfigControl : public VIntConfigControl ...@@ -123,7 +124,7 @@ class IntegerListConfigControl : public VIntConfigControl
{ {
public: public:
IntegerListConfigControl( vlc_object_t *, module_config_t *, QWidget *, IntegerListConfigControl( vlc_object_t *, module_config_t *, QWidget *,
bool, QGridLayout*, int ); bool, QGridLayout*, int& );
IntegerListConfigControl( vlc_object_t *, module_config_t *, QLabel *, IntegerListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool ); QComboBox*, bool );
virtual ~IntegerListConfigControl() {}; virtual ~IntegerListConfigControl() {};
...@@ -140,7 +141,7 @@ class BoolConfigControl : public VIntConfigControl ...@@ -140,7 +141,7 @@ class BoolConfigControl : public VIntConfigControl
{ {
public: public:
BoolConfigControl( vlc_object_t *, module_config_t *, QWidget *, BoolConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int ); QGridLayout *, int& );
BoolConfigControl( vlc_object_t *, module_config_t *, BoolConfigControl( vlc_object_t *, module_config_t *,
QLabel *, QCheckBox*, bool ); QLabel *, QCheckBox*, bool );
virtual ~BoolConfigControl() {}; virtual ~BoolConfigControl() {};
...@@ -171,7 +172,7 @@ class FloatConfigControl : public VFloatConfigControl ...@@ -171,7 +172,7 @@ class FloatConfigControl : public VFloatConfigControl
{ {
public: public:
FloatConfigControl( vlc_object_t *, module_config_t *, QWidget *, FloatConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int ); QGridLayout *, int& );
FloatConfigControl( vlc_object_t *, module_config_t *, FloatConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QDoubleSpinBox* ); QLabel*, QDoubleSpinBox* );
virtual ~FloatConfigControl() {}; virtual ~FloatConfigControl() {};
...@@ -191,7 +192,7 @@ class FloatRangeConfigControl : public FloatConfigControl ...@@ -191,7 +192,7 @@ class FloatRangeConfigControl : public FloatConfigControl
{ {
public: public:
FloatRangeConfigControl( vlc_object_t *, module_config_t *, QWidget *, FloatRangeConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int ); QGridLayout *, int& );
FloatRangeConfigControl( vlc_object_t *, module_config_t *, FloatRangeConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QDoubleSpinBox* ); QLabel*, QDoubleSpinBox* );
private: private:
...@@ -217,7 +218,7 @@ class StringConfigControl : public VStringConfigControl ...@@ -217,7 +218,7 @@ class StringConfigControl : public VStringConfigControl
{ {
public: public:
StringConfigControl( vlc_object_t *, module_config_t *, QWidget *, StringConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int, bool pwd ); QGridLayout *, int&, bool pwd );
StringConfigControl( vlc_object_t *, module_config_t *, QLabel *, StringConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QLineEdit*, bool pwd ); QLineEdit*, bool pwd );
virtual ~StringConfigControl() {}; virtual ~StringConfigControl() {};
...@@ -234,7 +235,7 @@ class ModuleConfigControl : public VStringConfigControl ...@@ -234,7 +235,7 @@ class ModuleConfigControl : public VStringConfigControl
{ {
public: public:
ModuleConfigControl( vlc_object_t *, module_config_t *, QWidget *, bool, ModuleConfigControl( vlc_object_t *, module_config_t *, QWidget *, bool,
QGridLayout*, int ); QGridLayout*, int& );
ModuleConfigControl( vlc_object_t *, module_config_t *, QLabel *, ModuleConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool ); QComboBox*, bool );
virtual ~ModuleConfigControl() {}; virtual ~ModuleConfigControl() {};
...@@ -247,11 +248,32 @@ private: ...@@ -247,11 +248,32 @@ private:
QComboBox *combo; QComboBox *combo;
}; };
class ModuleListConfigControl : public VStringConfigControl
{
Q_OBJECT;
public:
ModuleListConfigControl( vlc_object_t *, module_config_t *, QWidget *,
bool, QGridLayout*, int& );
// ModuleListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
// QComboBox*, bool );
virtual ~ModuleListConfigControl();
virtual QString getValue();
virtual void hide();
virtual void show();
public slots:
void wakeUp_TheUserJustClickedOnSomething( int value );
private:
void finish( bool );
QVector<QCheckBox*> modules;
QLabel *label;
QLineEdit *text;
};
class StringListConfigControl : public VStringConfigControl class StringListConfigControl : public VStringConfigControl
{ {
public: public:
StringListConfigControl( vlc_object_t *, module_config_t *, QWidget *, StringListConfigControl( vlc_object_t *, module_config_t *, QWidget *,
bool, QGridLayout*, int ); bool, QGridLayout*, int& );
StringListConfigControl( vlc_object_t *, module_config_t *, QLabel *, StringListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool ); QComboBox*, bool );
virtual ~StringListConfigControl() {}; virtual ~StringListConfigControl() {};
......
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