#define _INFOPANELS_H_
#include <vlc/vlc.h>
#include <QWidget>
+#include <QTreeWidget>
#include <QLineEdit>
#include <QSpinBox>
#include <QDoubleSpinBox>
#include <QComboBox>
#include <QCheckBox>
+#include <QVector>
+#include <QDialog>
+
#include "ui/input_stats.h"
#include "qt4.hpp"
#include <assert.h>
module_config_t*,QWidget* );
static ConfigControl * createControl( vlc_object_t*,
module_config_t*,QWidget*,
- QGridLayout *, int);
+ QGridLayout *, int& );
+ void doApply( intf_thread_t *);
protected:
vlc_object_t *p_this;
module_config_t *p_item;
{
public:
IntegerConfigControl( vlc_object_t *, module_config_t *, QWidget *,
- QGridLayout *, int );
+ QGridLayout *, int& );
IntegerConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QSpinBox* );
virtual ~IntegerConfigControl() {};
{
public:
IntegerRangeConfigControl( vlc_object_t *, module_config_t *, QWidget *,
- QGridLayout *, int );
+ QGridLayout *, int& );
IntegerRangeConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QSpinBox* );
private:
{
public:
IntegerListConfigControl( vlc_object_t *, module_config_t *, QWidget *,
- bool, QGridLayout*, int );
+ bool, QGridLayout*, int& );
IntegerListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool );
virtual ~IntegerListConfigControl() {};
{
public:
BoolConfigControl( vlc_object_t *, module_config_t *, QWidget *,
- QGridLayout *, int );
+ QGridLayout *, int& );
BoolConfigControl( vlc_object_t *, module_config_t *,
QLabel *, QCheckBox*, bool );
virtual ~BoolConfigControl() {};
{
public:
FloatConfigControl( vlc_object_t *, module_config_t *, QWidget *,
- QGridLayout *, int );
+ QGridLayout *, int& );
FloatConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QDoubleSpinBox* );
virtual ~FloatConfigControl() {};
{
public:
FloatRangeConfigControl( vlc_object_t *, module_config_t *, QWidget *,
- QGridLayout *, int );
+ QGridLayout *, int& );
FloatRangeConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QDoubleSpinBox* );
private:
void finish();
};
-#if 0
-class FloatConfigControl : public VFloatConfigControl
-{
-public:
- FloatConfigControl( vlc_object_t *a, module_config_t *b, QWidget *c ) :
- ConfigControl(a,b,c) {};
- virtual ~FloatConfigControl() {};
- virtual float getValue();
-private:
- QDoubleSpinBox *spin;
-};
-#endif
/*******************************************************
* String-based controls
{
public:
StringConfigControl( vlc_object_t *, module_config_t *, QWidget *,
- QGridLayout *, int, bool pwd );
+ QGridLayout *, int&, bool pwd );
StringConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QLineEdit*, bool pwd );
virtual ~StringConfigControl() {};
{
public:
ModuleConfigControl( vlc_object_t *, module_config_t *, QWidget *, bool,
- QGridLayout*, int );
+ QGridLayout*, int& );
ModuleConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool );
virtual ~ModuleConfigControl() {};
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
{
public:
StringListConfigControl( vlc_object_t *, module_config_t *, QWidget *,
- bool, QGridLayout*, int );
+ bool, QGridLayout*, int& );
StringListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool );
virtual ~StringListConfigControl() {};
};
#endif
+/**********************************************************************
+ * Key selector widget
+ **********************************************************************/
+class KeyInputDialog : public QDialog
+{
+public:
+ KeyInputDialog( QList<module_config_t *> &, char * );
+ int keyValue;
+ bool conflicts;
+private:
+ void keyPressEvent( QKeyEvent *);
+ QLabel *selected;
+ QLabel *warning;
+ char * keyToChange;
+ QList<module_config_t*> values;
+};
+
+class KeySelectorControl : public ConfigControl
+{
+ Q_OBJECT;
+public:
+ KeySelectorControl( vlc_object_t *, module_config_t *, QWidget *,
+ QGridLayout*, int& );
+ virtual int getType() { return 4; }
+ virtual ~KeySelectorControl() {};
+ virtual void hide() { table->hide(); label->hide(); }
+ virtual void show() { table->show(); label->show(); }
+ void doApply();
+private:
+ void finish();
+ QLabel *label;
+ QTreeWidget *table;
+ QList<module_config_t *> values;
+private slots:
+ void selectKey( QTreeWidgetItem *);
+};
+
#endif