Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
fe986989
Commit
fe986989
authored
Nov 09, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Open Dialog: Code cosmetic.
parent
78510eda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
18 deletions
+14
-18
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/open.cpp
+14
-18
No files found.
modules/gui/qt4/dialogs/open.cpp
View file @
fe986989
...
@@ -58,25 +58,23 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
...
@@ -58,25 +58,23 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
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 */
ui
.
slaveLabel
->
hide
();
ui
.
slaveText
->
hide
();
ui
.
slaveBrowseButton
->
hide
();
/* Hide the advancedPanel */
/* Hide the advancedPanel */
if
(
!
config_GetInt
(
p_intf
,
"qt-adv-options"
)
)
if
(
!
config_GetInt
(
p_intf
,
"qt-adv-options"
)
)
{
ui
.
advancedFrame
->
hide
();
ui
.
advancedFrame
->
hide
();
}
else
else
{
ui
.
advancedCheckBox
->
setCheckState
(
Qt
::
Checked
);
ui
.
advancedCheckBox
->
setCheckState
(
Qt
::
Checked
);
}
ui
.
slaveLabel
->
hide
();
ui
.
slaveText
->
hide
();
ui
.
slaveBrowseButton
->
hide
();
/* Buttons Creation */
/* Buttons Creation */
QSizePolicy
buttonSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Minimum
);
QSizePolicy
buttonSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Minimum
);
buttonSizePolicy
.
setHorizontalStretch
(
0
);
buttonSizePolicy
.
setHorizontalStretch
(
0
);
buttonSizePolicy
.
setVerticalStretch
(
0
);
buttonSizePolicy
.
setVerticalStretch
(
0
);
/* Play Button */
playButton
=
new
QToolButton
(
this
);
playButton
=
new
QToolButton
(
this
);
playButton
->
setText
(
qtr
(
"&Play"
)
);
playButton
->
setText
(
qtr
(
"&Play"
)
);
playButton
->
setSizePolicy
(
buttonSizePolicy
);
playButton
->
setSizePolicy
(
buttonSizePolicy
);
...
@@ -84,10 +82,12 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
...
@@ -84,10 +82,12 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
playButton
->
setPopupMode
(
QToolButton
::
MenuButtonPopup
);
playButton
->
setPopupMode
(
QToolButton
::
MenuButtonPopup
);
playButton
->
setToolButtonStyle
(
Qt
::
ToolButtonTextOnly
);
playButton
->
setToolButtonStyle
(
Qt
::
ToolButtonTextOnly
);
/* Cancel Button */
cancelButton
=
new
QPushButton
();
cancelButton
=
new
QPushButton
();
cancelButton
->
setText
(
qtr
(
"&Cancel"
)
);
cancelButton
->
setText
(
qtr
(
"&Cancel"
)
);
cancelButton
->
setSizePolicy
(
buttonSizePolicy
);
cancelButton
->
setSizePolicy
(
buttonSizePolicy
);
/* 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"
)
);
...
@@ -109,8 +109,7 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
...
@@ -109,8 +109,7 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
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
,
CONNECT
(
captureOpenPanel
,
mrlUpdated
(
QString
),
this
,
updateMRL
(
QString
)
);
updateMRL
(
QString
)
);
CONNECT
(
fileOpenPanel
,
methodChanged
(
QString
),
CONNECT
(
fileOpenPanel
,
methodChanged
(
QString
),
this
,
newMethod
(
QString
)
);
this
,
newMethod
(
QString
)
);
...
@@ -134,7 +133,6 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
...
@@ -134,7 +133,6 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
/* At creation time, modify the default buttons */
/* At creation time, modify the default buttons */
if
(
i_action_flag
)
setMenuAction
();
if
(
i_action_flag
)
setMenuAction
();
/* Initialize caching */
/* Initialize caching */
storedMethod
=
""
;
storedMethod
=
""
;
newMethod
(
"file-caching"
);
newMethod
(
"file-caching"
);
...
@@ -170,16 +168,15 @@ void OpenDialog::setMenuAction()
...
@@ -170,16 +168,15 @@ void OpenDialog::setMenuAction()
}
}
}
}
void
OpenDialog
::
showTab
(
int
i_tab
=
0
)
void
OpenDialog
::
showTab
(
int
i_tab
=
0
)
{
{
this
->
show
();
this
->
show
();
ui
.
Tab
->
setCurrentIndex
(
i_tab
);
ui
.
Tab
->
setCurrentIndex
(
i_tab
);
}
}
void
OpenDialog
::
signalCurrent
()
{
void
OpenDialog
::
signalCurrent
()
{
if
(
ui
.
Tab
->
currentWidget
()
!=
NULL
)
{
if
(
ui
.
Tab
->
currentWidget
()
!=
NULL
)
(
dynamic_cast
<
OpenPanel
*>
(
ui
.
Tab
->
currentWidget
()))
->
updateMRL
();
(
dynamic_cast
<
OpenPanel
*>
(
ui
.
Tab
->
currentWidget
()
))
->
updateMRL
();
}
}
}
/***********
/***********
...
@@ -191,8 +188,7 @@ void OpenDialog::cancel()
...
@@ -191,8 +188,7 @@ void OpenDialog::cancel()
{
{
fileOpenPanel
->
clear
();
fileOpenPanel
->
clear
();
this
->
toggleVisible
();
this
->
toggleVisible
();
if
(
isModal
()
)
if
(
isModal
()
)
reject
();
reject
();
}
}
/* If EnterKey is pressed */
/* If EnterKey is pressed */
...
...
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