/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Maps/Classes/cSettings.cpp |
---|
0,0 → 1,88 |
/*************************************************************************** |
* Copyright (C) 2008 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program 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 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#include <QSettings> |
#include <QDir> |
#include "cSettings.h" |
cSettings::cSettings() |
{ |
Settings_ID = 1; |
read_Settings(); |
} |
void cSettings::read_Settings() |
{ |
QSettings Setting("QMK", QA_NAME); |
Setting.beginGroup("Global"); |
Settings_ID = Setting.value("Settings ID", Settings_ID).toInt(); |
Setting.endGroup(); |
Setting.beginGroup("GUI"); |
GUI.isMax = Setting.value("IsMax",false).toBool(); |
GUI.Size = Setting.value("Size", QSize(500, 350)).toSize(); |
GUI.Point = Setting.value("Point",QPoint(1,1)).toPoint(); |
GUI.Toolbar = Setting.value("Toolbar",true).toBool(); |
Setting.endGroup(); |
Setting.beginGroup("CONFIG"); |
CONFIG.cb_CenterPos = Setting.value("cb_CenterPos",true).toBool(); |
CONFIG.cb_ShowRoute = Setting.value("cb_ShowRoute",true).toBool(); |
CONFIG.cb_ShowWPs = Setting.value("cb_ShowWPs",true).toBool(); |
CONFIG.cb_Goto = Setting.value("cb_Goto",true).toBool(); |
Setting.endGroup(); |
Setting.beginGroup("Navi"); |
NAVI.StayTime = Setting.value("StayTime", 500).toInt(); |
NAVI.Latitude = Setting.value("Latitude", 52.5).toDouble(); |
NAVI.Longitude = Setting.value("Longitude", 13.5).toDouble(); |
Setting.endGroup(); |
} |
void cSettings::write_Settings() |
{ |
QSettings Setting("QMK", QA_NAME); |
Setting.beginGroup("Global"); |
Setting.setValue("Settings ID", Settings_ID); |
Setting.endGroup(); |
Setting.beginGroup("GUI"); |
Setting.setValue("IsMax", GUI.isMax); |
Setting.setValue("Size", GUI.Size); |
Setting.setValue("Point", GUI.Point); |
Setting.setValue("Toolbar", GUI.Toolbar); |
Setting.endGroup(); |
Setting.beginGroup("CONFIG"); |
Setting.setValue("cb_CenterPos", CONFIG.cb_CenterPos); |
Setting.setValue("cb_ShowRoute", CONFIG.cb_ShowRoute); |
Setting.setValue("cb_ShowWPs", CONFIG.cb_ShowWPs); |
Setting.setValue("cb_Goto", CONFIG.cb_Goto); |
Setting.endGroup(); |
Setting.beginGroup("NAVI"); |
Setting.setValue("StayTime", NAVI.StayTime); |
Setting.setValue("Latitude", NAVI.Latitude); |
Setting.setValue("Longitude", NAVI.Longitude); |
Setting.endGroup(); |
} |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Maps/Classes/cSettings.h |
---|
0,0 → 1,65 |
/*************************************************************************** |
* Copyright (C) 2008 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program 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 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#ifndef CSETTINGS_H |
#define CSETTINGS_H |
#include <QSize> |
#include <QPoint> |
#include <QString> |
#include "../Defines.h" |
struct set_GUI |
{ |
bool isMax; |
QSize Size; |
QPoint Point; |
bool Toolbar; |
}; |
struct set_CONFIG |
{ |
bool cb_Goto; |
bool cb_ShowRoute; |
bool cb_ShowWPs; |
bool cb_CenterPos; |
}; |
struct set_NAVI |
{ |
int StayTime; |
double Latitude; |
double Longitude; |
}; |
class cSettings |
{ |
public: |
cSettings(); |
void read_Settings(); |
void write_Settings(); |
int Settings_ID; |
set_GUI GUI; |
set_CONFIG CONFIG; |
set_NAVI NAVI; |
}; |
#endif // CSETTINGS_H |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Maps/Defines.h |
---|
0,0 → 1,54 |
/*************************************************************************** |
* Copyright (C) 2009 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program 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 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#ifndef DEFINES_H |
#define DEFINES_H |
#include <QString> |
#include "../Global/Global.h" |
#include "../Global/Kopter.h" |
static const QString QA_NAME = "QMK-Maps"; |
static const QString QA_VERSION_NR = "1.3.1"; |
#ifdef _BETA_ |
static const QString QA_VERSION = QA_VERSION_NR + " (BETA)"; |
#else |
static const QString QA_VERSION = QA_VERSION_NR; |
#endif |
static const QString QA_DATE = "05.02.2011"; |
static const QString QA_YEAR = "2008-2011"; |
static const QString QA_ABOUT = |
"<HTML>" |
"<p><b><font size=8>" + QA_NAME + "</font></b></p>" |
"<br />" |
"Version " + QA_VERSION + " - " + QA_DATE + " on " + QA_OS + "" |
"<br /><br /><b>kompatibel zu " + QA_HWVERSION + "</b>" |
"<br /><br />" |
"(C) " + QA_YEAR + " by " + QA_AUTHOR + " - " |
"<a href=\"mailto:" + QA_EMAIL + "\">" + QA_EMAIL + "</a> <br /><br />" |
"Groundstation-Programm für den Mikrokopter<br /><br />" |
"QMK-Maps - Positionsanzeige und Waypoint-Programmierung.<br /><br /> " |
"Dieses Programm wird unter den Bedingungen der GPL v2 veröffentlicht." |
"</HTML>"; |
static const QString DataFields = "VWXO"; |
#endif // DEFINES_H |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Maps/Dialogs/dlg_Main.cpp |
---|
0,0 → 1,908 |
/*************************************************************************** |
* Copyright (C) 2009 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program 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 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#include <QCryptographicHash> |
#include <QMessageBox> |
#include <QDomDocument> |
#include <QFile> |
#include "dlg_Main.h" |
#include "dlg_MapPos.h" |
// Konstruktor Main-Form |
dlg_Main::dlg_Main() |
{ |
setupUi(this); |
o_Settings = new cSettings(); |
wg_Connection->set_Client(ID_MAPS, QA_NAME + " " + QA_VERSION, DataFields); |
o_Map = new MapControl(QSize(25,25)); |
l_RouteWP = new LineString(); |
init_Directorys(); |
init_GUI(); |
init_Connections(); |
} |
// Grafische Oberfläche initialisieren |
void dlg_Main::init_GUI() |
{ |
setWindowTitle(QA_NAME + " " + QA_VERSION); |
resize(o_Settings->GUI.Size); |
move(o_Settings->GUI.Point); |
if (o_Settings->GUI.isMax) |
{ |
showMaximized(); |
} |
wg_Connection->set_SelectVisible(false); |
cb_CenterPos->setChecked(o_Settings->CONFIG.cb_CenterPos); |
cb_ShowRoute->setChecked(o_Settings->CONFIG.cb_ShowRoute); |
cb_ShowWPs->setChecked(o_Settings->CONFIG.cb_ShowWPs); |
cb_Goto->setChecked(o_Settings->CONFIG.cb_Goto); |
// tb_More->addWidget(cb_Maps); |
cb_Maps->setVisible(false); |
ac_Toolbar->setChecked(o_Settings->GUI.Toolbar); |
if (ac_Toolbar->isChecked()) |
{ |
wg_Connection->set_ButtonVisible(false); |
} |
else |
{ |
ToolBar->setVisible(false); |
tb_More->setVisible(false); |
} |
} |
// Signale mit Slots verbinden |
void dlg_Main::init_Connections() |
{ |
connect(ac_Connect, SIGNAL(triggered()), wg_Connection, SLOT(slot_btn_Connect())); |
connect(ac_Toolbar, SIGNAL(triggered()), this, SLOT(slot_ac_Toolbar())); |
connect(sl_Zoom, SIGNAL(valueChanged(int)), this, SLOT(slot_Zoom(int))); |
connect(cb_Maps, SIGNAL(currentIndexChanged(int)), this, SLOT(slot_ChangeMap(int))); |
connect(cb_ShowWPs, SIGNAL(toggled(bool)), this, SLOT(slot_ShowWayPoints(bool))); |
connect(btn_WPAdd, SIGNAL(clicked()), this, SLOT(slot_btn_WPAdd())); |
connect(btn_WPFly, SIGNAL(clicked()), this, SLOT(slot_btn_WPFly())); |
connect(btn_WPDelete, SIGNAL(clicked()), this, SLOT(slot_btn_WPDelete())); |
connect(ac_LoadRoute, SIGNAL(triggered()), this, SLOT(slot_ac_LoadWayPoints())); |
connect(ac_SaveRoute, SIGNAL(triggered()), this, SLOT(slot_ac_SaveRoute())); |
connect(ac_LoadMap, SIGNAL(triggered()), this, SLOT(slot_ac_LoadMapPic())); |
connect(ac_Record, SIGNAL(triggered()), this, SLOT(slot_ac_Record())); |
connect(ac_RouteDelete, SIGNAL(triggered()), this, SLOT(slot_ac_RouteDelete())); |
// About QMK-Kernel & About-QT Dialog einfügen |
connect(ac_About, SIGNAL(triggered()), this, SLOT(slot_ac_About())); |
menu_Help->addAction(trUtf8("Über &Qt"), qApp, SLOT(aboutQt())); |
connect(wg_Connection, SIGNAL(sig_Status(int)), this, SLOT(slot_ConnectionStatus(int))); |
connect(wg_Connection, SIGNAL(sig_MK_Version(s_Hardware)), this, SLOT(slot_MK_Version(s_Hardware))); |
connect(wg_Connection, SIGNAL(sig_MK_NaviData(s_MK_NaviData)), this, SLOT(slot_MK_NaviData(s_MK_NaviData))); |
connect(wg_Connection, SIGNAL(sig_MK_WayPoint(int)), this, SLOT(slot_MK_WayPoint(int))); |
} |
void dlg_Main::init_Directorys() |
{ |
QDir *t_Dir = new QDir(); |
s_Dir.MainData = QDir::homePath() + "/QMK-Data"; |
if (!t_Dir->exists(s_Dir.MainData)) |
{ |
t_Dir->mkdir(s_Dir.MainData); |
} |
s_Dir.MapCache = s_Dir.MainData + "/Map-Cache"; |
if (!t_Dir->exists(s_Dir.MapCache)) |
{ |
t_Dir->mkdir(s_Dir.MapCache); |
} |
s_Dir.WPRoutes = s_Dir.MainData + "/WP-Routes"; |
if (!t_Dir->exists(s_Dir.WPRoutes)) |
{ |
t_Dir->mkdir(s_Dir.WPRoutes); |
} |
s_Dir.MapPics = s_Dir.MainData + "/Map-Pics"; |
if (!t_Dir->exists(s_Dir.MapPics)) |
{ |
t_Dir->mkdir(s_Dir.MapPics); |
} |
s_Dir.Flights = s_Dir.MainData + "/Flights"; |
if (!t_Dir->exists(s_Dir.Flights)) |
{ |
t_Dir->mkdir(s_Dir.Flights); |
} |
} |
/////////////////////////////////////////////////////////////////// |
// QMK-Maps // |
/////////////////////////////////////////////////////////////////// |
void dlg_Main::create_Map() |
{ |
o_Map->resize(w_Map->size() - QSize(25,50)); |
o_Map->enablePersistentCache(s_Dir.MapCache); |
o_Map->showScale(true); |
o_Adapter = new OSMMapAdapter(); |
o_Layer = new MapLayer("MapLayer", o_Adapter); |
o_Click = new GeometryLayer("Click", o_Adapter); |
o_Info = new GeometryLayer("Poute", o_Adapter); |
o_RouteWP = new GeometryLayer("Route-WayPoint", o_Adapter); |
o_RouteFL = new GeometryLayer("Route-Flight", o_Adapter); |
o_Map->addLayer(o_Layer); |
o_Map->addLayer(o_Click); |
o_Map->addLayer(o_Info); |
o_Map->addLayer(o_RouteWP); |
o_Map->addLayer(o_RouteFL); |
o_Map->setZoom(17); |
o_Map->setView(QPointF(o_Settings->NAVI.Longitude,o_Settings->NAVI.Latitude)); |
// o_Map->setView(QPointF(13.5,52.5)); |
// o_Map->setView(QPointF(13.419805,52.431787)); |
connect(o_Map, SIGNAL(mouseEventCoordinate(const QMouseEvent*, const QPointF)), this, SLOT(slot_Click(const QMouseEvent*, const QPointF))); |
l_Map->addWidget(o_Map); |
sl_Zoom->setValue(17); |
// Flight |
Pen[0] = new QPen(QColor(0,0,255,255)); |
Pen[0]->setWidth(2); |
Pen[1] = new QPen(QColor(0,0,255,255)); |
Pen[1]->setWidth(1); |
// WayPoint |
Pen[2] = new QPen(QColor(255,0,0,255)); |
Pen[2]->setWidth(2); |
Pen[3] = new QPen(QColor(255,0,0,255)); |
Pen[3]->setWidth(1); |
// Info |
Pen[4] = new QPen(QColor(0,128,128,255)); |
Pen[4]->setWidth(2); |
Pen[5] = new QPen(QColor(0,128,128,255)); |
Pen[5]->setWidth(1); |
} |
// auf Veränderung der Fenstergröße reagieren |
void dlg_Main::resizeEvent ( QResizeEvent * event ) |
{ |
event = event; |
o_Map->resize(w_Map->size() - QSize(25,25)); |
} |
void dlg_Main::wheelEvent(QWheelEvent *event) |
{ |
int zoomValue = sl_Zoom->value(); |
int numDegrees = event->delta() / 8; |
int numSteps = numDegrees / 15; |
zoomValue += numSteps; |
if (zoomValue < 0) { zoomValue = 0;} |
if (zoomValue > 18) { zoomValue = 18;} |
sl_Zoom->setValue(zoomValue); |
} |
QList<sWayPoint> dlg_Main::parse_WayPointKML(QString s_File) |
{ |
QList<sWayPoint> tmp_WayPoints; |
sWayPoint tmp_WayPoint; |
QFile f_KML(s_File); |
f_KML.open(QIODevice::ReadOnly | QIODevice::Text); |
QByteArray s_KML; |
while (!f_KML.atEnd()) |
{ |
s_KML.append(f_KML.readLine()); |
} |
f_KML.close(); |
QDomDocument *UserXML; |
UserXML = new QDomDocument; |
UserXML->setContent(s_KML); |
QDomElement Root = UserXML->firstChildElement("kml"); |
QDomElement Document = Root.firstChildElement("Document"); |
QDomElement Placemark = Document.firstChildElement("Placemark"); |
QDomElement Linestring = Placemark.firstChildElement("LineString"); |
QString Name = Placemark.firstChildElement("name").toElement().text(); |
QString Route = Linestring.firstChildElement("coordinates").toElement().text(); |
QStringList s_Points = Route.split(" "); |
QStringList Position; |
for (int z = 0; z < s_Points.count() - 1; z++) |
{ |
if (z != 20) |
{ |
Position = s_Points[z].split(","); |
tmp_WayPoint.Longitude = Position[0].toDouble(); |
tmp_WayPoint.Latitude = Position[1].toDouble(); |
tmp_WayPoint.Altitude = Position[2].toDouble(); |
tmp_WayPoint.Time = sb_Time->value(); |
tmp_WayPoints.append(tmp_WayPoint); |
} |
else |
{ |
QMessageBox::warning(this, QA_NAME,trUtf8("Die Wegpunkt-Liste umfasst mehr als 20 Einträge. Es werden nur die ersten 20 Einträge übernommen."), QMessageBox::Ok); |
btn_WPAdd->setEnabled(false); |
z = s_Points.count(); |
} |
} |
return tmp_WayPoints; |
} |
QList<sWayPoint> dlg_Main::parse_WayPointMKW(QString s_File) |
{ |
QList<sWayPoint> tmp_WayPoints; |
sWayPoint tmp_WayPoint; |
QFile f_MKW(s_File); |
f_MKW.open(QIODevice::ReadOnly | QIODevice::Text); |
QString s_MKW; |
while (!f_MKW.atEnd()) |
{ |
s_MKW.append(f_MKW.readLine()); |
} |
f_MKW.close(); |
QStringList s_Points = s_MKW.split(" "); |
QStringList Position; |
for (int z = 0; z < s_Points.count() - 1; z++) |
{ |
if (z != 20) |
{ |
Position = s_Points[z].split(","); |
tmp_WayPoint.Longitude = Position[0].toDouble(); |
tmp_WayPoint.Latitude = Position[1].toDouble(); |
tmp_WayPoint.Altitude = Position[2].toDouble(); |
tmp_WayPoint.Time = Position[3].toInt(); |
tmp_WayPoints.append(tmp_WayPoint); |
} |
else |
{ |
QMessageBox::warning(this, QA_NAME,trUtf8("Die Wegpunkt-Liste umfasst mehr als 20 Einträge. Es werden nur die ersten 20 Einträge übernommen."), QMessageBox::Ok); |
btn_WPAdd->setEnabled(false); |
z = s_Points.count(); |
} |
} |
return tmp_WayPoints; |
} |
// Waypoint-Route anzeigen in Karte |
void dlg_Main::show_WayPoints(QList<sWayPoint> WayPoints) |
{ |
Point* p_Point; |
o_RouteWP->removeGeometry(l_RouteWP); |
p_RouteWP.clear(); |
l_WayPoints.clear(); |
l_WayPoints = WayPoints; |
for (int z = 0; z < WayPoints.count(); z++) |
{ |
p_Point = new Point(WayPoints[z].Longitude, WayPoints[z].Latitude); |
p_RouteWP.append(p_Point); |
} |
l_RouteWP = new LineString(p_RouteWP, "", Pen[3]); |
o_RouteWP->addGeometry(l_RouteWP); |
o_Map->setView(p_Point); |
o_Map->updateRequestNew(); |
} |
// Waypoint-Liste speichern |
void dlg_Main::save_WayPointsMKW(QString s_File) |
{ |
QFile *f_MKW = new QFile(s_File); |
f_MKW->open(QIODevice::ReadWrite | QIODevice::Text); |
QTextStream out(f_MKW); |
out.setRealNumberPrecision(9); |
for (int z = 0; z < l_WayPoints.count(); z++) |
{ |
out << l_WayPoints[z].Longitude << "," << l_WayPoints[z].Latitude << "," << l_WayPoints[z].Altitude << "," << l_WayPoints[z].Time << " \n"; |
} |
f_MKW->close(); |
} |
// Aktuelle MK-Position hinzufügen |
void dlg_Main::add_Position(s_MK_NaviData t_NaviData) |
{ |
sWayPoint WayPoint; |
WayPoint.Longitude = HandlerMK::Int2Double(t_NaviData.CurrentPosition.Longitude, 7); |
WayPoint.Latitude = HandlerMK::Int2Double(t_NaviData.CurrentPosition.Latitude, 7); |
WayPoint.Altitude = HandlerMK::Int2Double(t_NaviData.CurrentPosition.Altitude, 3); |
o_Settings->NAVI.Latitude = WayPoint.Latitude; |
o_Settings->NAVI.Longitude = WayPoint.Longitude; |
l_Track.append(WayPoint); |
o_RouteFL->removeGeometry(l_RouteFL); |
p_RouteFL.append(new Point(WayPoint.Longitude, WayPoint.Latitude)); |
o_Click->removeGeometry(LastPos); |
Point* P = new CirclePoint(WayPoint.Longitude, WayPoint.Latitude, "P1", Point::Middle, Pen[0]); |
LastPos = P; |
// P->setBaselevel(17); |
o_Click->addGeometry(P); |
// Target anzeigen |
o_Click->removeGeometry(Target); |
Target = new ImagePoint( HandlerMK::Int2Double(t_NaviData.TargetPosition.Longitude, 7), HandlerMK::Int2Double(t_NaviData.TargetPosition.Latitude, 7), ":/Flags/Global/Images/Flags/Target.png", "Start"); |
Target->setBaselevel(o_Adapter->adaptedZoom()); |
o_Click->addGeometry(Target); |
if (cb_CenterPos->isChecked()) |
{ |
o_Map->setView(QPointF(WayPoint.Longitude, WayPoint.Latitude)); |
} |
if (cb_ShowRoute->isChecked()) |
{ |
l_RouteFL = new LineString(p_RouteFL, "", Pen[1]); |
o_RouteFL->addGeometry(l_RouteFL); |
} |
o_Map->updateRequestNew(); |
if (ac_Record->isChecked()) |
{ |
QTextStream Out(o_Record); |
Out.setRealNumberPrecision(9); |
Out << WayPoint.Longitude << ", " << WayPoint.Latitude << ", " << WayPoint.Altitude << "\n"; |
} |
} |
// Ein Ziel anfliegen. |
// TODO: Check auf Entfernung zur IST-Position. |
void dlg_Main::send_Target(Point *t_Target) |
{ |
if (l_Track.count() > 0) |
{ |
s_MK_WayPoint s_WayPoint; |
s_WayPoint.Position.Latitude = int32_t(t_Target->latitude() * 10000000+0.5); |
s_WayPoint.Position.Longitude = int32_t(t_Target->longitude() * 10000000+0.5); |
s_WayPoint.Position.Altitude = 0; |
s_WayPoint.Position.Status = NEWDATA; |
s_WayPoint.Heading = -1; |
s_WayPoint.ToleranceRadius = 5; |
s_WayPoint.HoldTime = sb_Time->value(); |
s_WayPoint.Event_Flag = 0; |
s_WayPoint.Index = 1; |
s_WayPoint.reserve[0] = 0; // reserve |
s_WayPoint.reserve[1] = 0; // reserve |
s_WayPoint.reserve[2] = 0; // reserve |
s_WayPoint.reserve[3] = 0; |
memcpy((unsigned char *)&c_Data, (unsigned char *)&s_WayPoint, sizeof(s_WayPoint)); |
wg_Connection->send_Data(HandlerMK::make_Frame('s', ADDRESS_NC, c_Data, sizeof(s_WayPoint)).toLatin1().data()); |
} |
else |
{ |
QMessageBox::warning(this, QA_NAME,tr("Es wurden noch keine aktuellen Positionsdaten vom Mikrokopter empfangen."), QMessageBox::Ok); |
} |
} |
//Waypoint-Liste zum MK senden |
void dlg_Main::send_WayPoints(QList<sWayPoint> t_WayPoints, int t_Pos) |
{ |
s_MK_WayPoint s_WayPoint; |
double Longitude, Latitude; |
if (t_Pos == 0) |
{ // Waypoint-Liste löschen |
s_WayPoint.Position.Status = INVALID; |
memcpy((unsigned char *)&c_Data, (unsigned char *)&s_WayPoint, sizeof(s_WayPoint)); |
wg_Connection->send_Data(HandlerMK::make_Frame('w', ADDRESS_NC, c_Data, sizeof(s_WayPoint)).toLatin1().data(), DATA_WRITE_WAYPOINT); |
} |
else |
{ |
int z = t_Pos - 1; |
Longitude = t_WayPoints[z].Longitude; |
Latitude = t_WayPoints[z].Latitude; |
if (Longitude < 100) |
Longitude *= 10000000+0.5; |
if (Latitude < 100) |
Latitude *= 10000000+0.5; |
//fülle Wegpunkt-Daten |
s_WayPoint.Position.Altitude = 0; |
s_WayPoint.Position.Longitude = int32_t(Longitude); |
s_WayPoint.Position.Latitude = int32_t(Latitude); |
s_WayPoint.Position.Status = NEWDATA; |
s_WayPoint.Heading = -1; |
s_WayPoint.ToleranceRadius = 5; |
s_WayPoint.HoldTime = t_WayPoints[z].Time; |
s_WayPoint.Event_Flag = 0; |
s_WayPoint.Index = t_Pos; |
s_WayPoint.reserve[0] = 0; // reserve |
s_WayPoint.reserve[1] = 0; // reserve |
s_WayPoint.reserve[2] = 0; // reserve |
s_WayPoint.reserve[3] = 0; // reserve |
memcpy((unsigned char *)&c_Data, (unsigned char *)&s_WayPoint, sizeof(s_WayPoint)); |
wg_Connection->send_Data(HandlerMK::make_Frame('w', ADDRESS_NC, c_Data, sizeof(s_WayPoint)).toLatin1().data(), DATA_WRITE_WAYPOINT); |
} |
} |
/////////// |
// Slots // |
/////////// |
// About-Dialog |
void dlg_Main::slot_ac_About() |
{ |
QMessageBox::about(this, trUtf8(("Über ")) + QA_NAME, QA_ABOUT); |
} |
void dlg_Main::slot_ac_Toolbar() |
{ |
if (ac_Toolbar->isChecked()) |
{ |
wg_Connection->set_ButtonVisible(false); |
ToolBar->setVisible(true); |
tb_More->setVisible(true); |
} |
else |
{ |
wg_Connection->set_ButtonVisible(true); |
ToolBar->setVisible(false); |
tb_More->setVisible(false); |
} |
} |
void dlg_Main::slot_ConnectionStatus(int li_Status) |
{ |
if (li_Status) |
{ |
ac_Connect->setChecked(true); |
ac_Connect->setText(tr("Trennen")); |
} |
else |
{ |
ac_Connect->setChecked(false); |
ac_Connect->setText(tr("Verbinden")); |
} |
} |
void dlg_Main::slot_MK_Version(s_Hardware ls_Version) |
{ |
gs_Version = ls_Version; |
setWindowTitle(QA_NAME + " " + QA_VERSION + " - " + ls_Version.Hardware + " " + ls_Version.Version); |
} |
void dlg_Main::slot_MK_NaviData(s_MK_NaviData ps_MK_NaviData) |
{ |
QString Mode = "NC-Flags : "; |
if (ps_MK_NaviData.NCFlags & 0x08) {le_Mode->setText(tr("Range Limit")); Mode += "R";} |
if (ps_MK_NaviData.NCFlags & 0x10) {le_Mode->setText(tr("Serial Error")); Mode += "S";} |
if (ps_MK_NaviData.NCFlags & 0x20) {le_Mode->setText(tr("Target reached")); Mode += "T";} |
if (ps_MK_NaviData.NCFlags & 0x40) {le_Mode->setText(tr("Manual Control")); Mode += "M";} |
if (ps_MK_NaviData.NCFlags & 0x01) {le_Mode->setText(tr("Free")); Mode += "F";} |
if (ps_MK_NaviData.NCFlags & 0x02) {le_Mode->setText(tr("Position Hold")); Mode += "P";} |
if (ps_MK_NaviData.NCFlags & 0x04) {le_Mode->setText(tr("Coming Home")); Mode += "C";} |
le_WP->setText(QString("%1/").arg(ps_MK_NaviData.WaypointIndex) + QString("%1").arg(ps_MK_NaviData.WaypointNumber)); |
le_WPTime->setText(QString("%1:").arg(ps_MK_NaviData.TargetHoldTime / 60) + (QString("%1").arg(ps_MK_NaviData.TargetHoldTime % 60)).rightJustified(2, '0')); |
le_WPDist->setText(QString("%1m").arg(ps_MK_NaviData.TargetPositionDeviation.Distance / 10)); |
le_HomeDist->setText(QString("%1m").arg(ps_MK_NaviData.HomePositionDeviation.Distance / 10)); |
le_Sats->setText(QString("%1").arg(ps_MK_NaviData.SatsInUse)); |
add_Position(ps_MK_NaviData); |
} |
void dlg_Main::slot_MK_WayPoint(int pi_WayPointID) |
{ |
if (pi_WayPointID < l_WayPoints.count()) |
{ |
send_WayPoints(l_WayPoints, pi_WayPointID + 1); |
} |
} |
/////////////////////////////////////////////////////////////////// |
// QMK-Maps // |
/////////////////////////////////////////////////////////////////// |
// Zoom der Karte ändern |
void dlg_Main::slot_Zoom(int t_Zoom) |
{ |
o_Map->setZoom(t_Zoom); |
} |
// Karte wechseln |
void dlg_Main::slot_ChangeMap(int t_Set) |
{ |
int zoom = o_Adapter->adaptedZoom(); |
QPointF a = o_Map->currentCoordinate(); |
o_Map->setZoom(0); |
switch(t_Set) |
{ |
case 0 : // OpenStreetMap |
{ |
o_Adapter = new OSMMapAdapter(); |
} |
break; |
case 1 : // Yahoo Sat |
{ |
o_Adapter = new TileMapAdapter("tile.openaerialmap.org", "/tiles/1.0.0/openaerialmap-900913/%1/%2/%3.png", 256, 0, 17); |
} |
break; |
case 2 : // Google Maps |
{ |
o_Adapter = new GoogleMapAdapter(); |
} |
break; |
case 3 : // Google Sat |
{ |
o_Adapter = new GoogleSatMapAdapter(); |
} |
break; |
case 4 : // Yahoo Maps |
{ |
o_Adapter = new YahooMapAdapter(); |
} |
break; |
case 5 : // Yahoo Sat |
{ |
o_Adapter = new YahooMapAdapter("us.maps3.yimg.com", "/aerial.maps.yimg.com/png?v=1.7&t=a&s=256&x=%2&y=%3&z=%1"); |
} |
break; |
} |
o_Layer->setMapAdapter(o_Adapter); |
o_Click->setMapAdapter(o_Adapter); |
o_Info->setMapAdapter(o_Adapter); |
o_RouteWP->setMapAdapter(o_Adapter); |
o_RouteFL->setMapAdapter(o_Adapter); |
o_Map->updateRequestNew(); |
o_Map->setZoom(zoom); |
} |
// Click in die Karte |
void dlg_Main::slot_Click(const QMouseEvent* Event, const QPointF Coord) |
{ |
if ((Event->type() == QEvent::MouseButtonPress) && ((Event->button() == Qt::RightButton) || (Event->button() == Qt::MidButton))) |
{ |
sl_Zoom->setValue(o_Adapter->adaptedZoom()); |
} |
// Überwachen ob Karte verschoben wird |
if ((Event->type() == QEvent::MouseButtonPress) && (Event->button() == Qt::LeftButton)) |
{ |
MapCenter = o_Map->currentCoordinate(); |
} |
// Nur wenn nicht Verschoben dann einen Punkt setzen |
if ((Event->type() == QEvent::MouseButtonRelease) && (Event->button() == Qt::LeftButton)) |
{ |
if (o_Map->currentCoordinate() == MapCenter) |
{ |
if (l_WayPoints.count() < 20) |
{ |
btn_WPAdd->setEnabled(true); |
} |
o_Click->removeGeometry(ClickPoint); |
ClickPoint = new CirclePoint(Coord.x(), Coord.y(), 6, "P1", Point::Middle, Pen[2]); |
LastClick = new Point(Coord.x(), Coord.y()); |
ClickPoint->setBaselevel(o_Adapter->adaptedZoom()); |
o_Click->addGeometry(ClickPoint); |
// o_Click->removeGeometry(Flag); |
// Flag = new ImagePoint(Coord.x(), Coord.y(), ":/Flags/Global/Images/Flags/Target.png", "Start"); |
// Flag->setBaselevel(o_Adapter->adaptedZoom()); |
// o_Click->addGeometry(Flag); |
if (cb_Goto->isChecked()) |
{ |
send_Target(LastClick); |
} |
} |
} |
o_Map->updateRequestNew(); |
// qDebug(QString("%1").arg(Coord.x()).toLatin1().data()); |
// qDebug(QString("%1").arg(Coord.y()).toLatin1().data()); |
} |
// WayPoint zur Liste hinzufügen |
void dlg_Main::slot_btn_WPAdd() |
{ |
cb_ShowWPs->setChecked(true); |
sWayPoint WayPoint; |
WayPoint.Longitude = LastClick->longitude(); |
WayPoint.Latitude = LastClick->latitude(); |
WayPoint.Time = sb_Time->value(); |
l_WayPoints.append(WayPoint); |
o_RouteWP->removeGeometry(l_RouteWP); |
p_RouteWP.append(LastClick); |
l_RouteWP = new LineString(p_RouteWP, "", Pen[3]); |
o_RouteWP->addGeometry(l_RouteWP); |
o_Map->updateRequestNew(); |
btn_WPFly->setEnabled(true); |
if (l_WayPoints.count() == 20) |
{ |
QMessageBox::warning(this, QA_NAME,trUtf8("Wegpunkt-Liste ist voll. Es können maximal 20 Wegpunkte benutzt werden."), QMessageBox::Ok); |
btn_WPAdd->setEnabled(false); |
} |
} |
// WayPoint-Liste übertragen |
void dlg_Main::slot_btn_WPFly() |
{ |
send_WayPoints(l_WayPoints, 0); |
} |
// WayPpoint-Liste löschen |
void dlg_Main::slot_btn_WPDelete() |
{ |
p_RouteWP.clear(); |
l_WayPoints.clear(); |
o_RouteWP->clearGeometries(); |
l_RouteWP = new LineString(p_RouteWP, "", Pen[0]); |
// o_RouteWP->addGeometry(l_RouteWP); |
// o_RouteWP->removeGeometry(l_RouteWP); |
o_Map->updateRequestNew(); |
btn_WPFly->setEnabled(false); |
btn_WPAdd->setEnabled(true); |
} |
// WayPoint-Liste laden |
void dlg_Main::slot_ac_LoadWayPoints() |
{ |
QString Filename = QFileDialog::getOpenFileName(this, "WayPoint-Route laden", s_Dir.WPRoutes, "Mikrokopter WayPoints(*.mkw);;KML-Datei(*.kml);;Alle Dateien (*)"); |
if (!Filename.isEmpty()) |
{ |
if (Filename.endsWith(".kml", Qt::CaseInsensitive)) |
{ |
cb_ShowWPs->setChecked(true); |
btn_WPFly->setEnabled(true); |
show_WayPoints(parse_WayPointKML(Filename)); |
} |
if (Filename.endsWith(".mkw", Qt::CaseInsensitive)) |
{ |
cb_ShowWPs->setChecked(true); |
btn_WPFly->setEnabled(true); |
show_WayPoints(parse_WayPointMKW(Filename)); |
} |
} |
} |
// WayPoint-Liste speichern |
void dlg_Main::slot_ac_SaveRoute() |
{ |
QString Filename = QFileDialog::getSaveFileName(this, "WayPoint-Route speichern", s_Dir.WPRoutes, "Mikrokopter WayPoints(*.mkw);;Alle Dateien (*)"); |
if (!Filename.isEmpty()) |
{ |
if (!(Filename.endsWith(".mkw", Qt::CaseInsensitive))) |
{ |
Filename = Filename + QString(".mkw"); |
} |
save_WayPointsMKW(Filename); |
} |
} |
// Route anzeigen / ausblenden |
void dlg_Main::slot_ShowWayPoints(bool Show) |
{ |
if (Show == true) |
{ |
if (l_RouteWP->hasPoints()) |
{ |
o_RouteWP->addGeometry(l_RouteWP); |
o_Map->updateRequestNew(); |
} |
} |
else |
{ |
o_RouteWP->removeGeometry(l_RouteWP); |
o_Map->updateRequestNew(); |
} |
} |
// Bilddatei als Karteladen. |
void dlg_Main::slot_ac_LoadMapPic() |
{ |
QString Filename = QFileDialog::getOpenFileName(this, "Bild als Karte", s_Dir.MapPics, "Bilddatei(*.jpg *.png *.gif);;Alle Dateien (*)"); |
if (!Filename.isEmpty()) |
{ |
QFile *f_Points = new QFile(Filename + ".pos"); |
if (f_Points->exists()) |
{ |
f_Points->open(QIODevice::ReadOnly | QIODevice::Text); |
QString s_Points; |
while (!f_Points->atEnd()) |
{ |
s_Points.append(f_Points->readLine()); |
} |
f_Points->close(); |
QStringList s_Pos = s_Points.split(","); |
FixedImageOverlay* fip = new FixedImageOverlay(s_Pos[0].toDouble(), s_Pos[1].toDouble(), s_Pos[2].toDouble(), s_Pos[3].toDouble(), Filename); |
o_Layer->addGeometry(fip); |
o_Map->setView(QPointF(((s_Pos[0].toDouble() + s_Pos[2].toDouble()) / 2),((s_Pos[1].toDouble() + s_Pos[3].toDouble()) / 2))); |
o_Map->updateRequestNew(); |
} |
else |
{ |
dlg_MapPos *f_MapPos = new dlg_MapPos(this); |
if (f_MapPos->exec()==QDialog::Accepted) |
{ |
QString Data = f_MapPos->get_Data(); |
f_Points->open(QIODevice::ReadWrite | QIODevice::Text); |
QTextStream out(f_Points); |
out.setRealNumberPrecision(9); |
out << Data << "\n"; |
f_Points->close(); |
QStringList s_Pos = Data.split(","); |
FixedImageOverlay* fip = new FixedImageOverlay(s_Pos[0].toDouble(), s_Pos[1].toDouble(), s_Pos[2].toDouble(), s_Pos[3].toDouble(), Filename); |
o_Layer->addGeometry(fip); |
o_Map->updateRequestNew(); |
} |
} |
} |
} |
// Flug als KML aufzeichnen |
void dlg_Main::slot_ac_Record() |
{ |
if (ac_Record->isChecked()) |
{ |
QString f_Name = s_Dir.Flights + "/" + QDate::currentDate().toString(("yyyy-MM-dd")) + "_" + QTime::currentTime().toString("hh-mm"); |
ac_Record->setText(tr("Stoppen")); |
o_Record = new QFile(f_Name + ".kml"); |
o_Record->open(QIODevice::Append | QIODevice::Text); |
QTextStream Out(o_Record); |
Out << HandlerKML::get_Header(tr("Mikrokopter Flugaufzeichnung")) << "\n"; |
} |
else |
{ |
QTextStream Out(o_Record); |
Out << HandlerKML::get_Footer() << "\n"; |
o_Record->close(); |
ac_Record->setText(tr("Aufzeichnen")); |
} |
} |
// WayPpoint-Liste löschen |
void dlg_Main::slot_ac_RouteDelete() |
{ |
p_RouteFL.clear(); |
l_Track.clear(); |
o_RouteFL->clearGeometries(); |
l_RouteFL = new LineString(p_RouteFL, "", Pen[0]); |
// o_RouteFL->removeGeometry(l_RouteFL); |
o_Map->updateRequestNew(); |
} |
// Programm Ende |
dlg_Main::~dlg_Main() |
{ |
o_Settings->GUI.isMax = isMaximized(); |
o_Settings->GUI.Size = size(); |
o_Settings->GUI.Point = pos(); |
o_Settings->GUI.Toolbar = ac_Toolbar->isChecked(); |
o_Settings->CONFIG.cb_CenterPos = cb_CenterPos->isChecked(); |
o_Settings->CONFIG.cb_ShowRoute = cb_ShowRoute->isChecked(); |
o_Settings->CONFIG.cb_ShowWPs = cb_ShowWPs->isChecked(); |
o_Settings->CONFIG.cb_Goto = cb_Goto->isChecked(); |
o_Settings->NAVI.StayTime = sb_Time->value(); |
o_Settings->write_Settings(); |
// qDebug("Ende."); |
} |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Maps/Dialogs/dlg_Main.h |
---|
0,0 → 1,142 |
/*************************************************************************** |
* Copyright (C) 2009 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program 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 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#ifndef DLG_MAIN_H |
#define DLG_MAIN_H |
#include <QtGui/QMainWindow> |
#include <QFile> |
#include "ui_dlg_Main.h" |
#include "../Defines.h" |
#include "../TypeDefs.h" |
#include "../Classes/cSettings.h" |
#include "../../Global/Class_QMapControl.h" |
#include "../../Global/Class_HandlerKML/HandlerKML.h" |
using namespace qmapcontrol; |
class dlg_Main : public QMainWindow, public Ui::dlg_Main_UI |
{ |
Q_OBJECT |
public: |
dlg_Main(); |
~dlg_Main(); |
void create_Map(); |
private: |
// Info über die Hardware |
s_Hardware gs_Version; |
// Settings-Object |
cSettings *o_Settings; |
char c_Data[150]; |
// Programm-Initialisirungen |
void init_GUI(); |
void init_Connections(); |
void init_Directorys(); |
s_Directorys s_Dir; |
// QMK-Maps |
QFile *o_Record; |
QPen* Pen[6]; |
MapControl *o_Map; |
MapAdapter *o_Adapter; |
Layer *o_Layer; |
Layer *o_Click; |
Layer *o_Info; |
Layer *o_RouteWP; |
Layer *o_RouteFL; |
QList<Point*> p_RouteWP; |
LineString* l_RouteWP; |
QList<Point*> p_RouteFL; |
LineString* l_RouteFL; |
Point* LastPos; |
Point* LastClick; |
Point* ClickPoint; |
Point* Flag; |
Point* Home; |
Point* Target; |
QPointF MapCenter; |
QList<sWayPoint> l_WayPoints; |
QList<sWayPoint> l_Track; |
QList<sWayPoint> parse_WayPointKML(QString s_File); |
QList<sWayPoint> parse_WayPointMKW(QString s_File); |
void show_WayPoints(QList<sWayPoint> WayPoints); |
void save_WayPointsMKW(QString s_File); |
void add_Position(s_MK_NaviData t_NaviData); |
// void show_Data(s_MK_NaviData t_NaviData); |
void send_Target(Point *t_Target); |
void send_WayPoints(QList<sWayPoint> l_WayPoints, int t_Pos = 0); |
private slots: |
void slot_ac_About(); |
void slot_ac_Toolbar(); |
void slot_ConnectionStatus(int li_Status); |
void slot_MK_Version(s_Hardware ls_Version); |
void slot_MK_NaviData(s_MK_NaviData ps_MK_NaviData); |
void slot_MK_WayPoint(int pi_WayPointID); |
// QMK-Maps |
void slot_Zoom(int t_Zoom); |
void slot_ChangeMap(int); |
void slot_Click(const QMouseEvent*, const QPointF); |
void slot_btn_WPAdd(); |
void slot_btn_WPFly(); |
void slot_btn_WPDelete(); |
void slot_ShowWayPoints(bool); |
void slot_ac_RouteDelete(); |
void slot_ac_LoadMapPic(); |
void slot_ac_Record(); |
void slot_ac_LoadWayPoints(); |
void slot_ac_SaveRoute(); |
protected: |
virtual void wheelEvent(QWheelEvent *event); |
virtual void resizeEvent ( QResizeEvent * event ); |
}; |
#endif // DLG_MAIN_H |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Maps/Dialogs/dlg_Main.ui |
---|
0,0 → 1,720 |
<?xml version="1.0" encoding="UTF-8"?> |
<ui version="4.0"> |
<class>dlg_Main_UI</class> |
<widget class="QMainWindow" name="dlg_Main_UI"> |
<property name="geometry"> |
<rect> |
<x>0</x> |
<y>0</y> |
<width>729</width> |
<height>367</height> |
</rect> |
</property> |
<property name="windowTitle"> |
<string>QMK</string> |
</property> |
<property name="windowIcon"> |
<iconset resource="../QMK-Maps.qrc"> |
<normaloff>:/Icon/Global/Images/Icons/QMK-Maps.png</normaloff>:/Icon/Global/Images/Icons/QMK-Maps.png</iconset> |
</property> |
<property name="styleSheet"> |
<string notr="true"/> |
</property> |
<widget class="QWidget" name="centralWidget"> |
<layout class="QGridLayout" name="gridLayout_5"> |
<item row="0" column="0" colspan="2"> |
<widget class="wgt_Connection" name="wg_Connection" native="true"> |
<property name="sizePolicy"> |
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> |
<horstretch>0</horstretch> |
<verstretch>0</verstretch> |
</sizepolicy> |
</property> |
</widget> |
</item> |
<item row="1" column="0"> |
<widget class="QFrame" name="frame_3"> |
<property name="sizePolicy"> |
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> |
<horstretch>0</horstretch> |
<verstretch>0</verstretch> |
</sizepolicy> |
</property> |
<property name="frameShape"> |
<enum>QFrame::StyledPanel</enum> |
</property> |
<property name="frameShadow"> |
<enum>QFrame::Raised</enum> |
</property> |
<layout class="QHBoxLayout" name="horizontalLayout_2"> |
<property name="spacing"> |
<number>2</number> |
</property> |
<property name="margin"> |
<number>2</number> |
</property> |
<item> |
<widget class="QLabel" name="label_7"> |
<property name="text"> |
<string>WP:</string> |
</property> |
</widget> |
</item> |
<item> |
<widget class="QLineEdit" name="le_WP"> |
<property name="sizePolicy"> |
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> |
<horstretch>50</horstretch> |
<verstretch>0</verstretch> |
</sizepolicy> |
</property> |
<property name="minimumSize"> |
<size> |
<width>50</width> |
<height>0</height> |
</size> |
</property> |
<property name="maximumSize"> |
<size> |
<width>50</width> |
<height>16777215</height> |
</size> |
</property> |
<property name="text"> |
<string/> |
</property> |
<property name="alignment"> |
<set>Qt::AlignCenter</set> |
</property> |
<property name="readOnly"> |
<bool>true</bool> |
</property> |
</widget> |
</item> |
<item> |
<widget class="QLineEdit" name="le_WPTime"> |
<property name="minimumSize"> |
<size> |
<width>50</width> |
<height>0</height> |
</size> |
</property> |
<property name="maximumSize"> |
<size> |
<width>50</width> |
<height>16777215</height> |
</size> |
</property> |
<property name="alignment"> |
<set>Qt::AlignCenter</set> |
</property> |
<property name="readOnly"> |
<bool>true</bool> |
</property> |
</widget> |
</item> |
<item> |
<widget class="QLineEdit" name="le_WPDist"> |
<property name="minimumSize"> |
<size> |
<width>60</width> |
<height>0</height> |
</size> |
</property> |
<property name="maximumSize"> |
<size> |
<width>60</width> |
<height>16777215</height> |
</size> |
</property> |
<property name="text"> |
<string/> |
</property> |
<property name="alignment"> |
<set>Qt::AlignCenter</set> |
</property> |
<property name="readOnly"> |
<bool>true</bool> |
</property> |
</widget> |
</item> |
<item> |
<widget class="QLabel" name="label_9"> |
<property name="text"> |
<string>Home:</string> |
</property> |
</widget> |
</item> |
<item> |
<widget class="QLineEdit" name="le_HomeDist"> |
<property name="minimumSize"> |
<size> |
<width>60</width> |
<height>0</height> |
</size> |
</property> |
<property name="maximumSize"> |
<size> |
<width>60</width> |
<height>16777215</height> |
</size> |
</property> |
<property name="text"> |
<string/> |
</property> |
<property name="alignment"> |
<set>Qt::AlignCenter</set> |
</property> |
<property name="readOnly"> |
<bool>true</bool> |
</property> |
</widget> |
</item> |
<item> |
<widget class="QLabel" name="label_8"> |
<property name="text"> |
<string>Mode:</string> |
</property> |
</widget> |
</item> |
<item> |
<widget class="QLineEdit" name="le_Mode"> |
<property name="minimumSize"> |
<size> |
<width>120</width> |
<height>0</height> |
</size> |
</property> |
<property name="maximumSize"> |
<size> |
<width>120</width> |
<height>16777215</height> |
</size> |
</property> |
<property name="alignment"> |
<set>Qt::AlignCenter</set> |
</property> |
<property name="readOnly"> |
<bool>true</bool> |
</property> |
</widget> |
</item> |
<item> |
<widget class="QLabel" name="label"> |
<property name="text"> |
<string>Sats:</string> |
</property> |
</widget> |
</item> |
<item> |
<widget class="QLineEdit" name="le_Sats"> |
<property name="minimumSize"> |
<size> |
<width>30</width> |
<height>0</height> |
</size> |
</property> |
<property name="maximumSize"> |
<size> |
<width>30</width> |
<height>16777215</height> |
</size> |
</property> |
<property name="text"> |
<string/> |
</property> |
<property name="alignment"> |
<set>Qt::AlignCenter</set> |
</property> |
<property name="readOnly"> |
<bool>true</bool> |
</property> |
</widget> |
</item> |
<item> |
<spacer name="horizontalSpacer"> |
<property name="orientation"> |
<enum>Qt::Horizontal</enum> |
</property> |
<property name="sizeHint" stdset="0"> |
<size> |
<width>138</width> |
<height>20</height> |
</size> |
</property> |
</spacer> |
</item> |
</layout> |
</widget> |
</item> |
<item row="1" column="1" rowspan="3"> |
<layout class="QVBoxLayout" name="verticalLayout"> |
<item> |
<widget class="QGroupBox" name="groupBox"> |
<property name="title"> |
<string>Route</string> |
</property> |
<layout class="QGridLayout" name="gridLayout_2"> |
<item row="0" column="0"> |
<widget class="QLabel" name="label_6"> |
<property name="text"> |
<string>Verweilzeit</string> |
</property> |
</widget> |
</item> |
<item row="2" column="0"> |
<layout class="QHBoxLayout" name="horizontalLayout_3"> |
<item> |
<widget class="QSpinBox" name="sb_Time"> |
<property name="maximum"> |
<number>300</number> |
</property> |
<property name="value"> |
<number>10</number> |
</property> |
</widget> |
</item> |
<item> |
<widget class="QLabel" name="label_2"> |
<property name="text"> |
<string>Sek.</string> |
</property> |
</widget> |
</item> |
</layout> |
</item> |
<item row="3" column="0"> |
<widget class="QPushButton" name="btn_WPAdd"> |
<property name="text"> |
<string>hinzufügen</string> |
</property> |
</widget> |
</item> |
<item row="4" column="0"> |
<widget class="QPushButton" name="btn_WPFly"> |
<property name="enabled"> |
<bool>false</bool> |
</property> |
<property name="text"> |
<string>abfliegen</string> |
</property> |
</widget> |
</item> |
<item row="5" column="0"> |
<widget class="QPushButton" name="btn_WPDelete"> |
<property name="text"> |
<string>löschen</string> |
</property> |
</widget> |
</item> |
</layout> |
</widget> |
</item> |
<item> |
<widget class="QFrame" name="frame_4"> |
<property name="frameShape"> |
<enum>QFrame::StyledPanel</enum> |
</property> |
<property name="frameShadow"> |
<enum>QFrame::Raised</enum> |
</property> |
<layout class="QGridLayout" name="gridLayout_4"> |
<item row="2" column="0"> |
<widget class="QCheckBox" name="cb_ShowWPs"> |
<property name="text"> |
<string>ausgewählte |
Route anzeigen</string> |
</property> |
<property name="checked"> |
<bool>true</bool> |
</property> |
</widget> |
</item> |
<item row="3" column="0"> |
<widget class="QCheckBox" name="cb_CenterPos"> |
<property name="text"> |
<string>auf IST-Position |
zentrieren</string> |
</property> |
<property name="checked"> |
<bool>true</bool> |
</property> |
</widget> |
</item> |
<item row="1" column="0"> |
<widget class="QCheckBox" name="cb_ShowRoute"> |
<property name="text"> |
<string>geflogene |
Route anzeigen</string> |
</property> |
<property name="checked"> |
<bool>true</bool> |
</property> |
</widget> |
</item> |
</layout> |
</widget> |
</item> |
<item> |
<spacer name="verticalSpacer"> |
<property name="orientation"> |
<enum>Qt::Vertical</enum> |
</property> |
<property name="sizeHint" stdset="0"> |
<size> |
<width>20</width> |
<height>40</height> |
</size> |
</property> |
</spacer> |
</item> |
</layout> |
</item> |
<item row="2" column="0"> |
<widget class="QFrame" name="w_Map"> |
<property name="minimumSize"> |
<size> |
<width>0</width> |
<height>250</height> |
</size> |
</property> |
<property name="frameShape"> |
<enum>QFrame::StyledPanel</enum> |
</property> |
<property name="frameShadow"> |
<enum>QFrame::Raised</enum> |
</property> |
<layout class="QGridLayout" name="gridLayout"> |
<property name="margin"> |
<number>2</number> |
</property> |
<item row="0" column="0"> |
<layout class="QHBoxLayout" name="l_Map"/> |
</item> |
</layout> |
</widget> |
</item> |
<item row="3" column="0"> |
<widget class="QFrame" name="frame_2"> |
<property name="sizePolicy"> |
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> |
<horstretch>0</horstretch> |
<verstretch>0</verstretch> |
</sizepolicy> |
</property> |
<property name="frameShape"> |
<enum>QFrame::StyledPanel</enum> |
</property> |
<property name="frameShadow"> |
<enum>QFrame::Raised</enum> |
</property> |
<layout class="QGridLayout" name="gridLayout_3"> |
<property name="margin"> |
<number>2</number> |
</property> |
<item row="0" column="1"> |
<widget class="QSlider" name="sl_Zoom"> |
<property name="maximum"> |
<number>18</number> |
</property> |
<property name="pageStep"> |
<number>1</number> |
</property> |
<property name="orientation"> |
<enum>Qt::Horizontal</enum> |
</property> |
<property name="tickPosition"> |
<enum>QSlider::NoTicks</enum> |
</property> |
</widget> |
</item> |
<item row="0" column="0"> |
<widget class="QLabel" name="label_5"> |
<property name="text"> |
<string>Zoom:</string> |
</property> |
</widget> |
</item> |
<item row="0" column="2"> |
<widget class="QCheckBox" name="cb_Goto"> |
<property name="text"> |
<string>Position bei Click Anfliegen</string> |
</property> |
</widget> |
</item> |
<item row="0" column="3"> |
<widget class="QComboBox" name="cb_Maps"> |
<property name="enabled"> |
<bool>true</bool> |
</property> |
<item> |
<property name="text"> |
<string>OpenStreetMap</string> |
</property> |
</item> |
<item> |
<property name="text"> |
<string>OpenAerialMap</string> |
</property> |
</item> |
<item> |
<property name="text"> |
<string>Google: Map</string> |
</property> |
</item> |
<item> |
<property name="text"> |
<string>Google: Satellit</string> |
</property> |
</item> |
<item> |
<property name="text"> |
<string>Yahoo: Map </string> |
</property> |
</item> |
<item> |
<property name="text"> |
<string>Yahoo: Satellit</string> |
</property> |
</item> |
</widget> |
</item> |
</layout> |
</widget> |
</item> |
</layout> |
</widget> |
<widget class="QMenuBar" name="menuBar"> |
<property name="geometry"> |
<rect> |
<x>0</x> |
<y>0</y> |
<width>729</width> |
<height>19</height> |
</rect> |
</property> |
<widget class="QMenu" name="menu_Preferences"> |
<property name="enabled"> |
<bool>false</bool> |
</property> |
<property name="title"> |
<string>Einstellungen</string> |
</property> |
</widget> |
<widget class="QMenu" name="menu_Help"> |
<property name="title"> |
<string>Hilfe</string> |
</property> |
<addaction name="ac_About"/> |
</widget> |
<widget class="QMenu" name="menuExtras"> |
<property name="title"> |
<string>Extras</string> |
</property> |
<addaction name="ac_RouteDelete"/> |
</widget> |
<widget class="QMenu" name="menuAnsicht"> |
<property name="title"> |
<string>Ansicht</string> |
</property> |
<addaction name="ac_Toolbar"/> |
</widget> |
<widget class="QMenu" name="menu_Program"> |
<property name="title"> |
<string>Programm</string> |
</property> |
<addaction name="ac_Quit"/> |
<addaction name="ac_Connect"/> |
</widget> |
<addaction name="menu_Program"/> |
<addaction name="menuAnsicht"/> |
<addaction name="menu_Preferences"/> |
<addaction name="menuExtras"/> |
<addaction name="menu_Help"/> |
</widget> |
<widget class="QToolBar" name="ToolBar"> |
<property name="minimumSize"> |
<size> |
<width>0</width> |
<height>0</height> |
</size> |
</property> |
<property name="windowTitle"> |
<string>toolBar</string> |
</property> |
<property name="movable"> |
<bool>false</bool> |
</property> |
<property name="allowedAreas"> |
<set>Qt::LeftToolBarArea</set> |
</property> |
<property name="iconSize"> |
<size> |
<width>30</width> |
<height>30</height> |
</size> |
</property> |
<property name="toolButtonStyle"> |
<enum>Qt::ToolButtonTextUnderIcon</enum> |
</property> |
<property name="floatable"> |
<bool>false</bool> |
</property> |
<attribute name="toolBarArea"> |
<enum>LeftToolBarArea</enum> |
</attribute> |
<attribute name="toolBarBreak"> |
<bool>false</bool> |
</attribute> |
<addaction name="ac_Connect"/> |
<addaction name="separator"/> |
<addaction name="ac_LoadRoute"/> |
<addaction name="ac_SaveRoute"/> |
<addaction name="separator"/> |
<addaction name="ac_LoadMap"/> |
<addaction name="separator"/> |
<addaction name="ac_Record"/> |
<addaction name="separator"/> |
</widget> |
<widget class="QToolBar" name="tb_More"> |
<property name="windowTitle"> |
<string>toolBar</string> |
</property> |
<property name="movable"> |
<bool>false</bool> |
</property> |
<property name="allowedAreas"> |
<set>Qt::LeftToolBarArea</set> |
</property> |
<attribute name="toolBarArea"> |
<enum>LeftToolBarArea</enum> |
</attribute> |
<attribute name="toolBarBreak"> |
<bool>false</bool> |
</attribute> |
</widget> |
<action name="ac_Quit"> |
<property name="icon"> |
<iconset resource="../QMK-Maps.qrc"> |
<normaloff>:/Actions/Global/Images/Actions/Exit.png</normaloff>:/Actions/Global/Images/Actions/Exit.png</iconset> |
</property> |
<property name="text"> |
<string>Beenden</string> |
</property> |
</action> |
<action name="ac_About"> |
<property name="icon"> |
<iconset resource="../QMK-Maps.qrc"> |
<normaloff>:/Icon/Global/Images/Icons/QMK-Maps.png</normaloff>:/Icon/Global/Images/Icons/QMK-Maps.png</iconset> |
</property> |
<property name="text"> |
<string>Über QMK-Maps</string> |
</property> |
</action> |
<action name="ac_Connect"> |
<property name="checkable"> |
<bool>true</bool> |
</property> |
<property name="checked"> |
<bool>false</bool> |
</property> |
<property name="icon"> |
<iconset resource="../QMK-Maps.qrc"> |
<normaloff>:/Actions/Global/Images/Actions/Connection-NO.png</normaloff> |
<normalon>:/Actions/Global/Images/Actions/Connection-OK.png</normalon>:/Actions/Global/Images/Actions/Connection-NO.png</iconset> |
</property> |
<property name="text"> |
<string>Verbinden</string> |
</property> |
</action> |
<action name="ac_LoadRoute"> |
<property name="icon"> |
<iconset resource="../QMK-Maps.qrc"> |
<normaloff>:/Actions/Global/Images/Actions/Load.png</normaloff>:/Actions/Global/Images/Actions/Load.png</iconset> |
</property> |
<property name="text"> |
<string>Route Laden</string> |
</property> |
</action> |
<action name="ac_SaveRoute"> |
<property name="icon"> |
<iconset resource="../QMK-Maps.qrc"> |
<normaloff>:/Actions/Global/Images/Actions/Save.png</normaloff>:/Actions/Global/Images/Actions/Save.png</iconset> |
</property> |
<property name="text"> |
<string>Route Speichern</string> |
</property> |
</action> |
<action name="ac_LoadMap"> |
<property name="icon"> |
<iconset resource="../QMK-Maps.qrc"> |
<normaloff>:/Actions/Global/Images/Actions/Load-Map.png</normaloff>:/Actions/Global/Images/Actions/Load-Map.png</iconset> |
</property> |
<property name="text"> |
<string>Karte laden</string> |
</property> |
</action> |
<action name="ac_Record"> |
<property name="checkable"> |
<bool>true</bool> |
</property> |
<property name="icon"> |
<iconset resource="../QMK-Maps.qrc"> |
<normaloff>:/Actions/Global/Images/Actions/Log-Record.png</normaloff> |
<normalon>:/Actions/Global/Images/Actions/Log-Stop.png</normalon>:/Actions/Global/Images/Actions/Log-Record.png</iconset> |
</property> |
<property name="text"> |
<string>Aufzeichnen</string> |
</property> |
<property name="toolTip"> |
<string>Flug aufzeichnen</string> |
</property> |
</action> |
<action name="ac_RouteDelete"> |
<property name="text"> |
<string>Geflogene Route löschen</string> |
</property> |
</action> |
<action name="ac_Toolbar"> |
<property name="checkable"> |
<bool>true</bool> |
</property> |
<property name="checked"> |
<bool>true</bool> |
</property> |
<property name="text"> |
<string>Toolbar</string> |
</property> |
</action> |
</widget> |
<layoutdefault spacing="6" margin="11"/> |
<customwidgets> |
<customwidget> |
<class>wgt_Connection</class> |
<extends>QWidget</extends> |
<header>wgt_Connection.h</header> |
<container>1</container> |
</customwidget> |
</customwidgets> |
<resources> |
<include location="../QMK-Maps.qrc"/> |
</resources> |
<connections> |
<connection> |
<sender>ac_Quit</sender> |
<signal>triggered()</signal> |
<receiver>dlg_Main_UI</receiver> |
<slot>close()</slot> |
<hints> |
<hint type="sourcelabel"> |
<x>-1</x> |
<y>-1</y> |
</hint> |
<hint type="destinationlabel"> |
<x>182</x> |
<y>88</y> |
</hint> |
</hints> |
</connection> |
</connections> |
</ui> |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Maps/Dialogs/dlg_MapPos.cpp |
---|
0,0 → 1,29 |
/*************************************************************************** |
* Copyright (C) 2009 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program 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 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#include "dlg_MapPos.h" |
dlg_MapPos::dlg_MapPos(QWidget *parent) : QDialog(parent) |
{ |
setupUi(this); |
} |
QString dlg_MapPos::get_Data() |
{ |
return QString(le_Links->text().replace(",", ".") + ", " + le_Oben->text().replace(",", ".") + ", " + le_Rechts->text().replace(",", ".") + ", " + le_Unten->text().replace(",", ".")); |
} |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Maps/Dialogs/dlg_MapPos.h |
---|
0,0 → 1,35 |
/*************************************************************************** |
* Copyright (C) 2009 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program 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 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#ifndef DLG_MAPPOS_H |
#define DLG_MAPPOS_H |
#include <QDialog> |
#include "ui_dlg_MapPos.h" |
class dlg_MapPos : public QDialog, public Ui::dlg_MapPos_UI |
{ |
Q_OBJECT |
public: |
dlg_MapPos(QWidget *parent = 0); |
QString get_Data(); |
}; |
#endif // DLG_MAPPOS_H |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Maps/Dialogs/dlg_MapPos.ui |
---|
0,0 → 1,162 |
<?xml version="1.0" encoding="UTF-8"?> |
<ui version="4.0"> |
<class>dlg_MapPos_UI</class> |
<widget class="QDialog" name="dlg_MapPos_UI"> |
<property name="geometry"> |
<rect> |
<x>0</x> |
<y>0</y> |
<width>376</width> |
<height>129</height> |
</rect> |
</property> |
<property name="windowTitle"> |
<string>Karten-Positionen</string> |
</property> |
<layout class="QGridLayout" name="gridLayout"> |
<item row="0" column="0"> |
<spacer name="horizontalSpacer_2"> |
<property name="orientation"> |
<enum>Qt::Horizontal</enum> |
</property> |
<property name="sizeHint" stdset="0"> |
<size> |
<width>116</width> |
<height>20</height> |
</size> |
</property> |
</spacer> |
</item> |
<item row="0" column="1"> |
<widget class="QLineEdit" name="le_Oben"/> |
</item> |
<item row="0" column="3"> |
<spacer name="horizontalSpacer_3"> |
<property name="orientation"> |
<enum>Qt::Horizontal</enum> |
</property> |
<property name="sizeHint" stdset="0"> |
<size> |
<width>116</width> |
<height>20</height> |
</size> |
</property> |
</spacer> |
</item> |
<item row="1" column="0"> |
<widget class="QLineEdit" name="le_Links"/> |
</item> |
<item row="1" column="1"> |
<spacer name="horizontalSpacer_6"> |
<property name="orientation"> |
<enum>Qt::Horizontal</enum> |
</property> |
<property name="sizeHint" stdset="0"> |
<size> |
<width>115</width> |
<height>20</height> |
</size> |
</property> |
</spacer> |
</item> |
<item row="1" column="2" colspan="2"> |
<widget class="QLineEdit" name="le_Rechts"/> |
</item> |
<item row="2" column="0"> |
<spacer name="horizontalSpacer_4"> |
<property name="orientation"> |
<enum>Qt::Horizontal</enum> |
</property> |
<property name="sizeHint" stdset="0"> |
<size> |
<width>116</width> |
<height>20</height> |
</size> |
</property> |
</spacer> |
</item> |
<item row="2" column="1" colspan="2"> |
<widget class="QLineEdit" name="le_Unten"/> |
</item> |
<item row="2" column="3"> |
<spacer name="horizontalSpacer_5"> |
<property name="orientation"> |
<enum>Qt::Horizontal</enum> |
</property> |
<property name="sizeHint" stdset="0"> |
<size> |
<width>116</width> |
<height>20</height> |
</size> |
</property> |
</spacer> |
</item> |
<item row="3" column="0" colspan="4"> |
<layout class="QHBoxLayout" name="horizontalLayout"> |
<item> |
<spacer name="horizontalSpacer"> |
<property name="orientation"> |
<enum>Qt::Horizontal</enum> |
</property> |
<property name="sizeHint" stdset="0"> |
<size> |
<width>40</width> |
<height>20</height> |
</size> |
</property> |
</spacer> |
</item> |
<item> |
<widget class="QPushButton" name="pb_Save"> |
<property name="text"> |
<string>Speichern</string> |
</property> |
</widget> |
</item> |
<item> |
<widget class="QPushButton" name="pushButton"> |
<property name="text"> |
<string>Abbrechen</string> |
</property> |
</widget> |
</item> |
</layout> |
</item> |
</layout> |
</widget> |
<resources/> |
<connections> |
<connection> |
<sender>pb_Save</sender> |
<signal>clicked()</signal> |
<receiver>dlg_MapPos_UI</receiver> |
<slot>accept()</slot> |
<hints> |
<hint type="sourcelabel"> |
<x>227</x> |
<y>109</y> |
</hint> |
<hint type="destinationlabel"> |
<x>108</x> |
<y>100</y> |
</hint> |
</hints> |
</connection> |
<connection> |
<sender>pushButton</sender> |
<signal>clicked()</signal> |
<receiver>dlg_MapPos_UI</receiver> |
<slot>reject()</slot> |
<hints> |
<hint type="sourcelabel"> |
<x>340</x> |
<y>112</y> |
</hint> |
<hint type="destinationlabel"> |
<x>339</x> |
<y>65</y> |
</hint> |
</hints> |
</connection> |
</connections> |
</ui> |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Maps/QMK-Maps.pro |
---|
0,0 → 1,33 |
# ------------------------------------------------- |
# Project created by QtCreator 2009-07-20T20:04:00 |
# ------------------------------------------------- |
include(../Global/Class_QMapControl.pri) |
include(../Global/Widget_Connection.pri) |
QT += network \ |
xml |
TARGET = QMK-Maps |
TEMPLATE = app |
DESTDIR = ../Binary |
debug:DEFINES += _BETA_ |
OBJECTS_DIR = ../Binary/.build/QMK-Maps |
UI_DIR = ../Binary/.build/QMK-Maps |
MOC_DIR = ../Binary/.build/QMK-Maps |
RCC_DIR = ../Binary/.build/QMK-Maps |
RESOURCES += QMK-Maps.qrc |
SOURCES += main.cpp \ |
Dialogs/dlg_Main.cpp \ |
Dialogs/dlg_MapPos.cpp \ |
Classes/cSettings.cpp \ |
../Global/Class_HandlerKML/HandlerKML.cpp |
HEADERS += Defines.h \ |
../Global/Global.h \ |
../Global/Class_QMapControl.h \ |
Dialogs/dlg_Main.h \ |
Dialogs/dlg_MapPos.h \ |
Classes/cSettings.h \ |
TypeDefs.h \ |
../Global/Class_HandlerKML/HandlerKML.h |
FORMS += Dialogs/dlg_Main.ui \ |
Dialogs/dlg_MapPos.ui |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Maps/QMK-Maps.qrc |
---|
0,0 → 1,23 |
<RCC> |
<qresource prefix="Icon" > |
<file>../Global/Images/Icons/QMK-Maps.png</file> |
</qresource> |
<qresource prefix="Flags" > |
<file>../Global/Images/Flags/Target.png</file> |
<file>../Global/Images/Flags/flag-black.png</file> |
<file>../Global/Images/Flags/flag-blue.png</file> |
<file>../Global/Images/Flags/flag-green.png</file> |
<file>../Global/Images/Flags/flag-red.png</file> |
<file>../Global/Images/Flags/flag-yellow.png</file> |
</qresource> |
<qresource prefix="Actions" > |
<file>../Global/Images/Actions/Log-Record.png</file> |
<file>../Global/Images/Actions/Log-Stop.png</file> |
<file>../Global/Images/Actions/Load-Map.png</file> |
<file>../Global/Images/Actions/Save.png</file> |
<file>../Global/Images/Actions/Load.png</file> |
<file>../Global/Images/Actions/Exit.png</file> |
<file>../Global/Images/Actions/Connection-NO.png</file> |
<file>../Global/Images/Actions/Connection-OK.png</file> |
</qresource> |
</RCC> |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Maps/TypeDefs.h |
---|
0,0 → 1,32 |
/*************************************************************************** |
* Copyright (C) 2009 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program 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 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#ifndef TYPEDEFS_H |
#define TYPEDEFS_H |
#include <QString> |
struct sWayPoint |
{ |
double Longitude; |
double Latitude; |
double Altitude; |
int Time; |
}; |
#endif // TYPEDEFS_H |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Maps/main.cpp |
---|
0,0 → 1,38 |
/*************************************************************************** |
* Copyright (C) 2009 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program 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 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#include <QtGui/QApplication> |
#include "Dialogs/dlg_Main.h" |
int main(int argc, char *argv[]) |
{ |
QApplication App(argc, argv); |
dlg_Main *MainApp = new dlg_Main(); |
MainApp->show(); |
MainApp->create_Map(); |
int iReturn = App.exec(); |
delete MainApp; |
return iReturn; |
} |