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
9ec1eec7
Commit
9ec1eec7
authored
May 03, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: activate the searching for the Hotkeys Preferences.
Close #2530
parent
62d7d384
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+16
-5
modules/gui/qt4/components/preferences_widgets.hpp
modules/gui/qt4/components/preferences_widgets.hpp
+3
-0
No files found.
modules/gui/qt4/components/preferences_widgets.cpp
View file @
9ec1eec7
...
...
@@ -1138,9 +1138,8 @@ KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this,
label
=
new
QLabel
(
qtr
(
"Select an action to change the associated hotkey"
)
);
/* Deactivated for now
QLabel
*
searchLabel
=
new
QLabel
(
qtr
(
"Search"
)
);
QLineEdit *actionSearch = new QLineEdit;*/
actionSearch
=
new
SearchLineEdit
(
keyContainer
);
table
=
new
QTreeWidget
;
table
->
setColumnCount
(
3
);
...
...
@@ -1158,9 +1157,8 @@ KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this,
finish
();
gLayout
->
addWidget
(
label
,
0
,
0
,
1
,
4
);
/* deactivated for now
gLayout
->
addWidget
(
searchLabel
,
1
,
0
,
1
,
2
);
gLayout->addWidget( actionSearch, 1, 2, 1, 2 );
*/
gLayout
->
addWidget
(
actionSearch
,
1
,
2
,
1
,
2
);
gLayout
->
addWidget
(
table
,
2
,
0
,
1
,
4
);
gLayout
->
addWidget
(
clearButton
,
3
,
0
,
1
,
1
);
gLayout
->
addWidget
(
shortcutValue
,
3
,
1
,
1
,
2
);
...
...
@@ -1171,6 +1169,8 @@ KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this,
CONNECT
(
clearButton
,
clicked
(),
shortcutValue
,
clear
()
);
CONNECT
(
clearButton
,
clicked
(),
this
,
setTheKey
()
);
BUTTONACT
(
setButton
,
setTheKey
()
);
CONNECT
(
actionSearch
,
textChanged
(
const
QString
&
),
this
,
filter
(
const
QString
&
)
);
}
void
KeySelectorControl
::
finish
()
...
...
@@ -1244,6 +1244,17 @@ void KeySelectorControl::finish()
CONNECT
(
shortcutValue
,
pressed
(),
this
,
selectKey
()
);
}
void
KeySelectorControl
::
filter
(
const
QString
&
qs_search
)
{
QList
<
QTreeWidgetItem
*>
resultList
=
table
->
findItems
(
qs_search
,
Qt
::
MatchContains
,
0
);
for
(
int
i
=
0
;
i
<
table
->
topLevelItemCount
();
i
++
)
{
table
->
topLevelItem
(
i
)
->
setHidden
(
!
resultList
.
contains
(
table
->
topLevelItem
(
i
)
)
);
}
}
/* Show the key selected from the table in the keySelector */
void
KeySelectorControl
::
select1Key
()
{
...
...
@@ -1354,7 +1365,7 @@ void KeyInputDialog::checkForConflicts( int i_vlckey )
/* Avoid 0 or -1 that are the "Unset" states */
{
warning
->
setText
(
qtr
(
"Warning: the key is already assigned to
\"
"
)
+
conflictList
[
0
]
->
text
(
0
)
+
"
\"
"
);
conflictList
[
0
]
->
text
(
0
)
+
"
\"
"
);
warning
->
show
();
buttonBox
->
show
();
...
...
modules/gui/qt4/components/preferences_widgets.hpp
View file @
9ec1eec7
...
...
@@ -434,6 +434,7 @@ signals:
void
pressed
();
};
class
SearchLineEdit
;
class
KeySelectorControl
:
public
ConfigControl
{
Q_OBJECT
;
...
...
@@ -451,10 +452,12 @@ private:
QTreeWidget
*
table
;
KeyShortcutEdit
*
shortcutValue
;
QList
<
module_config_t
*>
values
;
SearchLineEdit
*
actionSearch
;
private
slots
:
void
setTheKey
();
void
selectKey
(
QTreeWidgetItem
*
=
NULL
);
void
select1Key
();
void
filter
(
const
QString
&
);
};
class
KeyInputDialog
:
public
QDialog
...
...
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