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
97f221eb
Commit
97f221eb
authored
Dec 21, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Small open dialog refactoring for use for vlm dialog.
parent
fee86c5d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
192 additions
and
140 deletions
+192
-140
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/open.cpp
+130
-89
modules/gui/qt4/dialogs/open.hpp
modules/gui/qt4/dialogs/open.hpp
+13
-20
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+3
-4
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/dialogs_provider.hpp
+2
-1
modules/gui/qt4/ui/open.ui
modules/gui/qt4/ui/open.ui
+44
-26
No files found.
modules/gui/qt4/dialogs/open.cpp
View file @
97f221eb
/*****************************************************************************
/*****************************************************************************
* open.cpp : Advanced open dialog
* open.cpp : Advanced open dialog
*****************************************************************************
*****************************************************************************
* Copyright (
C
) 2006-2007 the VideoLAN team
* Copyright (
C
) 2006-2007 the VideoLAN team
* $Id$
* $Id$
*
*
* Authors: Jean-Baptiste Kempf <jb@videolan.org>
* Authors: Jean-Baptiste Kempf <jb@videolan.org>
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (
at your option
) any later version.
* (
at your option
) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY; without even the implied warranty of
...
@@ -33,21 +33,46 @@
...
@@ -33,21 +33,46 @@
OpenDialog
*
OpenDialog
::
instance
=
NULL
;
OpenDialog
*
OpenDialog
::
instance
=
NULL
;
OpenDialog
::
OpenDialog
(
QWidget
*
parent
,
intf_thread_t
*
_p_intf
,
bool
modal
,
OpenDialog
*
OpenDialog
::
getInstance
(
QWidget
*
parent
,
intf_thread_t
*
p_intf
,
int
_action_flag
,
bool
modal
)
{
/* Creation */
if
(
!
instance
)
instance
=
new
OpenDialog
(
parent
,
p_intf
,
modal
,
_action_flag
);
else
{
/* Request the instance but change small details:
- Button menu
- Modality on top of the parent dialog */
instance
->
i_action_flag
=
_action_flag
;
instance
->
setMenuAction
();
if
(
modal
)
instance
->
setWindowModality
(
Qt
::
WindowModal
);
}
return
instance
;
}
OpenDialog
::
OpenDialog
(
QWidget
*
parent
,
intf_thread_t
*
_p_intf
,
bool
modal
,
int
_action_flag
)
:
QVLCDialog
(
parent
,
_p_intf
)
int
_action_flag
)
:
QVLCDialog
(
parent
,
_p_intf
)
{
{
setModal
(
modal
);
i_action_flag
=
_action_flag
;
i_action_flag
=
_action_flag
;
if
(
modal
)
/* Select mode */
{
setWindowModality
(
Qt
::
WindowModal
);
i_action_flag
=
SELECT
;
}
/* Basic Creation of the Window */
/* Basic Creation of the Window */
ui
.
setupUi
(
this
);
ui
.
setupUi
(
this
);
setWindowTitle
(
qtr
(
"Open"
)
);
setWindowTitle
(
qtr
(
"Open"
)
);
resize
(
410
,
300
);
resize
(
410
,
300
);
/* Tab definition and creation */
/* Tab definition and creation */
fileOpenPanel
=
new
FileOpenPanel
(
ui
.
Tab
,
p_intf
);
fileOpenPanel
=
new
FileOpenPanel
(
ui
.
Tab
,
p_intf
);
discOpenPanel
=
new
DiscOpenPanel
(
ui
.
Tab
,
p_intf
);
discOpenPanel
=
new
DiscOpenPanel
(
ui
.
Tab
,
p_intf
);
netOpenPanel
=
new
NetOpenPanel
(
ui
.
Tab
,
p_intf
);
netOpenPanel
=
new
NetOpenPanel
(
ui
.
Tab
,
p_intf
);
captureOpenPanel
=
new
CaptureOpenPanel
(
ui
.
Tab
,
p_intf
);
captureOpenPanel
=
new
CaptureOpenPanel
(
ui
.
Tab
,
p_intf
);
/* Insert the tabs */
/* Insert the tabs */
...
@@ -55,19 +80,13 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
...
@@ -55,19 +80,13 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
ui
.
Tab
->
insertTab
(
OPEN_DISC_TAB
,
discOpenPanel
,
qtr
(
"&Disc"
)
);
ui
.
Tab
->
insertTab
(
OPEN_DISC_TAB
,
discOpenPanel
,
qtr
(
"&Disc"
)
);
ui
.
Tab
->
insertTab
(
OPEN_NETWORK_TAB
,
netOpenPanel
,
qtr
(
"&Network"
)
);
ui
.
Tab
->
insertTab
(
OPEN_NETWORK_TAB
,
netOpenPanel
,
qtr
(
"&Network"
)
);
ui
.
Tab
->
insertTab
(
OPEN_CAPTURE_TAB
,
captureOpenPanel
,
ui
.
Tab
->
insertTab
(
OPEN_CAPTURE_TAB
,
captureOpenPanel
,
qtr
(
"Capture &Device"
)
);
qtr
(
"Capture &Device"
)
);
/* Hide the Slave input widgets */
/* Hide the Slave input widgets */
ui
.
slaveLabel
->
hide
();
ui
.
slaveLabel
->
hide
();
ui
.
slaveText
->
hide
();
ui
.
slaveText
->
hide
();
ui
.
slaveBrowseButton
->
hide
();
ui
.
slaveBrowseButton
->
hide
();
/* Hide the advancedPanel */
if
(
!
config_GetInt
(
p_intf
,
"qt-adv-options"
)
)
ui
.
advancedFrame
->
hide
();
else
ui
.
advancedCheckBox
->
setChecked
(
true
);
/* Buttons Creation */
/* Buttons Creation */
QSizePolicy
buttonSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Minimum
);
QSizePolicy
buttonSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Minimum
);
buttonSizePolicy
.
setHorizontalStretch
(
0
);
buttonSizePolicy
.
setHorizontalStretch
(
0
);
...
@@ -77,7 +96,7 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
...
@@ -77,7 +96,7 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
playButton
=
new
QToolButton
(
this
);
playButton
=
new
QToolButton
(
this
);
playButton
->
setText
(
qtr
(
"&Play"
)
);
playButton
->
setText
(
qtr
(
"&Play"
)
);
playButton
->
setSizePolicy
(
buttonSizePolicy
);
playButton
->
setSizePolicy
(
buttonSizePolicy
);
playButton
->
setMinimumSize
(
QSize
(
90
,
0
)
);
playButton
->
setMinimumSize
(
QSize
(
90
,
0
)
);
playButton
->
setPopupMode
(
QToolButton
::
MenuButtonPopup
);
playButton
->
setPopupMode
(
QToolButton
::
MenuButtonPopup
);
playButton
->
setToolButtonStyle
(
Qt
::
ToolButtonTextOnly
);
playButton
->
setToolButtonStyle
(
Qt
::
ToolButtonTextOnly
);
...
@@ -86,10 +105,15 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
...
@@ -86,10 +105,15 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
cancelButton
->
setText
(
qtr
(
"&Cancel"
)
);
cancelButton
->
setText
(
qtr
(
"&Cancel"
)
);
cancelButton
->
setSizePolicy
(
buttonSizePolicy
);
cancelButton
->
setSizePolicy
(
buttonSizePolicy
);
/* Select Button */
selectButton
=
new
QPushButton
;
selectButton
->
setText
(
qtr
(
"Select"
)
);
selectButton
->
setSizePolicy
(
buttonSizePolicy
);
/* Menu for the Play button */
/* Menu for the Play button */
QMenu
*
openButtonMenu
=
new
QMenu
(
"Open"
);
QMenu
*
openButtonMenu
=
new
QMenu
(
"Open"
);
openButtonMenu
->
addAction
(
qtr
(
"&Enqueue"
),
this
,
SLOT
(
enqueue
()
),
openButtonMenu
->
addAction
(
qtr
(
"&Enqueue"
),
this
,
SLOT
(
enqueue
()
),
QKeySequence
(
"Alt+E"
)
);
QKeySequence
(
"Alt+E"
)
);
openButtonMenu
->
addAction
(
qtr
(
"&Play"
),
this
,
SLOT
(
play
()
),
openButtonMenu
->
addAction
(
qtr
(
"&Play"
),
this
,
SLOT
(
play
()
),
QKeySequence
(
"Alt+P"
)
);
QKeySequence
(
"Alt+P"
)
);
openButtonMenu
->
addAction
(
qtr
(
"&Stream"
),
this
,
SLOT
(
stream
()
)
,
openButtonMenu
->
addAction
(
qtr
(
"&Stream"
),
this
,
SLOT
(
stream
()
)
,
...
@@ -99,103 +123,110 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
...
@@ -99,103 +123,110 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
playButton
->
setMenu
(
openButtonMenu
);
playButton
->
setMenu
(
openButtonMenu
);
ui
.
buttonsBox
->
addButton
(
playButton
,
QDialogButtonBox
::
AcceptRole
);
/* Add the three Buttons */
ui
.
buttonsBox
->
addButton
(
playButton
,
QDialogButtonBox
::
ActionRole
);
ui
.
buttonsBox
->
addButton
(
selectButton
,
QDialogButtonBox
::
AcceptRole
);
ui
.
buttonsBox
->
addButton
(
cancelButton
,
QDialogButtonBox
::
RejectRole
);
ui
.
buttonsBox
->
addButton
(
cancelButton
,
QDialogButtonBox
::
RejectRole
);
/* At creation time, modify the default buttons */
setMenuAction
();
/* Force MRL update on tab change */
/* Force MRL update on tab change */
CONNECT
(
ui
.
Tab
,
currentChanged
(
int
),
this
,
signalCurrent
()
);
CONNECT
(
ui
.
Tab
,
currentChanged
(
int
),
this
,
signalCurrent
()
);
CONNECT
(
fileOpenPanel
,
mrlUpdated
(
QString
),
this
,
updateMRL
(
QString
)
);
CONNECT
(
fileOpenPanel
,
mrlUpdated
(
QString
),
this
,
updateMRL
(
QString
)
);
CONNECT
(
netOpenPanel
,
mrlUpdated
(
QString
),
this
,
updateMRL
(
QString
)
);
CONNECT
(
netOpenPanel
,
mrlUpdated
(
QString
),
this
,
updateMRL
(
QString
)
);
CONNECT
(
discOpenPanel
,
mrlUpdated
(
QString
),
this
,
updateMRL
(
QString
)
);
CONNECT
(
discOpenPanel
,
mrlUpdated
(
QString
),
this
,
updateMRL
(
QString
)
);
CONNECT
(
captureOpenPanel
,
mrlUpdated
(
QString
),
this
,
updateMRL
(
QString
)
);
CONNECT
(
captureOpenPanel
,
mrlUpdated
(
QString
),
this
,
updateMRL
(
QString
)
);
CONNECT
(
fileOpenPanel
,
methodChanged
(
QString
),
CONNECT
(
fileOpenPanel
,
methodChanged
(
QString
),
this
,
newCachingMethod
(
QString
)
);
this
,
newCachingMethod
(
QString
)
);
CONNECT
(
netOpenPanel
,
methodChanged
(
QString
),
CONNECT
(
netOpenPanel
,
methodChanged
(
QString
),
this
,
newCachingMethod
(
QString
)
);
this
,
newCachingMethod
(
QString
)
);
CONNECT
(
discOpenPanel
,
methodChanged
(
QString
),
CONNECT
(
discOpenPanel
,
methodChanged
(
QString
),
this
,
newCachingMethod
(
QString
)
);
this
,
newCachingMethod
(
QString
)
);
CONNECT
(
captureOpenPanel
,
methodChanged
(
QString
),
CONNECT
(
captureOpenPanel
,
methodChanged
(
QString
),
this
,
newCachingMethod
(
QString
)
);
this
,
newCachingMethod
(
QString
)
);
/* Advanced frame Connects */
/* Advanced frame Connects */
CONNECT
(
ui
.
slaveText
,
textChanged
(
QString
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
slaveText
,
textChanged
(
QString
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
cacheSpinBox
,
valueChanged
(
int
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
cacheSpinBox
,
valueChanged
(
int
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
startTimeSpinBox
,
valueChanged
(
int
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
startTimeSpinBox
,
valueChanged
(
int
),
this
,
updateMRL
()
);
BUTTONACT
(
ui
.
advancedCheckBox
,
toggleAdvancedPanel
()
);
BUTTONACT
(
ui
.
advancedCheckBox
,
toggleAdvancedPanel
()
);
/* Buttons action */
/* Buttons action */
BUTTONACT
(
playButton
,
selectSlots
()
);
BUTTONACT
(
playButton
,
selectSlots
()
);
BUTTONACT
(
selectButton
,
close
()
);
BUTTONACT
(
cancelButton
,
cancel
()
);
BUTTONACT
(
cancelButton
,
cancel
()
);
/* At creation time, modify the default buttons */
/* Hide the advancedPanel */
if
(
i_action_flag
)
setMenuAction
();
if
(
!
config_GetInt
(
p_intf
,
"qt-adv-options"
)
)
ui
.
advancedFrame
->
hide
();
else
ui
.
advancedCheckBox
->
setChecked
(
true
);
/* Initialize caching */
/* Initialize caching */
storedMethod
=
""
;
storedMethod
=
""
;
newCachingMethod
(
"file-caching"
);
newCachingMethod
(
"file-caching"
);
mainHeight
=
advHeight
=
0
;
}
}
OpenDialog
::~
OpenDialog
()
OpenDialog
::~
OpenDialog
()
{
{}
}
/* Finish the dialog and decide if you open another one after */
/* Finish the dialog and decide if you open another one after */
void
OpenDialog
::
setMenuAction
()
void
OpenDialog
::
setMenuAction
()
{
{
switch
(
i_action_flag
)
if
(
i_action_flag
==
SELECT
)
{
{
case
OPEN_AND_STREAM
:
playButton
->
hide
();
playButton
->
setText
(
qtr
(
"&Stream"
)
);
selectButton
->
show
();
break
;
}
case
OPEN_AND_SAVE
:
else
playButton
->
setText
(
qtr
(
"&Convert / Save"
)
);
{
break
;
switch
(
i_action_flag
)
case
OPEN_AND_ENQUEUE
:
{
playButton
->
setText
(
qtr
(
"&Enqueue"
)
);
case
OPEN_AND_STREAM
:
break
;
playButton
->
setText
(
qtr
(
"&Stream"
)
);
case
OPEN_AND_PLAY
:
break
;
default:
case
OPEN_AND_SAVE
:
playButton
->
setText
(
qtr
(
"&Play"
)
);
playButton
->
setText
(
qtr
(
"&Convert / Save"
)
);
}
break
;
case
OPEN_AND_ENQUEUE
:
playButton
->
setText
(
qtr
(
"&Enqueue"
)
);
break
;
case
OPEN_AND_PLAY
:
default:
playButton
->
setText
(
qtr
(
"&Play"
)
);
}
playButton
->
show
();
selectButton
->
hide
();
}
}
}
void
OpenDialog
::
showTab
(
int
i_tab
=
0
)
void
OpenDialog
::
showTab
(
int
i_tab
=
0
)
{
{
this
->
show
();
ui
.
Tab
->
setCurrentIndex
(
i_tab
);
ui
.
Tab
->
setCurrentIndex
(
i_tab
);
show
();
}
}
void
OpenDialog
::
signalCurrent
()
{
/* Function called on signal currentChanged triggered */
if
(
ui
.
Tab
->
currentWidget
()
!=
NULL
)
void
OpenDialog
::
signalCurrent
()
(
dynamic_cast
<
OpenPanel
*>
(
ui
.
Tab
->
currentWidget
()
))
->
updateMRL
();
{
if
(
ui
.
Tab
->
currentWidget
()
!=
NULL
)
(
dynamic_cast
<
OpenPanel
*>
(
ui
.
Tab
->
currentWidget
()
)
)
->
updateMRL
();
}
}
void
OpenDialog
::
toggleAdvancedPanel
()
void
OpenDialog
::
toggleAdvancedPanel
()
{
{
//FIXME does not work under Windows
if
(
ui
.
advancedFrame
->
isVisible
()
)
if
(
ui
.
advancedFrame
->
isVisible
()
)
{
{
ui
.
advancedFrame
->
hide
();
ui
.
advancedFrame
->
hide
();
#ifndef WIN32
//FIXME: Clear Bug here. Qt ?
setMinimumHeight
(
1
);
resize
(
size
().
width
(),
size
().
height
()
-
ui
.
advancedFrame
->
height
()
);
resize
(
width
(),
mainHeight
);
}
#endif
else
}
else
{
{
#ifndef WIN32
if
(
mainHeight
==
0
)
mainHeight
=
height
();
#endif
ui
.
advancedFrame
->
show
();
ui
.
advancedFrame
->
show
();
#ifndef WIN32
if
(
advHeight
==
0
)
{
advHeight
=
height
()
-
mainHeight
;
}
resize
(
width
(),
mainHeight
+
advHeight
);
#endif
}
}
}
}
...
@@ -205,16 +236,26 @@ void OpenDialog::toggleAdvancedPanel()
...
@@ -205,16 +236,26 @@ void OpenDialog::toggleAdvancedPanel()
/* If Cancel is pressed or escaped */
/* If Cancel is pressed or escaped */
void
OpenDialog
::
cancel
()
void
OpenDialog
::
cancel
()
{
{
/* Clear the panels */
for
(
int
i
=
0
;
i
<
OPEN_TAB_MAX
;
i
++
)
for
(
int
i
=
0
;
i
<
OPEN_TAB_MAX
;
i
++
)
dynamic_cast
<
OpenPanel
*>
(
ui
.
Tab
->
widget
(
i
))
->
clear
();
dynamic_cast
<
OpenPanel
*>
(
ui
.
Tab
->
widget
(
i
)
)
->
clear
();
toggleVisible
();
if
(
isModal
()
)
reject
();
/* Clear the variables */
mrl
.
clear
();
mainMRL
.
clear
();
/* If in Select Mode, reject instead of hiding */
if
(
windowModality
()
!=
Qt
::
NonModal
)
reject
();
else
hide
();
}
}
/* If EnterKey is pressed */
/* If EnterKey is pressed */
void
OpenDialog
::
close
()
void
OpenDialog
::
close
()
{
{
selectSlots
();
if
(
windowModality
()
!=
Qt
::
NonModal
)
accept
();
else
selectSlots
();
}
}
/* Play button */
/* Play button */
...
@@ -247,24 +288,13 @@ void OpenDialog::enqueue()
...
@@ -247,24 +288,13 @@ void OpenDialog::enqueue()
finish
(
true
);
finish
(
true
);
}
}
void
OpenDialog
::
transcode
()
{
stream
(
true
);
}
void
OpenDialog
::
stream
(
bool
b_transcode_only
)
{
/* not finished FIXME */
/* Should go through the finish function */
THEDP
->
streamingDialog
(
mrl
,
b_transcode_only
);
}
void
OpenDialog
::
finish
(
bool
b_enqueue
=
false
)
void
OpenDialog
::
finish
(
bool
b_enqueue
=
false
)
{
{
toggleVisible
();
toggleVisible
();
mrl
=
ui
.
advancedLineInput
->
text
();
mrl
=
ui
.
advancedLineInput
->
text
();
if
(
!
isModal
()
)
if
(
windowModality
()
==
Qt
::
NonModal
)
{
{
QStringList
tempMRL
=
SeparateEntries
(
mrl
);
QStringList
tempMRL
=
SeparateEntries
(
mrl
);
for
(
size_t
i
=
0
;
i
<
tempMRL
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
tempMRL
.
size
();
i
++
)
...
@@ -300,6 +330,17 @@ void OpenDialog::finish( bool b_enqueue = false )
...
@@ -300,6 +330,17 @@ void OpenDialog::finish( bool b_enqueue = false )
accept
();
accept
();
}
}
void
OpenDialog
::
transcode
()
{
stream
(
true
);
}
void
OpenDialog
::
stream
(
bool
b_transcode_only
)
{
mrl
=
ui
.
advancedLineInput
->
text
();
toggleVisible
();
THEDP
->
streamingDialog
(
mrl
,
b_transcode_only
);
}
/* Update the MRL */
/* Update the MRL */
void
OpenDialog
::
updateMRL
(
QString
tempMRL
)
void
OpenDialog
::
updateMRL
(
QString
tempMRL
)
...
...
modules/gui/qt4/dialogs/open.hpp
View file @
97f221eb
...
@@ -40,25 +40,12 @@ class OpenDialog : public QVLCDialog
...
@@ -40,25 +40,12 @@ class OpenDialog : public QVLCDialog
Q_OBJECT
;
Q_OBJECT
;
public:
public:
static
OpenDialog
*
getInstance
(
QWidget
*
parent
,
intf_thread_t
*
p_intf
,
static
OpenDialog
*
getInstance
(
QWidget
*
parent
,
intf_thread_t
*
p_intf
,
int
_action_flag
=
0
)
int
_action_flag
=
0
,
bool
modal
=
false
);
{
if
(
!
instance
)
instance
=
new
OpenDialog
(
parent
,
p_intf
,
false
,
_action_flag
);
else
{
instance
->
i_action_flag
=
_action_flag
;
instance
->
setMenuAction
();
}
return
instance
;
}
OpenDialog
(
QWidget
*
parent
,
intf_thread_t
*
,
bool
modal
,
int
_action_flag
=
0
);
virtual
~
OpenDialog
();
virtual
~
OpenDialog
();
void
showTab
(
int
);
void
showTab
(
int
);
QString
getMRL
(){
return
mrl
;
}
QString
mrl
;
QString
mainMRL
;
public
slots
:
public
slots
:
void
selectSlots
();
void
selectSlots
();
...
@@ -66,24 +53,30 @@ public slots:
...
@@ -66,24 +53,30 @@ public slots:
void
stream
(
bool
b_transode_only
=
false
);
void
stream
(
bool
b_transode_only
=
false
);
void
enqueue
();
void
enqueue
();
void
transcode
();
void
transcode
();
private:
private:
OpenDialog
(
QWidget
*
parent
,
intf_thread_t
*
,
bool
modal
,
int
_action_flag
=
0
);
static
OpenDialog
*
instance
;
static
OpenDialog
*
instance
;
input_thread_t
*
p_input
;
input_thread_t
*
p_input
;
QString
mrl
;
QString
mainMRL
;
QString
storedMethod
;
Ui
::
Open
ui
;
Ui
::
Open
ui
;
FileOpenPanel
*
fileOpenPanel
;
FileOpenPanel
*
fileOpenPanel
;
NetOpenPanel
*
netOpenPanel
;
NetOpenPanel
*
netOpenPanel
;
DiscOpenPanel
*
discOpenPanel
;
DiscOpenPanel
*
discOpenPanel
;
CaptureOpenPanel
*
captureOpenPanel
;
CaptureOpenPanel
*
captureOpenPanel
;
QString
storedMethod
;
QString
mrlSub
;
int
advHeight
,
mainHeight
;
int
i_action_flag
;
int
i_action_flag
;
QStringList
SeparateEntries
(
QString
);
QStringList
SeparateEntries
(
QString
);
QPushButton
*
cancelButton
;
QPushButton
*
cancelButton
,
*
selectButton
;
QToolButton
*
playButton
;
QToolButton
*
playButton
;
void
finish
(
bool
);
void
finish
(
bool
);
private
slots
:
private
slots
:
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
97f221eb
...
@@ -127,6 +127,7 @@ void DialogsProvider::customEvent( QEvent *event )
...
@@ -127,6 +127,7 @@ void DialogsProvider::customEvent( QEvent *event )
QVLCMenu
::
MiscPopupMenu
(
p_intf
);
break
;
QVLCMenu
::
MiscPopupMenu
(
p_intf
);
break
;
case
INTF_DIALOG_WIZARD
:
case
INTF_DIALOG_WIZARD
:
case
INTF_DIALOG_STREAMWIZARD
:
case
INTF_DIALOG_STREAMWIZARD
:
openThenStreamingDialogs
();
break
;
#ifdef UPDATE_CHECK
#ifdef UPDATE_CHECK
case
INTF_DIALOG_UPDATEVLC
:
case
INTF_DIALOG_UPDATEVLC
:
updateDialog
();
break
;
updateDialog
();
break
;
...
@@ -249,8 +250,7 @@ void DialogsProvider::PLAppendDialog()
...
@@ -249,8 +250,7 @@ void DialogsProvider::PLAppendDialog()
/* Unimplemmented yet - Usefull ? */
/* Unimplemmented yet - Usefull ? */
void
DialogsProvider
::
MLAppendDialog
()
void
DialogsProvider
::
MLAppendDialog
()
{
{}
}
/**
/**
* Simple open
* Simple open
...
@@ -414,14 +414,13 @@ void DialogsProvider::saveAPlaylist()
...
@@ -414,14 +414,13 @@ void DialogsProvider::saveAPlaylist()
* Sout emulation
* Sout emulation
****************************************************************************/
****************************************************************************/
//FIXME !!
void
DialogsProvider
::
streamingDialog
(
QString
mrl
,
bool
b_transcode_only
)
void
DialogsProvider
::
streamingDialog
(
QString
mrl
,
bool
b_transcode_only
)
{
{
SoutDialog
*
s
=
new
SoutDialog
(
p_intf
->
p_sys
->
p_mi
,
p_intf
,
SoutDialog
*
s
=
new
SoutDialog
(
p_intf
->
p_sys
->
p_mi
,
p_intf
,
b_transcode_only
);
b_transcode_only
);
if
(
s
->
exec
()
==
QDialog
::
Accepted
)
if
(
s
->
exec
()
==
QDialog
::
Accepted
)
{
{
msg_Err
(
p_intf
,
"mrl %s"
,
qta
(
s
->
getMrl
()
)
);
msg_Err
(
p_intf
,
"
Sout
mrl %s"
,
qta
(
s
->
getMrl
()
)
);
/* Just do it */
/* Just do it */
int
i_len
=
strlen
(
qtu
(
s
->
getMrl
()
)
)
+
10
;
int
i_len
=
strlen
(
qtu
(
s
->
getMrl
()
)
)
+
10
;
char
*
psz_option
=
(
char
*
)
malloc
(
i_len
);
char
*
psz_option
=
(
char
*
)
malloc
(
i_len
);
...
...
modules/gui/qt4/dialogs_provider.hpp
View file @
97f221eb
...
@@ -84,7 +84,8 @@ enum {
...
@@ -84,7 +84,8 @@ enum {
OPEN_AND_PLAY
,
OPEN_AND_PLAY
,
OPEN_AND_STREAM
,
OPEN_AND_STREAM
,
OPEN_AND_SAVE
,
OPEN_AND_SAVE
,
OPEN_AND_ENQUEUE
OPEN_AND_ENQUEUE
,
SELECT
};
};
class
QEvent
;
class
QEvent
;
...
...
modules/gui/qt4/ui/open.ui
View file @
97f221eb
...
@@ -14,9 +14,7 @@
...
@@ -14,9 +14,7 @@
</rect>
</rect>
</property>
</property>
<property name="sizePolicy" >
<property name="sizePolicy" >
<sizepolicy>
<sizepolicy vsizetype="Maximum" hsizetype="Preferred" >
<hsizetype>5</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
<verstretch>0</verstretch>
</sizepolicy>
</sizepolicy>
...
@@ -25,18 +23,25 @@
...
@@ -25,18 +23,25 @@
<string>Dialog</string>
<string>Dialog</string>
</property>
</property>
<layout class="QVBoxLayout" >
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<property name="spacing" >
<number>6</number>
<number>6</number>
</property>
</property>
<property name="leftMargin" >
<number>9</number>
</property>
<property name="topMargin" >
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<item>
<item>
<widget class="QTabWidget" name="Tab" >
<widget class="QTabWidget" name="Tab" >
<property name="sizePolicy" >
<property name="sizePolicy" >
<sizepolicy>
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
<verstretch>0</verstretch>
</sizepolicy>
</sizepolicy>
...
@@ -59,9 +64,7 @@
...
@@ -59,9 +64,7 @@
<item>
<item>
<widget class="QFrame" name="advancedFrame" >
<widget class="QFrame" name="advancedFrame" >
<property name="sizePolicy" >
<property name="sizePolicy" >
<sizepolicy>
<sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
<hsizetype>1</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
<verstretch>0</verstretch>
</sizepolicy>
</sizepolicy>
...
@@ -70,10 +73,22 @@
...
@@ -70,10 +73,22 @@
<enum>QFrame::StyledPanel</enum>
<enum>QFrame::StyledPanel</enum>
</property>
</property>
<layout class="QGridLayout" >
<layout class="QGridLayout" >
<property name="margin" >
<property name="leftMargin" >
<number>9</number>
</property>
<property name="topMargin" >
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
<number>9</number>
</property>
</property>
<property name="spacing" >
<property name="bottomMargin" >
<number>9</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
<number>6</number>
</property>
</property>
<item row="0" column="2" >
<item row="0" column="2" >
...
@@ -86,9 +101,7 @@
...
@@ -86,9 +101,7 @@
<item row="0" column="3" colspan="2" >
<item row="0" column="3" colspan="2" >
<widget class="QSpinBox" name="startTimeSpinBox" >
<widget class="QSpinBox" name="startTimeSpinBox" >
<property name="sizePolicy" >
<property name="sizePolicy" >
<sizepolicy>
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
<verstretch>0</verstretch>
</sizepolicy>
</sizepolicy>
...
@@ -110,9 +123,7 @@
...
@@ -110,9 +123,7 @@
<item row="0" column="0" >
<item row="0" column="0" >
<widget class="QLabel" name="cacheLabel" >
<widget class="QLabel" name="cacheLabel" >
<property name="sizePolicy" >
<property name="sizePolicy" >
<sizepolicy>
<sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
<hsizetype>0</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
<verstretch>0</verstretch>
</sizepolicy>
</sizepolicy>
...
@@ -180,9 +191,7 @@
...
@@ -180,9 +191,7 @@
<item row="0" column="1" >
<item row="0" column="1" >
<widget class="QSpinBox" name="cacheSpinBox" >
<widget class="QSpinBox" name="cacheSpinBox" >
<property name="sizePolicy" >
<property name="sizePolicy" >
<sizepolicy>
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
<verstretch>0</verstretch>
</sizepolicy>
</sizepolicy>
...
@@ -222,12 +231,21 @@
...
@@ -222,12 +231,21 @@
</item>
</item>
<item>
<item>
<layout class="QHBoxLayout" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<property name="spacing" >
<number>6</number>
<number>6</number>
</property>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<item>
<spacer>
<spacer>
<property name="orientation" >
<property name="orientation" >
...
...
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