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
bdd0c1e1
Commit
bdd0c1e1
authored
Jul 07, 2011
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: add size-scale into playlist model
parent
7c9fdd3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+4
-1
modules/gui/qt4/components/playlist/playlist_model.hpp
modules/gui/qt4/components/playlist/playlist_model.hpp
+12
-0
No files found.
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
bdd0c1e1
...
...
@@ -88,6 +88,8 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */
ADD_ICON
(
NODE
,
":/type/node"
);
#undef ADD_ICON
i_zoom
=
getSettings
()
->
value
(
"Playlist/zoom"
,
0
).
toInt
();
rebuild
(
p_root
);
DCONNECT
(
THEMIM
->
getIM
(),
metaChanged
(
input_item_t
*
),
this
,
processInputItemUpdate
(
input_item_t
*
)
);
...
...
@@ -101,6 +103,7 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */
PLModel
::~
PLModel
()
{
getSettings
()
->
setValue
(
"Playlist/zoom"
,
i_zoom
);
delete
rootItem
;
delete
sortingMenu
;
}
...
...
@@ -367,7 +370,7 @@ QVariant PLModel::data( const QModelIndex &index, const int role ) const
else
if
(
role
==
Qt
::
FontRole
)
{
QFont
f
;
f
.
setPointSize
(
f
.
pointSize
()
-
1
);
f
.
setPointSize
(
f
.
pointSize
()
-
1
+
i_zoom
);
if
(
isCurrent
(
index
)
)
f
.
setBold
(
true
);
return
QVariant
(
f
);
...
...
modules/gui/qt4/components/playlist/playlist_model.hpp
View file @
bdd0c1e1
...
...
@@ -104,6 +104,10 @@ public:
{
return
getItem
(
index
)
->
id
();
}
inline
int
getZoom
()
const
{
return
i_zoom
;
}
signals:
void
currentChanged
(
const
QModelIndex
&
);
...
...
@@ -112,6 +116,11 @@ signals:
public
slots
:
virtual
void
activateItem
(
const
QModelIndex
&
index
);
void
activateItem
(
playlist_item_t
*
p_item
);
inline
void
changeZoom
(
const
int
zoom
)
{
i_zoom
=
zoom
;
emit
layoutChanged
();
}
private:
/* General */
...
...
@@ -153,6 +162,9 @@ private:
int
i_cached_id
;
int
i_cached_input_id
;
/* Zoom factor for font-size */
int
i_zoom
;
private
slots
:
void
popupPlay
();
void
popupDel
();
...
...
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