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
df8d2104
Commit
df8d2104
authored
Jan 25, 2010
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: playlist: use same context menu for both tree- and icon-view
parent
8f145234
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+13
-6
modules/gui/qt4/components/playlist/standardpanel.hpp
modules/gui/qt4/components/playlist/standardpanel.hpp
+1
-1
No files found.
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
df8d2104
...
...
@@ -110,7 +110,7 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
CONNECT
(
treeView
->
header
(),
customContextMenuRequested
(
const
QPoint
&
),
this
,
popupSelectColumn
(
QPoint
)
);
CONNECT
(
treeView
,
customContextMenuRequested
(
const
QPoint
&
),
this
,
treeView
Popup
(
const
QPoint
&
)
);
this
,
playlist
Popup
(
const
QPoint
&
)
);
CONNECT
(
model
,
currentChanged
(
const
QModelIndex
&
),
this
,
handleExpansion
(
const
QModelIndex
&
)
);
...
...
@@ -216,11 +216,15 @@ void StandardPLPanel::popupSelectColumn( QPoint pos )
menu
.
exec
(
QCursor
::
pos
()
);
}
void
StandardPLPanel
::
treeView
Popup
(
const
QPoint
&
point
)
void
StandardPLPanel
::
playlist
Popup
(
const
QPoint
&
point
)
{
QModelIndex
index
=
treeView
->
indexAt
(
point
);
QPoint
globalPoint
=
treeView
->
viewport
()
->
mapToGlobal
(
point
);
QItemSelectionModel
*
selection
=
treeView
->
selectionModel
();
QAbstractItemView
*
aView
;
if
(
treeView
->
isVisible
()
)
aView
=
treeView
;
else
aView
=
iconView
;
QModelIndex
index
=
aView
->
indexAt
(
point
);
QPoint
globalPoint
=
aView
->
viewport
()
->
mapToGlobal
(
point
);
QItemSelectionModel
*
selection
=
aView
->
selectionModel
();
QModelIndexList
list
=
selection
->
selectedIndexes
();
model
->
popup
(
index
,
globalPoint
,
list
);
}
...
...
@@ -316,7 +320,10 @@ void StandardPLPanel::toggleView()
{
iconView
=
new
PlIconView
(
model
,
this
);
layout
->
addWidget
(
iconView
,
1
,
0
,
1
,
-
1
);
installEventFilter
(
iconView
);
//iconView->installEventFilter( this );
iconView
->
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
CONNECT
(
iconView
,
customContextMenuRequested
(
const
QPoint
&
),
this
,
playlistPopup
(
const
QPoint
&
)
);
}
treeView
->
hide
();
iconView
->
show
();
...
...
modules/gui/qt4/components/playlist/standardpanel.hpp
View file @
df8d2104
...
...
@@ -90,7 +90,7 @@ private slots:
void
popupSelectColumn
(
QPoint
);
void
toggleColumnShown
(
int
);
void
toggleView
();
void
treeView
Popup
(
const
QPoint
&
);
void
playlist
Popup
(
const
QPoint
&
);
};
#endif
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