#include <QPushButton>
#include <QVector>
#include <QDialog>
+#include <QFontComboBox>
class QTreeWidget;
class QTreeWidgetItem;
class QDialogButtonBox;
class QVBoxLayout;
+/*******************************************************
+ * Simple widgets
+ *******************************************************/
+
+class InterfacePreviewWidget : public QLabel
+{
+ Q_OBJECT
+public:
+ InterfacePreviewWidget( QWidget * );
+ enum enum_style {
+ COMPLETE, // aka MPC
+ MINIMAL, // aka WMP12 minimal
+ SKINS };
+public slots:
+ void setPreview( enum_style );
+ void setNormalPreview( bool b_minimal );
+};
+
+/*******************************************************
+ * Variable controls
+ *******************************************************/
+
class ConfigControl : public QObject
{
Q_OBJECT
BoolConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int& );
BoolConfigControl( vlc_object_t *, module_config_t *,
- QLabel *, QCheckBox*, bool );
+ QLabel *, QAbstractButton*, bool );
virtual ~BoolConfigControl() {};
virtual int getValue();
virtual void show() { checkbox->show(); }
virtual void hide() { checkbox->hide(); }
virtual int getType() { return CONFIG_ITEM_BOOL; }
private:
- QCheckBox *checkbox;
+ QAbstractButton *checkbox;
void finish();
};
virtual void updateField();
};
-#if 0
-class FontConfigControl : public FileConfigControl
+class FontConfigControl : public VStringConfigControl
{
Q_OBJECT;
public:
FontConfigControl( vlc_object_t *, module_config_t *, QWidget *,
- QGridLayout *, int&, bool pwd );
+ QGridLayout *, int&);
FontConfigControl( vlc_object_t *, module_config_t *, QLabel *,
- QLineEdit *, QPushButton *, bool pwd );
+ QFontComboBox *);
virtual ~FontConfigControl() {};
-public slots:
- virtual void updateField();
+ virtual QString getValue(){ return font->currentFont().family(); }
+protected:
+ QLabel *label;
+ QFontComboBox *font;
};
-#endif
class ModuleConfigControl : public VStringConfigControl
{
**********************************************************************/
class KeyShortcutEdit: public QLineEdit
{
- Q_OBJECT
+ Q_OBJECT;
public:
void setValue( int _value ){ value = _value; }
int getValue() const { return value; }
+
+ void setGlobal( bool _value ) { b_global = _value; }
+ bool getGlobal() const { return b_global; }
public slots:
- virtual void clear(void) { value = 0; QLineEdit::clear(); }
+ virtual void clear(void) { value = 0; QLineEdit::clear(); b_global = false;}
private:
int value;
+ bool b_global;
virtual void mousePressEvent( QMouseEvent *event );
signals:
void pressed();
};
+class SearchLineEdit;
class KeySelectorControl : public ConfigControl
{
Q_OBJECT;
QTreeWidget *table;
KeyShortcutEdit *shortcutValue;
QList<module_config_t *> values;
+ SearchLineEdit *actionSearch;
private slots:
void setTheKey();
- void selectKey( QTreeWidgetItem * = NULL );
+ void selectKey( QTreeWidgetItem * = NULL, int column = 1 );
void select1Key();
+ void filter( const QString & );
};
class KeyInputDialog : public QDialog
{
public:
- KeyInputDialog( QTreeWidget *, const QString&, QWidget * );
+ KeyInputDialog( QTreeWidget *, const QString&, QWidget *, bool b_global = false);
int keyValue;
bool conflicts;
private:
void checkForConflicts( int i_vlckey );
void keyPressEvent( QKeyEvent *);
void wheelEvent( QWheelEvent *);
- QLabel *selected;
+ QLabel *selected, *warning;
QVBoxLayout *vLayout;
QDialogButtonBox *buttonBox;
+ bool b_global;
};
#endif