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
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
Show 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 )
...
@@ -93,7 +93,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
PL_UNLOCK
;
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 */
/* Connect the activation of the selector to a redefining of the PL */
DCONNECT
(
selector
,
activated
(
playlist_item_t
*
),
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
...
@@ -887,7 +887,7 @@ void PLModel::search( const QString& search_text, const QModelIndex & idx, bool
endRemoveRows
(
);
endRemoveRows
(
);
beginInsertRows
(
idx
,
0
,
searchRoot
->
children
.
size
()
-
1
);
beginInsertRows
(
idx
,
0
,
searchRoot
->
children
.
size
()
-
1
);
updateChildren
(
searchRoot
);
updateChildren
(
searchRoot
);
// The PL_LOCK is needed here
endInsertRows
();
endInsertRows
();
PL_UNLOCK
;
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
...
@@ -500,3 +500,9 @@ void PLSelector::drawBranches ( QPainter * painter, const QRect & rect, const QM
QStyle
::
PE_IndicatorArrowDown
:
QStyle
::
PE_IndicatorArrowDown
:
QStyle
::
PE_IndicatorArrowRight
,
&
option
,
painter
);
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
...
@@ -114,6 +114,8 @@ class PLSelector: public QTreeWidget
public:
public:
PLSelector
(
QWidget
*
p
,
intf_thread_t
*
_p_intf
);
PLSelector
(
QWidget
*
p
,
intf_thread_t
*
_p_intf
);
virtual
~
PLSelector
();
virtual
~
PLSelector
();
void
getCurrentSelectedItem
(
int
*
type
,
QString
*
name
);
protected:
protected:
friend
class
PlaylistWidget
;
friend
class
PlaylistWidget
;
...
...
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
7310bac2
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "components/playlist/playlist_model.hpp"
#include "components/playlist/playlist_model.hpp"
#include "components/playlist/standardpanel.hpp"
#include "components/playlist/standardpanel.hpp"
#include "components/playlist/icon_view.hpp"
#include "components/playlist/icon_view.hpp"
#include "components/playlist/selector.hpp"
#include "util/customwidgets.hpp"
#include "util/customwidgets.hpp"
#include "menus.hpp"
#include "menus.hpp"
...
@@ -60,8 +61,10 @@ static const QString viewNames[] = { qtr( "Detailed View" ),
...
@@ -60,8 +61,10 @@ static const QString viewNames[] = { qtr( "Detailed View" ),
StandardPLPanel
::
StandardPLPanel
(
PlaylistWidget
*
_parent
,
StandardPLPanel
::
StandardPLPanel
(
PlaylistWidget
*
_parent
,
intf_thread_t
*
_p_intf
,
intf_thread_t
*
_p_intf
,
playlist_t
*
p_playlist
,
playlist_t
*
p_playlist
,
playlist_item_t
*
p_root
)
:
playlist_item_t
*
p_root
,
QWidget
(
_parent
),
p_intf
(
_p_intf
)
PLSelector
*
_p_selector
)
:
QWidget
(
_parent
),
p_intf
(
_p_intf
),
p_selector
(
_p_selector
)
{
{
layout
=
new
QGridLayout
(
this
);
layout
=
new
QGridLayout
(
this
);
layout
->
setSpacing
(
0
);
layout
->
setMargin
(
0
);
layout
->
setSpacing
(
0
);
layout
->
setMargin
(
0
);
...
@@ -208,10 +211,21 @@ void StandardPLPanel::toggleColumnShown( int i )
...
@@ -208,10 +211,21 @@ void StandardPLPanel::toggleColumnShown( int i )
/* Search in the playlist */
/* Search in the playlist */
void
StandardPLPanel
::
search
(
const
QString
&
searchText
)
void
StandardPLPanel
::
search
(
const
QString
&
searchText
)
{
{
int
type
;
QString
name
;
p_selector
->
getCurrentSelectedItem
(
&
type
,
&
name
);
if
(
type
!=
SD_TYPE
)
{
bool
flat
=
currentView
==
iconView
||
currentView
==
listView
;
bool
flat
=
currentView
==
iconView
||
currentView
==
listView
;
model
->
search
(
searchText
,
model
->
search
(
searchText
,
flat
?
currentView
->
rootIndex
()
:
QModelIndex
(),
flat
?
currentView
->
rootIndex
()
:
QModelIndex
(),
!
flat
);
!
flat
);
}
else
{
if
(
!
name
.
isEmpty
()
)
playlist_QueryServicesDiscovery
(
THEPL
,
qtu
(
name
),
qtu
(
searchText
)
);
}
}
}
/* Set the root of the new Playlist */
/* 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
...
@@ -56,7 +56,7 @@ class StandardPLPanel: public QWidget
public:
public:
StandardPLPanel
(
PlaylistWidget
*
,
intf_thread_t
*
,
StandardPLPanel
(
PlaylistWidget
*
,
intf_thread_t
*
,
playlist_t
*
,
playlist_item_t
*
);
playlist_t
*
,
playlist_item_t
*
,
PLSelector
*
);
virtual
~
StandardPLPanel
();
virtual
~
StandardPLPanel
();
protected:
protected:
friend
class
PlaylistWidget
;
friend
class
PlaylistWidget
;
...
@@ -78,6 +78,7 @@ private:
...
@@ -78,6 +78,7 @@ private:
QGridLayout
*
layout
;
QGridLayout
*
layout
;
LocationBar
*
locationBar
;
LocationBar
*
locationBar
;
SearchLineEdit
*
searchEdit
;
SearchLineEdit
*
searchEdit
;
PLSelector
*
p_selector
;
QTreeView
*
treeView
;
QTreeView
*
treeView
;
PlIconView
*
iconView
;
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