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
6950dc05
Commit
6950dc05
authored
Oct 28, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: further playlistPanel simplifications
This should help a lot the future work.
parent
45202fbe
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
29 deletions
+15
-29
modules/gui/qt4/components/playlist/playlist.cpp
modules/gui/qt4/components/playlist/playlist.cpp
+1
-1
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+13
-26
modules/gui/qt4/components/playlist/standardpanel.hpp
modules/gui/qt4/components/playlist/standardpanel.hpp
+1
-2
No files found.
modules/gui/qt4/components/playlist/playlist.cpp
View file @
6950dc05
...
...
@@ -90,7 +90,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
setMinimumWidth
(
300
);
PLModel
*
model
=
new
PLModel
(
p_playlist
,
p_intf
,
p_root
,
this
);
mainView
=
new
StandardPLPanel
(
this
,
p_intf
,
THEPL
,
p_root
,
selector
,
model
);
mainView
=
new
StandardPLPanel
(
this
,
p_intf
,
p_root
,
selector
,
model
);
/* Location Bar */
locationBar
=
new
LocationBar
(
model
);
...
...
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
6950dc05
/*****************************************************************************
* standardpanel.cpp : The "standard" playlist panel : just a treeview
****************************************************************************
* Copyright
(C) 2000-2009
VideoLAN
* Copyright
© 2000-2010
VideoLAN
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
* J
B
Kempf <jb@videolan.org>
* J
ean-Baptiste
Kempf <jb@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -34,6 +34,8 @@
#include "menus.hpp"
/* Popup */
#include "input_manager.hpp"
/* THEMIM */
#include "sorting.h"
/* Columns order */
#include <vlc_services_discovery.h>
/* SD_CMD_SEARCH */
#include <QHeaderView>
...
...
@@ -47,38 +49,28 @@
#include <assert.h>
#include "sorting.h"
StandardPLPanel
::
StandardPLPanel
(
PlaylistWidget
*
_parent
,
intf_thread_t
*
_p_intf
,
playlist_t
*
p_playlist
,
playlist_item_t
*
p_root
,
PLSelector
*
_p_selector
,
PLModel
*
_p_model
)
:
QWidget
(
_parent
),
p_intf
(
_p_intf
),
p_selector
(
_p_selector
)
PLModel
*
_p_model
)
:
QWidget
(
_parent
),
p_intf
(
_p_intf
),
p_selector
(
_p_selector
),
model
(
_p_model
)
{
QGridLayout
*
layout
=
new
QGri
dLayout
(
this
);
layout
->
setSpacing
(
0
);
layout
->
setMargin
(
0
);
viewStack
=
new
QStacke
dLayout
(
this
);
viewStack
->
setSpacing
(
0
);
viewStack
->
setMargin
(
0
);
setMinimumWidth
(
300
);
iconView
=
NULL
;
treeView
=
NULL
;
listView
=
NULL
;
viewStack
=
new
QStackedLayout
();
layout
->
addLayout
(
viewStack
,
1
,
0
,
1
,
-
1
);
model
=
_p_model
;
currentRootId
=
-
1
;
currentRootIndexId
=
-
1
;
lastActivatedId
=
-
1
;
/* Saved Settings */
getSettings
()
->
beginGroup
(
"Playlist"
);
int
i_viewMode
=
getSettings
()
->
value
(
"view-mode"
,
TREE_VIEW
).
toInt
();
getSettings
()
->
endGroup
();
showView
(
i_viewMode
);
...
...
@@ -147,8 +139,7 @@ void StandardPLPanel::popupSelectColumn( QPoint pos )
int
i
,
j
;
for
(
i
=
1
<<
1
,
j
=
1
;
i
<
COLUMN_END
;
i
<<=
1
,
j
++
)
{
QAction
*
option
=
menu
.
addAction
(
qfu
(
psz_column_title
(
i
)
)
);
QAction
*
option
=
menu
.
addAction
(
qfu
(
psz_column_title
(
i
)
)
);
option
->
setCheckable
(
true
);
option
->
setChecked
(
!
treeView
->
isColumnHidden
(
j
)
);
selectColumnsSigMapper
->
setMapping
(
option
,
j
);
...
...
@@ -267,7 +258,6 @@ void StandardPLPanel::createListView()
viewStack
->
addWidget
(
listView
);
}
void
StandardPLPanel
::
createTreeView
()
{
/* Create and configure the QTreeView */
...
...
@@ -326,7 +316,6 @@ void StandardPLPanel::createTreeView()
CONNECT
(
selectColumnsSigMapper
,
mapped
(
int
),
this
,
toggleColumnShown
(
int
)
);
/* Finish the layout */
viewStack
->
addWidget
(
treeView
);
}
...
...
@@ -396,7 +385,6 @@ void StandardPLPanel::activate( const QModelIndex &index )
void
StandardPLPanel
::
browseInto
(
input_item_t
*
p_input
)
{
if
(
p_input
->
i_id
!=
lastActivatedId
)
return
;
playlist_Lock
(
THEPL
);
...
...
@@ -418,5 +406,4 @@ void StandardPLPanel::browseInto( input_item_t *p_input )
browseInto
(
index
);
lastActivatedId
=
-
1
;
}
modules/gui/qt4/components/playlist/standardpanel.hpp
View file @
6950dc05
...
...
@@ -62,7 +62,7 @@ class StandardPLPanel: public QWidget
public:
StandardPLPanel
(
PlaylistWidget
*
,
intf_thread_t
*
,
playlist_
t
*
,
playlist_
item_t
*
,
PLSelector
*
,
PLModel
*
);
playlist_item_t
*
,
PLSelector
*
,
PLModel
*
);
virtual
~
StandardPLPanel
();
enum
{
TREE_VIEW
=
0
,
...
...
@@ -86,7 +86,6 @@ private:
QStackedLayout
*
viewStack
;
int
currentRootId
;
QSignalMapper
*
selectColumnsSigMapper
;
int
lastActivatedId
;
...
...
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