Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
aac1f4c6
Commit
aac1f4c6
authored
Feb 25, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Better behaviour for the left panel of the playlist.
parent
80f513e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
modules/gui/qt4/components/playlist/playlist.cpp
modules/gui/qt4/components/playlist/playlist.cpp
+15
-5
modules/gui/qt4/components/playlist/selector.cpp
modules/gui/qt4/components/playlist/selector.cpp
+1
-0
No files found.
modules/gui/qt4/components/playlist/playlist.cpp
View file @
aac1f4c6
...
...
@@ -42,8 +42,10 @@
* Playlist Widget. The embedded playlist
**********************************************************************/
PlaylistWidget
::
PlaylistWidget
(
intf_thread_t
*
_p_i
,
QSettings
*
settings
,
QWidget
*
_parent
)
:
p_intf
(
_p_i
),
parent
(
_parent
)
PlaylistWidget
::
PlaylistWidget
(
intf_thread_t
*
_p_i
,
QSettings
*
settings
,
QWidget
*
_parent
)
:
p_intf
(
_p_i
),
parent
(
_parent
)
{
/* Left Part and design */
QSplitter
*
leftW
=
new
QSplitter
(
Qt
::
Vertical
,
this
);
...
...
@@ -52,8 +54,13 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QSettings *settings, QWidge
selector
=
new
PLSelector
(
this
,
p_intf
,
THEPL
);
leftW
->
addWidget
(
selector
);
/* Create a Container for the Art Label
in order to have a beautiful resizing for the selector above it */
QWidget
*
artContainer
=
new
QWidget
;
QHBoxLayout
*
artContLay
=
new
QHBoxLayout
(
artContainer
);
artContLay
->
setMargin
(
0
);
artContLay
->
setSpacing
(
0
);
artContainer
->
setMaximumHeight
(
128
);
/* Art label */
art
=
new
ArtLabel
;
...
...
@@ -64,6 +71,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QSettings *settings, QWidge
art
->
setScaledContents
(
true
);
art
->
setPixmap
(
QPixmap
(
":/noart.png"
)
);
art
->
setToolTip
(
qtr
(
"Double click to get the media informations"
)
);
artContLay
->
addWidget
(
art
,
1
);
leftW
->
addWidget
(
artContainer
);
...
...
@@ -83,7 +91,6 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QSettings *settings, QWidge
connect
(
selector
,
SIGNAL
(
activated
(
int
)
),
this
,
SIGNAL
(
rootChanged
(
int
)
)
);
CONNECT
(
THEMIM
->
getIM
(),
artChanged
(
QString
)
,
this
,
setArt
(
QString
)
);
/* Forward removal requests from the selector to the main panel */
CONNECT
(
qobject_cast
<
PLSelector
*>
(
selector
)
->
model
,
shouldRemove
(
int
),
...
...
@@ -91,6 +98,9 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QSettings *settings, QWidge
emit
rootChanged
(
p_root
->
i_id
);
/* art */
CONNECT
(
THEMIM
->
getIM
(),
artChanged
(
QString
)
,
this
,
setArt
(
QString
)
);
/* Add the two sides of the QSplitter */
addWidget
(
leftW
);
addWidget
(
rightPanel
);
...
...
@@ -98,7 +108,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QSettings *settings, QWidge
QList
<
int
>
sizeList
;
sizeList
<<
180
<<
420
;
setSizes
(
sizeList
);
setSizePolicy
(
QSizePolicy
::
Preferred
,
QSizePolicy
::
Expanding
);
//
setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding );
setStretchFactor
(
0
,
0
);
setStretchFactor
(
1
,
3
);
leftW
->
setMaximumWidth
(
250
);
...
...
@@ -114,7 +124,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QSettings *settings, QWidge
void
PlaylistWidget
::
setArt
(
QString
url
)
{
if
(
url
.
is
Null
()
)
if
(
url
.
is
Empty
()
)
{
art
->
setPixmap
(
QPixmap
(
":/noart.png"
)
);
}
...
...
modules/gui/qt4/components/playlist/selector.cpp
View file @
aac1f4c6
...
...
@@ -27,6 +27,7 @@
#include "components/playlist/selector.hpp"
#include "qt4.hpp"
#include <QVBoxLayout>
#include <QHeaderView>
#include <QTreeView>
...
...
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