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
7310bac2
Commit
7310bac2
authored
Oct 22, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: search the SD if possible.
parent
40b4d780
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
9 deletions
+32
-9
modules/gui/qt4/components/playlist/playlist.cpp
modules/gui/qt4/components/playlist/playlist.cpp
+1
-1
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+1
-1
modules/gui/qt4/components/playlist/selector.cpp
modules/gui/qt4/components/playlist/selector.cpp
+6
-0
modules/gui/qt4/components/playlist/selector.hpp
modules/gui/qt4/components/playlist/selector.hpp
+2
-0
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+20
-6
modules/gui/qt4/components/playlist/standardpanel.hpp
modules/gui/qt4/components/playlist/standardpanel.hpp
+2
-1
No files found.
modules/gui/qt4/components/playlist/playlist.cpp
View file @
7310bac2
...
...
@@ -93,7 +93,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
PL_UNLOCK
;
rightPanel
=
new
StandardPLPanel
(
this
,
p_intf
,
THEPL
,
p_root
);
rightPanel
=
new
StandardPLPanel
(
this
,
p_intf
,
THEPL
,
p_root
,
selector
);
/* Connect the activation of the selector to a redefining of the PL */
DCONNECT
(
selector
,
activated
(
playlist_item_t
*
),
...
...
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
7310bac2
...
...
@@ -887,7 +887,7 @@ void PLModel::search( const QString& search_text, const QModelIndex & idx, bool
endRemoveRows
(
);
beginInsertRows
(
idx
,
0
,
searchRoot
->
children
.
size
()
-
1
);
updateChildren
(
searchRoot
);
updateChildren
(
searchRoot
);
// The PL_LOCK is needed here
endInsertRows
();
PL_UNLOCK
;
...
...
modules/gui/qt4/components/playlist/selector.cpp
View file @
7310bac2
...
...
@@ -500,3 +500,9 @@ void PLSelector::drawBranches ( QPainter * painter, const QRect & rect, const QM
QStyle
::
PE_IndicatorArrowDown
:
QStyle
::
PE_IndicatorArrowRight
,
&
option
,
painter
);
}
void
PLSelector
::
getCurrentSelectedItem
(
int
*
type
,
QString
*
string
)
{
*
type
=
currentItem
()
->
data
(
0
,
TYPE_ROLE
).
toInt
();
*
string
=
currentItem
()
->
data
(
0
,
NAME_ROLE
).
toString
();
}
modules/gui/qt4/components/playlist/selector.hpp
View file @
7310bac2
...
...
@@ -114,6 +114,8 @@ class PLSelector: public QTreeWidget
public:
PLSelector
(
QWidget
*
p
,
intf_thread_t
*
_p_intf
);
virtual
~
PLSelector
();
void
getCurrentSelectedItem
(
int
*
type
,
QString
*
name
);
protected:
friend
class
PlaylistWidget
;
...
...
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
7310bac2
...
...
@@ -31,6 +31,7 @@
#include "components/playlist/playlist_model.hpp"
#include "components/playlist/standardpanel.hpp"
#include "components/playlist/icon_view.hpp"
#include "components/playlist/selector.hpp"
#include "util/customwidgets.hpp"
#include "menus.hpp"
...
...
@@ -60,8 +61,10 @@ static const QString viewNames[] = { qtr( "Detailed View" ),
StandardPLPanel
::
StandardPLPanel
(
PlaylistWidget
*
_parent
,
intf_thread_t
*
_p_intf
,
playlist_t
*
p_playlist
,
playlist_item_t
*
p_root
)
:
QWidget
(
_parent
),
p_intf
(
_p_intf
)
playlist_item_t
*
p_root
,
PLSelector
*
_p_selector
)
:
QWidget
(
_parent
),
p_intf
(
_p_intf
),
p_selector
(
_p_selector
)
{
layout
=
new
QGridLayout
(
this
);
layout
->
setSpacing
(
0
);
layout
->
setMargin
(
0
);
...
...
@@ -208,10 +211,21 @@ void StandardPLPanel::toggleColumnShown( int i )
/* Search in the playlist */
void
StandardPLPanel
::
search
(
const
QString
&
searchText
)
{
bool
flat
=
currentView
==
iconView
||
currentView
==
listView
;
model
->
search
(
searchText
,
flat
?
currentView
->
rootIndex
()
:
QModelIndex
(),
!
flat
);
int
type
;
QString
name
;
p_selector
->
getCurrentSelectedItem
(
&
type
,
&
name
);
if
(
type
!=
SD_TYPE
)
{
bool
flat
=
currentView
==
iconView
||
currentView
==
listView
;
model
->
search
(
searchText
,
flat
?
currentView
->
rootIndex
()
:
QModelIndex
(),
!
flat
);
}
else
{
if
(
!
name
.
isEmpty
()
)
playlist_QueryServicesDiscovery
(
THEPL
,
qtu
(
name
),
qtu
(
searchText
)
);
}
}
/* Set the root of the new Playlist */
...
...
modules/gui/qt4/components/playlist/standardpanel.hpp
View file @
7310bac2
...
...
@@ -56,7 +56,7 @@ class StandardPLPanel: public QWidget
public:
StandardPLPanel
(
PlaylistWidget
*
,
intf_thread_t
*
,
playlist_t
*
,
playlist_item_t
*
);
playlist_t
*
,
playlist_item_t
*
,
PLSelector
*
);
virtual
~
StandardPLPanel
();
protected:
friend
class
PlaylistWidget
;
...
...
@@ -78,6 +78,7 @@ private:
QGridLayout
*
layout
;
LocationBar
*
locationBar
;
SearchLineEdit
*
searchEdit
;
PLSelector
*
p_selector
;
QTreeView
*
treeView
;
PlIconView
*
iconView
;
...
...
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