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
09f33f6b
Commit
09f33f6b
authored
Sep 25, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1883 from DonLakeFlyer/ParamSearch
Paramedter Editor search support
parents
4bfb1318
f6e82b56
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
214 additions
and
224 deletions
+214
-224
QGCApplication.pro
QGCApplication.pro
+0
-2
qgroundcontrol.qrc
qgroundcontrol.qrc
+0
-1
AutoPilotPlugin.cc
src/AutoPilotPlugins/AutoPilotPlugin.cc
+2
-2
AutoPilotPlugin.h
src/AutoPilotPlugins/AutoPilotPlugin.h
+1
-2
ParameterLoader.cc
src/FactSystem/ParameterLoader.cc
+2
-2
ParameterLoader.h
src/FactSystem/ParameterLoader.h
+1
-2
ParameterEditor.qml
src/QmlControls/ParameterEditor.qml
+179
-85
ParameterEditorController.cc
src/QmlControls/ParameterEditorController.cc
+23
-1
ParameterEditorController.h
src/QmlControls/ParameterEditorController.h
+2
-1
QGCView.qml
src/QmlControls/QGCView.qml
+3
-0
SetupParameterEditor.qml
src/VehicleSetup/SetupParameterEditor.qml
+1
-1
ParameterEditorWidget.cc
src/ViewWidgets/ParameterEditorWidget.cc
+0
-37
ParameterEditorWidget.h
src/ViewWidgets/ParameterEditorWidget.h
+0
-40
ParameterEditorWidget.qml
src/ViewWidgets/ParameterEditorWidget.qml
+0
-42
MainWindow.cc
src/ui/MainWindow.cc
+0
-4
MainWindow.h
src/ui/MainWindow.h
+0
-2
No files found.
QGCApplication.pro
View file @
09f33f6b
...
...
@@ -335,7 +335,6 @@ HEADERS += \
src
/
ui
/
WaypointViewOnlyView
.
h
\
src
/
ViewWidgets
/
CustomCommandWidget
.
h
\
src
/
ViewWidgets
/
CustomCommandWidgetController
.
h
\
src
/
ViewWidgets
/
ParameterEditorWidget
.
h
\
src
/
ViewWidgets
/
ViewWidgetController
.
h
\
src
/
MissionItem
.
h
\
src
/
AutoPilotPlugins
/
PX4
/
PX4AirframeLoader
.
h
...
...
@@ -464,7 +463,6 @@ SOURCES += \
src
/
ui
/
WaypointViewOnlyView
.
cc
\
src
/
ViewWidgets
/
CustomCommandWidget
.
cc
\
src
/
ViewWidgets
/
CustomCommandWidgetController
.
cc
\
src
/
ViewWidgets
/
ParameterEditorWidget
.
cc
\
src
/
ViewWidgets
/
ViewWidgetController
.
cc
\
src
/
MissionItem
.
cc
\
src
/
AutoPilotPlugins
/
PX4
/
PX4AirframeLoader
.
cc
...
...
qgroundcontrol.qrc
View file @
09f33f6b
...
...
@@ -110,7 +110,6 @@
<file alias="SetupParameterEditor.qml">src/VehicleSetup/SetupParameterEditor.qml</file>
<file alias="ScreenToolsFontQuery.qml">src/QmlControls/ScreenToolsFontQuery.qml</file>
<file alias="ParameterEditorWidget.qml">src/ViewWidgets/ParameterEditorWidget.qml</file>
<file alias="CustomCommandWidget.qml">src/ViewWidgets/CustomCommandWidget.qml</file>
<file alias="SafetyComponent.qml">src/AutoPilotPlugins/PX4/SafetyComponent.qml</file>
<file alias="RadioComponent.qml">src/AutoPilotPlugins/PX4/RadioComponent.qml</file>
...
...
src/AutoPilotPlugins/AutoPilotPlugin.cc
View file @
09f33f6b
...
...
@@ -157,9 +157,9 @@ Fact* AutoPilotPlugin::getFact(FactSystem::Provider_t provider, int componentId,
return
NULL
;
}
QStringList
AutoPilotPlugin
::
parameterNames
(
voi
d
)
QStringList
AutoPilotPlugin
::
parameterNames
(
int
componentI
d
)
{
return
_getParameterLoader
()
->
parameterNames
();
return
_getParameterLoader
()
->
parameterNames
(
componentId
);
}
const
QMap
<
int
,
QMap
<
QString
,
QStringList
>
>&
AutoPilotPlugin
::
getGroupMap
(
void
)
...
...
src/AutoPilotPlugins/AutoPilotPlugin.h
View file @
09f33f6b
...
...
@@ -81,8 +81,7 @@ public:
Q_INVOKABLE
bool
parameterExists
(
int
componentId
,
const
QString
&
name
);
/// Returns all parameter names
/// FIXME: component id missing, generic to fact
QStringList
parameterNames
(
void
);
QStringList
parameterNames
(
int
componentId
);
/// Returns the specified parameter Fact from the default component
/// WARNING: Returns a default Fact if parameter does not exists. If that possibility exists, check for existince first with
...
...
src/FactSystem/ParameterLoader.cc
View file @
09f33f6b
...
...
@@ -388,11 +388,11 @@ Fact* ParameterLoader::getFact(int componentId, const QString& name)
return
_mapParameterName2Variant
[
componentId
][
name
].
value
<
Fact
*>
();
}
QStringList
ParameterLoader
::
parameterNames
(
voi
d
)
QStringList
ParameterLoader
::
parameterNames
(
int
componentI
d
)
{
QStringList
names
;
foreach
(
QString
paramName
,
_mapParameterName2Variant
[
_
defaultComponentId
].
keys
())
{
foreach
(
QString
paramName
,
_mapParameterName2Variant
[
_
actualComponentId
(
componentId
)
].
keys
())
{
names
<<
paramName
;
}
...
...
src/FactSystem/ParameterLoader.h
View file @
09f33f6b
...
...
@@ -69,8 +69,7 @@ public:
const
QString
&
name
);
///< fact name
/// Returns all parameter names
/// FIXME: component id missing
QStringList
parameterNames
(
void
);
QStringList
parameterNames
(
int
componentId
);
/// Returns the specified Fact.
/// WARNING: Will assert if parameter does not exists. If that possibily exists, check for existince first with
...
...
src/QmlControls/ParameterEditor.qml
View file @
09f33f6b
This diff is collapsed.
Click to expand it.
src/QmlControls/ParameterEditorController.cc
View file @
09f33f6b
...
...
@@ -53,13 +53,35 @@ QStringList ParameterEditorController::getGroupsForComponent(int componentId)
return
groupMap
[
componentId
].
keys
();
}
QStringList
ParameterEditorController
::
get
Fact
sForGroup
(
int
componentId
,
QString
group
)
QStringList
ParameterEditorController
::
get
Parameter
sForGroup
(
int
componentId
,
QString
group
)
{
const
QMap
<
int
,
QMap
<
QString
,
QStringList
>
>&
groupMap
=
_autopilot
->
getGroupMap
();
return
groupMap
[
componentId
][
group
];
}
QStringList
ParameterEditorController
::
searchParametersForComponent
(
int
componentId
,
const
QString
&
searchText
,
bool
searchInName
,
bool
searchInDescriptions
)
{
QStringList
list
;
foreach
(
QString
paramName
,
_autopilot
->
parameterNames
(
componentId
))
{
if
(
searchText
.
isEmpty
())
{
list
+=
paramName
;
}
else
{
Fact
*
fact
=
_autopilot
->
getParameterFact
(
componentId
,
paramName
);
if
(
searchInName
&&
fact
->
name
().
contains
(
searchText
,
Qt
::
CaseInsensitive
))
{
list
+=
paramName
;
}
else
if
(
searchInDescriptions
&&
(
fact
->
shortDescription
().
contains
(
searchText
,
Qt
::
CaseInsensitive
)
||
fact
->
longDescription
().
contains
(
searchText
,
Qt
::
CaseInsensitive
)))
{
list
+=
paramName
;
}
}
}
list
.
sort
();
return
list
;
}
void
ParameterEditorController
::
clearRCToParam
(
void
)
{
Q_ASSERT
(
_uas
);
...
...
src/QmlControls/ParameterEditorController.h
View file @
09f33f6b
...
...
@@ -45,7 +45,8 @@ public:
Q_PROPERTY
(
QStringList
componentIds
MEMBER
_componentIds
CONSTANT
)
Q_INVOKABLE
QStringList
getGroupsForComponent
(
int
componentId
);
Q_INVOKABLE
QStringList
getFactsForGroup
(
int
componentId
,
QString
group
);
Q_INVOKABLE
QStringList
getParametersForGroup
(
int
componentId
,
QString
group
);
Q_INVOKABLE
QStringList
searchParametersForComponent
(
int
componentId
,
const
QString
&
searchText
,
bool
searchInName
,
bool
searchInDescriptions
);
Q_INVOKABLE
void
clearRCToParam
(
void
);
Q_INVOKABLE
void
saveToFile
(
void
);
...
...
src/QmlControls/QGCView.qml
View file @
09f33f6b
...
...
@@ -106,6 +106,9 @@ FactPanel {
}
else
if
(
buttons
&
StandardButton
.
Abort
)
{
__rejectButton
.
text
=
"
Abort
"
__rejectButton
.
visible
=
true
}
else
if
(
buttons
&
StandardButton
.
Reset
)
{
__rejectButton
.
text
=
"
Reset
"
__rejectButton
.
visible
=
true
}
}
...
...
src/VehicleSetup/SetupParameterEditor.qml
View file @
09f33f6b
...
...
@@ -29,5 +29,5 @@ import QGroundControl.ScreenTools 1.0
import
QGroundControl
.
Palette
1.0
ParameterEditor
{
fullMode
:
true
}
src/ViewWidgets/ParameterEditorWidget.cc
deleted
100644 → 0
View file @
4bfb1318
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Definition of class ParameterEditorWidget
* @author Lorenz Meier <mavteam@student.ethz.ch>
*
*/
#include "ParameterEditorWidget.h"
ParameterEditorWidget
::
ParameterEditorWidget
(
QWidget
*
parent
)
:
QGCQmlWidgetHolder
(
parent
)
{
setSource
(
QUrl
::
fromUserInput
(
"qrc:/qml/ParameterEditorWidget.qml"
));
}
src/ViewWidgets/ParameterEditorWidget.h
deleted
100644 → 0
View file @
4bfb1318
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/// @file
/// @author Don Gagne <don@thegagnes.com>
#ifndef PARAMETEREDITORWIDGET_H
#define PARAMETEREDITORWIDGET_H
#include "QGCQmlWidgetHolder.h"
class
ParameterEditorWidget
:
public
QGCQmlWidgetHolder
{
Q_OBJECT
public:
ParameterEditorWidget
(
QWidget
*
parent
=
0
);
};
#endif
src/ViewWidgets/ParameterEditorWidget.qml
deleted
100644 → 0
View file @
4bfb1318
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/// @file
/// @author Don Gagne <don@thegagnes.com>
import
QtQuick
2.2
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
ViewWidget
{
connectedComponent
:
editorComponent
Component
{
id
:
editorComponent
ParameterEditor
{
fullMode
:
false
}
}
}
src/ui/MainWindow.cc
View file @
09f33f6b
...
...
@@ -90,7 +90,6 @@ const char* MainWindow::_uasControlDockWidgetName = "UNMANNED_SYSTEM_CONTROL_DOC
const
char
*
MainWindow
::
_uasListDockWidgetName
=
"UNMANNED_SYSTEM_LIST_DOCKWIDGET"
;
const
char
*
MainWindow
::
_waypointsDockWidgetName
=
"WAYPOINT_LIST_DOCKWIDGET"
;
const
char
*
MainWindow
::
_mavlinkDockWidgetName
=
"MAVLINK_INSPECTOR_DOCKWIDGET"
;
const
char
*
MainWindow
::
_parametersDockWidgetName
=
"PARAMETER_INTERFACE_DOCKWIDGET"
;
const
char
*
MainWindow
::
_customCommandWidgetName
=
"CUSTOM_COMMAND_DOCKWIDGET"
;
const
char
*
MainWindow
::
_filesDockWidgetName
=
"FILE_VIEW_DOCKWIDGET"
;
const
char
*
MainWindow
::
_uasStatusDetailsDockWidgetName
=
"UAS_STATUS_DETAILS_DOCKWIDGET"
;
...
...
@@ -393,7 +392,6 @@ void MainWindow::_buildCommonWidgets(void)
{
_uasListDockWidgetName
,
"Unmanned Systems"
,
Qt
::
RightDockWidgetArea
},
{
_waypointsDockWidgetName
,
"Mission Plan"
,
Qt
::
BottomDockWidgetArea
},
{
_mavlinkDockWidgetName
,
"MAVLink Inspector"
,
Qt
::
RightDockWidgetArea
},
{
_parametersDockWidgetName
,
"Parameter Editor"
,
Qt
::
RightDockWidgetArea
},
{
_customCommandWidgetName
,
"Custom Command"
,
Qt
::
RightDockWidgetArea
},
{
_filesDockWidgetName
,
"Onboard Files"
,
Qt
::
RightDockWidgetArea
},
{
_uasStatusDetailsDockWidgetName
,
"Status Details"
,
Qt
::
RightDockWidgetArea
},
...
...
@@ -497,8 +495,6 @@ void MainWindow::_createInnerDockWidget(const QString& widgetName)
widget
=
new
QGCWaypointListMulti
(
this
);
}
else
if
(
widgetName
==
_mavlinkDockWidgetName
)
{
widget
=
new
QGCMAVLinkInspector
(
MAVLinkProtocol
::
instance
(),
this
);
}
else
if
(
widgetName
==
_parametersDockWidgetName
)
{
widget
=
new
ParameterEditorWidget
(
this
);
}
else
if
(
widgetName
==
_customCommandWidgetName
)
{
widget
=
new
CustomCommandWidget
(
this
);
}
else
if
(
widgetName
==
_filesDockWidgetName
)
{
...
...
src/ui/MainWindow.h
View file @
09f33f6b
...
...
@@ -49,7 +49,6 @@ This file is part of the QGROUNDCONTROL project
#if (defined QGC_MOUSE_ENABLED_WIN) | (defined QGC_MOUSE_ENABLED_LINUX)
#include "Mouse6dofInput.h"
#endif // QGC_MOUSE_ENABLED_WIN
#include "ParameterEditorWidget.h"
#include "opmapcontrol.h"
#include "MainToolBar.h"
#include "LogCompressor.h"
...
...
@@ -291,7 +290,6 @@ private:
static
const
char
*
_uasListDockWidgetName
;
static
const
char
*
_waypointsDockWidgetName
;
static
const
char
*
_mavlinkDockWidgetName
;
static
const
char
*
_parametersDockWidgetName
;
static
const
char
*
_customCommandWidgetName
;
static
const
char
*
_filesDockWidgetName
;
static
const
char
*
_uasStatusDetailsDockWidgetName
;
...
...
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