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
cd56737f
Commit
cd56737f
authored
Jul 26, 2011
by
Yuval Tze
Committed by
Francois Cartegnie
Jul 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: Preferences tree filter, UI
add SearchLineEdit above the advanced tree that filters the tree items.
parent
9b80d194
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
modules/gui/qt4/dialogs/preferences.cpp
modules/gui/qt4/dialogs/preferences.cpp
+24
-1
modules/gui/qt4/dialogs/preferences.hpp
modules/gui/qt4/dialogs/preferences.hpp
+4
-1
No files found.
modules/gui/qt4/dialogs/preferences.cpp
View file @
cd56737f
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include "components/complete_preferences.hpp"
#include "components/complete_preferences.hpp"
#include "components/simple_preferences.hpp"
#include "components/simple_preferences.hpp"
#include "util/searchlineedit.hpp"
#include <QHBoxLayout>
#include <QHBoxLayout>
#include <QGroupBox>
#include <QGroupBox>
...
@@ -54,7 +55,7 @@ PrefsDialog::PrefsDialog( QWidget *parent, intf_thread_t *_p_intf )
...
@@ -54,7 +55,7 @@ PrefsDialog::PrefsDialog( QWidget *parent, intf_thread_t *_p_intf )
/* Create Panels */
/* Create Panels */
tree_panel
=
new
QWidget
;
tree_panel
=
new
QWidget
;
tree_panel_l
=
new
Q
H
BoxLayout
;
tree_panel_l
=
new
Q
V
BoxLayout
;
tree_panel
->
setLayout
(
tree_panel_l
);
tree_panel
->
setLayout
(
tree_panel_l
);
main_panel
=
new
QWidget
;
main_panel
=
new
QWidget
;
main_panel_l
=
new
QHBoxLayout
;
main_panel_l
=
new
QHBoxLayout
;
...
@@ -75,6 +76,7 @@ PrefsDialog::PrefsDialog( QWidget *parent, intf_thread_t *_p_intf )
...
@@ -75,6 +76,7 @@ PrefsDialog::PrefsDialog( QWidget *parent, intf_thread_t *_p_intf )
/* Tree and panel initialisations */
/* Tree and panel initialisations */
advanced_tree
=
NULL
;
advanced_tree
=
NULL
;
tree_filter
=
NULL
;
simple_tree
=
NULL
;
simple_tree
=
NULL
;
current_simple_panel
=
NULL
;
current_simple_panel
=
NULL
;
advanced_panel
=
NULL
;
advanced_panel
=
NULL
;
...
@@ -138,6 +140,19 @@ void PrefsDialog::setAdvanced()
...
@@ -138,6 +140,19 @@ void PrefsDialog::setAdvanced()
if
(
simple_tree
)
if
(
simple_tree
)
if
(
simple_tree
->
isVisible
()
)
simple_tree
->
hide
();
if
(
simple_tree
->
isVisible
()
)
simple_tree
->
hide
();
if
(
!
tree_filter
)
{
tree_filter
=
new
SearchLineEdit
(
tree_panel
);
tree_filter
->
setMinimumHeight
(
26
);
CONNECT
(
tree_filter
,
textChanged
(
const
QString
&
),
this
,
advancedTreeFilterChanged
(
const
QString
&
)
);
tree_panel_l
->
addWidget
(
tree_filter
);
}
tree_filter
->
show
();
/* If don't have already and advanced TREE, then create it */
/* If don't have already and advanced TREE, then create it */
if
(
!
advanced_tree
)
if
(
!
advanced_tree
)
{
{
...
@@ -179,6 +194,9 @@ void PrefsDialog::setSmall()
...
@@ -179,6 +194,9 @@ void PrefsDialog::setSmall()
if
(
advanced_tree
)
if
(
advanced_tree
)
if
(
advanced_tree
->
isVisible
()
)
advanced_tree
->
hide
();
if
(
advanced_tree
->
isVisible
()
)
advanced_tree
->
hide
();
if
(
tree_filter
)
if
(
tree_filter
->
isVisible
()
)
tree_filter
->
hide
();
/* If no simple_tree, create one, connect it */
/* If no simple_tree, create one, connect it */
if
(
!
simple_tree
)
if
(
!
simple_tree
)
{
{
...
@@ -328,3 +346,8 @@ void PrefsDialog::reset()
...
@@ -328,3 +346,8 @@ void PrefsDialog::reset()
accept
();
accept
();
}
}
}
}
void
PrefsDialog
::
advancedTreeFilterChanged
(
const
QString
&
text
)
{
advanced_tree
->
filter
(
text
);
}
modules/gui/qt4/dialogs/preferences.hpp
View file @
cd56737f
...
@@ -40,6 +40,7 @@ class QRadioButton;
...
@@ -40,6 +40,7 @@ class QRadioButton;
class
QWidget
;
class
QWidget
;
class
QCheckBox
;
class
QCheckBox
;
class
QLabel
;
class
QLabel
;
class
SearchLineEdit
;
class
PrefsDialog
:
public
QVLCDialog
class
PrefsDialog
:
public
QVLCDialog
{
{
...
@@ -63,10 +64,11 @@ private:
...
@@ -63,10 +64,11 @@ private:
SPrefsPanel
*
simple_panels
[
SPrefsMax
];
SPrefsPanel
*
simple_panels
[
SPrefsMax
];
QWidget
*
tree_panel
;
QWidget
*
tree_panel
;
Q
H
BoxLayout
*
tree_panel_l
;
Q
V
BoxLayout
*
tree_panel_l
;
SPrefsCatList
*
simple_tree
;
SPrefsCatList
*
simple_tree
;
PrefsTree
*
advanced_tree
;
PrefsTree
*
advanced_tree
;
SearchLineEdit
*
tree_filter
;
QGroupBox
*
types
;
QGroupBox
*
types
;
QRadioButton
*
small
,
*
all
;
QRadioButton
*
small
,
*
all
;
...
@@ -79,6 +81,7 @@ private slots:
...
@@ -79,6 +81,7 @@ private slots:
void
changeAdvPanel
(
QTreeWidgetItem
*
);
void
changeAdvPanel
(
QTreeWidgetItem
*
);
void
changeSimplePanel
(
int
);
void
changeSimplePanel
(
int
);
void
advancedTreeFilterChanged
(
const
QString
&
);
void
save
();
void
save
();
void
cancel
();
void
cancel
();
...
...
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