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
ff167352
Commit
ff167352
authored
Oct 12, 2011
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: select what columns to show as sorting selection
parent
52d4b4bb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+8
-6
No files found.
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
ff167352
...
@@ -961,13 +961,15 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode
...
@@ -961,13 +961,15 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode
{
{
sortingMenu
=
new
QMenu
(
qtr
(
"Sort by"
)
);
sortingMenu
=
new
QMenu
(
qtr
(
"Sort by"
)
);
sortingMapper
=
new
QSignalMapper
(
this
);
sortingMapper
=
new
QSignalMapper
(
this
);
for
(
int
i
=
1
,
j
=
1
;
i
<
COLUMN_ALBUM
;
i
<<=
1
,
j
++
)
/* Choose what columns to show in sorting menu, not sure if this should be configurable*/
QList
<
int
>
sortingColumns
;
sortingColumns
<<
COLUMN_TITLE
<<
COLUMN_ARTIST
<<
COLUMN_ALBUM
<<
COLUMN_TRACK_NUMBER
<<
COLUMN_URI
;
foreach
(
int
Column
,
sortingColumns
)
{
{
if
(
i
==
COLUMN_NUMBER
)
continue
;
QAction
*
asc
=
sortingMenu
->
addAction
(
qfu
(
psz_column_title
(
Column
)
)
+
" "
+
qtr
(
"Ascending"
)
);
QAction
*
asc
=
sortingMenu
->
addAction
(
qfu
(
psz_column_title
(
i
)
)
+
" "
+
qtr
(
"Ascending"
)
);
QAction
*
desc
=
sortingMenu
->
addAction
(
qfu
(
psz_column_title
(
Column
)
)
+
" "
+
qtr
(
"Descending"
)
);
QAction
*
desc
=
sortingMenu
->
addAction
(
qfu
(
psz_column_title
(
i
)
)
+
" "
+
qtr
(
"Descending"
)
);
sortingMapper
->
setMapping
(
asc
,
columnFromMeta
(
Column
)
+
1
);
sortingMapper
->
setMapping
(
asc
,
j
);
sortingMapper
->
setMapping
(
desc
,
-
1
*
(
columnFromMeta
(
Column
)
+
1
)
);
sortingMapper
->
setMapping
(
desc
,
-
j
);
CONNECT
(
asc
,
triggered
(),
sortingMapper
,
map
()
);
CONNECT
(
asc
,
triggered
(),
sortingMapper
,
map
()
);
CONNECT
(
desc
,
triggered
(),
sortingMapper
,
map
()
);
CONNECT
(
desc
,
triggered
(),
sortingMapper
,
map
()
);
}
}
...
...
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