Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
96b1f07d
Commit
96b1f07d
authored
Dec 12, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: new view mode for the playlist in an IconList like mode.
parent
ddc08774
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
4 deletions
+40
-4
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+30
-1
modules/gui/qt4/components/playlist/standardpanel.hpp
modules/gui/qt4/components/playlist/standardpanel.hpp
+10
-3
No files found.
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
96b1f07d
...
@@ -53,7 +53,7 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
...
@@ -53,7 +53,7 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
playlist_item_t
*
p_root
)
:
playlist_item_t
*
p_root
)
:
QWidget
(
_parent
),
p_intf
(
_p_intf
)
QWidget
(
_parent
),
p_intf
(
_p_intf
)
{
{
QGridLayout
*
layout
=
new
QGridLayout
(
this
);
layout
=
new
QGridLayout
(
this
);
layout
->
setSpacing
(
0
);
layout
->
setMargin
(
0
);
layout
->
setSpacing
(
0
);
layout
->
setMargin
(
0
);
setMinimumWidth
(
300
);
setMinimumWidth
(
300
);
...
@@ -62,6 +62,7 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
...
@@ -62,6 +62,7 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
/* Create and configure the QTreeView */
/* Create and configure the QTreeView */
view
=
new
QVLCTreeView
;
view
=
new
QVLCTreeView
;
view
->
setModel
(
model
);
view
->
setModel
(
model
);
view2
=
NULL
;
view
->
setIconSize
(
QSize
(
20
,
20
)
);
view
->
setIconSize
(
QSize
(
20
,
20
)
);
view
->
setAlternatingRowColors
(
true
);
view
->
setAlternatingRowColors
(
true
);
...
@@ -134,6 +135,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
...
@@ -134,6 +135,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
BUTTONACT
(
addButton
,
popupAdd
()
);
BUTTONACT
(
addButton
,
popupAdd
()
);
layout
->
addWidget
(
addButton
,
0
,
3
);
layout
->
addWidget
(
addButton
,
0
,
3
);
QPushButton
*
viewButton
=
new
QPushButton
(
this
);
viewButton
->
setIcon
(
QIcon
(
":/buttons/playlist/playlist_add"
)
);
layout
->
addWidget
(
viewButton
,
0
,
2
);
BUTTONACT
(
viewButton
,
toggleView
()
);
/* Finish the layout */
/* Finish the layout */
layout
->
addWidget
(
view
,
1
,
0
,
1
,
-
1
);
layout
->
addWidget
(
view
,
1
,
0
,
1
,
-
1
);
...
@@ -287,3 +293,26 @@ void StandardPLPanel::deleteSelection()
...
@@ -287,3 +293,26 @@ void StandardPLPanel::deleteSelection()
model
->
doDelete
(
list
);
model
->
doDelete
(
list
);
}
}
void
StandardPLPanel
::
toggleView
()
{
if
(
view
&&
view
->
isVisible
()
)
{
if
(
view2
==
NULL
)
{
view2
=
new
QListView
;
view2
->
setModel
(
model
);
view2
->
setViewMode
(
QListView
::
IconMode
);
view2
->
setMovement
(
QListView
::
Snap
);
layout
->
addWidget
(
view2
,
1
,
0
,
1
,
-
1
);
}
view
->
hide
();
view2
->
show
();
}
else
{
view2
->
hide
();
view
->
show
();
}
}
modules/gui/qt4/components/playlist/standardpanel.hpp
View file @
96b1f07d
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
class
QSignalMapper
;
class
QSignalMapper
;
class
QTreeView
;
class
QTreeView
;
class
QListView
;
class
PLModel
;
class
PLModel
;
class
QPushButton
;
class
QPushButton
;
class
QKeyEvent
;
class
QKeyEvent
;
...
@@ -59,10 +60,15 @@ protected:
...
@@ -59,10 +60,15 @@ protected:
PLModel
*
model
;
PLModel
*
model
;
private:
private:
intf_thread_t
*
p_intf
;
intf_thread_t
*
p_intf
;
QWidget
*
parent
;
Q
Label
*
title
;
Q
Widget
*
parent
;
Q
TreeView
*
view
;
Q
Label
*
title
;
QPushButton
*
addButton
;
QPushButton
*
addButton
;
QGridLayout
*
layout
;
QTreeView
*
view
;
QListView
*
view2
;
int
currentRootId
;
int
currentRootId
;
QSignalMapper
*
selectColumnsSigMapper
;
QSignalMapper
*
selectColumnsSigMapper
;
...
@@ -78,6 +84,7 @@ private slots:
...
@@ -78,6 +84,7 @@ private slots:
void
popupAdd
();
void
popupAdd
();
void
popupSelectColumn
(
QPoint
);
void
popupSelectColumn
(
QPoint
);
void
toggleColumnShown
(
int
);
void
toggleColumnShown
(
int
);
void
toggleView
();
};
};
#endif
#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