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
3ac61394
Commit
3ac61394
authored
Jun 13, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Support for Media Art in the Media Info dialog and various fixed on that dialog.
parent
b271b9ff
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
29 deletions
+59
-29
modules/gui/qt4/components/infopanels.cpp
modules/gui/qt4/components/infopanels.cpp
+50
-24
modules/gui/qt4/components/infopanels.hpp
modules/gui/qt4/components/infopanels.hpp
+4
-0
modules/gui/qt4/dialogs/mediainfo.cpp
modules/gui/qt4/dialogs/mediainfo.cpp
+5
-5
No files found.
modules/gui/qt4/components/infopanels.cpp
View file @
3ac61394
...
...
@@ -47,39 +47,36 @@ MetaPanel::MetaPanel( QWidget *parent, intf_thread_t *_p_intf ) :
{
int
line
=
0
;
QGridLayout
*
l
=
new
QGridLayout
(
this
);
l
->
setColumnStretch
(
2
,
5
);
l
->
setColumnStretch
(
5
,
3
);
#define ADD_META( string, widget ) { \
l->addWidget( new QLabel( qtr( string ) + " :" ), line, 0 ); \
widget = new QLineEdit; \
l->addWidget( widget, line, 1, 1,
7
); \
l->addWidget( widget, line, 1, 1,
9
); \
line++; }
ADD_META
(
VLC_META_TITLE
,
title_text
);
/* OK */
ADD_META
(
VLC_META_ARTIST
,
artist_text
);
/* OK */
ADD_META
(
VLC_META_GENRE
,
genre_text
);
/* FIXME List id3genres.h is not
includable yet ? */
/* Album Name */
l
->
addWidget
(
new
QLabel
(
qfu
(
VLC_META_COLLECTION
)
+
" :"
),
line
,
0
);
collection_text
=
new
QLineEdit
;
l
->
addWidget
(
collection_text
,
line
,
1
,
1
,
5
);
l
->
addWidget
(
new
QLabel
(
qfu
(
VLC_META_DATE
)
+
" :"
),
line
,
6
);
ADD_META
(
VLC_META_COLLECTION
,
collection_text
);
/* OK */
/* Genre Name */
/* FIXME List id3genres.h is not includable yet ? */
genre_text
=
new
QLineEdit
;
l
->
addWidget
(
new
QLabel
(
qtr
(
VLC_META_GENRE
)
+
" :"
),
line
,
0
);
l
->
addWidget
(
genre_text
,
line
,
1
,
1
,
6
);
/* Date (Should be in years) */
date_text
=
new
QSpinBox
;
setSpinBounds
(
date_text
);
l
->
addWidget
(
date_text
,
line
,
7
);
l
->
addWidget
(
new
QLabel
(
qfu
(
VLC_META_DATE
)
+
" :"
),
line
,
7
);
l
->
addWidget
(
date_text
,
line
,
8
,
1
,
2
);
line
++
;
/* Number and Rating */
l
->
addWidget
(
new
QLabel
(
qfu
(
_
(
"Track number/Position"
)
)
+
" :"
),
line
,
0
);
seqnum_text
=
new
QSpinBox
;
setSpinBounds
(
seqnum_text
);
l
->
addWidget
(
seqnum_text
,
line
,
1
,
1
,
3
);
l
->
addWidget
(
seqnum_text
,
line
,
1
,
1
,
4
);
l
->
addWidget
(
new
QLabel
(
qfu
(
VLC_META_RATING
)
+
" :"
),
line
,
4
);
l
->
addWidget
(
new
QLabel
(
qfu
(
VLC_META_RATING
)
+
" :"
),
line
,
5
);
rating_text
=
new
QSpinBox
;
setSpinBounds
(
rating_text
)
;
l
->
addWidget
(
rating_text
,
line
,
5
,
1
,
3
);
l
->
addWidget
(
rating_text
,
line
,
6
,
1
,
4
);
line
++
;
ADD_META
(
VLC_META_NOW_PLAYING
,
nowplaying_text
);
...
...
@@ -87,23 +84,43 @@ MetaPanel::MetaPanel( QWidget *parent, intf_thread_t *_p_intf ) :
/* Language and settings */
l
->
addWidget
(
new
QLabel
(
qfu
(
VLC_META_LANGUAGE
)
+
" :"
),
line
,
0
);
language_text
=
new
QLineEdit
;
l
->
addWidget
(
language_text
,
line
,
1
,
1
,
3
);
l
->
addWidget
(
new
QLabel
(
qfu
(
VLC_META_SETTING
)
+
" :"
),
line
,
4
);
l
->
addWidget
(
language_text
,
line
,
1
,
1
,
4
);
l
->
addWidget
(
new
QLabel
(
qfu
(
VLC_META_SETTING
)
+
" :"
),
line
,
5
);
setting_text
=
new
QLineEdit
;
l
->
addWidget
(
setting_text
,
line
,
5
,
1
,
3
);
l
->
addWidget
(
setting_text
,
line
,
6
,
1
,
4
);
line
++
;
ADD_META
(
VLC_META_COPYRIGHT
,
copyright_text
);
ADD_META
(
VLC_META_PUBLISHER
,
publisher_text
);
/* ART_URL */
// ADD_META( VLC_META_URL, setting_text );
art_cover
=
new
QLabel
(
""
);
art_cover
->
setMinimumHeight
(
128
);
art_cover
->
setMinimumWidth
(
128
);
art_cover
->
setMaximumHeight
(
128
);
art_cover
->
setMaximumWidth
(
128
);
art_cover
->
setScaledContents
(
true
);
art_cover
->
setPixmap
(
QPixmap
(
":/noart.png"
)
);
l
->
addWidget
(
art_cover
,
line
,
8
,
4
,
2
);
ADD_META
(
VLC_META_ENCODED_BY
,
publisher_text
);
ADD_META
(
VLC_META_DESCRIPTION
,
description_text
);
// Comment Two lines?
#define ADD_META_B( string, widget ) { \
l->addWidget( new QLabel( qtr( string ) + " :" ), line, 0 ); \
widget = new QLineEdit; \
l->addWidget( widget, line, 1, 1, 7 ); \
line++; }
ADD_META_B
(
VLC_META_COPYRIGHT
,
copyright_text
);
ADD_META_B
(
VLC_META_PUBLISHER
,
publisher_text
);
ADD_META_B
(
VLC_META_ENCODED_BY
,
publisher_text
);
ADD_META_B
(
VLC_META_DESCRIPTION
,
description_text
);
// Comment Two lines?
/* ADD_META( TRACKID) DO NOT SHOW it */
/* ADD_URI - DO not show it, done outside */
/* ART_URL */
// ADD_META( VLC_META_URL, setting_text );
#undef ADD_META
#undef ADD_META_B
// CONNECT( model, artSet( QString ) , this, setArt( QString ) );
}
MetaPanel
::~
MetaPanel
()
...
...
@@ -158,6 +175,15 @@ void MetaPanel::update( input_item_t *p_item )
#undef UPDATE_META
}
void
MetaPanel
::
setArt
(
QString
artUrl
)
{
msg_Dbg
(
p_intf
,
"Trying to update art"
);
if
(
artUrl
.
isNull
()
)
art_cover
->
setPixmap
(
QPixmap
(
":/noart.png"
)
);
else
art_cover
->
setPixmap
(
QPixmap
(
artUrl
)
);
}
void
MetaPanel
::
clear
(){}
ExtraMetaPanel
::
ExtraMetaPanel
(
QWidget
*
parent
,
intf_thread_t
*
_p_intf
)
:
...
...
modules/gui/qt4/components/infopanels.hpp
View file @
3ac61394
...
...
@@ -45,6 +45,7 @@ class QTreeWidgetItem;
class
QTreeView
;
class
QSpinBox
;
class
QLineEdit
;
class
QLabel
;
class
MetaPanel
:
public
QWidget
{
...
...
@@ -68,10 +69,13 @@ private:
QLineEdit
*
language_text
;
QLineEdit
*
nowplaying_text
;
QLineEdit
*
publisher_text
;
QLabel
*
art_cover
;
public
slots
:
void
update
(
input_item_t
*
);
void
clear
();
private
slots
:
void
setArt
(
QString
);
signals:
void
uriSet
(
QString
);
};
...
...
modules/gui/qt4/dialogs/mediainfo.cpp
View file @
3ac61394
...
...
@@ -47,7 +47,7 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf, bool _mainInput,
p_input
=
NULL
;
setWindowTitle
(
qtr
(
"Media information"
)
);
resize
(
6
00
,
450
);
resize
(
7
00
,
450
);
QGridLayout
*
layout
=
new
QGridLayout
(
this
);
...
...
@@ -68,12 +68,12 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf, bool _mainInput,
closeButton
->
setDefault
(
true
);
uriLine
=
new
QLineEdit
;
QLabel
*
uriLabel
=
new
QLabel
(
qtr
(
"Location"
)
);
QLabel
*
uriLabel
=
new
QLabel
(
qtr
(
"Location
:
"
)
);
layout
->
addWidget
(
IT
,
0
,
0
,
1
,
3
);
layout
->
addWidget
(
closeButton
,
2
,
2
);
layout
->
addWidget
(
uriLine
,
1
,
1
,
1
,
2
);
layout
->
addWidget
(
IT
,
0
,
0
,
1
,
7
);
layout
->
addWidget
(
closeButton
,
2
,
6
);
layout
->
addWidget
(
uriLabel
,
1
,
0
,
1
,
1
);
layout
->
addWidget
(
uriLine
,
1
,
1
,
1
,
6
);
BUTTONACT
(
closeButton
,
close
()
);
CONNECT
(
MP
,
uriSet
(
QString
),
uriLine
,
setText
(
QString
)
);
...
...
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