Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
59e12b8d
Commit
59e12b8d
authored
Sep 26, 2017
by
Don Gagne
Committed by
GitHub
Sep 26, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5671 from mavlink/ux_improvements
Some smaller UX improvements
parents
5a4e8197
b9b1f1ef
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
6 deletions
+20
-6
ParameterEditor.qml
src/QmlControls/ParameterEditor.qml
+1
-1
ParameterEditorController.cc
src/QmlControls/ParameterEditorController.cc
+13
-4
ParameterEditorDialog.qml
src/QmlControls/ParameterEditorDialog.qml
+5
-0
QGCViewDialog.qml
src/QmlControls/QGCViewDialog.qml
+1
-1
No files found.
src/QmlControls/ParameterEditor.qml
View file @
59e12b8d
...
...
@@ -32,7 +32,7 @@ QGCView {
property
Fact
_editorDialogFact
:
Fact
{
}
property
int
_rowHeight
:
ScreenTools
.
defaultFontPixelHeight
*
2
property
int
_rowWidth
:
10
// Dynamic adjusted at runtime
property
bool
_searchFilter
:
searchText
.
text
!=
""
///< true: showing results of search
property
bool
_searchFilter
:
searchText
.
text
.
trim
()
!=
""
///< true: showing results of search
property
var
_searchResults
///< List of parameter names from search results
property
bool
_showRCToParam
:
!
ScreenTools
.
isMobile
&&
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
px4Firmware
...
...
src/QmlControls/ParameterEditorController.cc
View file @
59e12b8d
...
...
@@ -158,8 +158,9 @@ void ParameterEditorController::setRCToParam(const QString& paramName)
void
ParameterEditorController
::
_updateParameters
(
void
)
{
QObjectList
newParameterList
;
QStringList
searchItems
=
_searchText
.
split
(
' '
,
QString
::
SkipEmptyParts
);
if
(
_searchText
.
isEmpty
())
{
if
(
searchItems
.
isEmpty
())
{
const
QMap
<
int
,
QMap
<
QString
,
QStringList
>
>&
groupMap
=
_vehicle
->
parameterManager
()
->
getGroupMap
();
foreach
(
const
QString
&
parameter
,
groupMap
[
_currentComponentId
][
_currentGroup
])
{
newParameterList
.
append
(
_vehicle
->
parameterManager
()
->
getParameter
(
_currentComponentId
,
parameter
));
...
...
@@ -167,9 +168,17 @@ void ParameterEditorController::_updateParameters(void)
}
else
{
foreach
(
const
QString
&
parameter
,
_vehicle
->
parameterManager
()
->
parameterNames
(
_vehicle
->
defaultComponentId
()))
{
Fact
*
fact
=
_vehicle
->
parameterManager
()
->
getParameter
(
_vehicle
->
defaultComponentId
(),
parameter
);
if
(
fact
->
name
().
contains
(
_searchText
,
Qt
::
CaseInsensitive
)
||
fact
->
shortDescription
().
contains
(
_searchText
,
Qt
::
CaseInsensitive
)
||
fact
->
longDescription
().
contains
(
_searchText
,
Qt
::
CaseInsensitive
))
{
bool
matched
=
true
;
// all of the search items must match in order for the parameter to be added to the list
for
(
const
auto
&
searchItem
:
searchItems
)
{
if
(
!
fact
->
name
().
contains
(
searchItem
,
Qt
::
CaseInsensitive
)
&&
!
fact
->
shortDescription
().
contains
(
searchItem
,
Qt
::
CaseInsensitive
)
&&
!
fact
->
longDescription
().
contains
(
searchItem
,
Qt
::
CaseInsensitive
))
{
matched
=
false
;
}
}
if
(
matched
)
{
newParameterList
.
append
(
fact
);
}
}
...
...
src/QmlControls/ParameterEditorDialog.qml
View file @
59e12b8d
...
...
@@ -85,6 +85,11 @@ QGCViewDialog {
}
}
// set focus to the text field when becoming visible (in case of an Enum,
// the valueField is not visible, but it's not an issue because the combo
// box cannot have a focus)
onVisibleChanged
:
if
(
visible
&&
!
ScreenTools
.
isMobile
)
valueField
.
forceActiveFocus
()
QGCFlickable
{
anchors.fill
:
parent
contentHeight
:
_column
.
y
+
_column
.
height
...
...
src/QmlControls/QGCViewDialog.qml
View file @
59e12b8d
...
...
@@ -31,7 +31,7 @@ FactPanel {
if
(
event
.
key
==
Qt
.
Key_Escape
)
{
reject
()
event
.
accepted
=
true
}
else
if
(
event
.
key
==
Qt
.
Key_Return
)
{
}
else
if
(
event
.
key
==
Qt
.
Key_Return
||
event
.
key
==
Qt
.
Key_Enter
)
{
accept
()
event
.
accepted
=
true
}
...
...
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