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