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
bf144ba3
Commit
bf144ba3
authored
Jan 29, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: Playlist, map the click to cycleViews
And adapt the actions in consequences
parent
86e411e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
8 deletions
+23
-8
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+21
-8
modules/gui/qt4/components/playlist/standardpanel.hpp
modules/gui/qt4/components/playlist/standardpanel.hpp
+2
-0
No files found.
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
bf144ba3
...
@@ -108,16 +108,17 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
...
@@ -108,16 +108,17 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
QActionGroup
*
actionGroup
=
new
QActionGroup
(
this
);
QActionGroup
*
actionGroup
=
new
QActionGroup
(
this
);
QAction
*
a
ction
=
actionGroup
->
addAction
(
"Detailed view"
);
treeViewA
ction
=
actionGroup
->
addAction
(
"Detailed view"
);
a
ction
->
setCheckable
(
true
);
treeViewA
ction
->
setCheckable
(
true
);
viewSelectionMapper
->
setMapping
(
a
ction
,
TREE_VIEW
);
viewSelectionMapper
->
setMapping
(
treeViewA
ction
,
TREE_VIEW
);
CONNECT
(
a
ction
,
triggered
(),
viewSelectionMapper
,
map
()
);
CONNECT
(
treeViewA
ction
,
triggered
(),
viewSelectionMapper
,
map
()
);
a
ction
=
actionGroup
->
addAction
(
"Icon view"
);
iconViewA
ction
=
actionGroup
->
addAction
(
"Icon view"
);
a
ction
->
setCheckable
(
true
);
iconViewA
ction
->
setCheckable
(
true
);
viewSelectionMapper
->
setMapping
(
a
ction
,
ICON_VIEW
);
viewSelectionMapper
->
setMapping
(
iconViewA
ction
,
ICON_VIEW
);
CONNECT
(
a
ction
,
triggered
(),
viewSelectionMapper
,
map
()
);
CONNECT
(
iconViewA
ction
,
triggered
(),
viewSelectionMapper
,
map
()
);
BUTTONACT
(
viewButton
,
cycleViews
()
);
QMenu
*
viewMenu
=
new
QMenu
(
this
);
QMenu
*
viewMenu
=
new
QMenu
(
this
);
viewMenu
->
addActions
(
actionGroup
->
actions
()
);
viewMenu
->
addActions
(
actionGroup
->
actions
()
);
...
@@ -372,6 +373,7 @@ void StandardPLPanel::showView( int i_view )
...
@@ -372,6 +373,7 @@ void StandardPLPanel::showView( int i_view )
if
(
iconView
)
iconView
->
hide
();
if
(
iconView
)
iconView
->
hide
();
treeView
->
show
();
treeView
->
show
();
currentView
=
treeView
;
currentView
=
treeView
;
treeViewAction
->
setChecked
(
true
);
break
;
break
;
}
}
case
ICON_VIEW
:
case
ICON_VIEW
:
...
@@ -383,12 +385,23 @@ void StandardPLPanel::showView( int i_view )
...
@@ -383,12 +385,23 @@ void StandardPLPanel::showView( int i_view )
if
(
treeView
)
treeView
->
hide
();
if
(
treeView
)
treeView
->
hide
();
iconView
->
show
();
iconView
->
show
();
currentView
=
iconView
;
currentView
=
iconView
;
iconViewAction
->
setChecked
(
true
);
break
;
break
;
}
}
default:
;
default:
;
}
}
}
}
void
StandardPLPanel
::
cycleViews
()
{
if
(
currentView
==
iconView
)
showView
(
TREE_VIEW
);
else
if
(
currentView
==
treeView
)
showView
(
ICON_VIEW
);
else
assert
(
0
);
}
void
StandardPLPanel
::
wheelEvent
(
QWheelEvent
*
e
)
void
StandardPLPanel
::
wheelEvent
(
QWheelEvent
*
e
)
{
{
// Accept this event in order to prevent unwanted volume up/down changes
// Accept this event in order to prevent unwanted volume up/down changes
...
...
modules/gui/qt4/components/playlist/standardpanel.hpp
View file @
bf144ba3
...
@@ -76,6 +76,7 @@ private:
...
@@ -76,6 +76,7 @@ private:
PlIconView
*
iconView
;
PlIconView
*
iconView
;
QAbstractItemView
*
currentView
;
QAbstractItemView
*
currentView
;
QAction
*
iconViewAction
,
*
treeViewAction
;
int
currentRootId
;
int
currentRootId
;
QSignalMapper
*
selectColumnsSigMapper
;
QSignalMapper
*
selectColumnsSigMapper
;
QSignalMapper
*
viewSelectionMapper
;
QSignalMapper
*
viewSelectionMapper
;
...
@@ -104,6 +105,7 @@ private slots:
...
@@ -104,6 +105,7 @@ private slots:
void
popupPlView
(
const
QPoint
&
);
void
popupPlView
(
const
QPoint
&
);
void
toggleColumnShown
(
int
);
void
toggleColumnShown
(
int
);
void
showView
(
int
);
void
showView
(
int
);
void
cycleViews
();
void
activate
(
const
QModelIndex
&
);
void
activate
(
const
QModelIndex
&
);
void
handleInputChange
(
input_thread_t
*
);
void
handleInputChange
(
input_thread_t
*
);
};
};
...
...
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