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
9c191f2f
Commit
9c191f2f
authored
Jan 25, 2010
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: make playlist tree-view popup menu work again
parent
a706d73d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+15
-1
modules/gui/qt4/components/playlist/standardpanel.hpp
modules/gui/qt4/components/playlist/standardpanel.hpp
+1
-0
No files found.
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
9c191f2f
...
...
@@ -81,8 +81,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
treeView
->
setDragEnabled
(
true
);
treeView
->
setAcceptDrops
(
true
);
treeView
->
setDropIndicatorShown
(
true
);
treeView
->
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
//treeView->installEventFilter( this );
//<jleben> I guess we don't need that
installEventFilter
(
treeView
);
/* Saved Settings */
getSettings
()
->
beginGroup
(
"Playlist"
);
if
(
getSettings
()
->
contains
(
"headerStateV2"
)
)
...
...
@@ -106,6 +109,8 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
model
,
activateItem
(
const
QModelIndex
&
)
);
CONNECT
(
treeView
->
header
(),
customContextMenuRequested
(
const
QPoint
&
),
this
,
popupSelectColumn
(
QPoint
)
);
CONNECT
(
treeView
,
customContextMenuRequested
(
const
QPoint
&
),
this
,
treeViewPopup
(
const
QPoint
&
)
);
CONNECT
(
model
,
currentChanged
(
const
QModelIndex
&
),
this
,
handleExpansion
(
const
QModelIndex
&
)
);
...
...
@@ -211,6 +216,15 @@ void StandardPLPanel::popupSelectColumn( QPoint pos )
menu
.
exec
(
QCursor
::
pos
()
);
}
void
StandardPLPanel
::
treeViewPopup
(
const
QPoint
&
point
)
{
QModelIndex
index
=
treeView
->
indexAt
(
point
);
QPoint
globalPoint
=
treeView
->
viewport
()
->
mapToGlobal
(
point
);
QItemSelectionModel
*
selection
=
treeView
->
selectionModel
();
QModelIndexList
list
=
selection
->
selectedIndexes
();
model
->
popup
(
index
,
globalPoint
,
list
);
}
void
StandardPLPanel
::
toggleColumnShown
(
int
i
)
{
treeView
->
setColumnHidden
(
i
,
!
treeView
->
isColumnHidden
(
i
)
);
...
...
modules/gui/qt4/components/playlist/standardpanel.hpp
View file @
9c191f2f
...
...
@@ -90,6 +90,7 @@ private slots:
void
popupSelectColumn
(
QPoint
);
void
toggleColumnShown
(
int
);
void
toggleView
();
void
treeViewPopup
(
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