Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
7f2ab0ac
Commit
7f2ab0ac
authored
Apr 25, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt, redesign of the media info dialog
Close #2915, #2831, #2898
parent
3a78a00c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
66 deletions
+69
-66
modules/gui/qt4/components/info_panels.cpp
modules/gui/qt4/components/info_panels.cpp
+62
-63
modules/gui/qt4/components/info_panels.hpp
modules/gui/qt4/components/info_panels.hpp
+3
-1
modules/gui/qt4/dialogs/mediainfo.cpp
modules/gui/qt4/dialogs/mediainfo.cpp
+4
-2
No files found.
modules/gui/qt4/components/info_panels.cpp
View file @
7f2ab0ac
...
...
@@ -60,100 +60,100 @@ MetaPanel::MetaPanel( QWidget *parent,
:
QWidget
(
parent
),
p_intf
(
_p_intf
)
{
QGridLayout
*
metaLayout
=
new
QGridLayout
(
this
);
metaLayout
->
setVerticalSpacing
(
12
);
metaLayout
->
setVerticalSpacing
(
0
);
QFont
smallFont
=
QApplication
::
font
();
smallFont
.
setPointSize
(
smallFont
.
pointSize
()
-
2
);
smallFont
.
setBold
(
true
);
int
line
=
0
;
/* Counter for GridLayout */
p_input
=
NULL
;
QLabel
*
label
;
#define ADD_META( string, widget ) { \
metaLayout->addWidget( new QLabel( qtr( string ) + " :" ), line, 0 ); \
#define ADD_META( string, widget, col, colspan ) { \
label = new QLabel( qtr( string ) ); label->setFont( smallFont ); \
label->setContentsMargins( 3, 2, 0, 0 ); \
metaLayout->addWidget( label, line++, col, 1, colspan ); \
widget = new QLineEdit; \
metaLayout->addWidget( widget, line, 1, 1, 9 ); \
line++; }
metaLayout->addWidget( widget, line, col, 1, colspan ); \
CONNECT( widget, textEdited( QString ), this, enterEditMode() ); \
}
/* Title, artist and album*/
ADD_META
(
VLC_META_TITLE
,
title_text
);
/* OK */
ADD_META
(
VLC_META_ARTIST
,
artist_text
);
/* OK */
ADD_META
(
VLC_META_ALBUM
,
collection_text
);
/* OK */
ADD_META
(
VLC_META_TITLE
,
title_text
,
0
,
10
);
line
++
;
ADD_META
(
VLC_META_ARTIST
,
artist_text
,
0
,
10
);
line
++
;
ADD_META
(
VLC_META_ALBUM
,
collection_text
,
0
,
7
);
/* Date */
label
=
new
QLabel
(
qtr
(
VLC_META_DATE
)
);
label
->
setFont
(
smallFont
);
label
->
setContentsMargins
(
3
,
2
,
0
,
0
);
metaLayout
->
addWidget
(
label
,
line
-
1
,
7
,
1
,
2
);
/* Date (Should be in years) */
date_text
=
new
QLineEdit
;
date_text
->
setAlignment
(
Qt
::
AlignRight
);
date_text
->
setInputMask
(
"0000"
);
date_text
->
setMaximumWidth
(
128
);
metaLayout
->
addWidget
(
date_text
,
line
,
7
,
1
,
-
1
);
line
++
;
/* Genre Name */
/* TODO List id3genres.h is not includable yet ? */
genre_text
=
new
QLineEdit
;
metaLayout
->
addWidget
(
new
QLabel
(
qtr
(
VLC_META_GENRE
)
+
" :"
),
line
,
0
);
metaLayout
->
addWidget
(
genre_text
,
line
,
1
,
1
,
3
);
ADD_META
(
VLC_META_GENRE
,
genre_text
,
0
,
7
);
/* Number - on the same line */
metaLayout
->
addWidget
(
new
QLabel
(
qtr
(
VLC_META_TRACK_NUMBER
)
+
" :"
),
line
,
5
,
1
,
2
);
label
=
new
QLabel
(
qtr
(
VLC_META_TRACK_NUMBER
)
);
label
->
setFont
(
smallFont
);
label
->
setContentsMargins
(
3
,
2
,
0
,
0
);
metaLayout
->
addWidget
(
label
,
line
-
1
,
7
,
1
,
3
);
seqnum_text
=
new
QLineEdit
;
seqnum_text
->
setInputMask
(
"0000"
);
seqnum_text
->
setAlignment
(
Qt
::
AlignRight
);
metaLayout
->
addWidget
(
seqnum_text
,
line
,
7
,
1
,
3
);
line
++
;
seqnum_text
->
setMaximumWidth
(
60
);
metaLayout
->
addWidget
(
seqnum_text
,
line
,
7
,
1
,
1
);
/* Date (Should be in years) */
date_text
=
new
QLineEdit
;
date_text
->
setInputMask
(
"0000"
);
date_text
->
setAlignment
(
Qt
::
AlignRight
);
metaLayout
->
addWidget
(
new
QLabel
(
qtr
(
VLC_META_DATE
)
+
" :"
),
line
,
0
);
metaLayout
->
addWidget
(
date_text
,
line
,
1
,
1
,
3
);
label
=
new
QLabel
(
"/"
);
label
->
setFont
(
smallFont
);
metaLayout
->
addWidget
(
label
,
line
,
8
,
1
,
1
);
seqtot_text
=
new
QLineEdit
;
seqtot_text
->
setMaximumWidth
(
60
);
metaLayout
->
addWidget
(
seqtot_text
,
line
,
9
,
1
,
1
);
line
++
;
/* Rating - on the same line */
/*
metaLayout->addWidget( new QLabel( qtr( VLC_META_RATING )
+ " :"
), line, 4, 1, 2 );
metaLayout->addWidget( new QLabel( qtr( VLC_META_RATING ) ), line, 4, 1, 2 );
rating_text = new QSpinBox; setSpinBounds( rating_text );
metaLayout->addWidget( rating_text, line, 6, 1, 1 );
*/
/* Now Playing - Useful for live feeds (HTTP, DVB, ETC...) */
ADD_META
(
VLC_META_NOW_PLAYING
,
nowplaying_text
,
0
,
7
);
nowplaying_text
->
setReadOnly
(
true
);
line
--
;
/* Language on the same line */
metaLayout
->
addWidget
(
new
QLabel
(
qfu
(
VLC_META_LANGUAGE
)
+
" :"
),
line
,
5
,
1
,
2
);
language_text
=
new
QLineEdit
;
language_text
->
setReadOnly
(
true
);
metaLayout
->
addWidget
(
language_text
,
line
,
7
,
1
,
3
);
line
++
;
ADD_META
(
VLC_META_LANGUAGE
,
language_text
,
7
,
-
1
);
line
++
;
/* ART_URL */
art_cover
=
new
CoverArtLabel
(
this
,
p_intf
);
metaLayout
->
addWidget
(
art_cover
,
line
,
8
,
4
,
2
,
Qt
::
AlignRigh
t
);
metaLayout
->
addWidget
(
art_cover
,
line
+
1
,
7
,
6
,
3
,
Qt
::
AlignLef
t
);
/* Settings is unused */
/* l->addWidget( new QLabel( qtr( VLC_META_SETTING ) + " :" ), line, 5 )
;
setting_text = new QLineEdit
;
l->addWidget( setting_text, line, 6, 1, 4 ); */
ADD_META
(
VLC_META_PUBLISHER
,
publisher_text
,
0
,
7
);
line
++
;
ADD_META
(
VLC_META_COPYRIGHT
,
copyright_text
,
0
,
7
);
line
++
;
ADD_META
(
VLC_META_ENCODED_BY
,
encodedby_text
,
0
,
7
);
line
++
;
ADD_META
(
N_
(
"Comments"
),
description_text
,
0
,
7
);
line
++
;
/* Less used metadata */
#define ADD_META_2( string, widget ) { \
metaLayout->addWidget( new QLabel( qtr( string ) + " :" ), line, 0 ); \
widget = new QLineEdit; \
metaLayout->addWidget( widget, line, 1, 1, 7 ); \
line++; }
/* Now Playing - Useful for live feeds (HTTP, DVB, ETC...) */
ADD_META_2
(
VLC_META_NOW_PLAYING
,
nowplaying_text
);
nowplaying_text
->
setReadOnly
(
true
);
ADD_META_2
(
VLC_META_PUBLISHER
,
publisher_text
);
ADD_META_2
(
VLC_META_COPYRIGHT
,
copyright_text
);
ADD_META_2
(
N_
(
"Comments"
),
description_text
);
/* useless metadata */
/* VLC_META_SETTING: Useless */
/* ADD_META( TRACKID ) Useless ? */
/* ADD_URI - Do not show it, done outside */
//ADD_META_2( VLC_META_ENCODED_BY, encodedby_text );
/* ADD_META( TRACKID ) Useless ? */
/* ADD_URI - DO not show it, done outside */
metaLayout
->
setColumnStretch
(
1
,
2
);
metaLayout
->
setColumnStretch
(
1
,
20
);
metaLayout
->
setColumnMinimumWidth
(
1
,
80
);
metaLayout
->
setRowStretch
(
line
,
10
);
#undef ADD_META
#undef ADD_META_2
CONNECT
(
title_text
,
textEdited
(
QString
),
this
,
enterEditMode
()
);
CONNECT
(
artist_text
,
textEdited
(
QString
),
this
,
enterEditMode
()
);
CONNECT
(
collection_text
,
textEdited
(
QString
),
this
,
enterEditMode
()
);
CONNECT
(
genre_text
,
textEdited
(
QString
),
this
,
enterEditMode
()
);
CONNECT
(
seqnum_text
,
textEdited
(
QString
),
this
,
enterEditMode
()
);
CONNECT
(
seqtot_text
,
textEdited
(
QString
),
this
,
enterEditMode
()
);
CONNECT
(
date_text
,
textEdited
(
QString
),
this
,
enterEditMode
()
);
CONNECT
(
description_text
,
textEdited
(
QString
),
this
,
enterEditMode
()
);
/* CONNECT( rating_text, valueChanged( QString ), this, enterEditMode( QString ) );*/
/* We are not yet in Edit Mode */
...
...
@@ -222,12 +222,11 @@ void MetaPanel::update( input_item_t *p_item )
UPDATE_META
(
Language
,
language_text
);
UPDATE_META
(
NowPlaying
,
nowplaying_text
);
UPDATE_META
(
Publisher
,
publisher_text
);
// UPDATE_META( Setting, setting_text );
//FIXME this is wrong if has Publisher and EncodedBy fields
UPDATE_META
(
EncodedBy
,
publisher_text
);
UPDATE_META
(
EncodedBy
,
encodedby_text
);
UPDATE_META
(
Date
,
date_text
);
UPDATE_META
(
TrackNum
,
seqnum_text
);
// UPDATE_META( Setting, setting_text );
// UPDATE_META_INT( Rating, rating_text );
#undef UPDATE_META_INT
...
...
modules/gui/qt4/components/info_panels.hpp
View file @
7f2ab0ac
...
...
@@ -71,6 +71,8 @@ private:
QLineEdit
*
copyright_text
;
QLineEdit
*
collection_text
;
QLineEdit
*
seqnum_text
;
QLineEdit
*
seqtot_text
;
QLineEdit
*
description_text
;
// QSpinBox *rating_text;
QLineEdit
*
date_text
;
...
...
@@ -78,7 +80,7 @@ private:
QLineEdit
*
language_text
;
QLineEdit
*
nowplaying_text
;
QLineEdit
*
publisher_text
;
//
QLineEdit *encodedby_text;
QLineEdit
*
encodedby_text
;
CoverArtLabel
*
art_cover
;
public
slots
:
...
...
modules/gui/qt4/dialogs/mediainfo.cpp
View file @
7f2ab0ac
...
...
@@ -51,15 +51,17 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
setWindowTitle
(
qtr
(
"Media Information"
)
);
setWindowRole
(
"vlc-media-info"
);
setWindowFlags
(
Qt
::
Window
|
Qt
::
CustomizeWindowHint
|
Qt
::
WindowCloseButtonHint
);
/* TabWidgets and Tabs creation */
infoTabW
=
new
QTabWidget
;
MP
=
new
MetaPanel
(
infoTabW
,
p_intf
);
infoTabW
->
addTab
(
MP
,
qtr
(
"&General"
)
);
EMP
=
new
ExtraMetaPanel
(
infoTabW
,
p_intf
);
infoTabW
->
addTab
(
EMP
,
qtr
(
"&
Extra
Metadata"
)
);
infoTabW
->
addTab
(
EMP
,
qtr
(
"&Metadata"
)
);
IP
=
new
InfoPanel
(
infoTabW
,
p_intf
);
infoTabW
->
addTab
(
IP
,
qtr
(
"&Codec
Details
"
)
);
infoTabW
->
addTab
(
IP
,
qtr
(
"&Codec"
)
);
if
(
isMainInputInfo
)
{
ISP
=
new
InputStatsPanel
(
infoTabW
,
p_intf
);
...
...
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