Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f025433b
Commit
f025433b
authored
Aug 21, 2008
by
Jean-Philippe Andre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: Implement Stream/Save in playlist popup menu
parent
6bd699cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
2 deletions
+41
-2
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+38
-2
modules/gui/qt4/components/playlist/playlist_model.hpp
modules/gui/qt4/components/playlist/playlist_model.hpp
+3
-0
No files found.
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
f025433b
...
...
@@ -26,6 +26,7 @@
#endif
#include "qt4.hpp"
#include "dialogs_provider.hpp"
#include "components/playlist/playlist_model.hpp"
#include "dialogs/mediainfo.hpp"
#include <vlc_intf_strings.h>
...
...
@@ -396,6 +397,35 @@ int PLModel::rowCount( const QModelIndex &parent ) const
return
parentItem
->
childCount
();
}
QStringList
PLModel
::
selectedURIs
()
{
QStringList
lst
;
for
(
int
i
=
0
;
i
<
current_selection
.
size
();
i
++
)
{
PL_LOCK
;
PLItem
*
item
=
static_cast
<
PLItem
*>
(
current_selection
[
i
].
internalPointer
());
if
(
!
item
)
continue
;
input_item_t
*
p_item
=
input_item_GetById
(
p_playlist
,
item
->
i_input_id
);
if
(
!
p_item
)
continue
;
char
*
psz
=
input_item_GetURI
(
p_item
);
if
(
!
psz
)
continue
;
else
{
lst
.
append
(
QString
(
psz
)
);
free
(
psz
);
}
PL_UNLOCK
;
}
return
lst
;
}
/************************* General playlist status ***********************/
bool
PLModel
::
hasRandom
()
...
...
@@ -862,6 +892,7 @@ void PLModel::popupDel()
{
doDelete
(
current_selection
);
}
void
PLModel
::
popupPlay
()
{
PL_LOCK
;
...
...
@@ -888,12 +919,17 @@ void PLModel::popupInfo()
void
PLModel
::
popupStream
()
{
msg_Err
(
p_playlist
,
"Stream not implemented"
);
QStringList
mrls
=
selectedURIs
();
if
(
!
mrls
.
isEmpty
()
)
THEDP
->
streamingDialog
(
NULL
,
mrls
[
0
],
false
);
}
void
PLModel
::
popupSave
()
{
msg_Err
(
p_playlist
,
"Save not implemented"
);
QStringList
mrls
=
selectedURIs
();
if
(
!
mrls
.
isEmpty
()
)
THEDP
->
streamingDialog
(
NULL
,
mrls
[
0
],
true
);
}
#include <QUrl>
...
...
modules/gui/qt4/components/playlist/playlist_model.hpp
View file @
f025433b
...
...
@@ -96,6 +96,9 @@ public:
int
rowCount
(
const
QModelIndex
&
parent
=
QModelIndex
()
)
const
;
int
columnCount
(
const
QModelIndex
&
parent
=
QModelIndex
()
)
const
;
/* Get current selection */
QStringList
selectedURIs
();
void
rebuild
();
void
rebuild
(
playlist_item_t
*
);
bool
hasRandom
();
bool
hasLoop
();
bool
hasRepeat
();
...
...
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