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
70b09fc5
Commit
70b09fc5
authored
Feb 09, 2011
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up WP interface
parent
c9a7fdde
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
187 additions
and
132 deletions
+187
-132
WaypointList.cc
src/ui/WaypointList.cc
+123
-111
WaypointList.h
src/ui/WaypointList.h
+4
-4
WaypointView.cc
src/ui/WaypointView.cc
+16
-0
WaypointView.h
src/ui/WaypointView.h
+14
-13
QGCCustomWaypointAction.ui
src/ui/mission/QGCCustomWaypointAction.ui
+30
-4
No files found.
src/ui/WaypointList.cc
View file @
70b09fc5
This diff is collapsed.
Click to expand it.
src/ui/WaypointList.h
View file @
70b09fc5
...
...
@@ -87,8 +87,8 @@ public slots:
/** @brief The waypoint manager informs that the waypoint list was changed */
void
waypointListChanged
(
void
);
/** @brief The MapWidget informs that a waypoint global was changed on the map */
void
waypointGlobalChanged
(
const
QPointF
coordinate
,
const
int
indexWP
);
//
/** @brief The MapWidget informs that a waypoint global was changed on the map */
//
void waypointGlobalChanged(const QPointF coordinate, const int indexWP);
void
clearWPWidget
();
...
...
@@ -99,8 +99,8 @@ public slots:
void
moveDown
(
Waypoint
*
wp
);
void
removeWaypoint
(
Waypoint
*
wp
);
void
setIsLoadFileWP
();
void
setIsReadGlobalWP
(
bool
value
);
//
void setIsLoadFileWP();
//
void setIsReadGlobalWP(bool value);
...
...
src/ui/WaypointView.cc
View file @
70b09fc5
...
...
@@ -29,6 +29,7 @@ WaypointView::WaypointView(Waypoint* wp, QWidget* parent) :
m_ui
->
setupUi
(
this
);
this
->
wp
=
wp
;
connect
(
wp
,
SIGNAL
(
destroyed
(
QObject
*
)),
this
,
SLOT
(
deleted
(
QObject
*
)));
// CUSTOM COMMAND WIDGET
customCommand
->
setupUi
(
m_ui
->
customActionWidget
);
...
...
@@ -320,6 +321,14 @@ void WaypointView::updateFrameView(int frame)
}
}
void
WaypointView
::
deleted
(
QObject
*
waypoint
)
{
if
(
waypoint
==
this
->
wp
)
{
deleteLater
();
}
}
void
WaypointView
::
changedFrame
(
int
index
)
{
// set waypoint action
...
...
@@ -346,6 +355,13 @@ void WaypointView::changedCurrent(int state)
void
WaypointView
::
updateValues
()
{
// Check if we just lost the wp, delete the widget
// accordingly
if
(
!
wp
)
{
deleteLater
();
return
;
}
// Deactivate signals from the WP
wp
->
blockSignals
(
true
);
// update frame
...
...
src/ui/WaypointView.h
View file @
70b09fc5
/*=====================================================================
/*===================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
...
...
@@ -10,15 +9,15 @@ This file is part of the QGROUNDCONTROL project
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/>.
======================================================================*/
/**
...
...
@@ -46,17 +45,19 @@ class Ui_QGCCustomWaypointAction;
class
WaypointView
:
public
QWidget
{
Q_OBJECT
Q_DISABLE_COPY
(
WaypointView
)
public:
explicit
WaypointView
(
Waypoint
*
wp
,
QWidget
*
parent
);
public:
explicit
WaypointView
(
Waypoint
*
wp
,
QWidget
*
parent
);
virtual
~
WaypointView
();
public:
void
setCurrent
(
bool
state
);
public
slots
:
void
moveUp
();
void
moveDown
();
void
remove
();
/** @brief Waypoint matching this widget has been deleted */
void
deleted
(
QObject
*
waypoint
);
void
changedAutoContinue
(
int
);
void
updateFrameView
(
int
frame
);
void
changedFrame
(
int
state
);
...
...
@@ -64,19 +65,19 @@ public slots:
void
changedAction
(
int
state
);
void
changedCurrent
(
int
);
void
updateValues
(
void
);
void
setYaw
(
int
);
//hidden degree to radian conversion
protected:
virtual
void
changeEvent
(
QEvent
*
e
);
Waypoint
*
wp
;
// Special widgets extendending the
// waypoint view to mission capabilities
Ui_QGCCustomWaypointAction
*
customCommand
;
private:
Ui
::
WaypointView
*
m_ui
;
signals:
void
moveUpWaypoint
(
Waypoint
*
);
void
moveDownWaypoint
(
Waypoint
*
);
...
...
src/ui/mission/QGCCustomWaypointAction.ui
View file @
70b09fc5
...
...
@@ -13,7 +13,7 @@
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
stretch=
"10,10,10,10,10,10,0"
>
<property
name=
"spacing"
>
<number>
5
</number>
</property>
...
...
@@ -23,7 +23,7 @@
<item>
<widget
class=
"QSpinBox"
name=
"commandSpinBox"
>
<property
name=
"prefix"
>
<string>
CMD
</string>
<string>
CMD
/ACT
</string>
</property>
<property
name=
"minimum"
>
<number>
0
</number>
...
...
@@ -65,7 +65,7 @@
<item>
<widget
class=
"QDoubleSpinBox"
name=
"param3SpinBox"
>
<property
name=
"prefix"
>
<string>
P3
</string>
<string>
Orbit/
P3
</string>
</property>
<property
name=
"minimum"
>
<double>
-2147483647.000000000000000
</double>
...
...
@@ -78,7 +78,33 @@
<item>
<widget
class=
"QDoubleSpinBox"
name=
"param4SpinBox"
>
<property
name=
"prefix"
>
<string>
P4
</string>
<string>
X/P4
</string>
</property>
<property
name=
"minimum"
>
<double>
-2147483647.000000000000000
</double>
</property>
<property
name=
"maximum"
>
<double>
2147483647.000000000000000
</double>
</property>
</widget>
</item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"param5SpinBox"
>
<property
name=
"prefix"
>
<string>
Y/P5
</string>
</property>
<property
name=
"minimum"
>
<double>
-2147483647.000000000000000
</double>
</property>
<property
name=
"maximum"
>
<double>
2147483647.000000000000000
</double>
</property>
</widget>
</item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"doubleSpinBox"
>
<property
name=
"prefix"
>
<string>
Z/P6
</string>
</property>
<property
name=
"minimum"
>
<double>
-2147483647.000000000000000
</double>
...
...
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