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
a3b7bce4
Commit
a3b7bce4
authored
Apr 28, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt, playlist: simplifications
parent
7ec2e3f0
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
62 deletions
+50
-62
modules/gui/qt4/components/playlist/playlist_item.cpp
modules/gui/qt4/components/playlist/playlist_item.cpp
+6
-4
modules/gui/qt4/components/playlist/playlist_item.hpp
modules/gui/qt4/components/playlist/playlist_item.hpp
+4
-7
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+38
-48
modules/gui/qt4/components/playlist/playlist_model.hpp
modules/gui/qt4/components/playlist/playlist_model.hpp
+2
-3
No files found.
modules/gui/qt4/components/playlist/playlist_item.cpp
View file @
a3b7bce4
...
...
@@ -30,7 +30,6 @@
#include "qt4.hpp"
#include "playlist_item.hpp"
#include <vlc_intf_strings.h>
#include "sorting.h"
...
...
@@ -45,14 +44,12 @@
PLItem have a parent, and id and a input Id
*/
void
PLItem
::
init
(
playlist_item_t
*
_playlist_item
,
PLItem
*
parent
)
{
parentItem
=
parent
;
/* Can be NULL, but only for the rootItem */
i_id
=
_playlist_item
->
i_id
;
/* Playlist item specific id */
p_input
=
_playlist_item
->
p_input
;
vlc_gc_incref
(
p_input
);
}
/*
...
...
@@ -79,11 +76,16 @@ PLItem::~PLItem()
/* So far signal is always true.
Using signal false would not call PLModel... Why ?
*/
void
PLItem
::
insertChild
(
PLItem
*
item
,
int
i_pos
,
bool
signal
)
inline
void
PLItem
::
insertChild
(
PLItem
*
item
,
int
i_pos
,
bool
signal
)
{
children
.
insert
(
i_pos
,
item
);
}
inline
void
PLItem
::
appendChild
(
PLItem
*
item
,
bool
signal
)
{
children
.
insert
(
children
.
count
(),
item
);
}
void
PLItem
::
removeChild
(
PLItem
*
item
)
{
children
.
removeOne
(
item
);
...
...
modules/gui/qt4/components/playlist/playlist_item.hpp
View file @
a3b7bce4
...
...
@@ -35,16 +35,12 @@ class PLItem
friend
class
PLModel
;
public:
PLItem
(
playlist_item_t
*
,
PLItem
*
parent
);
PLItem
(
playlist_item_t
*
);
~
PLItem
();
int
row
()
const
;
void
insertChild
(
PLItem
*
,
int
p
,
bool
signal
=
true
);
void
appendChild
(
PLItem
*
item
,
bool
signal
=
true
)
{
children
.
insert
(
children
.
count
(),
item
);
};
void
insertChild
(
PLItem
*
,
int
pos
,
bool
signal
=
true
);
void
appendChild
(
PLItem
*
item
,
bool
signal
=
true
);
void
removeChild
(
PLItem
*
);
void
removeChildren
();
void
takeChildAt
(
int
);
...
...
@@ -59,12 +55,13 @@ public:
protected:
QList
<
PLItem
*>
children
;
PLItem
*
parentItem
;
int
i_id
;
input_item_t
*
p_input
;
private:
PLItem
(
playlist_item_t
*
);
void
init
(
playlist_item_t
*
,
PLItem
*
);
PLItem
*
parentItem
;
};
#endif
...
...
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
a3b7bce4
This diff is collapsed.
Click to expand it.
modules/gui/qt4/components/playlist/playlist_model.hpp
View file @
a3b7bce4
...
...
@@ -92,8 +92,7 @@ public:
void
search
(
const
QString
&
search_text
,
const
QModelIndex
&
root
,
bool
b_recursive
);
void
sort
(
const
int
column
,
Qt
::
SortOrder
order
);
void
sort
(
const
int
i_root_id
,
const
int
column
,
Qt
::
SortOrder
order
);
void
rebuild
();
void
rebuild
(
playlist_item_t
*
);
void
rebuild
(
playlist_item_t
*
p
=
NULL
);
inline
PLItem
*
getItem
(
QModelIndex
index
)
const
{
...
...
@@ -174,7 +173,7 @@ class PlMimeData : public QMimeData
Q_OBJECT
public:
PlMimeData
()
;
PlMimeData
()
{}
~
PlMimeData
();
void
appendItem
(
input_item_t
*
p_item
);
QList
<
input_item_t
*>
inputItems
()
const
;
...
...
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