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
f8e30c95
Commit
f8e30c95
authored
Sep 03, 2010
by
Mariano Lizarraga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://github.com/tecnosapiens/qgroundcontrol
parents
2ba1ac3b
171d4c43
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
152 additions
and
76 deletions
+152
-76
layer.cpp
lib/QMapControl/src/layer.cpp
+1
-0
layermanager.cpp
lib/QMapControl/src/layermanager.cpp
+14
-3
qgroundcontrol.pri
qgroundcontrol.pri
+2
-1
MainWindow.cc
src/ui/MainWindow.cc
+9
-0
MainWindow.ui
src/ui/MainWindow.ui
+4
-1
MapWidget.cc
src/ui/MapWidget.cc
+18
-7
MapWidget.h
src/ui/MapWidget.h
+6
-1
WaypointList.cc
src/ui/WaypointList.cc
+8
-0
WaypointList.h
src/ui/WaypointList.h
+16
-0
WaypointList.ui
src/ui/WaypointList.ui
+16
-5
testlog2.txt
testlog2.txt
+58
-58
No files found.
lib/QMapControl/src/layer.cpp
View file @
f8e30c95
...
...
@@ -29,6 +29,7 @@ namespace qmapcontrol
Layer
::
Layer
(
QString
layername
,
MapAdapter
*
mapadapter
,
enum
LayerType
layertype
,
bool
takeevents
)
:
visible
(
true
),
mylayername
(
layername
),
mylayertype
(
layertype
),
mapAdapter
(
mapadapter
),
takeevents
(
takeevents
),
myoffscreenViewport
(
QRect
(
0
,
0
,
0
,
0
))
{
draggingGeometry
=
false
;
//qDebug() << "creating new Layer: " << layername << ", type: " << contents;
//qDebug() << this->layertype;
}
...
...
lib/QMapControl/src/layermanager.cpp
View file @
f8e30c95
...
...
@@ -366,15 +366,26 @@ namespace qmapcontrol
void
LayerManager
::
mouseEvent
(
const
QMouseEvent
*
evnt
)
{
QListIterator
<
Layer
*>
it
(
mylayers
);
while
(
it
.
hasNext
()
)
// TODO: to review errors generated in the Windows operating system when the QListIterator is used
for
(
int
i
=
0
;
i
<
mylayers
.
size
();
i
++
)
{
Layer
*
l
=
it
.
next
()
;
Layer
*
l
=
mylayers
[
i
]
;
if
(
l
->
isVisible
())
{
l
->
mouseEvent
(
evnt
,
mapmiddle_px
);
}
}
// QListIterator<Layer*> it(mylayers);
// while (it.hasNext())
// {
// qDebug() << it.next();
// Layer* l = it.next();
// if (l->isVisible())
// {
// l->mouseEvent(evnt, mapmiddle_px);
// }
// }
}
void
LayerManager
::
updateRequest
(
QRectF
rect
)
...
...
qgroundcontrol.pri
View file @
f8e30c95
...
...
@@ -126,7 +126,8 @@ win32 {
# Special settings for debug
#CONFIG += CONSOLE
INCLUDEPATH += $$BASEDIR\lib\sdl\include #\
INCLUDEPATH += $$BASEDIR\lib\sdl\include \
$$BASEDIR\lib\opal\include #\ #\
#"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
LIBS += -L$$BASEDIR\lib\sdl\win32 \
...
...
src/ui/MainWindow.cc
View file @
f8e30c95
...
...
@@ -97,6 +97,9 @@ MainWindow::MainWindow(QWidget *parent) :
// Adjust the size
adjustSize
();
//waypoints->setMapHandle(map);
connect
(
waypoints
,
SIGNAL
(
clearPahtclicked
()),
map
,
SLOT
(
clearPath
()));
}
MainWindow
::~
MainWindow
()
...
...
@@ -147,6 +150,10 @@ void MainWindow::connectWidgets()
connect
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
int
)),
linechart
,
SLOT
(
selectSystem
(
int
)));
connect
(
linechart
,
SIGNAL
(
logfileWritten
(
QString
)),
this
,
SLOT
(
loadDataView
(
QString
)));
connect
(
mavlink
,
SIGNAL
(
receiveLossChanged
(
int
,
float
)),
info
,
SLOT
(
updateSendLoss
(
int
,
float
)));
}
void
MainWindow
::
arrangeCenterStack
()
...
...
@@ -308,6 +315,8 @@ void MainWindow::connectActions()
// Joystick configuration
connect
(
ui
.
actionJoystickSettings
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
configure
()));
}
void
MainWindow
::
showHelp
()
...
...
src/ui/MainWindow.ui
View file @
f8e30c95
...
...
@@ -22,6 +22,9 @@
<height>
800
</height>
</size>
</property>
<property
name=
"mouseTracking"
>
<bool>
false
</bool>
</property>
<property
name=
"windowTitle"
>
<string>
MGMainWindow
</string>
</property>
...
...
@@ -35,7 +38,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
1000
</width>
<height>
2
2
</height>
<height>
2
1
</height>
</rect>
</property>
<widget
class=
"QMenu"
name=
"menuMGround"
>
...
...
src/ui/MapWidget.cc
View file @
f8e30c95
...
...
@@ -305,13 +305,13 @@ void MapWidget::createPathButtonClicked(bool checked)
this
->
setCursor
(
Qt
::
PointingHandCursor
);
mc
->
setMouseMode
(
qmapcontrol
::
MapControl
::
None
);
// Clear the previous WP track
// TODO: Move this to an actual clear track button and add a warning dialog
mc
->
layer
(
"Waypoints"
)
->
clearGeometries
();
wps
.
clear
();
path
->
setPoints
(
wps
);
mc
->
layer
(
"Waypoints"
)
->
addGeometry
(
path
);
wpIndex
.
clear
();
//
// Clear the previous WP track
//
// TODO: Move this to an actual clear track button and add a warning dialog
//
mc->layer("Waypoints")->clearGeometries();
//
wps.clear();
//
path->setPoints(wps);
//
mc->layer("Waypoints")->addGeometry(path);
//
wpIndex.clear();
}
else
{
...
...
@@ -536,3 +536,14 @@ void MapWidget::changeEvent(QEvent *e)
break
;
}
}
void
MapWidget
::
clearPath
()
{
// Clear the previous WP track
mc
->
layer
(
"Waypoints"
)
->
clearGeometries
();
wps
.
clear
();
path
->
setPoints
(
wps
);
mc
->
layer
(
"Waypoints"
)
->
addGeometry
(
path
);
wpIndex
.
clear
();
mc
->
updateRequestNew
();
}
src/ui/MapWidget.h
View file @
f8e30c95
...
...
@@ -63,6 +63,9 @@ public slots:
void
updateGlobalPosition
(
UASInterface
*
uas
,
double
lat
,
double
lon
,
double
alt
,
quint64
usec
);
void
updatePosition
(
float
time
,
double
lat
,
double
lon
);
//ROCA
void
clearPath
();
protected:
void
changeEvent
(
QEvent
*
e
);
void
wheelEvent
(
QWheelEvent
*
event
);
...
...
@@ -108,8 +111,10 @@ protected:
void
captureGeometryDrag
(
Geometry
*
geom
,
QPointF
coordinate
);
void
captureGeometryEndDrag
(
Geometry
*
geom
,
QPointF
coordinate
);
signals:
void
movePoint
(
QPointF
newCoord
);
//
void movePoint(QPointF newCoord);
private:
Ui
::
MapWidget
*
m_ui
;
...
...
src/ui/WaypointList.cc
View file @
f8e30c95
...
...
@@ -77,6 +77,8 @@ WaypointList::WaypointList(QWidget *parent, UASInterface* uas) :
connect
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
UASInterface
*
)),
this
,
SLOT
(
setUAS
(
UASInterface
*
)));
// SET UAS AFTER ALL SIGNALS/SLOTS ARE CONNECTED
setUAS
(
uas
);
...
...
@@ -352,3 +354,9 @@ void WaypointList::changeEvent(QEvent *e)
}
}
void
WaypointList
::
on_clearWPListButton_clicked
()
{
emit
clearPahtclicked
();
}
src/ui/WaypointList.h
View file @
f8e30c95
...
...
@@ -42,6 +42,7 @@ This file is part of the QGROUNDCONTROL project
#include "UASInterface.h"
#include "WaypointView.h"
namespace
Ui
{
class
WaypointList
;
}
...
...
@@ -73,6 +74,8 @@ public slots:
/** @brief Add a waypoint at the current MAV position */
void
addCurrentPositonWaypoint
();
//Update events
/** @brief sets statusLabel string */
void
updateStatusLabel
(
const
QString
&
string
);
...
...
@@ -88,6 +91,12 @@ public slots:
void
moveDown
(
Waypoint
*
wp
);
void
removeWaypoint
(
Waypoint
*
wp
);
signals:
void
clearPahtclicked
();
protected:
virtual
void
changeEvent
(
QEvent
*
e
);
...
...
@@ -102,6 +111,13 @@ protected:
private:
Ui
::
WaypointList
*
m_ui
;
private
slots
:
void
on_clearWPListButton_clicked
();
};
#endif // WAYPOINTLIST_H
src/ui/WaypointList.ui
View file @
f8e30c95
...
...
@@ -26,7 +26,7 @@
<property
name=
"spacing"
>
<number>
4
</number>
</property>
<item
row=
"0"
column=
"0"
colspan=
"
9
"
>
<item
row=
"0"
column=
"0"
colspan=
"
10
"
>
<widget
class=
"QScrollArea"
name=
"scrollArea"
>
<property
name=
"widgetResizable"
>
<bool>
true
</bool>
...
...
@@ -37,7 +37,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
466
</width>
<height>
1
49
</height>
<height>
1
63
</height>
</rect>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
...
...
@@ -54,7 +54,7 @@
</widget>
</widget>
</item>
<item
row=
"2"
column=
"
7
"
>
<item
row=
"2"
column=
"
8
"
>
<widget
class=
"QPushButton"
name=
"readButton"
>
<property
name=
"text"
>
<string>
Read
</string>
...
...
@@ -65,7 +65,7 @@
</property>
</widget>
</item>
<item
row=
"2"
column=
"
8
"
>
<item
row=
"2"
column=
"
9
"
>
<widget
class=
"QPushButton"
name=
"transmitButton"
>
<property
name=
"text"
>
<string>
Write
</string>
...
...
@@ -76,7 +76,7 @@
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
colspan=
"
9
"
>
<item
row=
"3"
column=
"0"
colspan=
"
10
"
>
<widget
class=
"QLabel"
name=
"statusLabel"
>
<property
name=
"text"
>
<string>
TextLabel
</string>
...
...
@@ -135,6 +135,17 @@
</property>
</widget>
</item>
<item
row=
"2"
column=
"7"
>
<widget
class=
"QPushButton"
name=
"clearWPListButton"
>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"icon"
>
<iconset
resource=
"../../mavground.qrc"
>
<normaloff>
:/images/actions/process-stop.svg
</normaloff>
:/images/actions/process-stop.svg
</iconset>
</property>
</widget>
</item>
</layout>
<action
name=
"actionAddWaypoint"
>
<property
name=
"icon"
>
...
...
testlog2.txt
View file @
f8e30c95
This diff is collapsed.
Click to expand it.
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