#ifndef _PREFERENCESWIDGETS_H_
#define _PREFERENCESWIDGETS_H_
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
#include "qt4.hpp"
#include <assert.h>
class IntegerListConfigControl : public VIntConfigControl
{
+Q_OBJECT
public:
IntegerListConfigControl( vlc_object_t *, module_config_t *, QWidget *,
bool, QGridLayout*, int& );
virtual void hide() { combo->hide(); if( label ) label->hide(); }
virtual void show() { combo->show(); if( label ) label->show(); }
private:
- void finish( bool );
+ void finish(module_config_t *, bool );
QLabel *label;
QComboBox *combo;
+private slots:
+ void actionRequested( int );
+
};
class BoolConfigControl : public VIntConfigControl
virtual void updateField();
};
+#if 0
class FontConfigControl : public FileConfigControl
{
Q_OBJECT;
public slots:
virtual void updateField();
};
+#endif
class ModuleConfigControl : public VStringConfigControl
{
virtual void show() { combo->show(); if( label ) label->show(); }
QComboBox *combo;
private:
- void finish( bool );
+ void finish(module_config_t *, bool );
QLabel *label;
private slots:
void actionRequested( int );
/**********************************************************************
* Key selector widget
**********************************************************************/
-class KeyInputDialog : public QDialog
-{
-public:
- KeyInputDialog( QList<module_config_t *> &, const char *, QWidget * );
- int keyValue;
- bool conflicts;
-private:
- void checkForConflicts( int i_vlckey );
- void keyPressEvent( QKeyEvent *);
- void wheelEvent( QWheelEvent *);
- QLabel *selected;
- QVBoxLayout *vLayout;
- const char *keyToChange;
- QList<module_config_t*> values;
- QDialogButtonBox *buttonBox;
-};
-
class KeyShortcutEdit: public QLineEdit
{
Q_OBJECT
+public:
+ void setValue( int _value ){ value = _value; }
+ int getValue() const { return value; }
+public slots:
+ virtual void clear(void) { value = 0; QLineEdit::clear(); }
private:
+ int value;
virtual void mousePressEvent( QMouseEvent *event );
signals:
void pressed();
private slots:
void setTheKey();
void selectKey( QTreeWidgetItem * = NULL );
- void select1Key( QTreeWidgetItem *);
+ void select1Key();
};
+class KeyInputDialog : public QDialog
+{
+public:
+ KeyInputDialog( QTreeWidget *, QString, QWidget * );
+ int keyValue;
+ bool conflicts;
+private:
+ QTreeWidget *table;
+ void checkForConflicts( int i_vlckey );
+ void keyPressEvent( QKeyEvent *);
+ void wheelEvent( QWheelEvent *);
+ QLabel *selected;
+ QVBoxLayout *vLayout;
+ QDialogButtonBox *buttonBox;
+};
#endif