Commit fc383e22 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Open: start to use a completer, use an enum and no stupid #define.

parent d5ef9279
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <QLineEdit> #include <QLineEdit>
#include <QStackedLayout> #include <QStackedLayout>
#include <QListView> #include <QListView>
#include <QCompleter>
/************************************************************************** /**************************************************************************
* Open Files and subtitles * * Open Files and subtitles *
...@@ -96,6 +97,12 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -96,6 +97,12 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
#else #else
lineFileEdit = findChildren<QLineEdit*>()[3]; lineFileEdit = findChildren<QLineEdit*>()[3];
#endif #endif
QStringList fileCompleteList ;
QCompleter *fileCompleter = new QCompleter( fileCompleteList, this );
lineFileEdit->setCompleter( fileCompleter );
// lineFileEdit->hide(); // lineFileEdit->hide();
/* Make a list of QLabel inside the QFileDialog to access the good ones */ /* Make a list of QLabel inside the QFileDialog to access the good ones */
......
...@@ -44,13 +44,16 @@ ...@@ -44,13 +44,16 @@
#define setSpinBoxFreq( spinbox ){ spinbox->setRange ( 0, INT_MAX ); \ #define setSpinBoxFreq( spinbox ){ spinbox->setRange ( 0, INT_MAX ); \
spinbox->setAccelerated( true ); } spinbox->setAccelerated( true ); }
#define V4L_DEVICE 0 enum
#define PVR_DEVICE 1 {
#define DVB_DEVICE 2 V4L_DEVICE,
#define BDA_DEVICE 3 PVR_DEVICE,
#define DSHOW_DEVICE 4 DVB_DEVICE,
#define SCREEN_DEVICE 5 BDA_DEVICE,
#define JACK_DEVICE 6 DSHOW_DEVICE,
SCREEN_DEVICE,
JACK_DEVICE
};
class QWidget; class QWidget;
class QLineEdit; class QLineEdit;
......
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