Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
e6e4cb89
Commit
e6e4cb89
authored
Oct 02, 2010
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: OpenDiscPanel: add devices listing
parent
57a4f916
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+21
-16
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
e6e4cb89
...
...
@@ -54,6 +54,17 @@
I_DIR_OR_FOLDER( N_("Select a device or a VIDEO_TS directory"), \
N_("Select a device or a VIDEO_TS folder") )
/* Populate a combobox with the devices matching a pattern.
Combobox will automatically do autocompletion on the edit zone */
#define POPULATE_WITH_DEVS(ppsz_devlist, targetCombo) \
QStringList targetCombo ## StringList = QStringList(); \
for ( int i = 0; i< sizeof(ppsz_devlist) / sizeof(*ppsz_devlist); i++ ) \
targetCombo ## StringList << QString( ppsz_devlist[ i ] ); \
targetCombo->addItems( QDir( "/dev/" )\
.entryList( targetCombo ## StringList, QDir::System )\
.replaceInStrings( QRegExp("^"), "/dev/" ) \
);
static
const
char
*
psz_devModule
[]
=
{
"v4l"
,
"v4l2"
,
"pvr"
,
"dvb"
,
"bda"
,
"dshow"
,
"screen"
,
"jack"
};
...
...
@@ -351,10 +362,16 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
}
SetErrorMode
(
oldMode
);
}
#else
/* Use a Completer under Linux */
QCompleter
*
discCompleter
=
new
QCompleter
(
this
);
discCompleter
->
setModel
(
new
QDirModel
(
discCompleter
)
);
ui
.
deviceCombo
->
setCompleter
(
discCompleter
);
#else
/* Linux */
char
const
*
const
ppsz_discdevices
[]
=
{
"sr*"
,
"sg*"
,
"scd*"
,
"dvd*"
,
"cd*"
};
QComboBox
*
discCombo
=
ui
.
deviceCombo
;
/* avoid namespacing in macro */
POPULATE_WITH_DEVS
(
ppsz_discdevices
,
discCombo
);
#endif
/* CONNECTs */
...
...
@@ -805,17 +822,6 @@ void CaptureOpenPanel::initialize()
"radio*"
};
#define POPULATE_WITH_DEVS(ppsz_devlist, targetCombo) \
QStringList targetCombo ## StringList = QStringList(); \
for ( int i = 0; i< sizeof(ppsz_devlist) / sizeof(*ppsz_devlist); i++ ) \
targetCombo ## StringList << QString( ppsz_devlist[ i ] ); \
QDir targetCombo ## Dir = QDir( "/dev/" ); \
targetCombo->addItems( \
targetCombo ## Dir\
.entryList( targetCombo ## StringList, QDir::System )\
.replaceInStrings( QRegExp("^"), "/dev/" ) \
);
/* V4l Main panel */
QLabel
*
v4l2VideoDeviceLabel
=
new
QLabel
(
qtr
(
"Video device name"
)
);
v4l2DevLayout
->
addWidget
(
v4l2VideoDeviceLabel
,
0
,
0
);
...
...
@@ -851,7 +857,6 @@ void CaptureOpenPanel::initialize()
CuMRL
(
v4l2AudioDevice
->
lineEdit
(),
textChanged
(
const
QString
&
)
);
CuMRL
(
v4l2AudioDevice
,
currentIndexChanged
(
int
)
);
CuMRL
(
v4l2StdBox
,
currentIndexChanged
(
int
)
);
#undef POPULATE_WITH_DEVS
}
/*******
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment