Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
de2c8c11
Commit
de2c8c11
authored
Jan 03, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: search implementation in the plugins list dialog for fast-seeing if a module is here or not.
parent
1664191a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
modules/gui/qt4/dialogs/plugins.cpp
modules/gui/qt4/dialogs/plugins.cpp
+25
-1
modules/gui/qt4/dialogs/plugins.hpp
modules/gui/qt4/dialogs/plugins.hpp
+4
-0
No files found.
modules/gui/qt4/dialogs/plugins.cpp
View file @
de2c8c11
...
...
@@ -33,6 +33,8 @@
#include <QStringList>
#include <QHeaderView>
#include <QDialogButtonBox>
#include <QLineEdit>
#include <QLabel>
PluginDialog
::
PluginDialog
(
intf_thread_t
*
_p_intf
)
:
QVLCFrame
(
_p_intf
)
{
...
...
@@ -66,10 +68,19 @@ PluginDialog::PluginDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
treePlugins
->
setSortingEnabled
(
true
);
treePlugins
->
sortByColumn
(
1
,
Qt
::
AscendingOrder
);
QLabel
*
label
=
new
QLabel
(
_
(
"&Search:"
),
this
);
edit
=
new
QLineEdit
;
label
->
setBuddy
(
edit
);
layout
->
addWidget
(
label
,
1
,
0
);
layout
->
addWidget
(
edit
,
1
,
1
,
1
,
-
1
);
CONNECT
(
edit
,
textChanged
(
QString
),
this
,
search
(
QString
)
);
QDialogButtonBox
*
box
=
new
QDialogButtonBox
;
QPushButton
*
okButton
=
new
QPushButton
(
"ok"
,
this
);
box
->
addButton
(
okButton
,
QDialogButtonBox
::
AcceptRole
);
layout
->
addWidget
(
box
,
1
,
2
);
layout
->
addWidget
(
box
,
2
,
2
);
BUTTONACT
(
okButton
,
close
()
);
...
...
@@ -94,6 +105,19 @@ inline void PluginDialog::FillTree()
}
}
void
PluginDialog
::
search
(
const
QString
qs
)
{
QList
<
QTreeWidgetItem
*>
items
=
treePlugins
->
findItems
(
qs
,
Qt
::
MatchContains
);
items
+=
treePlugins
->
findItems
(
qs
,
Qt
::
MatchContains
,
1
);
QTreeWidgetItem
*
item
=
NULL
;
for
(
int
i
=
0
;
i
<
treePlugins
->
topLevelItemCount
();
i
++
)
{
item
=
treePlugins
->
topLevelItem
(
i
);
item
->
setHidden
(
!
items
.
contains
(
item
)
);
}
}
PluginDialog
::~
PluginDialog
()
{
writeSettings
(
"Plugins"
);
...
...
modules/gui/qt4/dialogs/plugins.hpp
View file @
de2c8c11
...
...
@@ -27,6 +27,7 @@
#include "util/qvlcframe.hpp"
class
QTreeWidget
;
class
QLineEdit
;
class
PluginDialog
:
public
QVLCFrame
{
...
...
@@ -38,6 +39,9 @@ private:
virtual
~
PluginDialog
();
QTreeWidget
*
treePlugins
;
QLineEdit
*
edit
;
private
slots
:
void
search
(
const
QString
);
};
#endif
...
...
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