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
99b1edc0
Commit
99b1edc0
authored
Nov 30, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: remove random and repeat buttons from playlist
And clean the code.
parent
de5baa43
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
99 deletions
+3
-99
modules/gui/qt4/components/playlist/panels.hpp
modules/gui/qt4/components/playlist/panels.hpp
+1
-3
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+0
-29
modules/gui/qt4/components/playlist/playlist_model.hpp
modules/gui/qt4/components/playlist/playlist_model.hpp
+0
-4
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+2
-63
No files found.
modules/gui/qt4/components/playlist/panels.hpp
View file @
99b1edc0
...
...
@@ -62,7 +62,7 @@ private:
QWidget
*
parent
;
QLabel
*
title
;
QTreeView
*
view
;
QPushButton
*
repeatButton
,
*
randomButton
,
*
addButton
,
*
gotoPlayingButton
;
QPushButton
*
addButton
,
*
gotoPlayingButton
;
int
currentRootId
;
QSignalMapper
*
selectColumnsSigMapper
;
...
...
@@ -72,8 +72,6 @@ public slots:
private
slots
:
void
deleteSelection
();
void
handleExpansion
(
const
QModelIndex
&
);
void
toggleRandom
();
void
toggleRepeat
();
void
gotoPlayingItem
();
void
doPopup
(
QModelIndex
index
,
QPoint
point
);
void
search
(
const
QString
&
searchText
);
...
...
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
99b1edc0
...
...
@@ -456,35 +456,6 @@ QStringList PLModel::selectedURIs()
return
lst
;
}
/************************* General playlist status ***********************/
bool
PLModel
::
hasRandom
()
{
return
var_GetBool
(
p_playlist
,
"random"
);
}
bool
PLModel
::
hasRepeat
()
{
return
var_GetBool
(
p_playlist
,
"repeat"
);
}
bool
PLModel
::
hasLoop
()
{
return
var_GetBool
(
p_playlist
,
"loop"
);
}
void
PLModel
::
setLoop
(
bool
on
)
{
var_SetBool
(
p_playlist
,
"loop"
,
on
?
true
:
false
);
config_PutInt
(
p_playlist
,
"loop"
,
on
?
1
:
0
);
}
void
PLModel
::
setRepeat
(
bool
on
)
{
var_SetBool
(
p_playlist
,
"repeat"
,
on
?
true
:
false
);
config_PutInt
(
p_playlist
,
"repeat"
,
on
?
1
:
0
);
}
void
PLModel
::
setRandom
(
bool
on
)
{
var_SetBool
(
p_playlist
,
"random"
,
on
?
true
:
false
);
config_PutInt
(
p_playlist
,
"random"
,
on
?
1
:
0
);
}
/************************* Lookups *****************************/
...
...
modules/gui/qt4/components/playlist/playlist_model.hpp
View file @
99b1edc0
...
...
@@ -81,7 +81,6 @@ public:
/* Lookups */
QStringList
selectedURIs
();
bool
hasRandom
();
bool
hasLoop
();
bool
hasRepeat
();
QModelIndex
index
(
PLItem
*
,
int
c
)
const
;
QModelIndex
currentIndex
(
)
{
return
index
(
currentItem
,
0
);
};
bool
isCurrent
(
const
QModelIndex
&
index
)
const
;
...
...
@@ -144,9 +143,6 @@ signals:
public
slots
:
void
activateItem
(
const
QModelIndex
&
index
);
void
activateItem
(
playlist_item_t
*
p_item
);
void
setRandom
(
bool
);
void
setLoop
(
bool
);
void
setRepeat
(
bool
);
private
slots
:
void
popupPlay
();
...
...
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
99b1edc0
/*****************************************************************************
* standardpanel.cpp : The "standard" playlist panel : just a treeview
****************************************************************************
* Copyright (C) 2000-200
5 the VideoLAN team
* Copyright (C) 2000-200
9 VideoLAN
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
* JB Kempf
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -118,38 +119,6 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
BUTTONACT
(
addButton
,
popupAdd
()
);
buttons
->
addWidget
(
addButton
);
/* Random 2-state button */
randomButton
=
new
QPushButton
(
this
);
randomButton
->
setIcon
(
QIcon
(
":/buttons/playlist/shuffle_on"
));
randomButton
->
setToolTip
(
qtr
(
I_PL_RANDOM
));
randomButton
->
setCheckable
(
true
);
randomButton
->
setChecked
(
model
->
hasRandom
()
);
BUTTONACT
(
randomButton
,
toggleRandom
()
);
buttons
->
addWidget
(
randomButton
);
/* Repeat 3-state button */
repeatButton
=
new
QPushButton
(
this
);
repeatButton
->
setToolTip
(
qtr
(
"Click to toggle between loop one, loop all"
)
);
repeatButton
->
setCheckable
(
true
);
if
(
model
->
hasRepeat
()
)
{
repeatButton
->
setIcon
(
QIcon
(
":/buttons/playlist/repeat_one"
)
);
repeatButton
->
setChecked
(
true
);
}
else
if
(
model
->
hasLoop
()
)
{
repeatButton
->
setIcon
(
QIcon
(
":/buttons/playlist/repeat_all"
)
);
repeatButton
->
setChecked
(
true
);
}
else
{
repeatButton
->
setIcon
(
QIcon
(
":/buttons/playlist/repeat_one"
)
);
repeatButton
->
setChecked
(
false
);
}
BUTTONACT
(
repeatButton
,
toggleRepeat
()
);
buttons
->
addWidget
(
repeatButton
);
/* Goto */
gotoPlayingButton
=
new
QPushButton
;
BUTTON_SET_ACT_I
(
gotoPlayingButton
,
""
,
buttons
/
playlist
/
jump_to
,
...
...
@@ -186,36 +155,6 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
CONNECT
(
selectColumnsSigMapper
,
mapped
(
int
),
this
,
toggleColumnShown
(
int
)
);
}
/* Function to toggle between the Repeat states */
void
StandardPLPanel
::
toggleRepeat
()
{
if
(
model
->
hasRepeat
()
)
{
model
->
setRepeat
(
false
);
model
->
setLoop
(
true
);
repeatButton
->
setIcon
(
QIcon
(
":/buttons/playlist/repeat_all"
)
);
repeatButton
->
setChecked
(
true
);
}
else
if
(
model
->
hasLoop
()
)
{
model
->
setRepeat
(
false
)
;
model
->
setLoop
(
false
);
repeatButton
->
setChecked
(
false
);
repeatButton
->
setIcon
(
QIcon
(
":/buttons/playlist/repeat_one"
)
);
}
else
{
model
->
setRepeat
(
true
);
model
->
setLoop
(
false
);
repeatButton
->
setChecked
(
true
);
repeatButton
->
setIcon
(
QIcon
(
":/buttons/playlist/repeat_one"
)
);
}
}
/* Function to toggle between the Random states */
void
StandardPLPanel
::
toggleRandom
()
{
bool
prev
=
model
->
hasRandom
();
model
->
setRandom
(
!
prev
);
}
void
StandardPLPanel
::
gotoPlayingItem
()
{
view
->
scrollTo
(
model
->
currentIndex
()
);
...
...
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