Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
71219c5d
Commit
71219c5d
authored
Jan 21, 2008
by
Jean-Baptiste Kempf
Browse files
Qt4 - add a button to scroll to currentItem. Close #1443
parent
0320a30e
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/gui/qt4/components/playlist/panels.hpp
View file @
71219c5d
...
...
@@ -72,7 +72,7 @@ protected:
friend
class
PlaylistWidget
;
private:
QTreeView
*
view
;
QPushButton
*
repeatButton
,
*
randomButton
,
*
addButton
;
QPushButton
*
repeatButton
,
*
randomButton
,
*
addButton
,
*
gotoPlayingButton
;
ClickLineEdit
*
searchLine
;
int
currentRootId
;
QSignalMapper
*
ContextUpdateMapper
;
...
...
@@ -84,6 +84,7 @@ private slots:
void
handleExpansion
(
const
QModelIndex
&
);
void
toggleRandom
();
void
toggleRepeat
();
void
gotoPlayingItem
();
void
doPopup
(
QModelIndex
index
,
QPoint
point
);
void
search
(
QString
search
);
void
clearFilter
();
...
...
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
71219c5d
...
...
@@ -133,6 +133,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
BUTTONACT
(
repeatButton
,
toggleRepeat
()
);
buttons
->
addWidget
(
repeatButton
);
/* Goto */
gotoPlayingButton
=
new
QPushButton
(
qtr
(
"X"
),
this
);
BUTTONACT
(
gotoPlayingButton
,
gotoPlayingItem
()
);
buttons
->
addWidget
(
gotoPlayingButton
);
/* A Spacer and the search possibilities */
QSpacerItem
*
spacer
=
new
QSpacerItem
(
10
,
20
);
buttons
->
addItem
(
spacer
);
...
...
@@ -193,6 +198,11 @@ void StandardPLPanel::toggleRandom()
randomButton
->
setToolTip
(
prev
?
qtr
(
I_PL_NORANDOM
)
:
qtr
(
I_PL_RANDOM
)
);
}
void
StandardPLPanel
::
gotoPlayingItem
()
{
view
->
scrollTo
(
view
->
currentIndex
()
);
}
void
StandardPLPanel
::
handleExpansion
(
const
QModelIndex
&
index
)
{
if
(
model
->
isCurrent
(
index
)
)
...
...
Write
Preview
Supports
Markdown
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