*
* Authors: Clément Stenac <zorglub@videolan.org>
* Antoine Cellerier <dionoea@videolan.org>
+ * Jean-Baptiste Kempf <jb@videolan.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
#include <QVector>
#include <QDialog>
#include <QLabel>
+#include <QFile>
+#include <QPushButton>
#include "qt4.hpp"
#include <assert.h>
class ConfigControl : public QObject
{
- Q_OBJECT;
+ Q_OBJECT
public:
ConfigControl( vlc_object_t *_p_this, module_config_t *_p_conf,
QWidget *p ) : p_this( _p_this ), p_item( _p_conf )
*******************************************************/
class VIntConfigControl : public ConfigControl
{
+Q_OBJECT
public:
VIntConfigControl( vlc_object_t *a, module_config_t *b, QWidget *c ) :
ConfigControl(a,b,c) {};
class IntegerConfigControl : public VIntConfigControl
{
+Q_OBJECT
public:
IntegerConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int& );
*******************************************************/
class VFloatConfigControl : public ConfigControl
{
+ Q_OBJECT
public:
VFloatConfigControl( vlc_object_t *a, module_config_t *b, QWidget *c ) :
ConfigControl(a,b,c) {};
class FloatConfigControl : public VFloatConfigControl
{
+ Q_OBJECT
public:
FloatConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int& );
class FloatRangeConfigControl : public FloatConfigControl
{
+ Q_OBJECT
public:
FloatRangeConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int& );
*******************************************************/
class VStringConfigControl : public ConfigControl
{
+ Q_OBJECT
public:
VStringConfigControl( vlc_object_t *a, module_config_t *b, QWidget *c ) :
ConfigControl(a,b,c) {};
class StringConfigControl : public VStringConfigControl
{
+ Q_OBJECT
public:
StringConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int&, bool pwd );
QLabel *label;
};
+class FileConfigControl : public VStringConfigControl
+{
+ Q_OBJECT;
+public:
+ FileConfigControl( vlc_object_t *, module_config_t *, QWidget *,
+ QGridLayout *, int&, bool pwd );
+ FileConfigControl( vlc_object_t *, module_config_t *, QLabel *,
+ QLineEdit *, QPushButton *, bool pwd );
+ virtual ~FileConfigControl() {};
+ virtual QString getValue() { return text->text(); };
+ virtual void show() { text->show(); label->show(); browse->show(); }
+ virtual void hide() { text->hide(); label->hide(); browse->hide(); }
+public slots:
+ virtual void updateField();
+protected:
+ void finish();
+private:
+ QLineEdit *text;
+ QLabel *label;
+ QPushButton *browse;
+};
+
+class DirectoryConfigControl : public FileConfigControl
+{
+ Q_OBJECT;
+public:
+ DirectoryConfigControl( vlc_object_t *, module_config_t *, QWidget *,
+ QGridLayout *, int&, bool pwd );
+ DirectoryConfigControl( vlc_object_t *, module_config_t *, QLabel *,
+ QLineEdit *, QPushButton *, bool pwd );
+ virtual ~DirectoryConfigControl() {};
+ virtual QString getValue() { return text->text(); };
+ virtual void show() { text->show(); label->show(); browse->show(); }
+ virtual void hide() { text->hide(); label->hide(); browse->hide(); }
+public slots:
+ virtual void updateField();
+private:
+ QLineEdit *text;
+ QLabel *label;
+ QPushButton *browse;
+};
+
class ModuleConfigControl : public VStringConfigControl
{
public: