Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
ca7f6e8f
Commit
ca7f6e8f
authored
Jun 02, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Info Panels: Rewrite Meta Data and Dionoea's feature request. (1)
parent
298291bb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
215 additions
and
76 deletions
+215
-76
modules/gui/qt4/components/infopanels.cpp
modules/gui/qt4/components/infopanels.cpp
+172
-59
modules/gui/qt4/components/infopanels.hpp
modules/gui/qt4/components/infopanels.hpp
+41
-15
modules/gui/qt4/dialogs/mediainfo.cpp
modules/gui/qt4/dialogs/mediainfo.cpp
+2
-2
No files found.
modules/gui/qt4/components/infopanels.cpp
View file @
ca7f6e8f
...
@@ -22,15 +22,19 @@
...
@@ -22,15 +22,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
*****************************************************************************/
#include "components/infopanels.hpp"
#include "qt4.hpp"
#include "qt4.hpp"
#include "components/infopanels.hpp"
#include <QTreeWidget>
#include <QTreeWidget>
#include <QListView>
#include <QPushButton>
#include <QPushButton>
#include <QHeaderView>
#include <QHeaderView>
#include <QList>
#include <QList>
#include <QGridLayout>
#include <QGridLayout>
#include <QLineEdit>
#include <QLabel>
#include <QSpinBox>
#include <QTabWidget>
/************************************************************************
/************************************************************************
* Single panels
* Single panels
...
@@ -43,25 +47,63 @@ MetaPanel::MetaPanel( QWidget *parent, intf_thread_t *_p_intf ) :
...
@@ -43,25 +47,63 @@ MetaPanel::MetaPanel( QWidget *parent, intf_thread_t *_p_intf ) :
{
{
int
line
=
0
;
int
line
=
0
;
QGridLayout
*
l
=
new
QGridLayout
(
this
);
QGridLayout
*
l
=
new
QGridLayout
(
this
);
l
->
setColumnStretch
(
2
,
5
);
l
->
setColumnStretch
(
5
,
3
);
#define ADD_META( string, widget ) { \
#define ADD_META( string, widget ) { \
l->addWidget( new QLabel( qtr( string )
), line, 0 );
\
l->addWidget( new QLabel( qtr( string )
+ " :" ), line, 0 );
\
widget = new QL
abel( "" );
\
widget = new QL
ineEdit;
\
l->addWidget( widget, line, 1
);
\
l->addWidget( widget, line, 1
, 1, 7 );
\
line++; }
line++; }
ADD_META
(
"Name"
,
name_text
);
ADD_META
(
"URI"
,
uri_text
);
ADD_META
(
VLC_META_TITLE
,
title_text
);
/* OK */
ADD_META
(
VLC_META_ARTIST
,
artist_text
);
ADD_META
(
VLC_META_ARTIST
,
artist_text
);
/* OK */
ADD_META
(
VLC_META_GENRE
,
genre_text
);
ADD_META
(
VLC_META_GENRE
,
genre_text
);
/* FIXME List id3genres.h is not
ADD_META
(
VLC_META_COPYRIGHT
,
copyright_text
);
includable yet ? */
ADD_META
(
VLC_META_COLLECTION
,
collection_text
);
ADD_META
(
VLC_META_SEQ_NUM
,
seqnum_text
);
/* Album Name */
ADD_META
(
VLC_META_DESCRIPTION
,
description_text
);
l
->
addWidget
(
new
QLabel
(
qfu
(
VLC_META_COLLECTION
)
+
" :"
),
line
,
0
);
ADD_META
(
VLC_META_RATING
,
rating_text
);
collection_text
=
new
QLineEdit
;
ADD_META
(
VLC_META_DATE
,
date_text
);
l
->
addWidget
(
collection_text
,
line
,
1
,
1
,
5
);
ADD_META
(
VLC_META_LANGUAGE
,
language_text
);
l
->
addWidget
(
new
QLabel
(
qfu
(
VLC_META_DATE
)
+
" :"
),
line
,
6
);
/* Date (Should be in years) */
date_text
=
new
QSpinBox
;
setSpinBounds
(
date_text
);
l
->
addWidget
(
date_text
,
line
,
7
);
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
(
new
QLabel
(
qfu
(
VLC_META_RATING
)
+
" :"
),
line
,
4
);
rating_text
=
new
QSpinBox
;
setSpinBounds
(
rating_text
)
;
l
->
addWidget
(
rating_text
,
line
,
5
,
1
,
3
);
line
++
;
ADD_META
(
VLC_META_NOW_PLAYING
,
nowplaying_text
);
ADD_META
(
VLC_META_NOW_PLAYING
,
nowplaying_text
);
/* 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
);
setting_text
=
new
QLineEdit
;
l
->
addWidget
(
setting_text
,
line
,
5
,
1
,
3
);
line
++
;
ADD_META
(
VLC_META_COPYRIGHT
,
copyright_text
);
ADD_META
(
VLC_META_PUBLISHER
,
publisher_text
);
ADD_META
(
VLC_META_PUBLISHER
,
publisher_text
);
ADD_META
(
VLC_META_SETTING
,
setting_text
);
ADD_META
(
VLC_META_ENCODED_BY
,
publisher_text
);
ADD_META
(
VLC_META_DESCRIPTION
,
description_text
);
// Comment Two lines?
/* ADD_META( TRACKID) DO NOT SHOW it */
// ADD_META( _( "URI" ), uri_text ); // FIXME URI outside
// ADD_META( VLC_META_URL, setting_text );
/* ART_URL */
}
}
MetaPanel
::~
MetaPanel
()
MetaPanel
::~
MetaPanel
()
...
@@ -70,39 +112,87 @@ MetaPanel::~MetaPanel()
...
@@ -70,39 +112,87 @@ MetaPanel::~MetaPanel()
void
MetaPanel
::
update
(
input_item_t
*
p_item
)
void
MetaPanel
::
update
(
input_item_t
*
p_item
)
{
{
char
*
psz_meta
;
#define UPDATE_META( meta, widget ) { \
#define UPDATE_META( meta, widget ) { \
char* psz_meta = p_item->p_meta->psz_##meta;
\
psz_meta = p_item->p_meta->psz_##meta;
\
if( !EMPTY_STR( psz_meta ) ) \
if( !EMPTY_STR( psz_meta ) ) \
widget->setText( qfu( psz_meta ) ); \
widget->setText( qfu( psz_meta ) ); \
else \
else \
widget->setText( "" ); }
widget->setText( "" ); }
if
(
!
EMPTY_STR
(
p_item
->
psz_name
)
)
#define UPDATE_META_INT( meta, widget ) { \
name_text
->
setText
(
qfu
(
p_item
->
psz_name
)
);
psz_meta = p_item->p_meta->psz_##meta; \
else
name_text
->
setText
(
""
);
if( !EMPTY_STR( psz_meta ) ) \
if
(
!
EMPTY_STR
(
p_item
->
psz_uri
)
)
widget->setValue( atoi( psz_meta ) ); }
/*FIXME Atoi ?*/
uri_text
->
setText
(
qfu
(
p_item
->
psz_uri
)
);
else
uri_text
->
setText
(
""
);
/* Name / Title */
psz_meta
=
p_item
->
p_meta
->
psz_title
;
if
(
!
EMPTY_STR
(
psz_meta
)
)
title_text
->
setText
(
qfu
(
psz_meta
)
);
else
if
(
!
EMPTY_STR
(
p_item
->
psz_name
)
)
title_text
->
setText
(
qfu
(
p_item
->
psz_name
)
);
else
title_text
->
setText
(
""
);
/* if( !EMPTY_STR( p_item->psz_uri ) )
uri_text->setText( qfu( p_item->psz_uri ) );*/
/// else uri_text->setText( "" );
UPDATE_META
(
artist
,
artist_text
);
UPDATE_META
(
artist
,
artist_text
);
UPDATE_META
(
genre
,
genre_text
);
UPDATE_META
(
genre
,
genre_text
);
UPDATE_META
(
copyright
,
copyright_text
);
UPDATE_META
(
copyright
,
copyright_text
);
UPDATE_META
(
album
,
collection_text
);
UPDATE_META
(
album
,
collection_text
);
UPDATE_META
(
tracknum
,
seqnum_text
);
UPDATE_META
(
description
,
description_text
);
UPDATE_META
(
description
,
description_text
);
UPDATE_META
(
rating
,
rating_text
);
UPDATE_META
(
date
,
date_text
);
UPDATE_META
(
language
,
language_text
);
UPDATE_META
(
language
,
language_text
);
UPDATE_META
(
nowplaying
,
nowplaying_text
);
UPDATE_META
(
nowplaying
,
nowplaying_text
);
UPDATE_META
(
publisher
,
publisher_text
);
UPDATE_META
(
publisher
,
publisher_text
);
UPDATE_META
(
setting
,
setting_text
);
UPDATE_META
(
setting
,
setting_text
);
UPDATE_META_INT
(
date
,
date_text
);
UPDATE_META_INT
(
tracknum
,
seqnum_text
);
UPDATE_META_INT
(
rating
,
rating_text
);
#undef UPDATE_META
#undef UPDATE_META
}
}
void
MetaPanel
::
clear
()
void
MetaPanel
::
clear
(){}
ExtraMetaPanel
::
ExtraMetaPanel
(
QWidget
*
parent
,
intf_thread_t
*
_p_intf
)
:
QWidget
(
parent
),
p_intf
(
_p_intf
)
{
QGridLayout
*
layout
=
new
QGridLayout
(
this
);
QLabel
*
topLabel
=
new
QLabel
(
qtr
(
"Extra metadata and other information"
" are shown in this list.
\n
"
)
);
topLabel
->
setWordWrap
(
true
);
layout
->
addWidget
(
topLabel
,
0
,
0
);
extraMetaTree
=
new
QTreeWidget
(
this
);
extraMetaTree
->
setAlternatingRowColors
(
true
);
extraMetaTree
->
setColumnCount
(
2
);
extraMetaTree
->
header
()
->
hide
();
/* QStringList *treeHeaders;
treeHeaders << qtr( "Test1" ) << qtr( "Test2" ); */
layout
->
addWidget
(
extraMetaTree
,
1
,
0
);
}
void
ExtraMetaPanel
::
update
(
input_item_t
*
p_item
)
{
{
vlc_meta_t
*
p_meta
=
p_item
->
p_meta
;
QStringList
tempItem
;
QList
<
QTreeWidgetItem
*>
items
;
for
(
int
i
=
0
;
i
<
p_meta
->
i_extra
;
i
++
)
{
tempItem
.
append
(
qfu
(
p_meta
->
ppsz_extra_name
[
i
]
)
+
" : "
);
tempItem
.
append
(
qfu
(
p_meta
->
ppsz_extra_value
[
i
]
)
);
items
.
append
(
new
QTreeWidgetItem
(
extraMetaTree
,
tempItem
)
);
}
extraMetaTree
->
addTopLevelItems
(
items
);
}
}
void
ExtraMetaPanel
::
clear
(){}
/* Second Panel - Stats */
/* Second Panel - Stats */
InputStatsPanel
::
InputStatsPanel
(
QWidget
*
parent
,
intf_thread_t
*
_p_intf
)
:
InputStatsPanel
::
InputStatsPanel
(
QWidget
*
parent
,
intf_thread_t
*
_p_intf
)
:
...
@@ -111,8 +201,11 @@ InputStatsPanel::InputStatsPanel( QWidget *parent, intf_thread_t *_p_intf ) :
...
@@ -111,8 +201,11 @@ InputStatsPanel::InputStatsPanel( QWidget *parent, intf_thread_t *_p_intf ) :
QGridLayout
*
layout
=
new
QGridLayout
(
this
);
QGridLayout
*
layout
=
new
QGridLayout
(
this
);
StatsTree
=
new
QTreeWidget
(
this
);
StatsTree
=
new
QTreeWidget
(
this
);
QList
<
QTreeWidgetItem
*>
items
;
QList
<
QTreeWidgetItem
*>
items
;
QLabel
*
topLabel
=
new
QLabel
(
qtr
(
"Various statistics about the current"
" media or stream.
\n
Played and streamed info are shown."
)
);
topLabel
->
setWordWrap
(
true
);
layout
->
addWidget
(
topLabel
,
0
,
0
);
layout
->
addWidget
(
StatsTree
,
0
,
0
);
StatsTree
->
setColumnCount
(
3
);
StatsTree
->
setColumnCount
(
3
);
StatsTree
->
header
()
->
hide
();
StatsTree
->
header
()
->
hide
();
...
@@ -121,38 +214,47 @@ InputStatsPanel::InputStatsPanel( QWidget *parent, intf_thread_t *_p_intf ) :
...
@@ -121,38 +214,47 @@ InputStatsPanel::InputStatsPanel( QWidget *parent, intf_thread_t *_p_intf ) :
new QTreeWidgetItem((QStringList () << itemText << itemValue << unit )); \
new QTreeWidgetItem((QStringList () << itemText << itemValue << unit )); \
itemName->setTextAlignment( 1 , Qt::AlignRight ) ; }
itemName->setTextAlignment( 1 , Qt::AlignRight ) ; }
#define CREATE_CATEGORY( catName, itemText ) { \
#define CREATE_CATEGORY( catName, itemText ) { \
CREATE_TREE_ITEM( catName, itemText , "", "" ); \
CREATE_TREE_ITEM( catName, itemText , "", "" ); \
catName->setExpanded( true ); \
catName->setExpanded( true ); \
StatsTree->addTopLevelItem( catName ); }
StatsTree->addTopLevelItem( catName ); }
#define CREATE_AND_ADD_TO_CAT( itemName, itemText, itemValue, catName, unit )
{ \
#define CREATE_AND_ADD_TO_CAT( itemName, itemText, itemValue, catName, unit ){ \
CREATE_TREE_ITEM( itemName, itemText, itemValue, unit ); \
CREATE_TREE_ITEM( itemName, itemText, itemValue, unit ); \
catName->addChild( itemName ); }
catName->addChild( itemName ); }
/* Create the main categories */
CREATE_CATEGORY
(
input
,
qtr
(
"Input"
)
);
CREATE_CATEGORY
(
input
,
qtr
(
"Input"
)
);
CREATE_CATEGORY
(
video
,
qtr
(
"Video"
)
);
CREATE_CATEGORY
(
video
,
qtr
(
"Video"
)
);
CREATE_CATEGORY
(
streaming
,
qtr
(
"Streaming"
)
);
CREATE_CATEGORY
(
streaming
,
qtr
(
"Streaming"
)
);
CREATE_CATEGORY
(
audio
,
qtr
(
"Audio"
)
);
CREATE_CATEGORY
(
audio
,
qtr
(
"Audio"
)
);
CREATE_AND_ADD_TO_CAT
(
read_media_stat
,
qtr
(
"Read at media"
),
CREATE_AND_ADD_TO_CAT
(
read_media_stat
,
qtr
(
"Read at media"
),
"0"
,
input
,
"kB"
)
;
"0"
,
input
,
"kB"
);
CREATE_AND_ADD_TO_CAT
(
input_bitrate_stat
,
qtr
(
"Input bitrate"
),
"0"
,
input
,
"kb/s"
)
;
CREATE_AND_ADD_TO_CAT
(
input_bitrate_stat
,
qtr
(
"Input bitrate"
),
"0"
,
input
,
"kb/s"
);
CREATE_AND_ADD_TO_CAT
(
demuxed_stat
,
qtr
(
"Demuxed"
),
"0"
,
input
,
"kB"
)
;
CREATE_AND_ADD_TO_CAT
(
demuxed_stat
,
qtr
(
"Demuxed"
),
"0"
,
input
,
"kB"
)
;
CREATE_AND_ADD_TO_CAT
(
stream_bitrate_stat
,
qtr
(
"Stream bitrate"
),
"0"
,
input
,
"kb/s"
)
;
CREATE_AND_ADD_TO_CAT
(
stream_bitrate_stat
,
qtr
(
"Stream bitrate"
),
"0"
,
input
,
"kb/s"
);
CREATE_AND_ADD_TO_CAT
(
vdecoded_stat
,
qtr
(
"Decoded blocks"
),
"0"
,
video
,
""
)
;
CREATE_AND_ADD_TO_CAT
(
vdisplayed_stat
,
qtr
(
"Displayed frames"
),
"0"
,
video
,
""
)
;
CREATE_AND_ADD_TO_CAT
(
vdecoded_stat
,
qtr
(
"Decoded blocks"
),
CREATE_AND_ADD_TO_CAT
(
vlost_frames_stat
,
qtr
(
"Lost frames"
),
"0"
,
video
,
""
)
;
"0"
,
video
,
""
);
CREATE_AND_ADD_TO_CAT
(
vdisplayed_stat
,
qtr
(
"Displayed frames"
),
CREATE_AND_ADD_TO_CAT
(
send_stat
,
qtr
(
"Sent packets"
),
"0"
,
streaming
,
""
)
;
"0"
,
video
,
""
);
CREATE_AND_ADD_TO_CAT
(
send_bytes_stat
,
qtr
(
"Sent bytes"
),
"0"
,
streaming
,
"kB"
)
;
CREATE_AND_ADD_TO_CAT
(
vlost_frames_stat
,
qtr
(
"Lost frames"
),
CREATE_AND_ADD_TO_CAT
(
send_bitrate_stat
,
qtr
(
"Sent bitrates"
),
"0"
,
streaming
,
"kb/s"
)
;
"0"
,
video
,
""
);
CREATE_AND_ADD_TO_CAT
(
adecoded_stat
,
qtr
(
"Decoded blocks"
),
"0"
,
audio
,
""
)
;
CREATE_AND_ADD_TO_CAT
(
send_stat
,
qtr
(
"Sent packets"
),
"0"
,
streaming
,
""
);
CREATE_AND_ADD_TO_CAT
(
aplayed_stat
,
qtr
(
"Played buffers"
),
"0"
,
audio
,
""
)
;
CREATE_AND_ADD_TO_CAT
(
send_bytes_stat
,
qtr
(
"Sent bytes"
),
CREATE_AND_ADD_TO_CAT
(
alost_stat
,
qtr
(
"Lost buffers"
),
"0"
,
audio
,
""
)
;
"0"
,
streaming
,
"kB"
);
CREATE_AND_ADD_TO_CAT
(
send_bitrate_stat
,
qtr
(
"Sent bitrates"
),
"0"
,
streaming
,
"kb/s"
);
CREATE_AND_ADD_TO_CAT
(
adecoded_stat
,
qtr
(
"Decoded blocks"
),
"0"
,
audio
,
""
);
CREATE_AND_ADD_TO_CAT
(
aplayed_stat
,
qtr
(
"Played buffers"
),
"0"
,
audio
,
""
);
CREATE_AND_ADD_TO_CAT
(
alost_stat
,
qtr
(
"Lost buffers"
),
"0"
,
audio
,
""
);
input
->
setExpanded
(
true
);
input
->
setExpanded
(
true
);
video
->
setExpanded
(
true
);
video
->
setExpanded
(
true
);
...
@@ -161,6 +263,8 @@ InputStatsPanel::InputStatsPanel( QWidget *parent, intf_thread_t *_p_intf ) :
...
@@ -161,6 +263,8 @@ InputStatsPanel::InputStatsPanel( QWidget *parent, intf_thread_t *_p_intf ) :
StatsTree
->
resizeColumnToContents
(
0
);
StatsTree
->
resizeColumnToContents
(
0
);
StatsTree
->
setColumnWidth
(
1
,
100
);
StatsTree
->
setColumnWidth
(
1
,
100
);
layout
->
addWidget
(
StatsTree
,
1
,
0
);
}
}
InputStatsPanel
::~
InputStatsPanel
()
InputStatsPanel
::~
InputStatsPanel
()
...
@@ -174,7 +278,8 @@ void InputStatsPanel::update( input_item_t *p_item )
...
@@ -174,7 +278,8 @@ void InputStatsPanel::update( input_item_t *p_item )
#define UPDATE( widget, format, calc... ) \
#define UPDATE( widget, format, calc... ) \
{ QString str; widget->setText( 1 , str.sprintf( format, ## calc ) ); }
{ QString str; widget->setText( 1 , str.sprintf( format, ## calc ) ); }
UPDATE
(
read_media_stat
,
"%8.0f"
,
(
float
)(
p_item
->
p_stats
->
i_read_bytes
)
/
1000
);
UPDATE
(
read_media_stat
,
"%8.0f"
,
(
float
)(
p_item
->
p_stats
->
i_read_bytes
)
/
1000
);
UPDATE
(
input_bitrate_stat
,
"%6.0f"
,
UPDATE
(
input_bitrate_stat
,
"%6.0f"
,
(
float
)(
p_item
->
p_stats
->
f_input_bitrate
*
8000
));
(
float
)(
p_item
->
p_stats
->
f_input_bitrate
*
8000
));
UPDATE
(
demuxed_stat
,
"%8.0f"
,
UPDATE
(
demuxed_stat
,
"%8.0f"
,
...
@@ -215,9 +320,15 @@ InfoPanel::InfoPanel( QWidget *parent, intf_thread_t *_p_intf ) :
...
@@ -215,9 +320,15 @@ InfoPanel::InfoPanel( QWidget *parent, intf_thread_t *_p_intf ) :
InfoTree
=
new
QTreeWidget
(
this
);
InfoTree
=
new
QTreeWidget
(
this
);
QList
<
QTreeWidgetItem
*>
items
;
QList
<
QTreeWidgetItem
*>
items
;
layout
->
addWidget
(
InfoTree
,
0
,
0
);
QLabel
*
topLabel
=
new
QLabel
(
qtr
(
"Information about what your media or"
" stream is made of.
\n
Muxer, Audio and Video Codecs, Subtitles "
"are shown."
)
);
topLabel
->
setWordWrap
(
true
);
layout
->
addWidget
(
topLabel
,
0
,
0
);
InfoTree
->
setColumnCount
(
1
);
InfoTree
->
setColumnCount
(
1
);
InfoTree
->
header
()
->
hide
();
InfoTree
->
header
()
->
hide
();
layout
->
addWidget
(
InfoTree
,
1
,
0
);
}
}
InfoPanel
::~
InfoPanel
()
InfoPanel
::~
InfoPanel
()
...
@@ -262,12 +373,12 @@ void InfoPanel::clear()
...
@@ -262,12 +373,12 @@ void InfoPanel::clear()
InfoTab
::
InfoTab
(
QWidget
*
parent
,
intf_thread_t
*
_p_intf
,
bool
_stats
)
:
InfoTab
::
InfoTab
(
QWidget
*
parent
,
intf_thread_t
*
_p_intf
,
bool
_stats
)
:
QTabWidget
(
parent
),
stats
(
_stats
),
p_intf
(
_p_intf
)
QTabWidget
(
parent
),
stats
(
_stats
),
p_intf
(
_p_intf
)
{
{
// setGeometry(0, 0, 400, 500
);
MP
=
new
MetaPanel
(
NULL
,
p_intf
);
addTab
(
MP
,
qtr
(
"&General"
)
);
MP
=
new
MetaPanel
(
NULL
,
p_intf
);
EMP
=
new
ExtraMetaPanel
(
NULL
,
p_intf
);
addTab
(
MP
,
qtr
(
"&General"
)
);
addTab
(
EMP
,
qtr
(
"&Extra Metadata"
)
);
IP
=
new
InfoPanel
(
NULL
,
p_intf
);
IP
=
new
InfoPanel
(
NULL
,
p_intf
);
addTab
(
IP
,
qtr
(
"&Details"
));
addTab
(
IP
,
qtr
(
"&
Codec
Details"
));
if
(
stats
)
if
(
stats
)
{
{
ISP
=
new
InputStatsPanel
(
NULL
,
p_intf
);
ISP
=
new
InputStatsPanel
(
NULL
,
p_intf
);
...
@@ -289,6 +400,7 @@ void InfoTab::update( input_item_t *p_item, bool update_info,
...
@@ -289,6 +400,7 @@ void InfoTab::update( input_item_t *p_item, bool update_info,
IP
->
update
(
p_item
);
IP
->
update
(
p_item
);
if
(
update_meta
)
if
(
update_meta
)
MP
->
update
(
p_item
);
MP
->
update
(
p_item
);
EMP
->
update
(
p_item
);
if
(
stats
)
if
(
stats
)
ISP
->
update
(
p_item
);
ISP
->
update
(
p_item
);
}
}
...
@@ -297,5 +409,6 @@ void InfoTab::clear()
...
@@ -297,5 +409,6 @@ void InfoTab::clear()
{
{
IP
->
clear
();
IP
->
clear
();
MP
->
clear
();
MP
->
clear
();
EMP
->
clear
();
if
(
stats
)
ISP
->
clear
();
if
(
stats
)
ISP
->
clear
();
}
}
modules/gui/qt4/components/infopanels.hpp
View file @
ca7f6e8f
...
@@ -30,10 +30,22 @@
...
@@ -30,10 +30,22 @@
#include <QWidget>
#include <QWidget>
#include <QTabWidget>
#include <QTabWidget>
#include <QLabel>
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
#define setSpinBounds( spinbox ) { \
spinbox->setRange( 0, INT_MAX ); \
spinbox->setAccelerated( true ) ; \
spinbox->setAlignment( Qt::AlignRight ); \
spinbox->setSpecialValueText(""); }
class
QTreeWidget
;
class
QTreeWidget
;
class
QTreeWidgetItem
;
class
QTreeWidgetItem
;
class
QTreeView
;
class
QSpinBox
;
class
QLineEdit
;
class
MetaPanel
:
public
QWidget
class
MetaPanel
:
public
QWidget
{
{
...
@@ -43,26 +55,39 @@ public:
...
@@ -43,26 +55,39 @@ public:
virtual
~
MetaPanel
();
virtual
~
MetaPanel
();
private:
private:
intf_thread_t
*
p_intf
;
intf_thread_t
*
p_intf
;
QL
abel
*
uri_text
;
QL
ineEdit
*
uri_text
;
QL
abel
*
nam
e_text
;
QL
ineEdit
*
titl
e_text
;
QL
abel
*
artist_text
;
QL
ineEdit
*
artist_text
;
QL
abel
*
genre_text
;
QL
ineEdit
*
genre_text
;
QL
abel
*
copyright_text
;
QL
ineEdit
*
copyright_text
;
QL
abel
*
collection_text
;
QL
ineEdit
*
collection_text
;
Q
Label
*
seqnum_text
;
Q
SpinBox
*
seqnum_text
;
QL
abel
*
description_text
;
QL
ineEdit
*
description_text
;
Q
Label
*
rating_text
;
Q
SpinBox
*
rating_text
;
Q
Label
*
date_text
;
Q
SpinBox
*
date_text
;
QL
abel
*
setting_text
;
QL
ineEdit
*
setting_text
;
QL
abel
*
language_text
;
QL
ineEdit
*
language_text
;
QL
abel
*
nowplaying_text
;
QL
ineEdit
*
nowplaying_text
;
QL
abel
*
publisher_text
;
QL
ineEdit
*
publisher_text
;
public
slots
:
public
slots
:
void
update
(
input_item_t
*
);
void
update
(
input_item_t
*
);
void
clear
();
void
clear
();
};
};
class
ExtraMetaPanel
:
public
QWidget
{
Q_OBJECT
;
public:
ExtraMetaPanel
(
QWidget
*
,
intf_thread_t
*
);
virtual
~
ExtraMetaPanel
()
{};
private:
intf_thread_t
*
p_intf
;
QTreeWidget
*
extraMetaTree
;
public
slots
:
void
update
(
input_item_t
*
);
void
clear
();
};
class
InputStatsPanel
:
public
QWidget
class
InputStatsPanel
:
public
QWidget
{
{
...
@@ -128,6 +153,7 @@ private:
...
@@ -128,6 +153,7 @@ private:
InputStatsPanel
*
ISP
;
InputStatsPanel
*
ISP
;
MetaPanel
*
MP
;
MetaPanel
*
MP
;
InfoPanel
*
IP
;
InfoPanel
*
IP
;
ExtraMetaPanel
*
EMP
;
int
i_runs
;
int
i_runs
;
};
};
...
...
modules/gui/qt4/dialogs/mediainfo.cpp
View file @
ca7f6e8f
...
@@ -44,7 +44,7 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf, bool _mainInput ) :
...
@@ -44,7 +44,7 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf, bool _mainInput ) :
p_input
=
NULL
;
p_input
=
NULL
;
setWindowTitle
(
qtr
(
"Media information"
)
);
setWindowTitle
(
qtr
(
"Media information"
)
);
resize
(
5
00
,
450
);
resize
(
6
00
,
450
);
QGridLayout
*
layout
=
new
QGridLayout
(
this
);
QGridLayout
*
layout
=
new
QGridLayout
(
this
);
IT
=
new
InfoTab
(
this
,
p_intf
,
true
)
;
IT
=
new
InfoTab
(
this
,
p_intf
,
true
)
;
...
@@ -95,8 +95,8 @@ void MediaInfoDialog::setInput(input_item_t *p_input)
...
@@ -95,8 +95,8 @@ void MediaInfoDialog::setInput(input_item_t *p_input)
void
MediaInfoDialog
::
update
()
void
MediaInfoDialog
::
update
()
{
{
/* Timer runs at 150 ms, dont' update more than 2 times per second */
/* Timer runs at 150 ms, dont' update more than 2 times per second */
i_runs
++
;
if
(
i_runs
%
3
!=
0
)
return
;
if
(
i_runs
%
3
!=
0
)
return
;
i_runs
++
;
input_thread_t
*
p_input
=
input_thread_t
*
p_input
=
MainInputManager
::
getInstance
(
p_intf
)
->
getInput
();
MainInputManager
::
getInstance
(
p_intf
)
->
getInput
();
...
...
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