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
7c0bb066
Commit
7c0bb066
authored
Sep 08, 2011
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: playlist: move zoom button to top bar
parent
a5f542fb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
31 deletions
+14
-31
modules/gui/qt4/components/playlist/playlist.cpp
modules/gui/qt4/components/playlist/playlist.cpp
+14
-23
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+0
-7
modules/gui/qt4/components/playlist/standardpanel.hpp
modules/gui/qt4/components/playlist/standardpanel.hpp
+0
-1
No files found.
modules/gui/qt4/components/playlist/playlist.cpp
View file @
7c0bb066
...
@@ -41,8 +41,6 @@
...
@@ -41,8 +41,6 @@
#include <QMenu>
#include <QMenu>
#include <QSignalMapper>
#include <QSignalMapper>
#include <QSlider>
#include <QSlider>
#include <QSpacerItem>
#include <QList>
/**********************************************************************
/**********************************************************************
* Playlist Widget. The embedded playlist
* Playlist Widget. The embedded playlist
...
@@ -112,11 +110,15 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
...
@@ -112,11 +110,15 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
CONNECT
(
locationBar
,
invoked
(
const
QModelIndex
&
),
CONNECT
(
locationBar
,
invoked
(
const
QModelIndex
&
),
mainView
,
browseInto
(
const
QModelIndex
&
)
);
mainView
,
browseInto
(
const
QModelIndex
&
)
);
QHBoxLayout
*
topbarLayout
=
new
QHBoxLayout
(
this
);
layout
->
addLayout
(
topbarLayout
,
0
,
1
);
topbarLayout
->
setSpacing
(
10
);
/* Button to switch views */
/* Button to switch views */
QToolButton
*
viewButton
=
new
QToolButton
(
this
);
QToolButton
*
viewButton
=
new
QToolButton
(
this
);
viewButton
->
setIcon
(
style
()
->
standardIcon
(
QStyle
::
SP_FileDialogDetailedView
)
);
viewButton
->
setIcon
(
style
()
->
standardIcon
(
QStyle
::
SP_FileDialogDetailedView
)
);
viewButton
->
setToolTip
(
qtr
(
"Change playlistview"
)
);
viewButton
->
setToolTip
(
qtr
(
"Change playlistview"
)
);
layout
->
addWidget
(
viewButton
,
0
,
2
);
topbarLayout
->
addWidget
(
viewButton
);
/* View selection menu */
/* View selection menu */
QSignalMapper
*
viewSelectionMapper
=
new
QSignalMapper
(
this
);
QSignalMapper
*
viewSelectionMapper
=
new
QSignalMapper
(
this
);
...
@@ -142,7 +144,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
...
@@ -142,7 +144,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
searchEdit
=
new
SearchLineEdit
(
this
);
searchEdit
=
new
SearchLineEdit
(
this
);
searchEdit
->
setMaximumWidth
(
250
);
searchEdit
->
setMaximumWidth
(
250
);
searchEdit
->
setMinimumWidth
(
80
);
searchEdit
->
setMinimumWidth
(
80
);
layout
->
addWidget
(
searchEdit
,
0
,
3
);
topbarLayout
->
addWidget
(
searchEdit
);
CONNECT
(
searchEdit
,
textChanged
(
const
QString
&
),
CONNECT
(
searchEdit
,
textChanged
(
const
QString
&
),
mainView
,
search
(
const
QString
&
)
);
mainView
,
search
(
const
QString
&
)
);
CONNECT
(
searchEdit
,
searchDelayedChanged
(
const
QString
&
),
CONNECT
(
searchEdit
,
searchDelayedChanged
(
const
QString
&
),
...
@@ -150,7 +152,14 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
...
@@ -150,7 +152,14 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
CONNECT
(
mainView
,
viewChanged
(
const
QModelIndex
&
),
CONNECT
(
mainView
,
viewChanged
(
const
QModelIndex
&
),
this
,
changeView
(
const
QModelIndex
&
)
);
this
,
changeView
(
const
QModelIndex
&
)
);
layout
->
setColumnStretch
(
3
,
3
);
/* Zoom */
QSlider
*
zoomSlider
=
new
QSlider
(
Qt
::
Horizontal
,
this
);
zoomSlider
->
setRange
(
-
10
,
10
);
zoomSlider
->
setPageStep
(
3
);
zoomSlider
->
setValue
(
model
->
getZoom
()
);
CONNECT
(
zoomSlider
,
valueChanged
(
int
),
model
,
changeZoom
(
int
)
);
topbarLayout
->
addWidget
(
zoomSlider
);
/* Connect the activation of the selector to a redefining of the PL */
/* Connect the activation of the selector to a redefining of the PL */
DCONNECT
(
selector
,
categoryActivated
(
playlist_item_t
*
,
bool
),
DCONNECT
(
selector
,
categoryActivated
(
playlist_item_t
*
,
bool
),
...
@@ -182,24 +191,6 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
...
@@ -182,24 +191,6 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
layout
->
addWidget
(
split
,
1
,
0
,
1
,
-
1
);
layout
->
addWidget
(
split
,
1
,
0
,
1
,
-
1
);
/* Zoom */
QSlider
*
zoomSlider
=
new
QSlider
(
Qt
::
Horizontal
,
this
);
zoomSlider
->
setRange
(
-
10
,
10
);
zoomSlider
->
setPageStep
(
3
);
zoomSlider
->
setValue
(
model
->
getZoom
()
);
CONNECT
(
zoomSlider
,
valueChanged
(
int
),
model
,
changeZoom
(
int
)
);
/* pad our zoom slider */
QGridLayout
*
sliderLayout
=
new
QGridLayout
;
QSpacerItem
*
sliderSpacer
=
new
QSpacerItem
(
mainView
->
getScrollBarsSize
(),
mainView
->
getScrollBarsSize
(),
QSizePolicy
::
Fixed
,
QSizePolicy
::
Fixed
);
sliderLayout
->
addWidget
(
zoomSlider
,
0
,
0
,
Qt
::
AlignCenter
);
sliderLayout
->
addItem
(
sliderSpacer
,
1
,
1
,
Qt
::
AlignCenter
);
layout
->
addLayout
(
sliderLayout
,
1
,
3
,
(
Qt
::
AlignBottom
|
Qt
::
AlignRight
)
);
setAcceptDrops
(
true
);
setAcceptDrops
(
true
);
setWindowTitle
(
qtr
(
"Playlist"
)
);
setWindowTitle
(
qtr
(
"Playlist"
)
);
setWindowRole
(
"vlc-playlist"
);
setWindowRole
(
"vlc-playlist"
);
...
...
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
7c0bb066
...
@@ -48,7 +48,6 @@
...
@@ -48,7 +48,6 @@
#include <QStackedLayout>
#include <QStackedLayout>
#include <QSignalMapper>
#include <QSignalMapper>
#include <QSettings>
#include <QSettings>
#include <QScrollBar>
#include <assert.h>
#include <assert.h>
...
@@ -415,12 +414,6 @@ int StandardPLPanel::currentViewIndex() const
...
@@ -415,12 +414,6 @@ int StandardPLPanel::currentViewIndex() const
return
PICTUREFLOW_VIEW
;
return
PICTUREFLOW_VIEW
;
}
}
int
StandardPLPanel
::
getScrollBarsSize
()
const
{
/* FIXME: should return a set in case of different widths */
return
currentView
->
verticalScrollBar
()
->
sizeHint
().
width
();
}
void
StandardPLPanel
::
cycleViews
()
void
StandardPLPanel
::
cycleViews
()
{
{
if
(
currentView
==
iconView
)
if
(
currentView
==
iconView
)
...
...
modules/gui/qt4/components/playlist/standardpanel.hpp
View file @
7c0bb066
...
@@ -69,7 +69,6 @@ public:
...
@@ -69,7 +69,6 @@ public:
VIEW_COUNT
};
VIEW_COUNT
};
int
currentViewIndex
()
const
;
int
currentViewIndex
()
const
;
int
getScrollBarsSize
()
const
;
protected:
protected:
PLModel
*
model
;
PLModel
*
model
;
...
...
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