Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
28825619
Commit
28825619
authored
Jan 31, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - #ifdef WIN32 consistancy if some insane people try Qt on Mac.
parent
3e75ca56
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
138 additions
and
139 deletions
+138
-139
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+128
-128
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+8
-8
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+0
-1
modules/gui/qt4/menus.hpp
modules/gui/qt4/menus.hpp
+1
-1
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+1
-1
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
28825619
...
...
@@ -530,7 +530,106 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
#define CuMRL( widget, slot ) CONNECT( widget , slot , this, updateMRL() );
#ifndef WIN32
#ifdef WIN32
/*********************
* DirectShow Stuffs *
*********************/
if
(
module_Exists
(
p_intf
,
"dshow"
)
){
addModuleAndLayouts
(
DSHOW_DEVICE
,
dshow
,
"DirectShow"
);
/* dshow Main */
int
line
=
0
;
module_config_t
*
p_config
=
config_FindConfig
(
VLC_OBJECT
(
p_intf
),
"dshow-vdev"
);
vdevDshowW
=
new
StringListConfigControl
(
VLC_OBJECT
(
p_intf
),
p_config
,
this
,
false
,
dshowDevLayout
,
line
);
line
++
;
p_config
=
config_FindConfig
(
VLC_OBJECT
(
p_intf
),
"dshow-adev"
);
adevDshowW
=
new
StringListConfigControl
(
VLC_OBJECT
(
p_intf
),
p_config
,
this
,
false
,
dshowDevLayout
,
line
);
line
++
;
/* dshow Properties */
QLabel
*
dshowVSizeLabel
=
new
QLabel
(
qtr
(
"Video size"
)
);
dshowPropLayout
->
addWidget
(
dshowVSizeLabel
,
0
,
0
);
dshowVSizeLine
=
new
QLineEdit
;
dshowPropLayout
->
addWidget
(
dshowVSizeLine
,
0
,
1
);
dshowPropLayout
->
addItem
(
new
QSpacerItem
(
20
,
20
,
QSizePolicy
::
Expanding
),
1
,
0
,
3
,
1
);
/* dshow CONNECTs */
CuMRL
(
vdevDshowW
->
combo
,
currentIndexChanged
(
int
)
);
CuMRL
(
adevDshowW
->
combo
,
currentIndexChanged
(
int
)
);
CuMRL
(
dshowVSizeLine
,
textChanged
(
QString
)
);
}
/**************
* BDA Stuffs *
**************/
if
(
module_Exists
(
p_intf
,
"bda"
)
){
addModuleAndLayouts
(
BDA_DEVICE
,
bda
,
"DVB DirectShow"
);
/* bda Main */
QLabel
*
bdaTypeLabel
=
new
QLabel
(
qtr
(
"DVB Type:"
)
);
bdas
=
new
QRadioButton
(
"DVB-S"
);
bdas
->
setChecked
(
true
);
bdac
=
new
QRadioButton
(
"DVB-C"
);
bdat
=
new
QRadioButton
(
"DVB-T"
);
bdaDevLayout
->
addWidget
(
bdaTypeLabel
,
0
,
0
);
bdaDevLayout
->
addWidget
(
bdas
,
0
,
1
);
bdaDevLayout
->
addWidget
(
bdac
,
0
,
2
);
bdaDevLayout
->
addWidget
(
bdat
,
0
,
3
);
/* bda Props */
QLabel
*
bdaFreqLabel
=
new
QLabel
(
qtr
(
"Transponder/multiplex frequency"
)
);
bdaPropLayout
->
addWidget
(
bdaFreqLabel
,
0
,
0
);
bdaFreq
=
new
QSpinBox
;
bdaFreq
->
setAlignment
(
Qt
::
AlignRight
);
bdaFreq
->
setSuffix
(
" kHz"
);
bdaFreq
->
setSingleStep
(
1000
);
setSpinBoxFreq
(
bdaFreq
)
bdaPropLayout
->
addWidget
(
bdaFreq
,
0
,
1
);
bdaSrateLabel
=
new
QLabel
(
qtr
(
"Transponder symbol rate"
)
);
bdaPropLayout
->
addWidget
(
bdaSrateLabel
,
1
,
0
);
bdaSrate
=
new
QSpinBox
;
bdaSrate
->
setAlignment
(
Qt
::
AlignRight
);
bdaSrate
->
setSuffix
(
" kHz"
);
setSpinBoxFreq
(
bdaSrate
);
bdaPropLayout
->
addWidget
(
bdaSrate
,
1
,
1
);
bdaBandLabel
=
new
QLabel
(
qtr
(
"Bandwidth"
)
);
bdaPropLayout
->
addWidget
(
bdaBandLabel
,
2
,
0
);
bdaBandBox
=
new
QComboBox
;
setfillVLCConfigCombo
(
"dvb-bandwidth"
,
p_intf
,
bdaBandBox
);
bdaPropLayout
->
addWidget
(
bdaBandBox
,
2
,
1
);
bdaBandLabel
->
hide
();
bdaBandBox
->
hide
();
bdaPropLayout
->
addItem
(
new
QSpacerItem
(
20
,
20
,
QSizePolicy
::
Expanding
),
2
,
0
,
2
,
1
);
/* bda CONNECTs */
CuMRL
(
bdaFreq
,
valueChanged
(
int
)
);
CuMRL
(
bdaSrate
,
valueChanged
(
int
)
);
CuMRL
(
bdaBandBox
,
currentIndexChanged
(
int
)
);
BUTTONACT
(
bdas
,
updateButtons
()
);
BUTTONACT
(
bdat
,
updateButtons
()
);
BUTTONACT
(
bdac
,
updateButtons
()
);
BUTTONACT
(
bdas
,
updateMRL
()
);
BUTTONACT
(
bdat
,
updateMRL
()
);
BUTTONACT
(
bdac
,
updateMRL
()
);
}
#else
/* WIN32 */
/*******
* V4L *
*******/
...
...
@@ -780,105 +879,6 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
BUTTONACT
(
dvbc
,
updateButtons
()
);
}
#else
/*!WIN32 */
/*********************
* DirectShow Stuffs *
*********************/
if
(
module_Exists
(
p_intf
,
"dshow"
)
){
addModuleAndLayouts
(
DSHOW_DEVICE
,
dshow
,
"DirectShow"
);
/* dshow Main */
int
line
=
0
;
module_config_t
*
p_config
=
config_FindConfig
(
VLC_OBJECT
(
p_intf
),
"dshow-vdev"
);
vdevDshowW
=
new
StringListConfigControl
(
VLC_OBJECT
(
p_intf
),
p_config
,
this
,
false
,
dshowDevLayout
,
line
);
line
++
;
p_config
=
config_FindConfig
(
VLC_OBJECT
(
p_intf
),
"dshow-adev"
);
adevDshowW
=
new
StringListConfigControl
(
VLC_OBJECT
(
p_intf
),
p_config
,
this
,
false
,
dshowDevLayout
,
line
);
line
++
;
/* dshow Properties */
QLabel
*
dshowVSizeLabel
=
new
QLabel
(
qtr
(
"Video size"
)
);
dshowPropLayout
->
addWidget
(
dshowVSizeLabel
,
0
,
0
);
dshowVSizeLine
=
new
QLineEdit
;
dshowPropLayout
->
addWidget
(
dshowVSizeLine
,
0
,
1
);
dshowPropLayout
->
addItem
(
new
QSpacerItem
(
20
,
20
,
QSizePolicy
::
Expanding
),
1
,
0
,
3
,
1
);
/* dshow CONNECTs */
CuMRL
(
vdevDshowW
->
combo
,
currentIndexChanged
(
int
)
);
CuMRL
(
adevDshowW
->
combo
,
currentIndexChanged
(
int
)
);
CuMRL
(
dshowVSizeLine
,
textChanged
(
QString
)
);
}
/**************
* BDA Stuffs *
**************/
if
(
module_Exists
(
p_intf
,
"bda"
)
){
addModuleAndLayouts
(
BDA_DEVICE
,
bda
,
"DVB DirectShow"
);
/* bda Main */
QLabel
*
bdaTypeLabel
=
new
QLabel
(
qtr
(
"DVB Type:"
)
);
bdas
=
new
QRadioButton
(
"DVB-S"
);
bdas
->
setChecked
(
true
);
bdac
=
new
QRadioButton
(
"DVB-C"
);
bdat
=
new
QRadioButton
(
"DVB-T"
);
bdaDevLayout
->
addWidget
(
bdaTypeLabel
,
0
,
0
);
bdaDevLayout
->
addWidget
(
bdas
,
0
,
1
);
bdaDevLayout
->
addWidget
(
bdac
,
0
,
2
);
bdaDevLayout
->
addWidget
(
bdat
,
0
,
3
);
/* bda Props */
QLabel
*
bdaFreqLabel
=
new
QLabel
(
qtr
(
"Transponder/multiplex frequency"
)
);
bdaPropLayout
->
addWidget
(
bdaFreqLabel
,
0
,
0
);
bdaFreq
=
new
QSpinBox
;
bdaFreq
->
setAlignment
(
Qt
::
AlignRight
);
bdaFreq
->
setSuffix
(
" kHz"
);
bdaFreq
->
setSingleStep
(
1000
);
setSpinBoxFreq
(
bdaFreq
)
bdaPropLayout
->
addWidget
(
bdaFreq
,
0
,
1
);
bdaSrateLabel
=
new
QLabel
(
qtr
(
"Transponder symbol rate"
)
);
bdaPropLayout
->
addWidget
(
bdaSrateLabel
,
1
,
0
);
bdaSrate
=
new
QSpinBox
;
bdaSrate
->
setAlignment
(
Qt
::
AlignRight
);
bdaSrate
->
setSuffix
(
" kHz"
);
setSpinBoxFreq
(
bdaSrate
);
bdaPropLayout
->
addWidget
(
bdaSrate
,
1
,
1
);
bdaBandLabel
=
new
QLabel
(
qtr
(
"Bandwidth"
)
);
bdaPropLayout
->
addWidget
(
bdaBandLabel
,
2
,
0
);
bdaBandBox
=
new
QComboBox
;
setfillVLCConfigCombo
(
"dvb-bandwidth"
,
p_intf
,
bdaBandBox
);
bdaPropLayout
->
addWidget
(
bdaBandBox
,
2
,
1
);
bdaBandLabel
->
hide
();
bdaBandBox
->
hide
();
bdaPropLayout
->
addItem
(
new
QSpacerItem
(
20
,
20
,
QSizePolicy
::
Expanding
),
2
,
0
,
2
,
1
);
/* bda CONNECTs */
CuMRL
(
bdaFreq
,
valueChanged
(
int
)
);
CuMRL
(
bdaSrate
,
valueChanged
(
int
)
);
CuMRL
(
bdaBandBox
,
currentIndexChanged
(
int
)
);
BUTTONACT
(
bdas
,
updateButtons
()
);
BUTTONACT
(
bdat
,
updateButtons
()
);
BUTTONACT
(
bdac
,
updateButtons
()
);
BUTTONACT
(
bdas
,
updateMRL
()
);
BUTTONACT
(
bdat
,
updateMRL
()
);
BUTTONACT
(
bdac
,
updateMRL
()
);
}
#endif
...
...
@@ -918,7 +918,28 @@ void CaptureOpenPanel::updateMRL()
ui
.
deviceCombo
->
currentIndex
()
).
toInt
();
switch
(
i_devicetype
)
{
#ifndef WIN32
#ifdef WIN32
case
BDA_DEVICE
:
if
(
bdas
->
isChecked
()
)
mrl
=
"dvb-s://"
;
else
if
(
bdat
->
isChecked
()
)
mrl
=
"dvb-t://"
;
else
if
(
bdac
->
isChecked
()
)
mrl
=
"dvb-c://"
;
else
return
;
mrl
+=
" :dvb-frequency="
+
QString
(
"%1"
).
arg
(
bdaFreq
->
value
()
);
if
(
bdas
->
isChecked
()
||
bdac
->
isChecked
()
)
mrl
+=
" :dvb-srate="
+
QString
(
"%1"
).
arg
(
bdaSrate
->
value
()
);
else
mrl
+=
" :dvb-bandwidth="
+
QString
(
"%1"
).
arg
(
bdaBandBox
->
itemData
(
bdaBandBox
->
currentIndex
()
).
toInt
()
);
break
;
case
DSHOW_DEVICE
:
mrl
=
"dshow://"
;
mrl
+=
" :dshow-vdev="
+
QString
(
"%1"
).
arg
(
vdevDshowW
->
getValue
()
);
mrl
+=
" :dshow-adev="
+
QString
(
"%1"
).
arg
(
adevDshowW
->
getValue
()
);
if
(
dshowVSizeLine
->
isModified
()
)
mrl
+=
" :dshow-size="
+
dshowVSizeLine
->
text
();
break
;
#else
case
V4L_DEVICE
:
mrl
=
"v4l://"
;
mrl
+=
" :v4l-vdev="
+
v4lVideoDevice
->
text
();
...
...
@@ -962,27 +983,6 @@ void CaptureOpenPanel::updateMRL()
mrl
+=
" :dvb-frequency="
+
QString
(
"%1"
).
arg
(
dvbFreq
->
value
()
);
mrl
+=
" :dvb-srate="
+
QString
(
"%1"
).
arg
(
dvbSrate
->
value
()
);
break
;
#else
case
BDA_DEVICE
:
if
(
bdas
->
isChecked
()
)
mrl
=
"dvb-s://"
;
else
if
(
bdat
->
isChecked
()
)
mrl
=
"dvb-t://"
;
else
if
(
bdac
->
isChecked
()
)
mrl
=
"dvb-c://"
;
else
return
;
mrl
+=
" :dvb-frequency="
+
QString
(
"%1"
).
arg
(
bdaFreq
->
value
()
);
if
(
bdas
->
isChecked
()
||
bdac
->
isChecked
()
)
mrl
+=
" :dvb-srate="
+
QString
(
"%1"
).
arg
(
bdaSrate
->
value
()
);
else
mrl
+=
" :dvb-bandwidth="
+
QString
(
"%1"
).
arg
(
bdaBandBox
->
itemData
(
bdaBandBox
->
currentIndex
()
).
toInt
()
);
break
;
case
DSHOW_DEVICE
:
mrl
=
"dshow://"
;
mrl
+=
" :dshow-vdev="
+
QString
(
"%1"
).
arg
(
vdevDshowW
->
getValue
()
);
mrl
+=
" :dshow-adev="
+
QString
(
"%1"
).
arg
(
adevDshowW
->
getValue
()
);
if
(
dshowVSizeLine
->
isModified
()
)
mrl
+=
" :dshow-size="
+
dshowVSizeLine
->
text
();
break
;
#endif
case
SCREEN_DEVICE
:
mrl
=
"screen://"
;
...
...
@@ -1011,12 +1011,7 @@ void CaptureOpenPanel::updateButtons()
msg_Dbg
(
p_intf
,
"Capture Type: %i"
,
i_devicetype
);
switch
(
i_devicetype
)
{
#ifndef WIN32
case
DVB_DEVICE
:
if
(
dvbs
->
isChecked
()
)
dvbFreq
->
setSuffix
(
" kHz"
);
if
(
dvbc
->
isChecked
()
||
dvbt
->
isChecked
()
)
dvbFreq
->
setSuffix
(
" Hz"
);
break
;
#else
#ifdef WIN32
case
BDA_DEVICE
:
if
(
bdas
->
isChecked
()
||
bdac
->
isChecked
()
)
{
...
...
@@ -1033,6 +1028,11 @@ void CaptureOpenPanel::updateButtons()
bdaBandLabel
->
show
();
}
break
;
#else
case
DVB_DEVICE
:
if
(
dvbs
->
isChecked
()
)
dvbFreq
->
setSuffix
(
" kHz"
);
if
(
dvbc
->
isChecked
()
||
dvbt
->
isChecked
()
)
dvbFreq
->
setSuffix
(
" Hz"
);
break
;
#endif
case
SCREEN_DEVICE
:
ui
.
optionsBox
->
hide
();
...
...
modules/gui/qt4/components/simple_preferences.cpp
View file @
28825619
...
...
@@ -236,7 +236,10 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONNECT
(
ui
.
outputModule
,
currentIndexChanged
(
int
),
this
,
updateAudioOptions
(
int
)
);
#ifndef WIN32
#ifdef WIN32
CONFIG_GENERIC
(
"directx-audio-device"
,
IntegerList
,
ui
.
DirectXLabel
,
DirectXDevice
);
#else
if
(
module_Exists
(
p_intf
,
"alsa"
)
)
{
CONFIG_GENERIC
(
"alsadev"
,
StringList
,
ui
.
alsaLabel
,
...
...
@@ -247,9 +250,6 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONFIG_GENERIC_FILE
(
"dspdev"
,
File
,
ui
.
OSSLabel
,
OSSDevice
,
OSSBrowse
);
}
#else
CONFIG_GENERIC
(
"directx-audio-device"
,
IntegerList
,
ui
.
DirectXLabel
,
DirectXDevice
);
#endif
// File exists everywhere
CONFIG_GENERIC_FILE
(
"audiofile-file"
,
File
,
ui
.
fileLabel
,
...
...
@@ -445,7 +445,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONFIG_GENERIC
(
"embeded-video"
,
Bool
,
NULL
,
embedVideo
);
CONFIG_GENERIC_FILE
(
"skins2-last"
,
File
,
NULL
,
fileSkin
,
skinBrowse
);
#if defined( WIN32 ) || defined( HAVE_DBUS_3 )
#if defined( WIN32 ) || defined( HAVE_DBUS_3 )
|| defined(__APPLE__)
CONFIG_GENERIC
(
"one-instance"
,
Bool
,
NULL
,
OneInterfaceMode
);
CONFIG_GENERIC
(
"playlist-enqueue"
,
Bool
,
NULL
,
EnqueueOneInterfaceMode
);
...
...
@@ -499,11 +499,11 @@ void SPrefsPanel::updateAudioOptions( int number)
QString
value
=
qobject_cast
<
QComboBox
*>
(
optionWidgets
[
audioOutCoB
])
->
itemData
(
number
).
toString
();
#ifndef WIN32
#ifdef WIN32
optionWidgets
[
directxW
]
->
setVisible
(
(
value
==
"directx"
)
);
#else
optionWidgets
[
ossW
]
->
setVisible
(
(
value
==
"oss"
)
);
optionWidgets
[
alsaW
]
->
setVisible
(
(
value
==
"alsa"
)
);
#else
optionWidgets
[
directxW
]
->
setVisible
(
(
value
==
"directx"
)
);
#endif
optionWidgets
[
fileW
]
->
setVisible
(
(
value
==
"aout_file"
)
);
}
...
...
modules/gui/qt4/main_interface.cpp
View file @
28825619
...
...
@@ -175,7 +175,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
statusBar
()
->
addPermanentWidget
(
pgBar
,
0
);
statusBar
()
->
addPermanentWidget
(
timeLabel
,
0
);
/* timeLabel behaviour:
- double clicking opens the goto time dialog
- right-clicking and clicking just toggle between remaining and
...
...
modules/gui/qt4/menus.hpp
View file @
28825619
...
...
@@ -31,7 +31,7 @@
#include <vector>
/* Folder vs. Directory */
#if
def WIN32
#if
defined( WIN32 ) || defined(__APPLE__)
#define I_OPEN_FOLDER "Open &Folder..."
#else
#define I_OPEN_FOLDER "Open D&irectory..."
...
...
modules/gui/qt4/qt4.cpp
View file @
28825619
...
...
@@ -285,7 +285,7 @@ static void Init( intf_thread_t *p_intf )
Q_INIT_RESOURCE
(
vlc
);
#if
ndef WIN32
#if
!defined(WIN32) && !defined(__APPLE__)
/* KLUDGE:
* disables icon theme use because that makes Cleanlooks style bug
* because it asks gconf for some settings that timeout because of threads
...
...
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