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
9eed4949
Commit
9eed4949
authored
Aug 02, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qt4 - Playlist: move the column selection to a submenu.
parent
4c813447
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
19 deletions
+21
-19
modules/gui/qt4/playlist_model.cpp
modules/gui/qt4/playlist_model.cpp
+21
-19
No files found.
modules/gui/qt4/playlist_model.cpp
View file @
9eed4949
...
@@ -86,7 +86,7 @@ void PLItem::updateview( void )
...
@@ -86,7 +86,7 @@ void PLItem::updateview( void )
{
{
strings
.
clear
();
strings
.
clear
();
for
(
int
i_index
=
1
;
i_index
<=
VLC_META_ENGINE_MB_TRM_ID
;
i_index
=
i_index
*
2
)
for
(
int
i_index
=
1
;
i_index
<=
VLC_META_ENGINE_MB_TRM_ID
;
i_index
=
i_index
*
2
)
{
{
if
(
i_showflags
&
i_index
)
if
(
i_showflags
&
i_index
)
{
{
...
@@ -94,16 +94,16 @@ void PLItem::updateview( void )
...
@@ -94,16 +94,16 @@ void PLItem::updateview( void )
{
{
case
VLC_META_ENGINE_ARTIST
:
case
VLC_META_ENGINE_ARTIST
:
strings
.
append
(
qtr
(
VLC_META_ARTIST
)
);
strings
.
append
(
qtr
(
VLC_META_ARTIST
)
);
break
;
break
;
case
VLC_META_ENGINE_TITLE
:
case
VLC_META_ENGINE_TITLE
:
strings
.
append
(
qtr
(
VLC_META_TITLE
)
);
strings
.
append
(
qtr
(
VLC_META_TITLE
)
);
break
;
break
;
case
VLC_META_ENGINE_DESCRIPTION
:
case
VLC_META_ENGINE_DESCRIPTION
:
strings
.
append
(
qtr
(
VLC_META_DESCRIPTION
)
);
strings
.
append
(
qtr
(
VLC_META_DESCRIPTION
)
);
break
;
break
;
case
VLC_META_ENGINE_DURATION
:
case
VLC_META_ENGINE_DURATION
:
strings
.
append
(
qtr
(
"Duration"
)
);
strings
.
append
(
qtr
(
"Duration"
)
);
break
;
break
;
case
VLC_META_ENGINE_GENRE
:
case
VLC_META_ENGINE_GENRE
:
strings
.
append
(
qtr
(
VLC_META_GENRE
)
);
strings
.
append
(
qtr
(
VLC_META_GENRE
)
);
break
;
break
;
...
@@ -186,8 +186,8 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
...
@@ -186,8 +186,8 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
{
{
strings
.
append
(
p_item
->
p_input
->
psz_name
);
strings
.
append
(
p_item
->
p_input
->
psz_name
);
return
;
return
;
}
}
#define ADD_META( meta ) { \
#define ADD_META( meta ) { \
if( p_item->p_input->p_meta ) \
if( p_item->p_input->p_meta ) \
...
@@ -195,7 +195,7 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
...
@@ -195,7 +195,7 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
else \
else \
strings.append( qtr( "" ) ); }
strings.append( qtr( "" ) ); }
for
(
int
i_index
=
1
;
i_index
<=
VLC_META_ENGINE_MB_TRM_ID
;
i_index
=
i_index
*
2
)
for
(
int
i_index
=
1
;
i_index
<=
VLC_META_ENGINE_MB_TRM_ID
;
i_index
=
i_index
*
2
)
{
{
if
(
parentItem
->
i_showflags
&
i_index
)
if
(
parentItem
->
i_showflags
&
i_index
)
{
{
...
@@ -203,7 +203,7 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
...
@@ -203,7 +203,7 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
{
{
case
VLC_META_ENGINE_ARTIST
:
case
VLC_META_ENGINE_ARTIST
:
ADD_META
(
p_item
->
p_input
->
p_meta
->
psz_artist
);
ADD_META
(
p_item
->
p_input
->
p_meta
->
psz_artist
);
break
;
break
;
case
VLC_META_ENGINE_TITLE
:
case
VLC_META_ENGINE_TITLE
:
if
(
p_item
->
p_input
->
p_meta
&&
p_item
->
p_input
->
p_meta
->
psz_title
)
if
(
p_item
->
p_input
->
p_meta
&&
p_item
->
p_input
->
p_meta
->
psz_title
)
{
{
...
@@ -211,14 +211,14 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
...
@@ -211,14 +211,14 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
}
else
{
}
else
{
ADD_META
(
p_item
->
p_input
->
psz_name
);
ADD_META
(
p_item
->
p_input
->
psz_name
);
}
}
break
;
break
;
case
VLC_META_ENGINE_DESCRIPTION
:
case
VLC_META_ENGINE_DESCRIPTION
:
ADD_META
(
p_item
->
p_input
->
p_meta
->
psz_description
);
ADD_META
(
p_item
->
p_input
->
p_meta
->
psz_description
);
break
;
break
;
case
VLC_META_ENGINE_DURATION
:
case
VLC_META_ENGINE_DURATION
:
secstotimestr
(
psz_duration
,
p_item
->
p_input
->
i_duration
/
1000000
);
secstotimestr
(
psz_duration
,
p_item
->
p_input
->
i_duration
/
1000000
);
strings
.
append
(
QString
(
psz_duration
)
);
strings
.
append
(
QString
(
psz_duration
)
);
break
;
break
;
case
VLC_META_ENGINE_GENRE
:
case
VLC_META_ENGINE_GENRE
:
ADD_META
(
p_item
->
p_input
->
p_meta
->
psz_genre
);
ADD_META
(
p_item
->
p_input
->
p_meta
->
psz_genre
);
break
;
break
;
...
@@ -232,7 +232,7 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
...
@@ -232,7 +232,7 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
ADD_META
(
p_item
->
p_input
->
p_meta
->
psz_rating
);
ADD_META
(
p_item
->
p_input
->
p_meta
->
psz_rating
);
default:
default:
break
;
break
;
}
}
}
}
}
}
...
@@ -959,12 +959,14 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list )
...
@@ -959,12 +959,14 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list )
ContextUpdateMapper
=
new
QSignalMapper
(
this
);
ContextUpdateMapper
=
new
QSignalMapper
(
this
);
QMenu
*
selectColMenu
=
new
QMenu
(
qtr
(
"Show columns"
)
);
#define ADD_META_ACTION( meta ) { \
#define ADD_META_ACTION( meta ) { \
QAction* option =
menu->addAction( qfu(VLC_META_##meta) );
\
QAction* option =
selectColMenu->addAction( qfu(VLC_META_##meta) );
\
option->setCheckable( true );
\
option->setCheckable( true ); \
option->setChecked( rootItem->i_showflags & VLC_META_ENGINE_##meta );
\
option->setChecked( rootItem->i_showflags & VLC_META_ENGINE_##meta ); \
ContextUpdateMapper->setMapping( option, VLC_META_ENGINE_##meta );
\
ContextUpdateMapper->setMapping( option, VLC_META_ENGINE_##meta ); \
CONNECT( option, triggered(), ContextUpdateMapper, map() ); \
CONNECT( option, triggered(), ContextUpdateMapper, map() );
\
}
}
CONNECT
(
ContextUpdateMapper
,
mapped
(
int
),
this
,
viewchanged
(
int
)
);
CONNECT
(
ContextUpdateMapper
,
mapped
(
int
),
this
,
viewchanged
(
int
)
);
...
@@ -978,7 +980,7 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list )
...
@@ -978,7 +980,7 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list )
ADD_META_ACTION
(
DESCRIPTION
);
ADD_META_ACTION
(
DESCRIPTION
);
#undef ADD_META_ACTION
#undef ADD_META_ACTION
menu
->
addMenu
(
selectColMenu
);
menu
->
popup
(
point
);
menu
->
popup
(
point
);
}
}
else
else
...
...
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