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 )
...
@@ -90,7 +90,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
setMinimumWidth
(
300
);
setMinimumWidth
(
300
);
PLModel
*
model
=
new
PLModel
(
p_playlist
,
p_intf
,
p_root
,
this
);
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 */
/* Location Bar */
locationBar
=
new
LocationBar
(
model
);
locationBar
=
new
LocationBar
(
model
);
...
...
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
6950dc05
/*****************************************************************************
/*****************************************************************************
* standardpanel.cpp : The "standard" playlist panel : just a treeview
* standardpanel.cpp : The "standard" playlist panel : just a treeview
****************************************************************************
****************************************************************************
* Copyright
(C) 2000-2009
VideoLAN
* Copyright
© 2000-2010
VideoLAN
* $Id$
* $Id$
*
*
* Authors: Clément Stenac <zorglub@videolan.org>
* 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
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -34,6 +34,8 @@
...
@@ -34,6 +34,8 @@
#include "menus.hpp"
/* Popup */
#include "menus.hpp"
/* Popup */
#include "input_manager.hpp"
/* THEMIM */
#include "input_manager.hpp"
/* THEMIM */
#include "sorting.h"
/* Columns order */
#include <vlc_services_discovery.h>
/* SD_CMD_SEARCH */
#include <vlc_services_discovery.h>
/* SD_CMD_SEARCH */
#include <QHeaderView>
#include <QHeaderView>
...
@@ -47,38 +49,28 @@
...
@@ -47,38 +49,28 @@
#include <assert.h>
#include <assert.h>
#include "sorting.h"
StandardPLPanel
::
StandardPLPanel
(
PlaylistWidget
*
_parent
,
StandardPLPanel
::
StandardPLPanel
(
PlaylistWidget
*
_parent
,
intf_thread_t
*
_p_intf
,
intf_thread_t
*
_p_intf
,
playlist_t
*
p_playlist
,
playlist_item_t
*
p_root
,
playlist_item_t
*
p_root
,
PLSelector
*
_p_selector
,
PLSelector
*
_p_selector
,
PLModel
*
_p_model
PLModel
*
_p_model
)
)
:
:
QWidget
(
_parent
),
p_intf
(
_p_intf
),
QWidget
(
_parent
),
p_intf
(
_p_intf
),
p_selector
(
_p_selector
),
model
(
_p_model
)
p_selector
(
_p_selector
)
{
{
QGridLayout
*
layout
=
new
QGri
dLayout
(
this
);
viewStack
=
new
QStacke
dLayout
(
this
);
layout
->
setSpacing
(
0
);
layout
->
setMargin
(
0
);
viewStack
->
setSpacing
(
0
);
viewStack
->
setMargin
(
0
);
setMinimumWidth
(
300
);
setMinimumWidth
(
300
);
iconView
=
NULL
;
iconView
=
NULL
;
treeView
=
NULL
;
treeView
=
NULL
;
listView
=
NULL
;
listView
=
NULL
;
viewStack
=
new
QStackedLayout
();
layout
->
addLayout
(
viewStack
,
1
,
0
,
1
,
-
1
);
model
=
_p_model
;
currentRootId
=
-
1
;
currentRootIndexId
=
-
1
;
currentRootIndexId
=
-
1
;
lastActivatedId
=
-
1
;
lastActivatedId
=
-
1
;
/* Saved Settings */
/* Saved Settings */
getSettings
()
->
beginGroup
(
"Playlist"
);
getSettings
()
->
beginGroup
(
"Playlist"
);
int
i_viewMode
=
getSettings
()
->
value
(
"view-mode"
,
TREE_VIEW
).
toInt
();
int
i_viewMode
=
getSettings
()
->
value
(
"view-mode"
,
TREE_VIEW
).
toInt
();
getSettings
()
->
endGroup
();
getSettings
()
->
endGroup
();
showView
(
i_viewMode
);
showView
(
i_viewMode
);
...
@@ -147,8 +139,7 @@ void StandardPLPanel::popupSelectColumn( QPoint pos )
...
@@ -147,8 +139,7 @@ void StandardPLPanel::popupSelectColumn( QPoint pos )
int
i
,
j
;
int
i
,
j
;
for
(
i
=
1
<<
1
,
j
=
1
;
i
<
COLUMN_END
;
i
<<=
1
,
j
++
)
for
(
i
=
1
<<
1
,
j
=
1
;
i
<
COLUMN_END
;
i
<<=
1
,
j
++
)
{
{
QAction
*
option
=
menu
.
addAction
(
QAction
*
option
=
menu
.
addAction
(
qfu
(
psz_column_title
(
i
)
)
);
qfu
(
psz_column_title
(
i
)
)
);
option
->
setCheckable
(
true
);
option
->
setCheckable
(
true
);
option
->
setChecked
(
!
treeView
->
isColumnHidden
(
j
)
);
option
->
setChecked
(
!
treeView
->
isColumnHidden
(
j
)
);
selectColumnsSigMapper
->
setMapping
(
option
,
j
);
selectColumnsSigMapper
->
setMapping
(
option
,
j
);
...
@@ -267,7 +258,6 @@ void StandardPLPanel::createListView()
...
@@ -267,7 +258,6 @@ void StandardPLPanel::createListView()
viewStack
->
addWidget
(
listView
);
viewStack
->
addWidget
(
listView
);
}
}
void
StandardPLPanel
::
createTreeView
()
void
StandardPLPanel
::
createTreeView
()
{
{
/* Create and configure the QTreeView */
/* Create and configure the QTreeView */
...
@@ -326,7 +316,6 @@ void StandardPLPanel::createTreeView()
...
@@ -326,7 +316,6 @@ void StandardPLPanel::createTreeView()
CONNECT
(
selectColumnsSigMapper
,
mapped
(
int
),
CONNECT
(
selectColumnsSigMapper
,
mapped
(
int
),
this
,
toggleColumnShown
(
int
)
);
this
,
toggleColumnShown
(
int
)
);
/* Finish the layout */
viewStack
->
addWidget
(
treeView
);
viewStack
->
addWidget
(
treeView
);
}
}
...
@@ -396,7 +385,6 @@ void StandardPLPanel::activate( const QModelIndex &index )
...
@@ -396,7 +385,6 @@ void StandardPLPanel::activate( const QModelIndex &index )
void
StandardPLPanel
::
browseInto
(
input_item_t
*
p_input
)
void
StandardPLPanel
::
browseInto
(
input_item_t
*
p_input
)
{
{
if
(
p_input
->
i_id
!=
lastActivatedId
)
return
;
if
(
p_input
->
i_id
!=
lastActivatedId
)
return
;
playlist_Lock
(
THEPL
);
playlist_Lock
(
THEPL
);
...
@@ -418,5 +406,4 @@ void StandardPLPanel::browseInto( input_item_t *p_input )
...
@@ -418,5 +406,4 @@ void StandardPLPanel::browseInto( input_item_t *p_input )
browseInto
(
index
);
browseInto
(
index
);
lastActivatedId
=
-
1
;
lastActivatedId
=
-
1
;
}
}
modules/gui/qt4/components/playlist/standardpanel.hpp
View file @
6950dc05
...
@@ -62,7 +62,7 @@ class StandardPLPanel: public QWidget
...
@@ -62,7 +62,7 @@ class StandardPLPanel: public QWidget
public:
public:
StandardPLPanel
(
PlaylistWidget
*
,
intf_thread_t
*
,
StandardPLPanel
(
PlaylistWidget
*
,
intf_thread_t
*
,
playlist_
t
*
,
playlist_
item_t
*
,
PLSelector
*
,
PLModel
*
);
playlist_item_t
*
,
PLSelector
*
,
PLModel
*
);
virtual
~
StandardPLPanel
();
virtual
~
StandardPLPanel
();
enum
{
TREE_VIEW
=
0
,
enum
{
TREE_VIEW
=
0
,
...
@@ -86,7 +86,6 @@ private:
...
@@ -86,7 +86,6 @@ private:
QStackedLayout
*
viewStack
;
QStackedLayout
*
viewStack
;
int
currentRootId
;
QSignalMapper
*
selectColumnsSigMapper
;
QSignalMapper
*
selectColumnsSigMapper
;
int
lastActivatedId
;
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