Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
662dc6f8
Commit
662dc6f8
authored
Aug 27, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: split playlist mode view in a separate function
parent
b216ade1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
17 deletions
+21
-17
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+19
-16
modules/gui/qt4/components/playlist/standardpanel.hpp
modules/gui/qt4/components/playlist/standardpanel.hpp
+2
-1
No files found.
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
662dc6f8
...
...
@@ -255,13 +255,25 @@ bool StandardPLPanel::popup( const QModelIndex & index, const QPoint &point, con
CONNECT
(
&
menu
,
triggered
(
QAction
*
),
model
,
actionSlot
(
QAction
*
)
);
QMenu
*
viewMenu
=
new
QMenu
(
qtr
(
"Playlist View Mode"
)
);
menu
.
addMenu
(
StandardPLPanel
::
viewSelectionMenu
(
this
)
);
/* Display and forward the result */
if
(
!
menu
.
isEmpty
()
)
{
menu
.
exec
(
point
);
return
true
;
}
else
return
false
;
#undef ADD_MENU_ENTRY
}
/* View selection menu */
QSignalMapper
*
viewSelectionMapper
=
new
QSignalMapper
(
this
);
CONNECT
(
viewSelectionMapper
,
mapped
(
int
),
this
,
showView
(
int
)
);
QMenu
*
StandardPLPanel
::
viewSelectionMenu
(
StandardPLPanel
*
panel
)
{
QMenu
*
viewMenu
=
new
QMenu
(
qtr
(
"Playlist View Mode"
)
);
QSignalMapper
*
viewSelectionMapper
=
new
QSignalMapper
(
viewMenu
);
CONNECT
(
viewSelectionMapper
,
mapped
(
int
),
panel
,
showView
(
int
)
);
QActionGroup
*
viewGroup
=
new
QActionGroup
(
this
);
QActionGroup
*
viewGroup
=
new
QActionGroup
(
viewMenu
);
# define MAX_VIEW StandardPLPanel::VIEW_COUNT
for
(
int
i
=
0
;
i
<
MAX_VIEW
;
i
++
)
{
...
...
@@ -270,19 +282,10 @@ bool StandardPLPanel::popup( const QModelIndex & index, const QPoint &point, con
viewGroup
->
addAction
(
action
);
viewSelectionMapper
->
setMapping
(
action
,
i
);
CONNECT
(
action
,
triggered
(),
viewSelectionMapper
,
map
()
);
if
(
currentViewIndex
()
==
i
)
if
(
panel
->
currentViewIndex
()
==
i
)
action
->
setChecked
(
true
);
}
menu
.
addMenu
(
viewMenu
);
/* Display and forward the result */
if
(
!
menu
.
isEmpty
()
)
{
menu
.
exec
(
point
);
return
true
;
}
else
return
false
;
#undef ADD_MENU_ENTRY
return
viewMenu
;
}
void
StandardPLPanel
::
popupSelectColumn
(
QPoint
)
...
...
modules/gui/qt4/components/playlist/standardpanel.hpp
View file @
662dc6f8
...
...
@@ -71,6 +71,7 @@ public:
int
currentViewIndex
()
const
;
static
QMenu
*
viewSelectionMenu
(
StandardPLPanel
*
obj
);
protected:
PLModel
*
model
;
MLModel
*
mlmodel
;
...
...
@@ -111,6 +112,7 @@ private:
public
slots
:
void
setRootItem
(
playlist_item_t
*
,
bool
);
void
browseInto
(
const
QModelIndex
&
);
void
showView
(
int
);
private
slots
:
void
deleteSelection
();
...
...
@@ -136,7 +138,6 @@ private slots:
void
decreaseZoom
()
{
updateZoom
(
i_zoom
-
1
);
};
void
toggleColumnShown
(
int
);
void
showView
(
int
);
void
cycleViews
();
signals:
...
...
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