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
48f7e0b2
Commit
48f7e0b2
authored
Sep 23, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Very very preliminary Qt implementation of album art
parent
2b7997ac
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
3 deletions
+40
-3
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+9
-1
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+3
-0
modules/gui/qt4/components/playlist/panels.hpp
modules/gui/qt4/components/playlist/panels.hpp
+4
-1
modules/gui/qt4/components/playlist/selector.hpp
modules/gui/qt4/components/playlist/selector.hpp
+4
-1
modules/gui/qt4/playlist_model.cpp
modules/gui/qt4/playlist_model.cpp
+16
-0
modules/gui/qt4/playlist_model.hpp
modules/gui/qt4/playlist_model.hpp
+4
-0
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
48f7e0b2
...
...
@@ -287,7 +287,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_intf ) :
selector
->
setMaximumWidth
(
130
);
left
->
addWidget
(
selector
);
QLabel
*
art
=
new
QLabel
(
""
);
art
=
new
QLabel
(
""
);
art
->
setMaximumHeight
(
128
);
art
->
setMaximumWidth
(
128
);
art
->
setScaledContents
(
true
);
...
...
@@ -302,6 +302,8 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_intf ) :
CONNECT
(
selector
,
activated
(
int
),
rightPanel
,
setRoot
(
int
)
);
CONNECT
(
qobject_cast
<
StandardPLPanel
*>
(
rightPanel
)
->
model
,
artSet
(
QString
)
,
this
,
setArt
(
QString
)
);
connect
(
selector
,
SIGNAL
(
activated
(
int
)),
this
,
SIGNAL
(
rootChanged
(
int
)
)
);
emit
rootChanged
(
p_root
->
i_id
);
...
...
@@ -312,6 +314,12 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_intf ) :
setLayout
(
layout
);
}
void
PlaylistWidget
::
setArt
(
QString
url
)
{
fprintf
(
stderr
,
"************** YEAH ! *************
\n
"
);
art
->
setPixmap
(
QPixmap
(
url
)
);
}
PlaylistWidget
::~
PlaylistWidget
()
{
}
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
48f7e0b2
...
...
@@ -136,6 +136,9 @@ private:
PLSelector
*
selector
;
PLPanel
*
rightPanel
;
QPushButton
*
addButton
;
QLabel
*
art
;
private
slots
:
void
setArt
(
QString
);
signals:
void
rootChanged
(
int
);
};
...
...
modules/gui/qt4/components/playlist/panels.hpp
View file @
48f7e0b2
...
...
@@ -55,6 +55,7 @@ public slots:
virtual
void
setRoot
(
int
)
=
0
;
};
class
PlaylistWidget
;
class
StandardPLPanel
:
public
PLPanel
{
...
...
@@ -65,8 +66,10 @@ public:
virtual
~
StandardPLPanel
();
protected:
virtual
void
keyPressEvent
(
QKeyEvent
*
e
);
pr
ivate
:
pr
otected
:
PLModel
*
model
;
friend
class
PlaylistWidget
;
private:
QTreeView
*
view
;
QPushButton
*
repeatButton
,
*
randomButton
,
*
addButton
;
ClickLineEdit
*
searchLine
;
...
...
modules/gui/qt4/components/playlist/selector.hpp
View file @
48f7e0b2
...
...
@@ -30,6 +30,7 @@
#include <playlist_model.hpp>
class
QTreeView
;
class
PlaylistWidget
;
class
PLSelector
:
public
QWidget
{
...
...
@@ -37,9 +38,11 @@ class PLSelector: public QWidget
public:
PLSelector
(
QWidget
*
p
,
intf_thread_t
*
_p_intf
,
playlist_t
*
);
virtual
~
PLSelector
();
protected:
PLModel
*
model
;
friend
class
PlaylistWidget
;
private:
intf_thread_t
*
p_intf
;
PLModel
*
model
;
QTreeView
*
view
;
private
slots
:
void
setSource
(
const
QModelIndex
&
);
...
...
modules/gui/qt4/playlist_model.cpp
View file @
48f7e0b2
...
...
@@ -132,6 +132,15 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
strings
[
2
]
=
QString
(
psz_duration
);
type
=
p_item
->
p_input
->
i_type
;
current
=
iscurrent
;
fprintf
(
stderr
,
"Updating current %i
\n
"
);
fprintf
(
stderr
,
"Meta %p art %s
\n
"
,
p_item
->
p_input
->
p_meta
,
p_item
->
p_input
->
p_meta
?
p_item
->
p_input
->
p_meta
->
psz_arturl
:
"non"
);
if
(
current
&&
p_item
->
p_input
->
p_meta
&&
p_item
->
p_input
->
p_meta
->
psz_arturl
&&
!
strncmp
(
p_item
->
p_input
->
p_meta
->
psz_arturl
,
"file://"
,
7
)
)
{
fprintf
(
stderr
,
"Have art %s
\n
"
,
p_item
->
p_input
->
p_meta
->
psz_arturl
);
model
->
sendArt
(
qfu
(
p_item
->
p_input
->
p_meta
->
psz_arturl
)
);
}
}
/*************************************************************************
...
...
@@ -593,6 +602,13 @@ void PLModel::UpdateTreeItem( playlist_item_t *p_item, PLItem *item,
/************************* Actions ******************************/
void
PLModel
::
sendArt
(
QString
url
)
{
QString
arturl
=
url
.
replace
(
"file://"
,
QString
(
""
)
);
fprintf
(
stderr
,
"send %s
\n
"
,
qta
(
arturl
)
);
emit
artSet
(
arturl
);
}
/**
* Deletion, here we have to do a ugly slow hack as we retrieve the full
* list of indexes to delete at once: when we delete a node and all of
...
...
modules/gui/qt4/playlist_model.hpp
View file @
48f7e0b2
...
...
@@ -121,6 +121,8 @@ public:
void
doDelete
(
QModelIndexList
selected
);
void
search
(
QString
search
);
void
sort
(
int
column
,
Qt
::
SortOrder
order
);
void
sendArt
(
QString
url
);
private:
void
addCallbacks
();
void
delCallbacks
();
...
...
@@ -159,6 +161,8 @@ private:
PLItem
*
p_cached_item_bi
;
int
i_cached_id
;
int
i_cached_input_id
;
signals:
void
artSet
(
QString
);
public
slots
:
void
activateItem
(
const
QModelIndex
&
index
);
void
activateItem
(
playlist_item_t
*
p_item
);
...
...
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