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
1f52d492
Commit
1f52d492
authored
Nov 12, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: add meta info panel and fix layout bug in stats
parent
d4399026
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
420 additions
and
391 deletions
+420
-391
modules/gui/qt4/components/infopanels.cpp
modules/gui/qt4/components/infopanels.cpp
+51
-14
modules/gui/qt4/components/infopanels.hpp
modules/gui/qt4/components/infopanels.hpp
+15
-3
modules/gui/qt4/ui/input_stats.ui
modules/gui/qt4/ui/input_stats.ui
+354
-374
No files found.
modules/gui/qt4/components/infopanels.cpp
View file @
1f52d492
...
@@ -86,31 +86,68 @@ void InputStatsPanel::clear()
...
@@ -86,31 +86,68 @@ void InputStatsPanel::clear()
MetaPanel
::
MetaPanel
(
QWidget
*
parent
,
intf_thread_t
*
_p_intf
)
:
MetaPanel
::
MetaPanel
(
QWidget
*
parent
,
intf_thread_t
*
_p_intf
)
:
QWidget
(
parent
),
p_intf
(
_p_intf
)
QWidget
(
parent
),
p_intf
(
_p_intf
)
{
{
int
line
=
0
;
QGridLayout
*
l
=
new
QGridLayout
(
this
);
#define ADD_META( string, widget ) { \
l->addWidget( new QLabel( qfu( string ) ), line, 0 ); \
widget = new QLabel( "" ); \
l->addWidget( widget, line, 1 ); \
line++; }
ADD_META
(
_
(
"Name"
),
name_text
);
ADD_META
(
_
(
"URI"
),
uri_text
);
ADD_META
(
VLC_META_ARTIST
,
artist_text
);
ADD_META
(
VLC_META_GENRE
,
genre_text
);
ADD_META
(
VLC_META_COPYRIGHT
,
copyright_text
);
ADD_META
(
VLC_META_COLLECTION
,
collection_text
);
ADD_META
(
VLC_META_SEQ_NUM
,
seqnum_text
);
ADD_META
(
VLC_META_DESCRIPTION
,
description_text
);
ADD_META
(
VLC_META_RATING
,
rating_text
);
ADD_META
(
VLC_META_DATE
,
date_text
);
ADD_META
(
VLC_META_LANGUAGE
,
language_text
);
ADD_META
(
VLC_META_NOW_PLAYING
,
nowplaying_text
);
ADD_META
(
VLC_META_PUBLISHER
,
publisher_text
);
ADD_META
(
VLC_META_SETTING
,
setting_text
);
}
}
MetaPanel
::~
MetaPanel
()
MetaPanel
::~
MetaPanel
()
{
{
}
}
void
MetaPanel
::
update
(
input_item_t
*
p_item
)
{
}
void
MetaPanel
::
clear
()
{
}
char
*
MetaPanel
::
getURI
(
)
void
MetaPanel
::
update
(
input_item_t
*
p_item
)
{
{
char
*
URI
;
#define UPDATE_META( meta, widget ) { \
return
URI
;
char* psz_meta = p_item->p_meta->psz_##meta; \
if( !EMPTY_STR( psz_meta ) ) \
widget->setText( qfu( psz_meta ) ); \
else \
widget->setText( "" ); }
if
(
!
EMPTY_STR
(
p_item
->
psz_name
)
)
name_text
->
setText
(
qfu
(
p_item
->
psz_name
)
);
else
name_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
(
genre
,
genre_text
);
UPDATE_META
(
copyright
,
copyright_text
);
UPDATE_META
(
album
,
collection_text
);
UPDATE_META
(
tracknum
,
seqnum_text
);
UPDATE_META
(
description
,
description_text
);
UPDATE_META
(
rating
,
rating_text
);
UPDATE_META
(
date
,
date_text
);
UPDATE_META
(
language
,
language_text
);
UPDATE_META
(
nowplaying
,
nowplaying_text
);
UPDATE_META
(
publisher
,
publisher_text
);
UPDATE_META
(
setting
,
setting_text
);
#undef UPDATE_META
}
}
char
*
MetaPanel
::
getName
()
void
MetaPanel
::
clear
()
{
{
char
*
Name
;
return
Name
;
}
}
InfoPanel
::
InfoPanel
(
QWidget
*
parent
,
intf_thread_t
*
_p_intf
)
:
InfoPanel
::
InfoPanel
(
QWidget
*
parent
,
intf_thread_t
*
_p_intf
)
:
QWidget
(
parent
),
p_intf
(
_p_intf
)
QWidget
(
parent
),
p_intf
(
_p_intf
)
{
{
...
...
modules/gui/qt4/components/infopanels.hpp
View file @
1f52d492
...
@@ -57,13 +57,25 @@ public:
...
@@ -57,13 +57,25 @@ public:
virtual
~
MetaPanel
();
virtual
~
MetaPanel
();
private:
private:
intf_thread_t
*
p_intf
;
intf_thread_t
*
p_intf
;
QLabel
*
uri_text
;
QLabel
*
name_text
;
QLabel
*
artist_text
;
QLabel
*
genre_text
;
QLabel
*
copyright_text
;
QLabel
*
collection_text
;
QLabel
*
seqnum_text
;
QLabel
*
description_text
;
QLabel
*
rating_text
;
QLabel
*
date_text
;
QLabel
*
setting_text
;
QLabel
*
language_text
;
QLabel
*
nowplaying_text
;
QLabel
*
publisher_text
;
public
slots
:
public
slots
:
void
update
(
input_item_t
*
);
void
update
(
input_item_t
*
);
void
clear
();
void
clear
();
char
*
getURI
();
char
*
getName
();
};
};
class
InfoPanel
:
public
QWidget
class
InfoPanel
:
public
QWidget
...
...
modules/gui/qt4/ui/input_stats.ui
View file @
1f52d492
This diff is collapsed.
Click to expand it.
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