Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 304 → Rev 305

/QMK-Groundstation/trunk/Classes/QMapControl/circlepoint.cpp
0,0 → 1,72
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "circlepoint.h"
namespace qmapcontrol
{
CirclePoint::CirclePoint(qreal x, qreal y, int radius, QString name, Alignment alignment, QPen* pen)
: Point(x, y, name, alignment)
{
size = QSize(radius, radius);
mypixmap = new QPixmap(radius+1, radius+1);
mypixmap->fill(Qt::transparent);
QPainter painter(mypixmap);
if (pen != 0)
{
painter.setPen(*pen);
}
painter.drawEllipse(0,0,radius, radius);
}
 
CirclePoint::CirclePoint(qreal x, qreal y, QString name, Alignment alignment, QPen* pen)
: Point(x, y, name, alignment)
{
int radius = 10;
size = QSize(radius, radius);
mypixmap = new QPixmap(radius+1, radius+1);
mypixmap->fill(Qt::transparent);
QPainter painter(mypixmap);
if (pen != 0)
{
painter.setPen(*pen);
}
painter.drawEllipse(0,0,radius, radius);
}
 
CirclePoint::~CirclePoint()
{
delete mypixmap;
}
 
void CirclePoint::setPen(QPen* pen)
{
mypen = pen;
mypixmap = new QPixmap(size.width()+1, size.height()+1);
mypixmap->fill(Qt::transparent);
QPainter painter(mypixmap);
painter.setPen(*pen);
painter.drawEllipse(0,0, size.width(), size.height());
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/circlepoint.h
0,0 → 1,77
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef CIRCLEPOINT_H
#define CIRCLEPOINT_H
 
#include "point.h"
 
namespace qmapcontrol
{
//! Draws a circle into the map
/*! This is a conveniece class for Point.
* It configures the pixmap of a Point to draw a circle.
* A QPen could be used to change the color or line-width of the circle
*
* @author Kai Winter <kaiwinter@gmx.de>
*/
class CirclePoint : public Point
{
public:
//!
/*!
*
* @param x longitude
* @param y latitude
* @param name name of the circle point
* @param alignment alignment (Middle or TopLeft)
* @param pen QPen for drawing
*/
CirclePoint(qreal x, qreal y, QString name = QString(), Alignment alignment = Middle, QPen* pen=0);
 
//!
/*!
*
* @param x longitude
* @param y latitude
* @param radius the radius of the circle
* @param name name of the circle point
* @param alignment alignment (Middle or TopLeft)
* @param pen QPen for drawing
*/
CirclePoint(qreal x, qreal y, int radius = 10, QString name = QString(), Alignment alignment = Middle, QPen* pen=0);
virtual ~CirclePoint();
 
//! sets the QPen which is used for drawing the circle
/*!
* A QPen can be used to modify the look of the drawn circle
* @param pen the QPen which should be used for drawing
* @see http://doc.trolltech.com/4.3/qpen.html
*/
virtual void setPen(QPen* pen);
 
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/curve.cpp
0,0 → 1,41
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "curve.h"
namespace qmapcontrol
{
Curve::Curve(QString name)
: Geometry(name)
{
}
 
 
Curve::~Curve()
{
}
}
// Geometry Curve::Clone(){}
 
// QRectF Curve::GetBoundingBox(){}
/QMK-Groundstation/trunk/Classes/QMapControl/curve.h
0,0 → 1,65
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef CURVE_H
#define CURVE_H
 
#include "geometry.h"
#include "point.h"
 
namespace qmapcontrol
{
//! A Curve Geometry, implemented to fullfil OGC Spec
/*!
* The Curve class is used by LineString as parent class.
* This class could not be used directly.
*
* From the OGC Candidate Implementation Specification:
* "A Curve is a 1-dimensional geometric object usually stored as a sequence of Points, with the subtype of Curve
* specifying the form of the interpolation between Points. This specification defines only one subclass of Curve,
* LineString, which uses a linear interpolation between Points."
* @author Kai Winter <kaiwinter@gmx.de>
*/
class Curve : public Geometry
{
Q_OBJECT
public:
virtual ~Curve();
 
double Length;
 
// virtual Geometry Clone();
// virtual QRectF GetBoundingBox();
 
// virtual Point EndPoint() = 0;
// virtual Point StartPoint() = 0;
// virtual Point Value() = 0;
 
protected:
Curve(QString name = QString());
virtual void draw(QPainter* painter, const MapAdapter* mapadapter, const QRect &screensize, const QPoint offset) = 0;
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/geometry.cpp
0,0 → 1,88
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "geometry.h"
namespace qmapcontrol
{
Geometry::Geometry(QString name)
: GeometryType("Geometry"), myparentGeometry(0), mypen(0), visible(true), myname(name)
{
}
 
 
Geometry::~Geometry()
{
}
 
QString Geometry::name() const
{
return myname;
}
Geometry* Geometry::parentGeometry() const
{
return myparentGeometry;
}
void Geometry::setParentGeometry(Geometry* geom)
{
myparentGeometry = geom;
}
bool Geometry::hasPoints() const
{
return false;
}
bool Geometry::hasClickedPoints() const
{
return false;
}
QList<Geometry*> Geometry::clickedPoints()
{
QList<Geometry*> tmp;
return tmp;
}
 
bool Geometry::isVisible() const
{
return visible;
}
void Geometry::setVisible(bool visible)
{
this->visible = visible;
emit(updateRequest(boundingBox()));
}
 
void Geometry::setName(QString name)
{
myname = name;
}
 
void Geometry::setPen(QPen* pen)
{
mypen = pen;
}
QPen* Geometry::pen() const
{
return mypen;
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/geometry.h
0,0 → 1,154
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef GEOMETRY_H
#define GEOMETRY_H
#include <QObject>
#include <QPainter>
#include <QDebug>
#include "mapadapter.h"
 
namespace qmapcontrol
{
class Point;
//! Main class for objects that should be painted in maps
/*!
* Geometry is the root class of the hierarchy. Geometry is an abstract (non-instantiable) class.
*
* This class and the derived classes Point, Curve and LineString are leant on the Simple
* Feature Specification of the Open Geospatial Consortium.
* @see www.opengeospatial.com
*
* @author Kai Winter <kaiwinter@gmx.de>
*/
class Geometry : public QObject
{
friend class LineString;
Q_OBJECT
public:
explicit Geometry(QString name = QString());
virtual ~Geometry();
 
QString GeometryType;
 
//!
/*! returns true if the given Geometry is equal to this Geometry
* not implemented yet!
* @param geom The Geometry to be tested
* @return true if the given Geometry is equal to this
*/
bool Equals(Geometry* geom);
 
//! returns a String representation of this Geometry
/*!
* not implemented yet!
* @return a String representation of this Geometry
*/
QString toString();
 
//! returns the name of this Geometry
/*!
* @return the name of this Geometry
*/
QString name() const;
 
//! returns the parent Geometry of this Geometry
/*!
* A LineString is a composition of many Points. This methods returns the parent (the LineString) of a Point
* @return the parent Geometry of this Geometry
*/
Geometry* parentGeometry() const;
 
//! returns true if this Geometry is visible
/*!
* @return true if this Geometry is visible
*/
bool isVisible() const;
 
//! sets the name of the geometry
/*!
* @param name the new name of the geometry
*/
void setName(QString name);
 
//! returns the QPen which is used on drawing
/*!
* The pen is set depending on the Geometry. A CirclePoint for example takes one with the constructor.
* @return the QPen which is used for drawing
*/
QPen* pen() const;
 
//! returns the BoundingBox
/*!
* The bounding box in world coordinates
* @return the BoundingBox
*/
virtual QRectF boundingBox()=0;
virtual bool Touches(Point* geom, const MapAdapter* mapadapter)=0;
virtual void draw(QPainter* painter, const MapAdapter* mapadapter, const QRect &viewport, const QPoint offset)=0;
virtual bool hasPoints() const;
virtual bool hasClickedPoints() const;
virtual void setPen(QPen* pen);
virtual QList<Geometry*> clickedPoints();
virtual QList<Point*> points()=0;
 
private:
Geometry* myparentGeometry;
Geometry(const Geometry& old);
Geometry& operator=(const Geometry& rhs);
 
protected:
QPen* mypen;
bool visible;
QString myname;
void setParentGeometry(Geometry* geom);
 
signals:
void updateRequest(Geometry* geom);
void updateRequest(QRectF rect);
//! This signal is emitted when a Geometry is clicked
/*!
* A Geometry is clickable, if the containing layer is clickable.
* The objects emits a signal if it gets clicked
* @param geometry The clicked Geometry
* @param point -unused-
*/
void geometryClicked(Geometry* geometry, QPoint point);
 
//! A Geometry emits this signal, when its position gets changed
/*!
* @param geom the Geometry
*/
void positionChanged(Geometry* geom);
 
public slots:
//! if visible is true, the layer is made visible
/*!
* @param visible if the layer should be visible
*/
virtual void setVisible(bool visible);
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/geometrylayer.cpp
0,0 → 1,38
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "geometrylayer.h"
namespace qmapcontrol
{
GeometryLayer::GeometryLayer(QString layername, MapAdapter* mapadapter, bool takeevents)
: Layer(layername, mapadapter, Layer::GeometryLayer, takeevents)
{
}
 
 
GeometryLayer::~GeometryLayer()
{
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/geometrylayer.h
0,0 → 1,65
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef GEOMETRYLAYER_H
#define GEOMETRYLAYER_H
 
#include "layer.h"
 
namespace qmapcontrol
{
//! GeometryLayer class
/*!
* There are two different layer types:
* - MapLayer: Displays Maps, but also Geometries. The configuration for displaying maps have to be done in the MapAdapter
* - GeometryLayer: Only displays Geometry objects.
*
* MapLayers also can display Geometry objects. The difference to the GeometryLayer is the repainting. Objects that are
* added to a MapLayer are "baken" on the map. This means, when you change it´s position for example the changes are
* not visible until a new offscreen image has been drawn. If you have "static" Geometries which won´t change their
* position this is fine. But if you want to change the objects position or pen you should use a GeometryLayer. Those
* are repainted immediately on changes.
*
* @author Kai Winter <kaiwinter@gmx.de>
*/
class GeometryLayer : public Layer
{
Q_OBJECT
 
public:
//! GeometryLayer constructor
/*!
* This is used to construct a map layer.
*
* @param layername The name of the Layer
* @param mapadapter The MapAdapter which does coordinate translation and Query-String-Forming
* @param takeevents Should the Layer receive MouseEvents? This is set to true by default. Setting it to false could
* be something like a "speed up hint"
*/
GeometryLayer(QString layername, MapAdapter* mapadapter, bool takeevents=true);
virtual ~GeometryLayer();
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/googlemapadapter.cpp
0,0 → 1,38
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "googlemapadapter.h"
namespace qmapcontrol
{
GoogleMapAdapter::GoogleMapAdapter()
: TileMapAdapter("mt2.google.com", "/mt?n=404&x=%2&y=%3&zoom=%1", 256, 17, 0)
//: TileMapAdapter("tile.openstreetmap.org", "/%1/%2/%3.png", 256, 0, 17)
{
}
 
GoogleMapAdapter::~GoogleMapAdapter()
{
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/googlemapadapter.h
0,0 → 1,51
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef GOOGLEMAPADAPTER_H
#define GOOGLEMAPADAPTER_H
 
#include "tilemapadapter.h"
 
namespace qmapcontrol
{
//! MapAdapter for Google
/*!
* This is a conveniece class, which extends and configures a TileMapAdapter
* @author Kai Winter <kaiwinter@gmx.de>
*/
class GoogleMapAdapter : public TileMapAdapter
{
Q_OBJECT
 
public:
//! constructor
/*!
* This construct a Google Adapter
*/
GoogleMapAdapter();
virtual ~GoogleMapAdapter();
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/googlesatmapadapter.cpp
0,0 → 1,181
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "googlesatmapadapter.h"
 
#include <math.h>
namespace qmapcontrol
{
GoogleSatMapAdapter::GoogleSatMapAdapter()
: MapAdapter("kh.google.com", "/kh?n=404&v=8&t=trtqtt", 256, 0, 19)
{
// name = "googlesat";
 
numberOfTiles = pow(2, current_zoom+0.0);
coord_per_x_tile = 360. / numberOfTiles;
coord_per_y_tile = 180. / numberOfTiles;
}
 
GoogleSatMapAdapter::~GoogleSatMapAdapter()
{
}
 
QString GoogleSatMapAdapter::getHost() const
{
int random = qrand() % 4;
return QString("kh%1.google.com").arg(random);
}
 
QPoint GoogleSatMapAdapter::coordinateToDisplay(const QPointF& coordinate) const
{
//double x = ((coordinate.x()+180)*(tilesize*numberOfTiles/360));
//double y = (((coordinate.y()*-1)+90)*(tilesize*numberOfTiles/180));
 
qreal x = (coordinate.x()+180.) * (numberOfTiles*mytilesize)/360.; // coord to pixel!
//double y = -1*(coordinate.y()-90) * (numberOfTiles*tilesize)/180.; // coord to pixel!
qreal y = (getMercatorYCoord(coordinate.y())-M_PI) * -1 * (numberOfTiles*mytilesize)/(2*M_PI); // coord to pixel!
return QPoint(int(x), int(y));
}
 
QPointF GoogleSatMapAdapter::displayToCoordinate(const QPoint& point) const
{
//double lon = ((point.x()/tilesize*numberOfTiles)*360)-180;
//double lat = (((point.y()/tilesize*numberOfTiles)*180)-90)*-1;
 
qreal lon = (point.x()*(360./(numberOfTiles*mytilesize)))-180.;
//double lat = -(point.y()*(180./(numberOfTiles*tilesize)))+90;
//qreal lat = getMercatorLatitude(point.y()*-1*(2*M_PI/(numberOfTiles*tilesize)) + M_PI);
qreal lat = lat *180./M_PI;
return QPointF(lon, lat);
}
 
qreal GoogleSatMapAdapter::getMercatorLatitude(qreal YCoord) const
{
//http://welcome.warnercnr.colostate.edu/class_info/nr502/lg4/projection_mathematics/converting.html
if (YCoord > M_PI) return 9999.;
if (YCoord < -M_PI) return -9999.;
 
qreal t = atan(exp(YCoord));
qreal res = (2.*(t))-(M_PI/2.);
return res;
}
 
qreal GoogleSatMapAdapter::getMercatorYCoord(qreal lati) const
{
qreal lat = lati;
 
// conversion degre=>radians
qreal phi = M_PI * lat / 180;
 
qreal res;
//double temp = Math.Tan(Math.PI / 4 - phi / 2);
//res = Math.Log(temp);
res = 0.5 * log((1 + sin(phi)) / (1 - sin(phi)));
 
return res;
}
 
void GoogleSatMapAdapter::zoom_in()
{
current_zoom+=1;
numberOfTiles = pow(2, current_zoom+0.0);
coord_per_x_tile = 360. / numberOfTiles;
coord_per_y_tile = 180. / numberOfTiles;
}
 
void GoogleSatMapAdapter::zoom_out()
{
current_zoom-=1;
numberOfTiles = pow(2, current_zoom+0.0);
coord_per_x_tile = 360. / numberOfTiles;
coord_per_y_tile = 180. / numberOfTiles;
}
 
bool GoogleSatMapAdapter::isValid(int x, int y, int z) const
{
if ((x>=0 && x < numberOfTiles) && (y>=0 && y < numberOfTiles) && z>=0)
{
return true;
}
return false;
}
QString GoogleSatMapAdapter::query(int i, int j, int z) const
{
return getQ(-180+i*coord_per_x_tile,
90-(j+1)*coord_per_y_tile, z);
}
 
QString GoogleSatMapAdapter::getQ(qreal longitude, qreal latitude, int zoom) const
{
qreal xmin=-180;
qreal xmax=180;
qreal ymin=-90;
qreal ymax=90;
 
qreal xmoy=0;
qreal ymoy=0;
QString location="t";
 
//Google uses a latitude divided by 2;
qreal halflat = latitude;
 
for (int i = 0; i < zoom; i++)
{
xmoy = (xmax + xmin) / 2;
ymoy = (ymax + ymin) / 2;
if (halflat >= ymoy) //upper part (q or r)
{
ymin = ymoy;
if (longitude < xmoy)
{ /*q*/
location+= "q";
xmax = xmoy;
}
else
{/*r*/
location+= "r";
xmin = xmoy;
}
}
else //lower part (t or s)
{
ymax = ymoy;
if (longitude < xmoy)
{ /*t*/
 
location+= "t";
xmax = xmoy;
}
else
{/*s*/
location+= "s";
xmin = xmoy;
}
}
}
return QString("/kh?n=404&v=24&t=%1").arg(location);
}
}
 
/QMK-Groundstation/trunk/Classes/QMapControl/googlesatmapadapter.h
0,0 → 1,74
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef GOOGLESATMAPADAPTER_H
#define GOOGLESATMAPADAPTER_H
 
#include "mapadapter.h"
namespace qmapcontrol
{
//! MapAdapter for Google
/*!
* This is a conveniece class, which extends and configures a TileMapAdapter
* @author Kai Winter <kaiwinter@gmx.de>
*/
class GoogleSatMapAdapter : public MapAdapter
{
Q_OBJECT
public:
//! constructor
/*!
* This construct a Google Adapter
*/
GoogleSatMapAdapter();
virtual ~GoogleSatMapAdapter();
 
virtual QPoint coordinateToDisplay(const QPointF&) const;
virtual QPointF displayToCoordinate(const QPoint&) const;
 
//! returns the host of this MapAdapter
/*!
* @return the host of this MapAdapter
*/
QString getHost () const;
 
 
protected:
virtual void zoom_in();
virtual void zoom_out();
virtual QString query(int x, int y, int z) const;
virtual bool isValid(int x, int y, int z) const;
 
private:
virtual QString getQ(qreal longitude, qreal latitude, int zoom) const;
qreal getMercatorLatitude(qreal YCoord) const;
qreal getMercatorYCoord(qreal lati) const;
 
qreal coord_per_x_tile;
qreal coord_per_y_tile;
int srvNum;
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/gps_position.cpp
0,0 → 1,33
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "gps_position.h"
namespace qmapcontrol
{
GPS_Position::GPS_Position(float time, float longitude, QString longitude_dir, float latitude, QString latitude_dir)
:time(time), longitude(longitude), latitude(latitude), longitude_dir(longitude_dir), latitude_dir(latitude_dir)
{
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/gps_position.h
0,0 → 1,52
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef GPS_POSITION_H
#define GPS_POSITION_H
 
#include <QString>
 
namespace qmapcontrol
{
//! Represents a coordinate from a GPS receiver
/*!
* This class is used to represent a coordinate which has been parsed from a NMEA string.
* This is not fully integrated in the API. An example which uses this data type can be found under Samples.
* @author Kai Winter
*/
class GPS_Position
{
public:
GPS_Position(float time, float longitude, QString longitude_dir, float latitude, QString latitude_dir);
float time; /*!< time of the string*/
float longitude; /*!< longitude coordinate*/
float latitude; /*!< latitude coordinate*/
 
private:
QString longitude_dir;
QString latitude_dir;
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/imagemanager.cpp
0,0 → 1,178
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "imagemanager.h"
namespace qmapcontrol
{
ImageManager* ImageManager::m_Instance = 0;
ImageManager::ImageManager(QObject* parent)
:QObject(parent), emptyPixmap(QPixmap(1,1)), net(new MapNetwork(this)), doPersistentCaching(false)
{
emptyPixmap.fill(Qt::transparent);
 
if (QPixmapCache::cacheLimit() <= 20000)
{
QPixmapCache::setCacheLimit(20000); // in kb
}
}
 
 
ImageManager::~ImageManager()
{
delete net;
}
 
QPixmap ImageManager::getImage(const QString& host, const QString& url)
{
//qDebug() << "ImageManager::getImage";
QPixmap pm;
//pm.fill(Qt::black);
 
//is image cached (memory) or currently loading?
if (!QPixmapCache::find(url, pm) && !net->imageIsLoading(url))
// if (!images.contains(url) && !net->imageIsLoading(url))
{
//image cached (persistent)?
if (doPersistentCaching && tileExist(url))
{
loadTile(url,pm);
QPixmapCache::insert(url.toAscii().toBase64(), pm);
}
else
{
//load from net, add empty image
net->loadImage(host, url);
//QPixmapCache::insert(url, emptyPixmap);
return emptyPixmap;
}
}
return pm;
}
 
QPixmap ImageManager::prefetchImage(const QString& host, const QString& url)
{
#ifdef Q_WS_QWS
// on mobile devices we don´t want the display resfreshing when tiles are received which are
// prefetched... This is a performance issue, because mobile devices are very slow in
// repainting the screen
prefetch.append(url);
#endif
return getImage(host, url);
}
 
void ImageManager::receivedImage(const QPixmap pixmap, const QString& url)
{
//qDebug() << "ImageManager::receivedImage";
QPixmapCache::insert(url, pixmap);
//images[url] = pixmap;
 
// needed?
if (doPersistentCaching && !tileExist(url) )
saveTile(url,pixmap);
 
//((Layer*)this->parent())->imageReceived();
 
if (!prefetch.contains(url))
{
emit(imageReceived());
}
else
{
 
#ifdef Q_WS_QWS
prefetch.remove(prefetch.indexOf(url));
#endif
}
}
 
void ImageManager::loadingQueueEmpty()
{
emit(loadingFinished());
//((Layer*)this->parent())->removeZoomImage();
//qDebug() << "size of image-map: " << images.size();
//qDebug() << "size: " << QPixmapCache::cacheLimit();
}
 
void ImageManager::abortLoading()
{
net->abortLoading();
}
void ImageManager::setProxy(QString host, int port)
{
net->setProxy(host, port);
}
 
void ImageManager::setCacheDir(const QDir& path)
{
doPersistentCaching = true;
cacheDir = path;
if (!cacheDir.exists())
{
cacheDir.mkpath(cacheDir.absolutePath());
}
}
 
bool ImageManager::saveTile(QString tileName,QPixmap tileData)
{
tileName.replace("/","-");
 
QFile file(cacheDir.absolutePath() + "/" + tileName.toAscii().toBase64());
 
//qDebug() << "writing: " << file.fileName();
if (!file.open(QIODevice::ReadWrite )){
qDebug()<<"error reading file";
return false;
}
QByteArray bytes;
QBuffer buffer(&bytes);
buffer.open(QIODevice::WriteOnly);
tileData.save(&buffer, "PNG");
 
file.write(bytes);
file.close();
return true;
}
bool ImageManager::loadTile(QString tileName,QPixmap &tileData)
{
tileName.replace("/","-");
QFile file(cacheDir.absolutePath() + "/" + tileName.toAscii().toBase64());
if (!file.open(QIODevice::ReadOnly )) {
return false;
}
tileData.loadFromData( file.readAll() );
 
file.close();
return true;
}
bool ImageManager::tileExist(QString tileName)
{
tileName.replace("/","-");
QFile file(cacheDir.absolutePath() + "/" + tileName.toAscii().toBase64());
if (file.exists())
return true;
else
return false;
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/imagemanager.h
0,0 → 1,125
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef IMAGEMANAGER_H
#define IMAGEMANAGER_H
 
#include <QObject>
#include <QPixmapCache>
#include <QDebug>
#include <QMutex>
#include <QFile>
#include <QBuffer>
#include <QDir>
#include "mapnetwork.h"
 
namespace qmapcontrol
{
class MapNetwork;
/**
@author Kai Winter <kaiwinter@gmx.de>
*/
class ImageManager : public QObject
{
Q_OBJECT;
 
public:
static ImageManager* instance()
{
if(!m_Instance)
{
m_Instance = new ImageManager;
}
return m_Instance;
}
 
~ImageManager();
//! returns a QPixmap of the asked image
/*!
* If this component doesn´t have the image a network query gets started to load it.
* @param host the host of the image
* @param path the path to the image
* @return the pixmap of the asked image
*/
QPixmap getImage(const QString& host, const QString& path);
 
QPixmap prefetchImage(const QString& host, const QString& path);
 
void receivedImage(const QPixmap pixmap, const QString& url);
 
/*!
* This method is called by MapNetwork, after all images in its queue were loaded.
* The ImageManager emits a signal, which is used in MapControl to remove the zoom image.
* The zoom image should be removed on Tile Images with transparency.
* Else the zoom image stay visible behind the newly loaded tiles.
*/
void loadingQueueEmpty();
 
/*!
* Aborts all current loading threads.
* This is useful when changing the zoom-factor, though newly needed images loads faster
*/
void abortLoading();
 
//! sets the proxy for HTTP connections
/*!
* This method sets the proxy for HTTP connections.
* This is not provided by the current Qtopia version!
* @param host the proxy´s hostname or ip
* @param port the proxy´s port
*/
void setProxy(QString host, int port);
 
//! sets the cache directory for persistently saving map tiles
/*!
*
* @param path the path where map tiles should be stored
* @todo add maximum size
*/
void setCacheDir(const QDir& path);
 
private:
ImageManager(QObject* parent = 0);
ImageManager(const ImageManager&);
ImageManager& operator=(const ImageManager&);
QPixmap emptyPixmap;
MapNetwork* net;
QVector<QString> prefetch;
QDir cacheDir;
bool doPersistentCaching;
 
static ImageManager* m_Instance;
 
bool saveTile(QString tileName,QPixmap tileData);
bool loadTile(QString tileName,QPixmap &tileData);
bool tileExist(QString tileName);
 
signals:
void imageReceived();
void loadingFinished();
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/imagepoint.cpp
0,0 → 1,49
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "imagepoint.h"
namespace qmapcontrol
{
ImagePoint::ImagePoint(qreal x, qreal y, QString filename, QString name, Alignment alignment)
: Point(x, y, name, alignment)
{
//qDebug() << "loading image: " << filename;
mypixmap = new QPixmap(filename);
size = mypixmap->size();
//qDebug() << "image size: " << size;
}
 
ImagePoint::ImagePoint(qreal x, qreal y, QPixmap* pixmap, QString name, Alignment alignment)
: Point(x, y, name, alignment)
{
mypixmap = pixmap;
size = mypixmap->size();
}
 
 
ImagePoint::~ImagePoint()
{
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/imagepoint.h
0,0 → 1,70
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef IMAGEPOINT_H
#define IMAGEPOINT_H
 
#include "point.h"
 
namespace qmapcontrol
{
 
//! Draws an image into the map
/*! This is a convenience class for Point.
* It configures the pixmap of a Point to draw the given image.
* The image will be loaded from the given path and written in the points pixmap.
*
* @author Kai Winter <kaiwinter@gmx.de>
*/
class ImagePoint : public Point
{
public:
//! Creates a point which loads and displays the given image file
/*!
* Use this contructor to load the given image file and let the point display it.
* When you want multiple points to display the same image, use the other contructor and pass a pointer to that image.
* @param x longitude
* @param y latitude
* @param filename the file which should be loaded and displayed
* @param name the name of the image point
* @param alignment alignment (Middle or TopLeft)
*/
ImagePoint(qreal x, qreal y, QString filename, QString name = QString(), Alignment alignment = Middle);
 
//! Creates a point which displays the given image
/*!
* Use this contructor to display the given image.
* You have to load that image yourself, but can use it for multiple points.
* @param x longitude
* @param y latitude
* @param pixmap pointer to the image pixmap
* @param name the name of the image point
* @param alignment alignment (Middle or TopLeft)
*/
ImagePoint(qreal x, qreal y, QPixmap* pixmap, QString name = QString(), Alignment alignment = Middle);
virtual ~ImagePoint();
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/layer.cpp
0,0 → 1,301
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "layer.h"
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))
{
//qDebug() << "creating new Layer: " << layername << ", type: " << contents;
//qDebug() << this->layertype;
}
 
Layer::~Layer()
{
delete mapAdapter;
}
 
void Layer::setSize(QSize size)
{
this->size = size;
screenmiddle = QPoint(size.width()/2, size.height()/2);
//QMatrix mat;
//mat.translate(480/2, 640/2);
//mat.rotate(45);
//mat.translate(-480/2,-640/2);
//screenmiddle = mat.map(screenmiddle);
}
 
QString Layer::layername() const
{
return mylayername;
}
 
const MapAdapter* Layer::mapadapter() const
{
return mapAdapter;
}
 
void Layer::setVisible(bool visible)
{
this->visible = visible;
emit(updateRequest());
}
 
void Layer::addGeometry(Geometry* geom)
{
//qDebug() << geom->getName() << ", " << geom->getPoints().at(0)->getWidget();
 
geometries.append(geom);
emit(updateRequest(geom->boundingBox()));
//a geometry can request a redraw, e.g. when its position has been changed
connect(geom, SIGNAL(updateRequest(QRectF)),
this, SIGNAL(updateRequest(QRectF)));
}
void Layer::removeGeometry(Geometry* geometry)
{
for (int i=0; i<geometries.count(); i++)
{
if (geometry == geometries.at(i))
{
disconnect(geometry);
geometries.removeAt(i);
//delete geometry;
}
}
}
 
void Layer::clearGeometries()
{
foreach(Geometry *geometry, geometries){
disconnect(geometry);
}
geometries.clear();
}
 
bool Layer::isVisible() const
{
return visible;
}
void Layer::zoomIn() const
{
mapAdapter->zoom_in();
}
void Layer::zoomOut() const
{
mapAdapter->zoom_out();
}
 
void Layer::mouseEvent(const QMouseEvent* evnt, const QPoint mapmiddle_px)
{
if (takesMouseEvents())
{
if (evnt->button() == Qt::LeftButton && evnt->type() == QEvent::MouseButtonPress)
{
// check for collision
QPointF c = mapAdapter->displayToCoordinate(QPoint(evnt->x()-screenmiddle.x()+mapmiddle_px.x(),
evnt->y()-screenmiddle.y()+mapmiddle_px.y()));
Point* tmppoint = new Point(c.x(), c.y());
for (int i=0; i<geometries.count(); i++)
{
if (geometries.at(i)->isVisible() && geometries.at(i)->Touches(tmppoint, mapAdapter))
 
//if (geometries.at(i)->Touches(c, mapAdapter))
{
emit(geometryClicked(geometries.at(i), QPoint(evnt->x(), evnt->y())));
}
}
delete tmppoint;
}
}
}
 
bool Layer::takesMouseEvents() const
{
return takeevents;
}
 
void Layer::drawYourImage(QPainter* painter, const QPoint mapmiddle_px) const
{
if (mylayertype == MapLayer)
{
//qDebug() << ":: " << mapmiddle_px;
//QMatrix mat;
//mat.translate(480/2, 640/2);
//mat.rotate(45);
//mat.translate(-480/2,-640/2);
 
//mapmiddle_px = mat.map(mapmiddle_px);
//qDebug() << ":: " << mapmiddle_px;
_draw(painter, mapmiddle_px);
}
 
drawYourGeometries(painter, QPoint(mapmiddle_px.x()-screenmiddle.x(), mapmiddle_px.y()-screenmiddle.y()), myoffscreenViewport);
}
void Layer::drawYourGeometries(QPainter* painter, const QPoint mapmiddle_px, QRect viewport) const
{
QPoint offset;
if (mylayertype == MapLayer)
offset = mapmiddle_px;
else
offset = mapmiddle_px-screenmiddle;
 
painter->translate(-mapmiddle_px+screenmiddle);
for (int i=0; i<geometries.count(); i++)
{
geometries.at(i)->draw(painter, mapAdapter, viewport, offset);
}
painter->translate(mapmiddle_px-screenmiddle);
 
}
void Layer::_draw(QPainter* painter, const QPoint mapmiddle_px) const
{
// screen middle rotieren...
 
int tilesize = mapAdapter->tilesize();
int cross_x = int(mapmiddle_px.x())%tilesize; // position on middle tile
int cross_y = int(mapmiddle_px.y())%tilesize;
//qDebug() << screenmiddle << " - " << cross_x << ", " << cross_y;
 
// calculate how many surrounding tiles have to be drawn to fill the display
int space_left = screenmiddle.x() - cross_x;
int tiles_left = space_left/tilesize;
if (space_left>0)
tiles_left+=1;
 
int space_above = screenmiddle.y() - cross_y;
int tiles_above = space_above/tilesize;
if (space_above>0)
tiles_above+=1;
 
int space_right = screenmiddle.x() - (tilesize-cross_x);
int tiles_right = space_right/tilesize;
if (space_right>0)
tiles_right+=1;
 
int space_bottom = screenmiddle.y() - (tilesize-cross_y);
int tiles_bottom = space_bottom/tilesize;
if (space_bottom>0)
tiles_bottom+=1;
 
//int tiles_displayed = 0;
int mapmiddle_tile_x = mapmiddle_px.x()/tilesize;
int mapmiddle_tile_y = mapmiddle_px.y()/tilesize;
 
const QPoint from = QPoint((-tiles_left+mapmiddle_tile_x)*tilesize, (-tiles_above+mapmiddle_tile_y)*tilesize);
const QPoint to = QPoint((tiles_right+mapmiddle_tile_x+1)*tilesize, (tiles_bottom+mapmiddle_tile_y+1)*tilesize);
 
myoffscreenViewport = QRect(from, to);
 
if (mapAdapter->isValid(mapmiddle_tile_x, mapmiddle_tile_y, mapAdapter->currentZoom()))
{
painter->drawPixmap(-cross_x+size.width(),
-cross_y+size.height(),
ImageManager::instance()->getImage(mapAdapter->host(), mapAdapter->query(mapmiddle_tile_x, mapmiddle_tile_y, mapAdapter->currentZoom())));
}
 
for (int i=-tiles_left+mapmiddle_tile_x; i<=tiles_right+mapmiddle_tile_x; i++)
{
for (int j=-tiles_above+mapmiddle_tile_y; j<=tiles_bottom+mapmiddle_tile_y; j++)
{
// check if image is valid
if (!(i==mapmiddle_tile_x && j==mapmiddle_tile_y))
if (mapAdapter->isValid(i, j, mapAdapter->currentZoom()))
{
 
painter->drawPixmap(((i-mapmiddle_tile_x)*tilesize)-cross_x+size.width(),
((j-mapmiddle_tile_y)*tilesize)-cross_y+size.height(),
ImageManager::instance()->getImage(mapAdapter->host(), mapAdapter->query(i, j, mapAdapter->currentZoom())));
//if (QCoreApplication::hasPendingEvents())
// QCoreApplication::processEvents();
}
}
}
 
 
// PREFETCHING
int upper = mapmiddle_tile_y-tiles_above-1;
int right = mapmiddle_tile_x+tiles_right+1;
int left = mapmiddle_tile_x-tiles_right-1;
int lower = mapmiddle_tile_y+tiles_bottom+1;
 
int j = upper;
for (int i=left; i<=right; i++)
{
if (mapAdapter->isValid(i, j, mapAdapter->currentZoom()))
ImageManager::instance()->prefetchImage(mapAdapter->host(), mapAdapter->query(i, j, mapAdapter->currentZoom()));
}
j = lower;
for (int i=left; i<=right; i++)
{
if (mapAdapter->isValid(i, j, mapAdapter->currentZoom()))
ImageManager::instance()->prefetchImage(mapAdapter->host(), mapAdapter->query(i, j, mapAdapter->currentZoom()));
}
int i = left;
for (int j=upper+1; j<=lower-1; j++)
{
if (mapAdapter->isValid(i, j, mapAdapter->currentZoom()))
ImageManager::instance()->prefetchImage(mapAdapter->host(), mapAdapter->query(i, j, mapAdapter->currentZoom()));
}
i = right;
for (int j=upper+1; j<=lower-1; j++)
{
if (mapAdapter->isValid(i, j, mapAdapter->currentZoom()))
ImageManager::instance()->prefetchImage(mapAdapter->host(), mapAdapter->query(i, j, mapAdapter->currentZoom()));
}
}
 
QRect Layer::offscreenViewport() const
{
return myoffscreenViewport;
}
 
void Layer::moveWidgets(const QPoint mapmiddle_px) const
{
for (int i=0; i<geometries.count(); i++)
{
const Geometry* geom = geometries.at(i);
if (geom->GeometryType == "Point")
{
if (((Point*)geom)->widget()!=0)
{
QPoint topleft_relative = QPoint(mapmiddle_px-screenmiddle);
((Point*)geom)->drawWidget(mapAdapter, topleft_relative);
}
}
}
}
Layer::LayerType Layer::layertype() const
{
return mylayertype;
}
 
void Layer::setMapAdapter(MapAdapter* mapadapter)
{
 
mapAdapter = mapadapter;
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/layer.h
0,0 → 1,182
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef LAYER_H
#define LAYER_H
 
#include <QObject>
#include <QDebug>
#include <QPainter>
#include <QMouseEvent>
 
#include "mapadapter.h"
#include "layermanager.h"
#include "geometry.h"
#include "point.h"
 
#include "wmsmapadapter.h"
#include "tilemapadapter.h"
 
namespace qmapcontrol
{
//! Layer class
/*!
* There are two different layer types:
* - MapLayer: Displays Maps, but also Geometries. The configuration for displaying maps have to be done in the MapAdapter
* - GeometryLayer: Only displays Geometry objects.
*
* MapLayers also can display Geometry objects. The difference to the GeometryLayer is the repainting. Objects that are
* added to a MapLayer are "baken" on the map. This means, when you change it´s position for example the changes are
* not visible until a new offscreen image has been drawn. If you have "static" Geometries which won´t change their
* position this is fine. But if you want to change the objects position or pen you should use a GeometryLayer. Those
* are repainted immediately on changes.
* You can either use this class and give a layertype on creation or you can use the classes MapLayer and GeometryLayer.
*
* @author Kai Winter <kaiwinter@gmx.de>
*/
class Layer : public QObject
{
Q_OBJECT
 
public:
friend class LayerManager;
 
//! sets the type of a layer, see Layer class doc for further information
enum LayerType
{
MapLayer, /*!< uses the MapAdapter to display maps, only gets refreshed when a new offscreen image is needed */
GeometryLayer /*!< gets refreshed everytime when a geometry changes */
};
 
//! Layer constructor
/*!
* This is used to construct a layer.
*
* @param layername The name of the Layer
* @param mapadapter The MapAdapter which does coordinate translation and Query-String-Forming
* @param layertype The above explained LayerType
* @param takeevents Should the Layer receive MouseEvents? This is set to true by default. Setting it to false could
* be something like a "speed up hint"
*/
Layer(QString layername, MapAdapter* mapadapter, enum LayerType layertype, bool takeevents=true);
virtual ~Layer();
 
//! returns the layer's name
/*!
* @return the name of this layer
*/
QString layername() const;
 
//! returns the layer´s MapAdapter
/*!
* This method returns the MapAdapter of this Layer, which can be useful
* to do coordinate transformations.
* @return the MapAdapter which us used by this Layer
*/
const MapAdapter* mapadapter() const;
 
//! adds a Geometry object to this Layer
/*!
* Please notice the different LayerTypes (MapLayer and GeometryLayer) and the differences
* @param geometry the new Geometry
*/
void addGeometry(Geometry* geometry);
 
//! removes the Geometry object from this Layer
/*!
* This method removes a Geometry object from this Layer.
*/
void removeGeometry(Geometry* geometry);
 
//! removes all Geometry objects from this Layer
/*!
* This method removes all Geometry objects from this Layer.
*/
void clearGeometries();
 
//! return true if the layer is visible
/*!
* @return if the layer is visible
*/
bool isVisible() const;
 
//! returns the LayerType of the Layer
/*!
* There are two LayerTypes: MapLayer and GeometryLayer
* @return the LayerType of this Layer
*/
Layer::LayerType layertype() const;
 
void setMapAdapter(MapAdapter* mapadapter);
 
Layer& operator=(const Layer& rhs);
Layer(const Layer& old);
 
private:
void moveWidgets(const QPoint mapmiddle_px) const;
void drawYourImage(QPainter* painter, const QPoint mapmiddle_px) const;
void drawYourGeometries(QPainter* painter, const QPoint mapmiddle_px, QRect viewport) const;
void setSize(QSize size);
QRect offscreenViewport() const;
bool takesMouseEvents() const;
void mouseEvent(const QMouseEvent*, const QPoint mapmiddle_px);
void zoomIn() const;
void zoomOut() const;
void _draw(QPainter* painter, const QPoint mapmiddle_px) const;
 
bool visible;
QString mylayername;
LayerType mylayertype;
QSize size;
QPoint screenmiddle;
 
QList<Geometry*> geometries;
MapAdapter* mapAdapter;
bool takeevents;
mutable QRect myoffscreenViewport;
 
signals:
//! This signal is emitted when a Geometry is clicked
/*!
* A Geometry is clickable, if the containing layer is clickable.
* The layer emits a signal for every clicked geometry
* @param geometry The clicked Geometry
* @param point The coordinate (in widget coordinates) of the click
*/
void geometryClicked(Geometry* geometry, QPoint point);
 
void updateRequest(QRectF rect);
void updateRequest();
 
public slots:
//! if visible is true, the layer is made visible
/*!
* @param visible if the layer should be visible
*/
void setVisible(bool visible);
 
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/layermanager.cpp
0,0 → 1,458
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "layermanager.h"
namespace qmapcontrol
{
LayerManager::LayerManager(MapControl* mapcontrol, QSize size)
:mapcontrol(mapcontrol), scroll(QPoint(0,0)), size(size), whilenewscroll(QPoint(0,0))
{
// genauer berechnen?
offSize = size *2;
composedOffscreenImage = QPixmap(offSize);
composedOffscreenImage2 = QPixmap(offSize);
zoomImage = QPixmap(size);
zoomImage.fill(Qt::white);
screenmiddle = QPoint(size.width()/2, size.height()/2);
}
 
 
LayerManager::~LayerManager()
{
mylayers.clear();
}
 
QPointF LayerManager::currentCoordinate() const
{
return mapmiddle;
}
 
QPixmap LayerManager::getImage() const
{
return composedOffscreenImage;
}
 
Layer* LayerManager::layer() const
{
Q_ASSERT_X(mylayers.size()>0, "LayerManager::getLayer()", "No layers were added!");
return mylayers.first();
}
 
Layer* LayerManager::layer(const QString& layername) const
{
QListIterator<Layer*> layerit(mylayers);
while (layerit.hasNext())
{
Layer* l = layerit.next();
if (l->layername() == layername)
return l;
}
return 0;
}
 
QList<QString> LayerManager::layers() const
{
QList<QString> keys;
QListIterator<Layer*> layerit(mylayers);
while (layerit.hasNext())
{
keys.append(layerit.next()->layername());
}
return keys;
}
 
 
void LayerManager::scrollView(const QPoint& point)
{
scroll += point;
zoomImageScroll+=point;
mapmiddle_px += point;
 
mapmiddle = layer()->mapadapter()->displayToCoordinate(mapmiddle_px);
if (!checkOffscreen())
{
newOffscreenImage();
}
else
{
moveWidgets();
}
}
 
void LayerManager::moveWidgets()
{
QListIterator<Layer*> it(mylayers);
while (it.hasNext())
{
it.next()->moveWidgets(mapmiddle_px);
}
}
 
void LayerManager::setView(const QPointF& coordinate)
{
mapmiddle_px = layer()->mapadapter()->coordinateToDisplay(coordinate);
mapmiddle = coordinate;
 
//TODO: muss wegen moveTo() raus
if (!checkOffscreen())
{
newOffscreenImage();
}
else
{
//TODO:
// verschiebung ausrechnen
// oder immer neues offscreenimage
newOffscreenImage();
}
}
 
void LayerManager::setView(QList<QPointF> coordinates)
{
setMiddle(coordinates);
// mapcontrol->update();
}
 
void LayerManager::setViewAndZoomIn(const QList<QPointF> coordinates)
{
while (containsAll(coordinates))
{
setMiddle(coordinates);
zoomIn();
}
 
 
if (!containsAll(coordinates))
{
zoomOut();
}
 
mapcontrol->update();
}
 
void LayerManager::setMiddle(QList<QPointF> coordinates)
{
int sum_x = 0;
int sum_y = 0;
for (int i=0; i<coordinates.size(); i++)
{
// mitte muss in px umgerechnet werden, da aufgrund der projektion die mittebestimmung aus koordinaten ungenau ist
QPoint p = layer()->mapadapter()->coordinateToDisplay(coordinates.at(i));
sum_x += p.x();
sum_y += p.y();
}
QPointF middle = layer()->mapadapter()->displayToCoordinate(QPoint(sum_x/coordinates.size(), sum_y/coordinates.size()));
// middle in px rechnen!
 
setView(middle);
}
 
bool LayerManager::containsAll(QList<QPointF> coordinates) const
{
QRectF bb = getViewport();
bool containsall = true;
for (int i=0; i<coordinates.size(); i++)
{
if (!bb.contains(coordinates.at(i)))
return false;
}
return containsall;
}
QPoint LayerManager::getMapmiddle_px() const
{
return mapmiddle_px;
}
 
QRectF LayerManager::getViewport() const
{
QPoint upperLeft = QPoint(mapmiddle_px.x()-screenmiddle.x(), mapmiddle_px.y()+screenmiddle.y());
QPoint lowerRight = QPoint(mapmiddle_px.x()+screenmiddle.x(), mapmiddle_px.y()-screenmiddle.y());
 
QPointF ulCoord = layer()->mapadapter()->displayToCoordinate(upperLeft);
QPointF lrCoord = layer()->mapadapter()->displayToCoordinate(lowerRight);
 
QRectF coordinateBB = QRectF(ulCoord, QSizeF( (lrCoord-ulCoord).x(), (lrCoord-ulCoord).y()));
return coordinateBB;
}
 
void LayerManager::addLayer(Layer* layer)
{
mylayers.append(layer);
 
layer->setSize(size);
 
connect(layer, SIGNAL(updateRequest(QRectF)),
this, SLOT(updateRequest(QRectF)));
connect(layer, SIGNAL(updateRequest()),
this, SLOT(updateRequest()));
 
if (mylayers.size()==1)
{
setView(QPointF(0,0));
}
}
 
void LayerManager::newOffscreenImage(bool clearImage, bool showZoomImage)
{
// qDebug() << "LayerManager::newOffscreenImage()";
whilenewscroll = mapmiddle_px;
 
if (clearImage)
{
composedOffscreenImage2.fill(Qt::white);
}
 
QPainter painter(&composedOffscreenImage2);
if (showZoomImage)
{
painter.drawPixmap(screenmiddle.x()-zoomImageScroll.x(), screenmiddle.y()-zoomImageScroll.y(),zoomImage);
}
//only draw basemaps
for (int i=0; i<mylayers.count(); i++)
{
Layer* l = mylayers.at(i);
if (l->isVisible())
{
if (l->layertype() == Layer::MapLayer)
{
l->drawYourImage(&painter, whilenewscroll);
}
}
}
 
composedOffscreenImage = composedOffscreenImage2;
scroll = mapmiddle_px-whilenewscroll;
 
mapcontrol->update();
}
 
void LayerManager::zoomIn()
{
QCoreApplication::processEvents();
 
ImageManager::instance()->abortLoading();
// layer rendern abbrechen?
zoomImageScroll = QPoint(0,0);
 
zoomImage.fill(Qt::white);
QPixmap tmpImg = composedOffscreenImage.copy(screenmiddle.x()+scroll.x(),screenmiddle.y()+scroll.y(), size.width(), size.height());
 
QPainter painter(&zoomImage);
painter.save();
painter.translate(screenmiddle);
painter.scale(2, 2);
painter.translate(-screenmiddle);
 
painter.drawPixmap(0,0,tmpImg);
painter.restore();
 
QListIterator<Layer*> it(mylayers);
//TODO: remove hack, that mapadapters wont get set zoom multiple times
QList<const MapAdapter*> doneadapters;
while (it.hasNext())
{
Layer* l = it.next();
if (!doneadapters.contains(l->mapadapter()))
{
l->zoomIn();
doneadapters.append(l->mapadapter());
}
}
mapmiddle_px = layer()->mapadapter()->coordinateToDisplay(mapmiddle);
whilenewscroll = mapmiddle_px;
 
newOffscreenImage();
 
}
 
bool LayerManager::checkOffscreen() const
{
// calculate offscreenImage dimension (px)
QPoint upperLeft = mapmiddle_px - screenmiddle;
QPoint lowerRight = mapmiddle_px + screenmiddle;
QRect viewport = QRect(upperLeft, lowerRight);
 
QRect testRect = layer()->offscreenViewport();
 
if (!testRect.contains(viewport))
{
return false;
}
 
return true;
}
void LayerManager::zoomOut()
{
QCoreApplication::processEvents();
ImageManager::instance()->abortLoading();
zoomImageScroll = QPoint(0,0);
zoomImage.fill(Qt::white);
QPixmap tmpImg = composedOffscreenImage.copy(screenmiddle.x()+scroll.x(),screenmiddle.y()+scroll.y(), size.width(), size.height());
QPainter painter(&zoomImage);
painter.translate(screenmiddle);
painter.scale(0.5,0.5);
painter.translate(-screenmiddle);
painter.drawPixmap(0,0,tmpImg);
 
painter.translate(screenmiddle);
painter.scale(2,2);
painter.translate(-screenmiddle);
 
QListIterator<Layer*> it(mylayers);
//TODO: remove hack, that mapadapters wont get set zoom multiple times
QList<const MapAdapter*> doneadapters;
while (it.hasNext())
{
Layer* l = it.next();
if (!doneadapters.contains(l->mapadapter()))
{
l->zoomOut();
doneadapters.append(l->mapadapter());
}
}
mapmiddle_px = layer()->mapadapter()->coordinateToDisplay(mapmiddle);
whilenewscroll = mapmiddle_px;
newOffscreenImage();
}
 
void LayerManager::setZoom(int zoomlevel)
{
int current_zoom;
if (layer()->mapadapter()->minZoom() < layer()->mapadapter()->maxZoom())
{
current_zoom = layer()->mapadapter()->currentZoom();
}
else
{
current_zoom = layer()->mapadapter()->minZoom() - layer()->mapadapter()->currentZoom();
}
 
 
if (zoomlevel < current_zoom)
{
for (int i=current_zoom; i>zoomlevel; i--)
{
zoomOut();
}
}
else
{
for (int i=current_zoom; i<zoomlevel; i++)
{
zoomIn();
}
}
}
 
void LayerManager::mouseEvent(const QMouseEvent* evnt)
{
QListIterator<Layer*> it(mylayers);
while (it.hasNext())
{
Layer* l = it.next();
if (l->isVisible())
{
l->mouseEvent(evnt, mapmiddle_px);
}
}
}
 
void LayerManager::updateRequest(QRectF rect)
{
const QPoint topleft = mapmiddle_px - screenmiddle;
 
QPointF c = rect.topLeft();
 
if (getViewport().contains(c) || getViewport().contains(rect.bottomRight()))
{
// QPoint point = getLayer()->getMapAdapter()->coordinateToDisplay(c);
// QPoint finalpoint = point-topleft;
// QRect rect_px = QRect(int(finalpoint.x()-(rect.width()-1)/2), int(finalpoint.y()-(rect.height()-1)/2),
// int(rect.width()+1), int(rect.height()+1));
//
// mapcontrol->updateRequest(rect_px);
mapcontrol->update();
// newOffscreenImage();
}
}
void LayerManager::updateRequest()
{
newOffscreenImage();
}
void LayerManager::forceRedraw()
{
newOffscreenImage();
}
void LayerManager::removeZoomImage()
{
zoomImage.fill(Qt::white);
forceRedraw();
}
 
void LayerManager::drawGeoms(QPainter* painter)
{
QListIterator<Layer*> it(mylayers);
while (it.hasNext())
{
Layer* l = it.next();
if (l->layertype() == Layer::GeometryLayer && l->isVisible())
{
l->drawYourGeometries(painter, mapmiddle_px, layer()->offscreenViewport());
}
}
}
void LayerManager::drawImage(QPainter* painter)
{
painter->drawPixmap(-scroll.x()-screenmiddle.x(),
-scroll.y()-screenmiddle.y(),
composedOffscreenImage);
}
 
int LayerManager::currentZoom() const
{
return layer()->mapadapter()->currentZoom();
}
 
void LayerManager::resize(QSize newSize)
{
size = newSize;
offSize = newSize *2;
composedOffscreenImage = QPixmap(offSize);
composedOffscreenImage2 = QPixmap(offSize);
zoomImage = QPixmap(newSize);
zoomImage.fill(Qt::white);
 
screenmiddle = QPoint(newSize.width()/2, newSize.height()/2);
 
QListIterator<Layer*> it(mylayers);
while (it.hasNext())
{
Layer* l = it.next();
l->setSize(newSize);
}
 
newOffscreenImage();
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/layermanager.h
0,0 → 1,213
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef LAYERMANAGER_H
#define LAYERMANAGER_H
 
#include <QObject>
#include <QMap>
#include <QListIterator>
#include "layer.h"
#include "mapadapter.h"
#include "mapcontrol.h"
 
namespace qmapcontrol
{
class Layer;
class MapAdapter;
class MapControl;
 
class LayerManager;
 
//! Handles Layers and viewport related settings
/*!
* This class handles internally all layers which were added to the MapControl.
* It also stores values for scrolling.
* It initiates the creation of a new offscreen image and on zooming the zoom images gets here created.
* @author Kai Winter <kaiwinter@gmx.de>
*/
class LayerManager : public QObject
{
Q_OBJECT
 
public:
LayerManager(MapControl*, QSize);
~LayerManager();
 
//! returns the coordinate of the center of the map
/*!
* @return returns the coordinate of the middle of the screen
*/
QPointF currentCoordinate() const;
 
//! returns the current offscreen image
/*!
* @return the current offscreen image
*/
QPixmap getImage() const;
 
//! returns the layer with the given name
/*!
* @param layername name of the wanted layer
* @return the layer with the given name
*/
Layer* layer(const QString&) const;
 
//! returns the base layer
/*!
* This will return the base layer of the LayerManager.
* The base layer is the one which is used to do internal coordinate calculations.
* @return the base layer
*/
Layer* layer() const;
 
//! returns the names of all layers
/*!
* @return returns a QList with the names of all layers
*/
QList<QString> layers() const;
 
//! sets the middle of the map to the given coordinate
/*!
* @param coordinate the coordinate which the view´s middle should be set to
*/
void setView(const QPointF& coordinate);
 
//! sets the view, so all coordinates are visible
/*!
* @param coordinates the Coorinates which should be visible
*/
void setView(const QList<QPointF> coordinates);
 
//! sets the view and zooms in, so all coordinates are visible
/*!
* The code of setting the view to multiple coordinates is "brute force" and pretty slow.
* Have to be reworked.
* @param coordinates the Coorinates which should be visible
*/
void setViewAndZoomIn (const QList<QPointF> coordinates);
 
//! zooms in one step
void zoomIn();
 
//! zooms out one step
void zoomOut();
 
//! sets the given zoomlevel
/*!
* @param zoomlevel the zoomlevel
*/
void setZoom(int zoomlevel);
 
//! The Viewport of the display
/*!
* Returns the visible viewport in world coordinates
* @return the visible viewport in world coordinates
*/
QRectF getViewport() const;
 
//! scrolls the view
/*!
* Scrolls the view by the given value in pixels and in display coordinates
* @param offset the distance which the view should be scrolled
*/
void scrollView(const QPoint& offset);
 
//! forwards mouseevents to the layers
/*!
* This method is invoked by the MapControl which receives Mouse Events.
* These events are forwarded to the layers, so they can check for clicked geometries.
* @param evnt the mouse event
*/
void mouseEvent(const QMouseEvent* evnt);
 
//! returns the middle of the map in projection coordinates
/*!
*
* @return the middle of the map in projection coordinates
*/
QPoint getMapmiddle_px() const;
 
void forceRedraw();
void removeZoomImage();
 
//! adds a layer
/*!
* If multiple layers are added, they are painted in the added order.
* @param layer the layer which should be added
*/
void addLayer(Layer* layer);
 
//! returns the current zoom level
/*!
* @return returns the current zoom level
*/
int currentZoom() const;
 
void drawGeoms(QPainter* painter);
void drawImage(QPainter* painter);
 
private:
LayerManager& operator=(const LayerManager& rhs);
LayerManager(const LayerManager& old);
//! This method have to be invoked to draw a new offscreen image
/*!
* @param clearImage if the current offscreeen image should be cleared
* @param showZoomImage if a zoom image should be painted
*/
void newOffscreenImage(bool clearImage=true, bool showZoomImage=true);
inline bool checkOffscreen() const;
inline bool containsAll(QList<QPointF> coordinates) const;
inline void moveWidgets();
inline void setMiddle(QList<QPointF> coordinates);
 
MapControl* mapcontrol;
QPoint screenmiddle; // middle of the screen
QPoint scroll; // scrollvalue of the offscreen image
QPoint zoomImageScroll; // scrollvalue of the zoom image
 
QSize size; // widget size
QSize offSize; // size of the offscreen image
 
QPixmap composedOffscreenImage;
QPixmap composedOffscreenImage2;
QPixmap zoomImage;
 
QList<Layer*> mylayers;
 
QPoint mapmiddle_px; // projection-display coordinates
QPointF mapmiddle; // world coordinate
 
QMutex scrollMutex;
QPoint whilenewscroll;
mutable QMutex refreshMutex;
 
public slots:
void updateRequest(QRectF rect);
void updateRequest();
void resize(QSize newSize);
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/linestring.cpp
0,0 → 1,170
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "linestring.h"
namespace qmapcontrol
{
LineString::LineString()
: Curve()
{
GeometryType = "LineString";
}
 
LineString::LineString(QList<Point*> const points, QString name, QPen* pen)
:Curve(name)
{
mypen = pen;
LineString();
setPoints(points);
}
 
LineString::~LineString()
{
}
 
// Geometry LineString::Clone(){}
 
// Point LineString::EndPoint(){}
// Point LineString::StartPoint(){}
// Point LineString::Value(){}
 
 
void LineString::addPoint(Point* point)
{
vertices.append(point);
}
 
QList<Point*> LineString::points()
{
return vertices;
}
 
void LineString::setPoints(QList<Point*> points)
{
for (int i=0; i<points.size(); i++)
{
points.at(i)->setParentGeometry(this);
}
vertices = points;
}
 
void LineString::draw(QPainter* painter, const MapAdapter* mapadapter, const QRect &screensize, const QPoint offset)
{
if (!visible)
return;
 
QPolygon p = QPolygon();
 
QPointF c;
for (int i=0; i<vertices.size(); i++)
{
c = vertices[i]->coordinate();
p.append(mapadapter->coordinateToDisplay(c));
}
if (mypen != 0)
{
painter->save();
painter->setPen(*mypen);
}
painter->drawPolyline(p);
if (mypen != 0)
{
painter->restore();
}
for (int i=0; i<vertices.size(); i++)
{
vertices[i]->draw(painter, mapadapter, screensize, offset);
}
}
 
int LineString::numberOfPoints() const
{
return vertices.count();
}
bool LineString::Touches(Point* geom, const MapAdapter* mapadapter)
{
// qDebug() << "LineString::Touches Point";
touchedPoints.clear();
bool touches = false;
for (int i=0; i<vertices.count(); i++)
{
// use implementation from Point
if (vertices.at(i)->Touches(geom, mapadapter))
{
touchedPoints.append(vertices.at(i));
 
touches = true;
}
}
if (touches)
{
emit(geometryClicked(this, QPoint(0,0)));
}
return touches;
}
bool LineString::Touches(Geometry* /*geom*/, const MapAdapter* /*mapadapter*/)
{
// qDebug() << "LineString::Touches Geom";
touchedPoints.clear();
 
return false;
}
 
QList<Geometry*> LineString::clickedPoints()
{
return touchedPoints;
}
bool LineString::hasPoints() const
{
return vertices.size() > 0 ? true : false;
}
bool LineString::hasClickedPoints() const
{
return touchedPoints.size() > 0 ? true : false;
}
 
QRectF LineString::boundingBox()
{
qreal minlon=180;
qreal maxlon=-180;
qreal minlat=90;
qreal maxlat=-90;
for (int i=0; i<vertices.size(); i++)
{
Point* tmp = vertices.at(i);
if (tmp->longitude() < minlon) minlon = tmp->longitude();
if (tmp->longitude() > maxlon) maxlon = tmp->longitude();
if (tmp->latitude() < minlat) minlat = tmp->latitude();
if (tmp->latitude() > maxlat) maxlat = tmp->latitude();
}
QPointF min = QPointF(minlon, minlat);
QPointF max = QPointF(maxlon, maxlat);
QPointF dist = max - min;
QSizeF si = QSizeF(dist.x(), dist.y());
 
return QRectF(min, si);
 
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/linestring.h
0,0 → 1,120
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef LINESTRING_H
#define LINESTRING_H
 
#include "curve.h"
 
namespace qmapcontrol
{
//! A collection of Point objects to describe a line
/*!
* A LineString is a Curve with linear interpolation between Points. Each consecutive pair of Points defines a Line segment.
* @author Kai Winter <kaiwinter@gmx.de>
*/
class LineString : public Curve
{
Q_OBJECT
 
public:
LineString();
//! constructor
/*!
* The constructor of a LineString takes a list of Points to form a line.
* @param points a list of points
* @param name the name of the LineString
* @param pen a QPen can be used to modify the look of the line.
* @see http://doc.trolltech.com/4.3/qpen.html
*/
LineString ( QList<Point*> const points, QString name = QString(), QPen* pen = 0 );
virtual ~LineString();
 
//! returns the points of the LineString
/*!
* @return a list with the points of the LineString
*/
QList<Point*> points();
 
//! adds a point at the end of the LineString
/*!
* @param point the point which should be added to the LineString
*/
void addPoint ( Point* point );
 
//! sets the given list as points of the LineString
/*!
* @param points the points which should be set for the LineString
*/
void setPoints ( QList<Point*> points );
 
//! returns the number of Points the LineString consists of
/*!
* @return the number of the LineString´s Points
*/
int numberOfPoints() const;
 
// virtual Geometry Clone();
virtual QRectF boundingBox();
// virtual Point EndPoint();
// virtual Point StartPoint();
// virtual Point Value();
 
//! returns true if the LineString has Childs
/*!
* This is equal to: numberOfPoints() > 0
* @return true it the LineString has Childs (=Points)
* @see clickedPoints()
*/
virtual bool hasPoints() const;
 
//! returns true if the LineString has clicked Points
/*!
* @return true if childs of a LineString were clicked
* @see clickedPoints()
*/
virtual bool hasClickedPoints() const;
 
//! returns the clicked Points
/*!
* If a LineString was clicked it could be neccessary to figure out which of its points where clicked.
* Do do so the methods hasPoints() and clickedPoints() can be used.
* When a point is added to a LineString the Point becomes its child.
* It is possible (depending on the zoomfactor) to click more than one Point of a LineString, so this method returns a list.
* @return the clicked Points of the LineString
*/
virtual QList<Geometry*> clickedPoints();
 
protected:
virtual bool Touches ( Geometry* geom, const MapAdapter* mapadapter );
virtual bool Touches ( Point* geom, const MapAdapter* mapadapter );
virtual void draw ( QPainter* painter, const MapAdapter* mapadapter, const QRect &screensize, const QPoint offset );
 
private:
QList<Point*> vertices;
QList<Geometry*> touchedPoints;
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/mapadapter.cpp
0,0 → 1,69
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "mapadapter.h"
namespace qmapcontrol
{
MapAdapter::MapAdapter(const QString& host, const QString& serverPath, int tilesize, int minZoom, int maxZoom)
:myhost(host), serverPath(serverPath), mytilesize(tilesize), min_zoom(minZoom), max_zoom(maxZoom)
{
current_zoom = min_zoom;
loc = QLocale(QLocale::English);
}
 
MapAdapter::~MapAdapter()
{
}
 
QString MapAdapter::host() const
{
return myhost;
}
 
int MapAdapter::tilesize() const
{
return mytilesize;
}
 
int MapAdapter::minZoom() const
{
return min_zoom;
}
 
int MapAdapter::maxZoom() const
{
return max_zoom;
}
 
int MapAdapter::currentZoom() const
{
return current_zoom;
}
 
int MapAdapter::adaptedZoom() const
{
return max_zoom < min_zoom ? min_zoom - current_zoom : current_zoom;
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/mapadapter.h
0,0 → 1,151
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef MAPADAPTER_H
#define MAPADAPTER_H
 
#include <QObject>
#include <QSize>
#include <QPoint>
#include <QPointF>
#include <QLocale>
#include <QDebug>
#include <cmath>
 
namespace qmapcontrol
{
//! Used to fit map servers into QMapControl
/*!
* MapAdapters are needed to convert between world- and display coordinates.
* This calculations depend on the used map projection.
* There are two ready-made MapAdapters:
* - TileMapAdapter, which is ready to use for OpenStreetMap or Google (Mercator projection)
* - WMSMapAdapter, which could be used for the most WMS-Server (some servers show errors, because of image ratio)
*
* MapAdapters are also needed to form the HTTP-Queries to load the map tiles.
* The maps from WMS Servers are also divided into tiles, because those can be better cached.
*
* @see TileMapAdapter, @see WMSMapAdapter
*
* @author Kai Winter <kaiwinter@gmx.de>
*/
class MapAdapter : public QObject
{
friend class Layer;
 
Q_OBJECT
 
public:
virtual ~MapAdapter();
 
//! returns the host of this MapAdapter
/*!
* @return the host of this MapAdapter
*/
QString host() const;
 
//! returns the size of the tiles
/*!
* @return the size of the tiles
*/
int tilesize() const;
 
//! returns the min zoom value
/*!
* @return the min zoom value
*/
int minZoom() const;
 
//! returns the max zoom value
/*!
* @return the max zoom value
*/
int maxZoom() const;
 
//! returns the current zoom
/*!
* @return the current zoom
*/
int currentZoom() const;
 
virtual int adaptedZoom()const;
 
//! translates a world coordinate to display coordinate
/*!
* The calculations also needs the current zoom. The current zoom is managed by the MapAdapter, so this is no problem.
* To divide model from view the current zoom should be moved to the layers.
* @param coordinate the world coordinate
* @return the display coordinate (in widget coordinates)
*/
virtual QPoint coordinateToDisplay(const QPointF& coordinate) const = 0;
 
//! translates display coordinate to world coordinate
/*!
* The calculations also needs the current zoom. The current zoom is managed by the MapAdapter, so this is no problem.
* To divide model from view the current zoom should be moved to the layers.
* @param point the display coordinate
* @return the world coordinate
*/
virtual QPointF displayToCoordinate(const QPoint& point) const = 0;
 
protected:
MapAdapter(const QString& host, const QString& serverPath, int tilesize, int minZoom = 0, int maxZoom = 0);
virtual void zoom_in() = 0;
virtual void zoom_out() = 0;
virtual bool isValid(int x, int y, int z) const = 0;
virtual QString query(int x, int y, int z) const = 0;
 
QSize size;
QString myhost;
QString serverPath;
int mytilesize;
int min_zoom;
int max_zoom;
int current_zoom;
 
int param1;
int param2;
int param3;
int param4;
int param5;
int param6;
 
QString sub1;
QString sub2;
QString sub3;
QString sub4;
QString sub5;
QString sub6;
 
int order[3][2];
 
int middle_x;
int middle_y;
 
qreal numberOfTiles;
QLocale loc;
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/mapcontrol.cpp
0,0 → 1,414
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "mapcontrol.h"
namespace qmapcontrol
{
MapControl::MapControl(QSize size, MouseMode mousemode)
: size(size), mymousemode(mousemode), scaleVisible(false)
{
layermanager = new LayerManager(this, size);
screen_middle = QPoint(size.width()/2, size.height()/2);
 
mousepressed = false;
 
connect(ImageManager::instance(), SIGNAL(imageReceived()),
this, SLOT(updateRequestNew()));
 
connect(ImageManager::instance(), SIGNAL(loadingFinished()),
this, SLOT(loadingFinished()));
 
this->setMaximumSize(size.width()+1, size.height()+1);
}
 
MapControl::~MapControl()
{
delete layermanager;
}
 
QPointF MapControl::currentCoordinate() const
{
return layermanager->currentCoordinate();
}
 
Layer* MapControl::layer(const QString& layername) const
{
return layermanager->layer(layername);
}
 
QList<QString> MapControl::layers() const
{
return layermanager->layers();
}
 
int MapControl::numberOfLayers() const
{
return layermanager->layers().size();
}
 
void MapControl::followGeometry(const Geometry* geom) const
{
connect(geom, SIGNAL(positionChanged(Geometry*)),
this, SLOT(positionChanged(Geometry*)));
}
 
void MapControl::positionChanged(Geometry* geom)
{
QPoint start = layermanager->layer()->mapadapter()->coordinateToDisplay(currentCoordinate());
QPoint dest = layermanager->layer()->mapadapter()->coordinateToDisplay(((Point*)geom)->coordinate());
 
QPoint step = (dest-start);
 
layermanager->scrollView(step);
 
// setView(geom);
update();
}
 
void MapControl::moveTo(QPointF coordinate)
{
target = coordinate;
steps = 25;
if (moveMutex.tryLock())
{
QTimer::singleShot(40, this, SLOT(tick()));
}
else
{
// stopMove(coordinate);
}
}
void MapControl::tick()
{
QPoint start = layermanager->layer()->mapadapter()->coordinateToDisplay(currentCoordinate());
QPoint dest = layermanager->layer()->mapadapter()->coordinateToDisplay(target);
 
QPoint step = (dest-start)/steps;
QPointF next = currentCoordinate()- step;
 
// setView(Coordinate(next.x(), next.y()));
layermanager->scrollView(step);
 
update();
steps--;
if (steps>0)
{
QTimer::singleShot(40, this, SLOT(tick()));
}
else
{
moveMutex.unlock();
}
}
 
void MapControl::paintEvent(QPaintEvent* evnt)
{
QWidget::paintEvent(evnt);
QPainter painter(this);
 
// painter.translate(150,190);
// painter.scale(0.5,0.5);
 
// painter.setClipRect(0,0, size.width(), size.height());
 
// painter.setViewport(10000000000,0,size.width(),size.height());
 
/*
// rotating
rotation = 45;
painter.translate(256,256);
painter.rotate(rotation);
painter.translate(-256,-256);
*/
 
layermanager->drawImage(&painter);
layermanager->drawGeoms(&painter);
 
// added by wolf
// draw scale
if (scaleVisible)
{
QList<double> distanceList;
distanceList<<5000000<<2000000<<1000000<<1000000<<1000000<<100000<<100000<<50000<<50000<<10000<<10000<<10000<<1000<<1000<<500<<200<<100<<50<<25;
if (currentZoom() >= 0 && distanceList.size() > currentZoom())
{
double line;
line = distanceList.at( currentZoom() ) / pow(2, 18-currentZoom() ) / 0.597164;
 
// draw the scale
painter.setPen(Qt::black);
QPoint p1(10,size.height()-20);
QPoint p2((int)line,size.height()-20);
painter.drawLine(p1,p2);
 
painter.drawLine(10,size.height()-15, 10,size.height()-25);
painter.drawLine((int)line,size.height()-15, (int)line,size.height()-25);
 
QString distance;
if (distanceList.at(currentZoom()) >= 1000)
{
distance = QVariant( distanceList.at(currentZoom())/1000 ) .toString()+ " km";
}
else
{
distance = QVariant( distanceList.at(currentZoom()) ).toString() + " m";
}
 
painter.drawText(QPoint((int)line+10,size.height()-15), distance);
}
}
 
painter.drawLine(screen_middle.x(), screen_middle.y()-10,
screen_middle.x(), screen_middle.y()+10); // |
painter.drawLine(screen_middle.x()-10, screen_middle.y(),
screen_middle.x()+10, screen_middle.y()); // -
 
// int cross_x = int(layermanager->getMapmiddle_px().x())%256;
// int cross_y = int(layermanager->getMapmiddle_px().y())%256;
// painter.drawLine(screen_middle.x()-cross_x+cross_x, screen_middle.y()-cross_y+0,
// screen_middle.x()-cross_x+cross_x, screen_middle.y()-cross_y+256); // |
// painter.drawLine(screen_middle.x()-cross_x+0, screen_middle.y()-cross_y+cross_y,
// screen_middle.x()-cross_x+256, screen_middle.y()-cross_y+cross_y); // -
 
painter.drawRect(0,0, size.width(), size.height());
/*
// rotating
painter.setMatrix(painter.matrix().inverted());
//qt = painter.transform();
qm = painter.combinedMatrix();
*/
 
if (mousepressed && mymousemode == Dragging)
{
QRect rect = QRect(pre_click_px, current_mouse_pos);
painter.drawRect(rect);
}
emit viewChanged(currentCoordinate(), currentZoom());
}
 
// mouse events
void MapControl::mousePressEvent(QMouseEvent* evnt)
{
//rotating (experimental)
// QMouseEvent* me = new QMouseEvent(evnt->type(), qm.map(QPoint(evnt->x(),evnt->y())), evnt->button(), evnt->buttons(), evnt->modifiers());
// evnt = me;
// qDebug() << "evnt: " << evnt->x() << ", " << evnt->y() << ", " << evnt->pos();
 
layermanager->mouseEvent(evnt);
 
if (layermanager->layers().size()>0)
{
if (evnt->button() == 1)
{
mousepressed = true;
pre_click_px = QPoint(evnt->x(), evnt->y());
}
else if (evnt->button() == 2 && mymousemode != None) // zoom in
{
zoomIn();
} else if (evnt->button() == 4 && mymousemode != None) // zoom out
{
zoomOut();
}
}
 
// emit(mouseEvent(evnt));
emit(mouseEventCoordinate(evnt, clickToWorldCoordinate(evnt->pos())));
}
 
void MapControl::mouseReleaseEvent(QMouseEvent* evnt)
{
mousepressed = false;
if (mymousemode == Dragging)
{
QPointF ulCoord = clickToWorldCoordinate(pre_click_px);
QPointF lrCoord = clickToWorldCoordinate(current_mouse_pos);
 
QRectF coordinateBB = QRectF(ulCoord, QSizeF( (lrCoord-ulCoord).x(), (lrCoord-ulCoord).y()));
 
emit(boxDragged(coordinateBB));
}
 
emit(mouseEventCoordinate(evnt, clickToWorldCoordinate(evnt->pos())));
}
 
void MapControl::mouseMoveEvent(QMouseEvent* evnt)
{
// emit(mouseEvent(evnt));
 
/*
// rotating
QMouseEvent* me = new QMouseEvent(evnt->type(), qm.map(QPoint(evnt->x(),evnt->y())), evnt->button(), evnt->buttons(), evnt->modifiers());
evnt = me;
*/
if (mousepressed && mymousemode == Panning)
{
QPoint offset = pre_click_px - QPoint(evnt->x(), evnt->y());
layermanager->scrollView(offset);
pre_click_px = QPoint(evnt->x(), evnt->y());
}
else if (mousepressed && mymousemode == Dragging)
{
current_mouse_pos = QPoint(evnt->x(), evnt->y());
}
// emit(mouseEventCoordinate(evnt, clickToWorldCoordinate(evnt->pos())));
 
update();
// emit(mouseEventCoordinate(evnt, clickToWorldCoordinate(evnt->pos())));
}
 
QPointF MapControl::clickToWorldCoordinate(QPoint click)
{
// click coordinate to image coordinate
QPoint displayToImage= QPoint(click.x()-screen_middle.x()+layermanager->getMapmiddle_px().x(),
click.y()-screen_middle.y()+layermanager->getMapmiddle_px().y());
// image coordinate to world coordinate
return layermanager->layer()->mapadapter()->displayToCoordinate(displayToImage);
}
 
void MapControl::updateRequest(QRect rect)
{
update(rect);
}
void MapControl::updateRequestNew()
{
// qDebug() << "MapControl::updateRequestNew()";
layermanager->forceRedraw();
update();
}
// slots
void MapControl::zoomIn()
{
layermanager->zoomIn();
update();
}
void MapControl::zoomOut()
{
layermanager->zoomOut();
update();
}
void MapControl::setZoom(int zoomlevel)
{
layermanager->setZoom(zoomlevel);
update();
}
int MapControl::currentZoom() const
{
return layermanager->currentZoom();
}
void MapControl::scrollLeft(int pixel)
{
layermanager->scrollView(QPoint(-pixel,0));
update();
}
void MapControl::scrollRight(int pixel)
{
layermanager->scrollView(QPoint(pixel,0));
update();
}
void MapControl::scrollUp(int pixel)
{
layermanager->scrollView(QPoint(0,-pixel));
update();
}
void MapControl::scrollDown(int pixel)
{
layermanager->scrollView(QPoint(0,pixel));
update();
}
void MapControl::scroll(const QPoint scroll)
{
layermanager->scrollView(scroll);
update();
}
 
void MapControl::setView(const QPointF& coordinate) const
{
layermanager->setView(coordinate);
}
 
void MapControl::setView(const QList<QPointF> coordinates) const
{
layermanager->setView(coordinates);
}
 
void MapControl::setViewAndZoomIn(const QList<QPointF> coordinates) const
{
layermanager->setViewAndZoomIn(coordinates);
}
 
void MapControl::setView(const Point* point) const
{
layermanager->setView(point->coordinate());
}
 
void MapControl::loadingFinished()
{
// qDebug() << "MapControl::loadingFinished()";
layermanager->removeZoomImage();
}
void MapControl::addLayer(Layer* layer)
{
layermanager->addLayer(layer);
}
 
void MapControl::setMouseMode(MouseMode mousemode)
{
mymousemode = mousemode;
}
MapControl::MouseMode MapControl::mouseMode()
{
return mymousemode;
}
 
void MapControl::stopFollowing(Geometry* geom)
{
geom->disconnect(SIGNAL(positionChanged(Geometry*)));
}
 
void MapControl::enablePersistentCache(const QDir& path)
{
ImageManager::instance()->setCacheDir(path);
}
 
void MapControl::setProxy(QString host, int port)
{
ImageManager::instance()->setProxy(host, port);
}
 
void MapControl::showScale(bool show)
{
scaleVisible = show;
}
 
void MapControl::resize(const QSize newSize)
{
this->size = newSize;
screen_middle = QPoint(newSize.width()/2, newSize.height()/2);
 
this->setMaximumSize(newSize.width()+1, newSize.height()+1);
layermanager->resize(newSize);
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/mapcontrol.h
0,0 → 1,333
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef MAPCONTROL_H
#define MAPCONTROL_H
 
#include <QtGui>
 
#include "layermanager.h"
#include "layer.h"
#include "mapadapter.h"
#include "geometry.h"
#include "imagemanager.h"
 
//! QMapControl namespace
namespace qmapcontrol
{
class LayerManager;
class MapAdapter;
class Layer;
 
//! The control element of the widget and also the widget itself
/*!
* This is the main widget.
* To this control layers can be added.
* A MapControl have to be instantiated with a QSize which sets the size the widget takes in a layout.
* The given size is also the size, which is asured to be filled with map images.
*
* @author Kai Winter <kaiwinter@gmx.de>
*/
class MapControl : public QWidget
{
Q_OBJECT
 
public:
//! Declares what actions the mouse move has on the map
enum MouseMode
{
Panning, /*!< The map is moved */
Dragging, /*!< A rectangular can be drawn */
None, /*!< Mouse move events have no efect to the map */
};
 
//! The constructor of MapControl
/*!
* The MapControl is the widget which displays the maps.
* The size describes the area, which gets filled with map data
* When you give no MouseMode, the mouse is moving the map.
* You can change the MouseMode on runtime, to e.g. Dragging, which lets the user drag a rectangular box.
* After the dragging a signal with the size of the box is emitted.
* The mousemode ´None´ can be used, to completely define the control of the map yourself.
* @param size the size which the widget should fill with map data
* @param mousemode the way mouseevents are handled
*/
MapControl ( QSize size, MouseMode mousemode = Panning );
 
~MapControl();
 
//! adds a layer
/*!
* If multiple layers are added, they are painted in the added order.
* @param layer the layer which should be added
*/
void addLayer ( Layer* layer );
 
//! returns the layer with the given name
/*!
* @param layername name of the wanted layer
* @return the layer with the given name
*/
Layer* layer ( const QString& layername ) const;
 
//! returns the names of all layers
/*!
* @return returns a QList with the names of all layers
*/
QList<QString> layers() const;
 
//! returns the number of existing layers
/*!
* @return returns the number of existing layers
*/
int numberOfLayers() const;
 
//! returns the coordinate of the center of the map
/*!
* @return returns the coordinate of the middle of the screen
*/
QPointF currentCoordinate() const;
 
//! returns the current zoom level
/*!
* @return returns the current zoom level
*/
int currentZoom() const;
 
//! sets the middle of the map to the given coordinate
/*!
* @param coordinate the coordinate which the view´s middle should be set to
*/
void setView ( const QPointF& coordinate ) const;
 
//! sets the view, so all coordinates are visible
/*!
* @param coordinates the Coorinates which should be visible
*/
void setView ( const QList<QPointF> coordinates ) const;
 
//! sets the view and zooms in, so all coordinates are visible
/*!
* The code of setting the view to multiple coordinates is "brute force" and pretty slow.
* Have to be reworked.
* @param coordinates the Coorinates which should be visible
*/
void setViewAndZoomIn ( const QList<QPointF> coordinates ) const;
 
//! sets the view to the given Point
/*!
*
* @param point the geometric point the view should be set to
*/
void setView ( const Point* point ) const;
 
//! Keeps the center of the map on the Geometry, even when it moves
/*!
* To stop the following the method stopFollowing() have to be called
* @param geometry the Geometry which should stay centered.
*/
void followGeometry ( const Geometry* geometry ) const;
 
//TODO:
// void followGeometry(const QList<Geometry*>) const;
 
//! Stops the following of a Geometry
/*!
* if the view is set to follow a Geometry this method stops the trace.
* See followGeometry().
* @param geometry the Geometry which should not followed anymore
*/
void stopFollowing ( Geometry* geometry );
 
//! Smoothly moves the center of the view to the given Coordinate
/*!
* @param coordinate the Coordinate which the center of the view should moved to
*/
void moveTo ( QPointF coordinate );
 
//! sets the Mouse Mode of the MapControl
/*!
* There are three MouseModes declard by an enum.
* The MouesMode Dragging draws an rectangular in the map while the MouseButton is pressed.
* When the Button is released a boxDragged() signal is emitted.
*
* The second MouseMode (the default) is Panning, which allows to drag the map around.
* @param mousemode the MouseMode
*/
void setMouseMode ( MouseMode mousemode );
 
//! returns the current MouseMode
/*!
* For a explanation for the MouseModes see setMouseMode()
* @return the current MouseMode
*/
MapControl::MouseMode mouseMode();
 
//int rotation;
 
//! Enable persistent caching of map tiles
/*!
* Call this method to allow the QMapControl widget to save map tiles
* persistent (also over application restarts).
* Tiles are stored in the subdirectory "QMapControl.cache" within the
* user's home directory. This can be changed by giving a path.
* @param path the path to the cache directory
*/
void enablePersistentCache ( const QDir& path=QDir::homePath() + "/QMapControl.cache" );
 
 
//! Sets the proxy for HTTP connections
/*!
* This method sets the proxy for HTTP connections.
* This is not provided by the current Qtopia version!
* @param host the proxy´s hostname or ip
* @param port the proxy´s port
*/
void setProxy ( QString host, int port );
 
//! Displays the scale within the widget
/*!
*
* @param show true if the scale should be displayed
*/
void showScale ( bool show );
 
private:
LayerManager* layermanager;
QPoint screen_middle; // middle of the widget (half size)
 
QPoint pre_click_px; // used for scrolling (MouseMode Panning)
QPoint current_mouse_pos; // used for scrolling and dragging (MouseMode Panning/Dragging)
 
QSize size; // size of the widget
 
bool mousepressed;
MouseMode mymousemode;
bool scaleVisible;
 
bool m_loadingFlag;
 
QMutex moveMutex; // used for method moveTo()
QPointF target; // used for method moveTo()
int steps; // used for method moveTo()
 
QPointF clickToWorldCoordinate ( QPoint click );
MapControl& operator= ( const MapControl& rhs );
MapControl ( const MapControl& old );
 
protected:
void paintEvent ( QPaintEvent* evnt );
void mousePressEvent ( QMouseEvent* evnt );
void mouseReleaseEvent ( QMouseEvent* evnt );
void mouseMoveEvent ( QMouseEvent* evnt );
 
signals:
// void mouseEvent(const QMouseEvent* evnt);
 
//! Emitted AFTER a MouseEvent occured
/*!
* This signals allows to receive click events within the MapWidget together with the world coordinate.
* It is emitted on MousePressEvents and MouseReleaseEvents.
* The kind of the event can be obtained by checking the events type.
* @param evnt the QMouseEvent that occured
* @param coordinate the corresponding world coordinate
*/
void mouseEventCoordinate ( const QMouseEvent* evnt, const QPointF coordinate );
 
//! Emitted, after a Rectangular is dragged.
/*!
* It is possible to select a rectangular area in the map, if the MouseMode is set to Dragging.
* The coordinates are in world coordinates
* @param QRectF the dragged Rect
*/
void boxDragged ( const QRectF );
 
//! This signal is emitted, when a Geometry is clicked
/*!
* @param geometry The clicked Geometry object
* @param coord_px The coordinate in pixel coordinates
*/
void geometryClicked ( Geometry* geometry, QPoint coord_px );
 
//! This signal is emitted, after the view have changed
/*!
* @param coordinate The current coordinate
* @param zoom The current zoom
*/
void viewChanged ( const QPointF &coordinate, int zoom );
 
public slots:
//! zooms in one step
void zoomIn();
 
//! zooms out one step
void zoomOut();
 
//! sets the given zoomlevel
/*!
* @param zoomlevel the zoomlevel
*/
void setZoom ( int zoomlevel );
 
//! scrolls the view to the left
void scrollLeft ( int pixel=10 );
 
//! scrolls the view to the right
void scrollRight ( int pixel=10 );
 
//! scrolls the view up
void scrollUp ( int pixel=10 );
 
//! scrolls the view down
void scrollDown ( int pixel=10 );
 
//! scrolls the view by the given point
void scroll ( const QPoint scroll );
 
//! updates the map for the given rect
/*!
* @param rect the area which should be repainted
*/
void updateRequest ( QRect rect );
 
//! updates the hole map by creating a new offscreen image
/*!
*
*/
void updateRequestNew();
 
//! Resizes the map to the given size
/*!
* @param newSize The new size
*/
void resize(const QSize newSize);
 
private slots:
void tick();
void loadingFinished();
void positionChanged ( Geometry* geom );
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/maplayer.cpp
0,0 → 1,38
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "maplayer.h"
namespace qmapcontrol
{
MapLayer::MapLayer(QString layername, MapAdapter* mapadapter, bool takeevents)
: Layer(layername, mapadapter, Layer::MapLayer, takeevents)
{
}
 
 
MapLayer::~MapLayer()
{
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/maplayer.h
0,0 → 1,65
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef MAPLAYER_H
#define MAPLAYER_H
 
#include "layer.h"
 
namespace qmapcontrol
{
//! MapLayer class
/*!
* There are two different layer types:
* - MapLayer: Displays Maps, but also Geometries. The configuration for displaying maps have to be done in the MapAdapter
* - GeometryLayer: Only displays Geometry objects.
*
* MapLayers also can display Geometry objects. The difference to the GeometryLayer is the repainting. Objects that are
* added to a MapLayer are "baken" on the map. This means, when you change it´s position for example the changes are
* not visible until a new offscreen image has been drawn. If you have "static" Geometries which won´t change their
* position this is fine. But if you want to change the objects position or pen you should use a GeometryLayer. Those
* are repainted immediately on changes.
*
* @author Kai Winter <kaiwinter@gmx.de>
*/
class MapLayer : public Layer
{
Q_OBJECT
 
public:
//! MapLayer constructor
/*!
* This is used to construct a map layer.
*
* @param layername The name of the Layer
* @param mapadapter The MapAdapter which does coordinate translation and Query-String-Forming
* @param takeevents Should the Layer receive MouseEvents? This is set to true by default. Setting it to false could
* be something like a "speed up hint"
*/
MapLayer(QString layername, MapAdapter* mapadapter, bool takeevents=true);
virtual ~MapLayer();
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/mapnetwork.cpp
0,0 → 1,137
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "mapnetwork.h"
#include <QWaitCondition>
namespace qmapcontrol
{
MapNetwork::MapNetwork(ImageManager* parent)
:parent(parent), http(new QHttp(this)), loaded(0)
{
connect(http, SIGNAL(requestFinished(int, bool)),
this, SLOT(requestFinished(int, bool)));
}
 
MapNetwork::~MapNetwork()
{
http->clearPendingRequests();
delete http;
}
 
 
void MapNetwork::loadImage(const QString& host, const QString& url)
{
// qDebug() << "getting: " << QString(host).append(url);
// http->setHost(host);
// int getId = http->get(url);
 
http->setHost(host);
QHttpRequestHeader header("GET", url);
header.setValue("User-Agent", "Mozilla");
header.setValue("Host", host);
int getId = http->request(header);
 
if (vectorMutex.tryLock())
{
loadingMap[getId] = url;
vectorMutex.unlock();
}
}
 
void MapNetwork::requestFinished(int id, bool error)
{
// sleep(1);
// qDebug() << "MapNetwork::requestFinished" << http->state() << ", id: " << id;
if (error)
{
qDebug() << "network error: " << http->errorString();
//restart query
 
}
else if (vectorMutex.tryLock())
{
// check if id is in map?
if (loadingMap.contains(id))
{
 
QString url = loadingMap[id];
loadingMap.remove(id);
vectorMutex.unlock();
// qDebug() << "request finished for id: " << id << ", belongs to: " << notifier.url << endl;
QByteArray ax;
 
if (http->bytesAvailable()>0)
{
QPixmap pm;
ax = http->readAll();
 
if (pm.loadFromData(ax))
{
loaded += pm.size().width()*pm.size().height()*pm.depth()/8/1024;
// qDebug() << "Network loaded: " << (loaded);
parent->receivedImage(pm, url);
}
else
{
qDebug() << "NETWORK_PIXMAP_ERROR: " << ax;
}
}
 
}
else
vectorMutex.unlock();
 
}
if (loadingMap.size() == 0)
{
// qDebug () << "all loaded";
parent->loadingQueueEmpty();
}
}
 
void MapNetwork::abortLoading()
{
http->clearPendingRequests();
// http->abort();
if (vectorMutex.tryLock())
{
loadingMap.clear();
vectorMutex.unlock();
}
}
 
bool MapNetwork::imageIsLoading(QString url)
{
return loadingMap.values().contains(url);
}
 
void MapNetwork::setProxy(QString host, int port)
{
#ifndef Q_WS_QWS
// do not set proxy on qt/extended
http->setProxy(host, port);
#endif
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/mapnetwork.h
0,0 → 1,78
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef MAPNETWORK_H
#define MAPNETWORK_H
 
#include <QObject>
#include <QDebug>
#include <QHttp>
#include <QVector>
#include <QPixmap>
#include "imagemanager.h"
/**
@author Kai Winter <kaiwinter@gmx.de>
*/
namespace qmapcontrol
{
class ImageManager;
class MapNetwork : QObject
{
Q_OBJECT
 
public:
MapNetwork(ImageManager* parent);
~MapNetwork();
 
void loadImage(const QString& host, const QString& url);
 
/*!
* checks if the given url is already loading
* @param url the url of the image
* @return boolean, if the image is already loading
*/
bool imageIsLoading(QString url);
 
/*!
* Aborts all current loading threads.
* This is useful when changing the zoom-factor, though newly needed images loads faster
*/
void abortLoading();
void setProxy(QString host, int port);
 
private:
ImageManager* parent;
QHttp* http;
QMap<int, QString> loadingMap;
qreal loaded;
QMutex vectorMutex;
MapNetwork& operator=(const MapNetwork& rhs);
MapNetwork(const MapNetwork& old);
 
private slots:
void requestFinished(int id, bool error);
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/osmmapadapter.cpp
0,0 → 1,38
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "osmmapadapter.h"
namespace qmapcontrol
{
OSMMapAdapter::OSMMapAdapter()
: TileMapAdapter("tile.openstreetmap.org", "/%1/%2/%3.png", 256, 0, 17)
// : TileMapAdapter("192.168.8.1", "/img/img_cache.php/%1/%2/%3.png", 256, 0, 17)
{
}
 
OSMMapAdapter::~OSMMapAdapter()
{
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/osmmapadapter.h
0,0 → 1,49
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef OSMMAPADAPTER_H
#define OSMMAPADAPTER_H
 
#include "tilemapadapter.h"
namespace qmapcontrol
{
//! MapAdapter for OpenStreetMap
/*!
* This is a conveniece class, which extends and configures a TileMapAdapter
* @author Kai Winter <kaiwinter@gmx.de>
*/
class OSMMapAdapter : public TileMapAdapter
{
Q_OBJECT
public:
//! constructor
/*!
* This construct a OpenStreetmap Adapter
*/
OSMMapAdapter();
virtual ~OSMMapAdapter();
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/point.cpp
0,0 → 1,330
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "point.h"
namespace qmapcontrol
{
Point::Point()
{}
Point::Point(const Point& point)
:Geometry(point.name()), X(point.longitude()), Y(point.latitude())
{
visible = point.isVisible();
mywidget = 0;
mypixmap = 0;
mypen = point.mypen;
homelevel = -1;
minsize = QSize(-1,-1);
maxsize = QSize(-1,-1);
}
 
Point::Point(qreal x, qreal y, QString name, enum Alignment alignment)
: Geometry(name), X(x), Y(y), myalignment(alignment)
{
GeometryType = "Point";
mywidget = 0;
mypixmap = 0;
visible = true;
homelevel = -1;
minsize = QSize(-1,-1);
maxsize = QSize(-1,-1);
}
 
Point::Point(qreal x, qreal y, QWidget* widget, QString name, enum Alignment alignment)
: Geometry(name), X(x), Y(y), mywidget(widget), myalignment(alignment)
{
// Point(x, y, name, alignment);
GeometryType = "Point";
mypixmap = 0;
visible = true;
size = widget->size();
homelevel = -1;
minsize = QSize(-1,-1);
maxsize = QSize(-1,-1);
mywidget->show();
}
Point::Point(qreal x, qreal y, QPixmap* pixmap, QString name, enum Alignment alignment)
: Geometry(name), X(x), Y(y), mypixmap(pixmap), myalignment(alignment)
{
GeometryType = "Point";
mywidget = 0;
visible = true;
size = pixmap->size();
homelevel = -1;
minsize = QSize(-1,-1);
maxsize = QSize(-1,-1);
}
/*
Point& Point::operator=(const Point& rhs)
{
if (this == &rhs)
return *this;
else
{
X = rhs.X;
Y = rhs.Y;
size = rhs.size;
 
mywidget = rhs.mywidget;
mypixmap = rhs.mypixmap;
alignment = rhs.alignment;
homelevel = rhs.homelevel;
minsize = rhs.minsize;
maxsize = rhs.maxsize;
}
}
*/
Point::~Point()
{
delete mywidget;
delete mypixmap;
}
 
void Point::setVisible(bool visible)
{
this->visible = visible;
if (mywidget !=0)
{
mywidget->setVisible(visible);
}
}
 
QRectF Point::boundingBox()
{
//TODO: have to be calculated in relation to alignment...
return QRectF(QPointF(X, Y), displaysize);
}
 
qreal Point::longitude() const
{
return X;
}
qreal Point::latitude() const
{
return Y;
}
QPointF Point::coordinate() const
{
return QPointF(X, Y);
}
 
void Point::draw(QPainter* painter, const MapAdapter* mapadapter, const QRect &viewport, const QPoint offset)
{
if (!visible)
return;
 
if (homelevel > 0)
{
 
int currentzoom = mapadapter->maxZoom() < mapadapter->minZoom() ? mapadapter->minZoom() - mapadapter->currentZoom() : mapadapter->currentZoom();
 
// int currentzoom = mapadapter->getZoom();
int diffzoom = homelevel-currentzoom;
int viewheight = size.height();
int viewwidth = size.width();
viewheight = int(viewheight / pow(2, diffzoom));
viewwidth = int(viewwidth / pow(2, diffzoom));
 
if (minsize.height()!= -1 && viewheight < minsize.height())
viewheight = minsize.height();
else if (maxsize.height() != -1 && viewheight > maxsize.height())
viewheight = maxsize.height();
 
 
if (minsize.width()!= -1 && viewwidth < minsize.width())
viewwidth = minsize.width();
else if (maxsize.width() != -1 && viewwidth > maxsize.width())
viewwidth = maxsize.width();
 
 
displaysize = QSize(viewwidth, viewheight);
}
else
{
displaysize = size;
}
 
 
if (mypixmap !=0)
{
const QPointF c = QPointF(X, Y);
QPoint point = mapadapter->coordinateToDisplay(c);
 
if (viewport.contains(point))
{
QPoint alignedtopleft = alignedPoint(point);
painter->drawPixmap(alignedtopleft.x(), alignedtopleft.y(), displaysize.width(), displaysize.height(), *mypixmap);
}
 
}
else if (mywidget!=0)
{
drawWidget(mapadapter, offset);
}
 
}
 
void Point::drawWidget(const MapAdapter* mapadapter, const QPoint offset)
{
const QPointF c = QPointF(X, Y);
QPoint point = mapadapter->coordinateToDisplay(c);
point -= offset;
 
QPoint alignedtopleft = alignedPoint(point);
mywidget->setGeometry(alignedtopleft.x(), alignedtopleft.y(), displaysize.width(), displaysize.height());
}
 
QPoint Point::alignedPoint(const QPoint point) const
{
QPoint alignedtopleft;
if (myalignment == Middle)
{
alignedtopleft.setX(point.x()-displaysize.width()/2);
alignedtopleft.setY(point.y()-displaysize.height()/2);
}
else if (myalignment == TopLeft)
{
alignedtopleft.setX(point.x());
alignedtopleft.setY(point.y());
}
else if (myalignment == TopRight)
{
alignedtopleft.setX(point.x()-displaysize.width());
alignedtopleft.setY(point.y());
}
else if (myalignment == BottomLeft)
{
alignedtopleft.setX(point.x());
alignedtopleft.setY(point.y()-displaysize.height());
}
else if (myalignment == BottomRight)
{
alignedtopleft.setX(point.x()-displaysize.width());
alignedtopleft.setY(point.y()-displaysize.height());
}
return alignedtopleft;
}
 
 
bool Point::Touches(Point* p, const MapAdapter* mapadapter)
{
if (this->isVisible() == false)
return false;
if (mypixmap == 0)
return false;
 
QPointF c = p->coordinate();
// coordinate to pixel
QPoint pxOfPoint = mapadapter->coordinateToDisplay(c);
// size/2 Pixel toleranz aufaddieren
QPoint p1;
QPoint p2;
 
switch (myalignment)
{
case Middle:
p1 = pxOfPoint - QPoint(displaysize.width()/2,displaysize.height()/2);
p2 = pxOfPoint + QPoint(displaysize.width()/2,displaysize.height()/2);
break;
case TopLeft:
p1 = pxOfPoint - QPoint(displaysize.width(),displaysize.height());
p2 = pxOfPoint;
break;
case TopRight:
p1 = pxOfPoint - QPoint(0, displaysize.height());
p2 = pxOfPoint + QPoint(displaysize.width(),0);
break;
case BottomLeft:
p1 = pxOfPoint - QPoint(displaysize.width(), 0);
p2 = pxOfPoint + QPoint(0, displaysize.height());
break;
case BottomRight:
p1 = pxOfPoint;
p2 = pxOfPoint + QPoint(displaysize.width(), displaysize.height());
break;
}
 
// calculate "Bounding Box" in coordinates
QPointF c1 = mapadapter->displayToCoordinate(p1);
QPointF c2 = mapadapter->displayToCoordinate(p2);
 
 
if(this->longitude()>=c1.x() && this->longitude()<=c2.x())
{
if (this->latitude()<=c1.y() && this->latitude()>=c2.y())
{
emit(geometryClicked(this, QPoint(0,0)));
return true;
}
}
return false;
}
 
void Point::setCoordinate(QPointF point)
{
// emit(updateRequest(this));
// emit(updateRequest(QRectF(X, Y, size.width(), size.height())));
X = point.x();
Y = point.y();
// emit(updateRequest(this));
emit(updateRequest(QRectF(X, Y, size.width(), size.height())));
 
emit(positionChanged(this));
}
QList<Point*> Point::points()
{
//TODO: assigning temp?!
QList<Point*> points;
points.append(this);
return points;
}
 
QWidget* Point::widget()
{
return mywidget;
}
 
QPixmap* Point::pixmap()
{
return mypixmap;
}
 
void Point::setBaselevel(int zoomlevel)
{
homelevel = zoomlevel;
}
void Point::setMinsize(QSize minsize)
{
this->minsize = minsize;
}
void Point::setMaxsize(QSize maxsize)
{
this->maxsize = maxsize;
}
Point::Alignment Point::alignment() const
{
return myalignment;
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/point.h
0,0 → 1,215
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef POINT_H
#define POINT_H
#include <QWidget>
 
#include "geometry.h"
 
namespace qmapcontrol
{
//! A geometric point to draw objects into maps
/*!
* This class can be used to draw your custom QPixmap or other QWidgets into maps.
* You can instantiate a Point with any Pixmap you want. The objects cares about collision detection (for clickable objects)
*
* When drawing a pixmap, take care you are adding the point to a GeometryLayer.
* You can also add a point to a MapLayer, but this should only be done, if the point is not changing its position or color etc.
* (GeometryLayers are assured to be repainted on any changes at the point. MapLayers only gets repainted, if a new
* offscreenImage is painter. This is a performance issue.)
*
* Points emit click events, if the containing layer receives clickevents (the default)
*
* You can also add a widget into maps. But keep in mind, that widgets always are drawn on top of all layers.
* You also have to handle click events yourself.
*
* To create "zoomable objects" (objects that increases size on zooming), a base level have to be set.
* The base level is the zoom level on which the point´s pixmap gets displayed on full size.
* On lower zoom levels it gets displayed smaller and on higher zoom levels larger.
* A minimal size can be set as well as a maximum size.
* @see setBaselevel, setMinsize, setMaxsize
*
* @author Kai Winter <kaiwinter@gmx.de>
*/
class Point : public Geometry
{
Q_OBJECT
 
public:
friend class Layer;
friend class LineString;
 
//! sets where the point should be aligned
enum Alignment
{
TopLeft, /*!< Align on TopLeft*/
TopRight, /*!< Align on TopRight*/
BottomLeft, /*!< Align on BottomLeft*/
BottomRight,/*!< Align on BottomRight*/
Middle /*!< Align on Middle*/
};
 
Point();
explicit Point(const Point&);
//! Copy Constructor
/*!
* This constructor creates a Point with no image or widget.
* @param x longitude
* @param y latitude
* @param name name of the point
* @param alignment allignment of the point (Middle or TopLeft)
*/
Point(qreal x, qreal y, QString name = QString(), enum Alignment alignment=Middle);
 
//! Constructor
/*!
* This constructor creates a point which will display the given widget.
* You can set an alignment on which corner the widget should be aligned to the coordinate.
* You have to set the size of the widget, before adding it to
* IMPORTANT: You have to set the QMapControl as parent for the widget!
* @param x longitude
* @param y latitude
* @param widget the widget which should be displayed by this point
* @param name name of the point
* @param alignment allignment of the point (Middle or TopLeft)
*/
Point(qreal x, qreal y, QWidget* widget, QString name = QString(), enum Alignment alignment = Middle);
 
//! Constructor
/*!
* This constructor creates a point which will display the give pixmap.
* You can set an alignment on which corner the pixmap should be aligned to the coordinate.
* @param x longitude
* @param y latitude
* @param pixmap the pixmap which should be displayed by this point
* @param name name of the point
* @param alignment allignment of the point (Middle or TopLeft)
*/
Point(qreal x, qreal y, QPixmap* pixmap, QString name = QString(), enum Alignment alignment = Middle);
virtual ~Point();
 
//! returns the bounding box of the point
/*!
* The Bounding contains the coordinate of the point and its size.
* The size is set, if the point contains a pixmap or a widget
* @return the bounding box of the point
*/
virtual QRectF boundingBox();
 
//! returns the longitude of the point
/*!
* @return the longitude of the point
*/
qreal longitude() const;
 
//! returns the latitude of the point
/*!
* @return the latitude of the point
*/
qreal latitude() const;
 
//! returns the coordinate of the point
/*!
* The x component of the returned QPointF is the longitude value,
* the y component the latitude
* @return the coordinate of a point
*/
QPointF coordinate() const;
 
virtual QList<Point*> points();
 
/*! \brief returns the widget of the point
@return the widget of the point
*/
QWidget* widget();
 
//! returns the pixmap of the point
/*!
* @return the pixmap of the point
*/
QPixmap* pixmap();
 
//! Sets the zoom level on which the point´s pixmap gets displayed on full size
/*!
* Use this method to set a zoom level on which the pixmap gets displayed with its real size.
* On zoomlevels below it will be displayed smaller, and on zoom levels thereover it will be displayed larger
* @see setMinsize, setMaxsize
* @param zoomlevel the zoomlevel on which the point will be displayed on full size
*/
void setBaselevel(int zoomlevel);
 
//! sets a minimal size for the pixmap
/*!
* When the point´s pixmap should change its size on zooming, this method sets the minimal size.
* @see setBaselevel
* @param minsize the minimal size which the pixmap should have
*/
void setMinsize(QSize minsize);
 
//! sets a maximal size for the pixmap
/*!
* When the point´s pixmap should change its size on zooming, this method sets the maximal size.
* @see setBaselevel
* @param maxsize the maximal size which the pixmap should have
*/
void setMaxsize(QSize maxsize);
 
Point::Alignment alignment() const;
 
protected:
qreal X;
qreal Y;
QSize size;
 
QWidget* mywidget;
QPixmap* mypixmap;
Alignment myalignment;
int homelevel;
QSize displaysize;
QSize minsize;
QSize maxsize;
 
 
void drawWidget(const MapAdapter* mapadapter, const QPoint offset);
// void drawPixmap(QPainter* painter, const MapAdapter* mapadapter, const QRect &viewport, const QPoint versch);
virtual void draw(QPainter* painter, const MapAdapter* mapadapter, const QRect &viewport, const QPoint offset);
QPoint alignedPoint(const QPoint point) const;
 
//! returns true if the given Point touches this Point
/*!
* The collision detection checks for the bounding rectangulars.
* @param geom the other point which should be tested on collision
* @param mapadapter the mapadapter which is used for calculations
* @return
*/
virtual bool Touches(Point* geom, const MapAdapter* mapadapter);
 
public slots:
void setCoordinate(QPointF point);
virtual void setVisible(bool visible);
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/src.pro
0,0 → 1,52
######################################################################
# Automatically generated by qmake (2.01a) Fri Feb 22 23:43:21 2008
######################################################################
 
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
 
# Input
HEADERS += circlepoint.h \
curve.h \
geometry.h \
geometrylayer.h \
googlemapadapter.h \
gps_position.h \
imagemanager.h \
imagepoint.h \
layer.h \
layermanager.h \
linestring.h \
mapadapter.h \
mapcontrol.h \
maplayer.h \
mapnetwork.h \
osmmapadapter.h \
point.h \
tilemapadapter.h \
wmsmapadapter.h \
yahoomapadapter.h \
yahooapimapadapter.h
SOURCES += circlepoint.cpp \
curve.cpp \
geometry.cpp \
geometrylayer.cpp \
googlemapadapter.cpp \
gps_position.cpp \
imagemanager.cpp \
imagepoint.cpp \
layer.cpp \
layermanager.cpp \
linestring.cpp \
mapadapter.cpp \
mapcontrol.cpp \
maplayer.cpp \
mapnetwork.cpp \
osmmapadapter.cpp \
point.cpp \
tilemapadapter.cpp \
wmsmapadapter.cpp \
yahoomapadapter.cpp \
yahooapimapadapter.cpp
/QMK-Groundstation/trunk/Classes/QMapControl/tilemapadapter.cpp
0,0 → 1,185
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "tilemapadapter.h"
namespace qmapcontrol
{
TileMapAdapter::TileMapAdapter(const QString& host, const QString& serverPath, int tilesize, int minZoom, int maxZoom)
:MapAdapter(host, serverPath, tilesize, minZoom, maxZoom)
{
PI = acos(-1.0);
 
/*
Initialize the "substring replace engine". First the string replacement
in getQuery was made by QString().arg() but this was very slow. So this
splits the servers path into substrings and when calling getQuery the
substrings get merged with the parameters of the URL.
Pretty complicated, but fast.
*/
param1 = serverPath.indexOf("%1");
param2 = serverPath.indexOf("%2");
param3 = serverPath.indexOf("%3");
 
int min = param1 < param2 ? param1 : param2;
min = param3 < min ? param3 : min;
 
int max = param1 > param2 ? param1 : param2;
max = param3 > max ? param3 : max;
 
int middle = param1+param2+param3-min-max;
 
order[0][0] = min;
if (min == param1)
order[0][1] = 0;
else if (min == param2)
order[0][1] = 1;
else
order[0][1] = 2;
 
order[1][0] = middle;
if (middle == param1)
order[1][1] = 0;
else if (middle == param2)
order[1][1] = 1;
else
order[1][1] = 2;
 
order[2][0] = max;
if (max == param1)
order[2][1] = 0;
else if(max == param2)
order[2][1] = 1;
else
order[2][1] = 2;
 
int zoom = max_zoom < min_zoom ? min_zoom - current_zoom : current_zoom;
numberOfTiles = tilesonzoomlevel(zoom);
loc.setNumberOptions(QLocale::OmitGroupSeparator);
}
 
TileMapAdapter::~TileMapAdapter()
{
}
//TODO: pull out
void TileMapAdapter::zoom_in()
{
if (min_zoom > max_zoom)
{
//current_zoom = current_zoom-1;
current_zoom = current_zoom > max_zoom ? current_zoom-1 : max_zoom;
}
else if (min_zoom < max_zoom)
{
//current_zoom = current_zoom+1;
current_zoom = current_zoom < max_zoom ? current_zoom+1 : max_zoom;
}
 
int zoom = max_zoom < min_zoom ? min_zoom - current_zoom : current_zoom;
numberOfTiles = tilesonzoomlevel(zoom);
 
}
void TileMapAdapter::zoom_out()
{
if (min_zoom > max_zoom)
{
//current_zoom = current_zoom+1;
current_zoom = current_zoom < min_zoom ? current_zoom+1 : min_zoom;
}
else if (min_zoom < max_zoom)
{
//current_zoom = current_zoom-1;
current_zoom = current_zoom > min_zoom ? current_zoom-1 : min_zoom;
}
 
int zoom = max_zoom < min_zoom ? min_zoom - current_zoom : current_zoom;
numberOfTiles = tilesonzoomlevel(zoom);
}
 
qreal TileMapAdapter::deg_rad(qreal x) const
{
return x * (PI/180.0);
}
qreal TileMapAdapter::rad_deg(qreal x) const
{
return x * (180/PI);
}
 
QString TileMapAdapter::query(int x, int y, int z) const
{
x = xoffset(x);
y = yoffset(y);
 
int a[3] = {z, x, y};
return QString(serverPath).replace(order[2][0],2, loc.toString(a[order[2][1]]))
.replace(order[1][0],2, loc.toString(a[order[1][1]]))
.replace(order[0][0],2, loc.toString(a[order[0][1]]));
 
}
 
QPoint TileMapAdapter::coordinateToDisplay(const QPointF& coordinate) const
{
qreal x = (coordinate.x()+180) * (numberOfTiles*mytilesize)/360.; // coord to pixel!
qreal y = (1-(log(tan(PI/4+deg_rad(coordinate.y())/2)) /PI)) /2 * (numberOfTiles*mytilesize);
 
return QPoint(int(x), int(y));
}
 
QPointF TileMapAdapter::displayToCoordinate(const QPoint& point) const
{
qreal longitude = (point.x()*(360/(numberOfTiles*mytilesize)))-180;
qreal latitude = rad_deg(atan(sinh((1-point.y()*(2/(numberOfTiles*mytilesize)))*PI)));
 
return QPointF(longitude, latitude);
 
}
 
bool TileMapAdapter::isValid(int x, int y, int z) const
{
if (max_zoom < min_zoom)
{
z= min_zoom - z;
}
 
if (x<0 || x>pow(2,z)-1 ||
y<0 || y>pow(2,z)-1)
{
return false;
}
return true;
 
}
int TileMapAdapter::tilesonzoomlevel(int zoomlevel) const
{
return int(pow(2, zoomlevel));
}
int TileMapAdapter::xoffset(int x) const
{
return x;
}
int TileMapAdapter::yoffset(int y) const
{
return y;
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/tilemapadapter.h
0,0 → 1,76
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef TILEMAPADAPTER_H
#define TILEMAPADAPTER_H
 
#include "mapadapter.h"
 
namespace qmapcontrol
{
//! MapAdapter for servers with image tiles
/*!
* Use this derived MapAdapter to display maps from OpenStreetMap
* @author Kai Winter <kaiwinter@gmx.de>
*/
class TileMapAdapter : public MapAdapter
{
Q_OBJECT
public:
//! constructor
/*!
* Sample of a correct initialization of a MapAdapter:<br/>
* TileMapAdapter* ta = new TileMapAdapter("192.168.8.1", "/img/img_cache.php/%1/%2/%3.png", 256, 0,17);<br/>
* The placeholders %1, %2, %3 stands for x, y, z<br/>
* The minZoom is 0 (means the whole world is visible). The maxZoom is 17 (means it is zoomed in to the max)
* @param host The servers URL
* @param serverPath The path to the tiles with placeholders
* @param tilesize the size of the tiles
* @param minZoom the minimum zoom level
* @param maxZoom the maximum zoom level
*/
TileMapAdapter(const QString& host, const QString& serverPath, int tilesize, int minZoom = 0, int maxZoom = 17);
 
virtual ~TileMapAdapter();
 
virtual QPoint coordinateToDisplay(const QPointF&) const;
virtual QPointF displayToCoordinate(const QPoint&) const;
 
qreal PI;
 
protected:
qreal rad_deg(qreal) const;
qreal deg_rad(qreal) const;
 
virtual bool isValid(int x, int y, int z) const;
virtual void zoom_in();
virtual void zoom_out();
virtual QString query(int x, int y, int z) const;
virtual int tilesonzoomlevel(int zoomlevel) const;
virtual int xoffset(int x) const;
virtual int yoffset(int y) const;
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/wmsmapadapter.cpp
0,0 → 1,110
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "wmsmapadapter.h"
namespace qmapcontrol
{
WMSMapAdapter::WMSMapAdapter(QString host, QString serverPath, int tilesize)
: MapAdapter(host, serverPath, tilesize, 0, 17)
{
// param1 = serverPath.indexOf("%1");
// param2 = serverPath.indexOf("%2");
// param3 = serverPath.indexOf("%3");
// param4 = serverPath.indexOf("%4");
// param5 = serverPath.indexOf("%5");
// param6 = serverPath.lastIndexOf("%5");
 
// this->serverPath = serverPath.replace(param6, 2, QString().setNum(tilesize)).replace(param5, 2, QString().setNum(tilesize));
 
// sub1 = serverPath.mid(0, param1);
// sub2 = serverPath.mid(param1+2, param2-param1-2);
// sub3 = serverPath.mid(param2+2, param3-param2-2);
// sub4 = serverPath.mid(param3+2, param4-param3-2);
// sub5 = serverPath.mid(param4+2);
 
this->serverPath.append("&WIDTH=").append(loc.toString(tilesize))
.append("&HEIGHT=").append(loc.toString(tilesize))
.append("&BBOX=");
numberOfTiles = pow(2, current_zoom);
coord_per_x_tile = 360. / numberOfTiles;
coord_per_y_tile = 180. / numberOfTiles;
}
 
 
WMSMapAdapter::~WMSMapAdapter()
{
}
 
QPoint WMSMapAdapter::coordinateToDisplay(const QPointF& coordinate) const
{
qreal x = (coordinate.x()+180) * (numberOfTiles*mytilesize)/360.; // coord to pixel!
qreal y = -1*(coordinate.y()-90) * (numberOfTiles*mytilesize)/180.; // coord to pixel!
return QPoint(int(x), int(y));
}
QPointF WMSMapAdapter::displayToCoordinate(const QPoint& point) const
{
qreal lon = (point.x()*(360./(numberOfTiles*mytilesize)))-180;
qreal lat = -(point.y()*(180./(numberOfTiles*mytilesize)))+90;
return QPointF(lon, lat);
}
void WMSMapAdapter::zoom_in()
{
current_zoom+=1;
numberOfTiles = pow(2, current_zoom);
coord_per_x_tile = 360. / numberOfTiles;
coord_per_y_tile = 180. / numberOfTiles;
}
void WMSMapAdapter::zoom_out()
{
current_zoom-=1;
numberOfTiles = pow(2, current_zoom);
coord_per_x_tile = 360. / numberOfTiles;
coord_per_y_tile = 180. / numberOfTiles;
}
 
bool WMSMapAdapter::isValid(int /*x*/, int /*y*/, int /*z*/) const
{
// if (x>0 && y>0 && z>0)
{
return true;
}
// return false;
}
QString WMSMapAdapter::query(int i, int j, int /*z*/) const
{
return getQ(-180+i*coord_per_x_tile,
90-(j+1)*coord_per_y_tile,
-180+i*coord_per_x_tile+coord_per_x_tile,
90-(j+1)*coord_per_y_tile+coord_per_y_tile);
}
QString WMSMapAdapter::getQ(qreal ux, qreal uy, qreal ox, qreal oy) const
{
return QString().append(serverPath)
.append(loc.toString(ux)).append(",")
.append(loc.toString(uy)).append(",")
.append(loc.toString(ox)).append(",")
.append(loc.toString(oy));
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/wmsmapadapter.h
0,0 → 1,70
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef WMSMAPADAPTER_H
#define WMSMAPADAPTER_H
 
#include "mapadapter.h"
 
namespace qmapcontrol
{
//! MapAdapter for WMS servers
/*!
* Use this derived MapAdapter to display maps from WMS servers
* @author Kai Winter <kaiwinter@gmx.de>
*/
class WMSMapAdapter : public MapAdapter
{
public:
//! constructor
/*!
* Sample of a correct initialization of a MapAdapter:<br/>
* MapAdapter* mapadapter = new WMSMapAdapter("www2.demis.nl", "/wms/wms.asp?wms=WorldMap[...]&BBOX=%1,%2,%3,%4&WIDTH=%5&HEIGHT=%5&TRANSPARENT=TRUE", 256);<br/>
* The placeholders %1, %2, %3, %4 creates the bounding box, %5 is for the tilesize
* The minZoom is 0 (means the whole world is visible). The maxZoom is 17 (means it is zoomed in to the max)
* @param host The servers URL
* @param serverPath The path to the tiles with placeholders
* @param tilesize the size of the tiles
*/
WMSMapAdapter(QString host, QString serverPath, int tilesize = 256);
virtual ~WMSMapAdapter();
 
virtual QPoint coordinateToDisplay(const QPointF&) const;
virtual QPointF displayToCoordinate(const QPoint&) const;
 
protected:
virtual void zoom_in();
virtual void zoom_out();
virtual QString query(int x, int y, int z) const;
virtual bool isValid(int x, int y, int z) const;
 
private:
virtual QString getQ(qreal ux, qreal uy, qreal ox, qreal oy) const;
 
qreal coord_per_x_tile;
qreal coord_per_y_tile;
};
}
#endif
/QMK-Groundstation/trunk/Classes/QMapControl/yahoomapadapter.cpp
0,0 → 1,63
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#include "yahoomapadapter.h"
namespace qmapcontrol
{
YahooMapAdapter::YahooMapAdapter()
: TileMapAdapter("png.maps.yimg.com", "/png?v=3.1.0&x=%2&y=%3&z=%1", 256, 17,0)
{
int zoom = max_zoom < min_zoom ? min_zoom - current_zoom : current_zoom;
numberOfTiles = pow(2, zoom+1);
}
YahooMapAdapter::YahooMapAdapter(QString host, QString url)
: TileMapAdapter(host, url, 256, 17,0)
{
int zoom = max_zoom < min_zoom ? min_zoom - current_zoom : current_zoom;
numberOfTiles = pow(2, zoom+1);
}
YahooMapAdapter::~YahooMapAdapter()
{
}
 
bool YahooMapAdapter::isValid(int /*x*/, int /*y*/, int /*z*/) const
{
return true;
}
 
int YahooMapAdapter::tilesonzoomlevel(int zoomlevel) const
{
return int(pow(2, zoomlevel+1));
}
 
int YahooMapAdapter::yoffset(int y) const
{
int zoom = max_zoom < min_zoom ? min_zoom - current_zoom : current_zoom;
 
int tiles = int(pow(2, zoom));
y = y*(-1)+tiles-1;
return int(y);
}
}
/QMK-Groundstation/trunk/Classes/QMapControl/yahoomapadapter.h
0,0 → 1,56
/*
*
* This file is part of QMapControl,
* an open-source cross-platform map widget
*
* Copyright (C) 2007 - 2008 Kai Winter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: kaiwinter@gmx.de
* Program URL : http://qmapcontrol.sourceforge.net/
*
*/
 
#ifndef YAHOOMAPADAPTER_H
#define YAHOOMAPADAPTER_H
 
#include "tilemapadapter.h"
 
namespace qmapcontrol
{
//! MapAdapter for Yahoo Maps
/*!
* @author Kai Winter <kaiwinter@gmx.de>
*/
class YahooMapAdapter : public TileMapAdapter
{
Q_OBJECT
 
public:
//! constructor
/*!
* This construct a Yahoo Adapter
*/
YahooMapAdapter();
YahooMapAdapter(QString host, QString url);
virtual ~YahooMapAdapter();
bool isValid(int x, int y, int z) const;
 
protected:
virtual int tilesonzoomlevel(int zoomlevel) const;
virtual int yoffset(int y) const;
};
}
#endif
/QMK-Groundstation/trunk/Classes/cQMK_Server.cpp
122,7 → 122,7
{
case 1 :
{
SendData(1, QString(QA_NAME + " " + QA_VERSION + ":" + Username + ":" + Password + ":"));
SendData(1, QString(QA_NAME + " " + QA_VERSION + " [" + QA_OS + "]:" + Username + ":" + Password + ":"));
}
break;
case 2 :
/QMK-Groundstation/trunk/Forms/dlg_Map.cpp
0,0 → 1,198
/***************************************************************************
* 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_Map.h"
 
dlg_Map::dlg_Map(QWidget *parent) : QDialog(parent)
{
setupUi(this);
 
connect(sl_Zoom, SIGNAL(valueChanged(int)), this, SLOT(slot_Zoom(int)));
connect(pb_Add, SIGNAL(clicked()), this, SLOT(slot_AddWP()));
connect(pb_Delete, SIGNAL(clicked()), this, SLOT(slot_DeleteWP()));
connect(cb_Maps, SIGNAL(currentIndexChanged(int)), this, SLOT(slot_ChangeMap(int)));
 
// o_Map = new MapControl(QSize(500,300));
o_Map = new MapControl(w_Map->size());
 
o_Adapter = new OSMMapAdapter();
// o_Adapter = new GoogleMapAdapter();
 
o_Layer = new MapLayer("MapLayer", o_Adapter);
o_Click = new GeometryLayer("Click", o_Adapter);
o_Route = new GeometryLayer("Poute", o_Adapter);
 
o_Map->addLayer(o_Layer);
o_Map->addLayer(o_Click);
o_Map->addLayer(o_Route);
 
o_Map->setZoom(17);
// o_Map->setView(QPointF(13.85615670,52.50787020));
o_Map->setView(QPointF(13.5,52.5));
 
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);
 
QDir path = QDir::homePath() + "/.QMK-Cache";
o_Map->enablePersistentCache(path);
 
Pen[0] = new QPen(QColor(0,0,255,255));
Pen[0]->setWidth(2);
Pen[1] = new QPen(QColor(255,0,0,255));
Pen[1]->setWidth(2);
 
}
 
void dlg_Map::add_Position(double x, double y)
{
o_Route->removeGeometry(l_RouteFL);
p_RouteFL.append(new Point(x,y));
 
o_Click->removeGeometry(LastPos);
 
Point* P = new CirclePoint(x, y, "P1", Point::Middle, Pen[0]);
LastPos = P;
P->setBaselevel(17);
o_Click->addGeometry(P);
 
if (cb_CenterPos->isChecked())
{
o_Map->setView(QPointF(x, y));
}
 
if (cb_ShowRoute->isChecked())
{
l_RouteFL = new LineString(p_RouteFL, "", Pen[1]);
 
o_Route->addGeometry(l_RouteFL);
}
o_Map->updateRequestNew();
}
 
void dlg_Map::slot_Zoom(int i_Zoom)
{
o_Map->setZoom(i_Zoom);
}
 
void dlg_Map::slot_AddWP()
{
o_Route->removeGeometry(l_RouteWP);
 
p_RouteWP.append(LastClick);
l_RouteWP = new LineString(p_RouteWP, "", Pen[0]);
 
o_Route->addGeometry(l_RouteWP);
o_Map->updateRequestNew();
}
 
void dlg_Map::slot_DeleteWP()
{
o_Route->removeGeometry(l_RouteWP);
p_RouteWP.clear();
o_Map->updateRequestNew();
}
 
void dlg_Map::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());
}
 
if ((Event->type() == QEvent::MouseButtonPress) && (Event->button() == Qt::LeftButton))
{
o_Click->removeGeometry(LastPoint);
 
Point* P = new CirclePoint(Coord.x(), Coord.y(), 3, "P1", Point::Middle, Pen[1]);
LastPoint = P;
 
LastClick = new Point(Coord.x(), Coord.y());
 
P->setBaselevel(o_Adapter->adaptedZoom());
o_Click->addGeometry(P);
}
o_Map->updateRequestNew();
}
 
void dlg_Map::resizeEvent ( QResizeEvent * event )
{
// o_Map->resize(event->size());
o_Map->resize(w_Map->size() - QSize(20,20));
}
 
void dlg_Map::slot_ChangeMap(int Set)
{
switch(Set)
{
case 0 :
{
int zoom = o_Adapter->adaptedZoom();
o_Map->setZoom(0);
 
o_Adapter = new OSMMapAdapter();
o_Layer->setMapAdapter(o_Adapter);
 
o_Map->updateRequestNew();
o_Map->setZoom(zoom);
}
break;
case 1 :
{
int zoom = o_Adapter->adaptedZoom();
o_Map->setZoom(0);
 
o_Adapter = new YahooMapAdapter();
o_Layer->setMapAdapter(o_Adapter);
 
o_Map->updateRequestNew();
o_Map->setZoom(zoom);
}
break;
case 2 :
{
int zoom = o_Adapter->adaptedZoom();
QPointF a = o_Map->currentCoordinate();
 
o_Map->setZoom(0);
 
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");
o_Layer->setMapAdapter(o_Adapter);
 
o_Map->updateRequestNew();
o_Map->setZoom(zoom);
}
break;
case 3 :
{
int zoom = o_Adapter->adaptedZoom();
QPointF a = o_Map->currentCoordinate();
 
o_Map->setZoom(0);
 
o_Adapter = new GoogleMapAdapter();
o_Layer->setMapAdapter(o_Adapter);
 
o_Map->updateRequestNew();
o_Map->setZoom(zoom);
}
break;
}
}
/QMK-Groundstation/trunk/Forms/dlg_Map.h
0,0 → 1,72
/***************************************************************************
* 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_MAP_H
#define DLG_MAP_H
 
#include <QDialog>
#include <QList>
 
#include "ui_dlg_Map.h"
#include "../qmapcontrol.h"
 
using namespace qmapcontrol;
 
class dlg_Map : public QDialog, public Ui::dlg_Map_UI
{
Q_OBJECT
 
public:
dlg_Map(QWidget *parent = 0);
void add_Position(double x, double y);
 
private:
QPen* Pen[3];
 
MapControl* o_Map;
MapAdapter* o_Adapter;
Layer* o_Layer;
Layer* o_Click;
Layer* o_Route;
 
QList<Point*> p_RouteWP;
LineString* l_RouteWP;
 
QList<Point*> p_RouteFL;
LineString* l_RouteFL;
Point* LastPos;
 
Point* LastPoint;
 
Point* LastClick;
 
 
 
private slots:
void slot_Zoom(int i_Zoom);
void slot_Click(const QMouseEvent*, const QPointF);
void slot_AddWP();
void slot_DeleteWP();
void slot_ChangeMap(int);
 
protected:
virtual void resizeEvent ( QResizeEvent * event );
 
};
 
#endif // DLG_MAP_H
/QMK-Groundstation/trunk/Forms/dlg_Map.ui
0,0 → 1,244
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>dlg_Map_UI</class>
<widget class="QDialog" name="dlg_Map_UI">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>322</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>600</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Flug-Karte</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1">
<widget class="QFrame" name="w_Map">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="1">
<layout class="QHBoxLayout" name="l_Map"/>
</item>
</layout>
</widget>
</item>
<item row="0" column="3" rowspan="2">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Route</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<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>60</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Sek.</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="pb_Add">
<property name="text">
<string>hinzufügen</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QPushButton" name="pushButton_6">
<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="pb_Delete">
<property name="text">
<string>löschen</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="cb_ShowRoute">
<property name="text">
<string>geflogene
Route anzeigen</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="cb_CenterPos">
<property name="text">
<string>auf IST-Position
zentrieren</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Verweilzeit</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Position</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QPushButton" name="pushButton_4">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Anfliegen</string>
</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="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Zoom:</string>
</property>
</widget>
</item>
<item>
<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>
<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="QLabel" name="label_4">
<property name="text">
<string>Karten:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cb_Maps">
<property name="enabled">
<bool>false</bool>
</property>
<item>
<property name="text">
<string>OpenStreetMap</string>
</property>
</item>
<item>
<property name="text">
<string>Yahoo: Map </string>
</property>
</item>
<item>
<property name="text">
<string>Yahoo: Satellit</string>
</property>
</item>
<item>
<property name="text">
<string>Google</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="0" column="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>2</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>
<include location="../MKTool.qrc"/>
</resources>
<connections/>
</ui>
/QMK-Groundstation/trunk/Forms/mktool.cpp
69,7 → 69,6
#ifdef _BETA_
ac_QMKServer->setEnabled(true);
#endif
 
// Settings-Tab hinzufügen.
f_Settings = new wdg_Settings( this );
f_Settings->set_Config(Settings);
204,6 → 203,9
// LCD-Dialog
f_LCD = new dlg_LCD(this);
 
// LCD-Dialog
f_Map = new dlg_Map(this);
 
GE_Server = new cServer();
 
QMK_Server = new cQMK_Server();
239,6 → 241,7
connect(ac_Preferences, SIGNAL(triggered()), this, SLOT(slot_ac_Preferences()));
connect(ac_Motortest, SIGNAL(triggered()), this, SLOT(slot_ac_Motortest()));
connect(ac_LCD, SIGNAL(triggered()), this, SLOT(slot_ac_LCD()));
connect(ac_Map, SIGNAL(triggered()), this, SLOT(slot_ac_Map()));
connect(ac_FastDebug, SIGNAL(triggered()), this, SLOT(slot_ac_FastDebug()));
connect(ac_NoDebug, SIGNAL(triggered()), this, SLOT(slot_ac_NoDebug()));
connect(ac_FastNavi, SIGNAL(triggered()), this, SLOT(slot_ac_FastNavi()));
685,6 → 688,17
}
}
 
void MKTool::slot_ac_Map()
{
if (!f_Map->isVisible())
{
f_Map = new dlg_Map(this);
 
f_Map->show();
}
}
 
 
void MKTool::slot_Motortest(int Motor1, int Motor2, int Motor3, int Motor4)
{
TX_Data[0] = Motor1;
1319,6 → 1333,8
 
GE_Server->store_NaviString(NaviString);
 
f_Map->add_Position(NaviString.Longitude.toDouble(), NaviString.Latitude.toDouble());
 
if ((QMK_Server->property("Connect")) == true)
{
// qDebug("Send Data to Server..!!");
/QMK-Groundstation/trunk/Forms/mktool.h
40,6 → 40,7
#include "ui_mktool.h"
#include "wdg_Settings.h"
#include "dlg_LCD.h"
#include "dlg_Map.h"
 
#include "../Classes/cConnection.h"
#include "../Classes/cSettings.h"
50,6 → 51,10
#include "../Logger/Logger.h"
#include "../typedefs.h"
 
#include "../qmapcontrol.h"
 
using namespace qmapcontrol;
 
class QextSerialPort;
 
class MKTool : public QMainWindow, public Ui::dlg_mktool_UI
62,6 → 67,10
 
private:
 
MapControl* mc;
MapAdapter* mapadapter;
Layer* mainlayer;
 
// Object für Kopter-Verbindung
cConnection *Conn;
 
80,6 → 89,9
// LCD-Dialog
dlg_LCD *f_LCD;
 
// LCD-Dialog
dlg_Map *f_Map;
 
//TCP-Socket
QTcpSocket *TcpSocket;
 
180,6 → 192,7
void slot_ac_GetLabels();
void slot_ac_Motortest();
void slot_ac_LCD();
void slot_ac_Map();
 
void slot_pb_HexFile();
void slot_pb_SendWaypoint();
/QMK-Groundstation/trunk/Forms/mktool.ui
1,93 → 1,94
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>dlg_mktool_UI</class>
<widget class="QMainWindow" name="dlg_mktool_UI" >
<property name="geometry" >
<widget class="QMainWindow" name="dlg_mktool_UI">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>675</width>
<height>422</height>
<height>413</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string>MK-Tool</string>
</property>
<property name="windowIcon" >
<iconset resource="../MKTool.qrc" >
<property name="windowIcon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Icon/Images/QMK-Groundstation.png</normaloff>:/Icon/Images/QMK-Groundstation.png</iconset>
</property>
<property name="toolButtonStyle" >
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextOnly</enum>
</property>
<property name="dockOptions" >
<property name="dockOptions">
<set>QMainWindow::AllowNestedDocks|QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks|QMainWindow::ForceTabbedDocks|QMainWindow::VerticalTabs</set>
</property>
<widget class="QWidget" name="centralwidget" >
<layout class="QGridLayout" name="gridLayout_12" >
<item row="0" column="0" >
<widget class="Line" name="line_2" >
<property name="orientation" >
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout_12">
<item row="0" column="0">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="lb_Status" >
<property name="font" >
<item row="2" column="0">
<widget class="QLabel" name="lb_Status">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="frameShape" >
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="text" >
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QTabWidget" name="tab_Main" >
<property name="toolTip" >
<item row="1" column="0">
<widget class="QTabWidget" name="tab_Main">
<property name="toolTip">
<string/>
</property>
<property name="currentIndex" >
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="Tab_0" >
<attribute name="title" >
<widget class="QWidget" name="Tab_0">
<attribute name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Debug.png</normaloff>:/Actions/Images/Actions/Debug.png</iconset>
</attribute>
<attribute name="title">
<string>Debug-Daten </string>
</attribute>
<attribute name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Debug.png</normaloff>:/Actions/Images/Actions/Debug.png</iconset>
</attribute>
<layout class="QGridLayout" name="gridLayout_7" >
<item row="0" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout" >
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QFrame" name="frame_15" >
<property name="frameShape" >
<widget class="QFrame" name="frame_15">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_5" >
<item row="0" column="0" >
<widget class="QLabel" name="lb_A_0" >
<property name="text" >
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QLabel" name="lb_A_0">
<property name="text">
<string>Analog 0</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_A_0" >
<property name="font" >
<item row="0" column="1">
<widget class="QLineEdit" name="le_A_0">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
94,27 → 95,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="lb_A_1" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="lb_A_1">
<property name="text">
<string>Analog 1</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="le_A_1" >
<property name="font" >
<item row="1" column="1">
<widget class="QLineEdit" name="le_A_1">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
121,27 → 122,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="lb_A_2" >
<property name="text" >
<item row="2" column="0">
<widget class="QLabel" name="lb_A_2">
<property name="text">
<string>Analog 2</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="le_A_2" >
<property name="font" >
<item row="2" column="1">
<widget class="QLineEdit" name="le_A_2">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
148,27 → 149,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="lb_A_3" >
<property name="text" >
<item row="3" column="0">
<widget class="QLabel" name="lb_A_3">
<property name="text">
<string>Analog 3</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="le_A_3" >
<property name="font" >
<item row="3" column="1">
<widget class="QLineEdit" name="le_A_3">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
175,27 → 176,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="lb_A_4" >
<property name="text" >
<item row="4" column="0">
<widget class="QLabel" name="lb_A_4">
<property name="text">
<string>Analog 4</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="le_A_4" >
<property name="font" >
<item row="4" column="1">
<widget class="QLineEdit" name="le_A_4">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
202,27 → 203,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="lb_A_5" >
<property name="text" >
<item row="5" column="0">
<widget class="QLabel" name="lb_A_5">
<property name="text">
<string>Analog 5</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QLineEdit" name="le_A_5" >
<property name="font" >
<item row="5" column="1">
<widget class="QLineEdit" name="le_A_5">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
229,27 → 230,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="lb_A_6" >
<property name="text" >
<item row="6" column="0">
<widget class="QLabel" name="lb_A_6">
<property name="text">
<string>Analog 6</string>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QLineEdit" name="le_A_6" >
<property name="font" >
<item row="6" column="1">
<widget class="QLineEdit" name="le_A_6">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
256,27 → 257,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="lb_A_7" >
<property name="text" >
<item row="7" column="0">
<widget class="QLabel" name="lb_A_7">
<property name="text">
<string>Analog 7</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QLineEdit" name="le_A_7" >
<property name="font" >
<item row="7" column="1">
<widget class="QLineEdit" name="le_A_7">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
283,13 → 284,13
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
298,24 → 299,24
</widget>
</item>
<item>
<widget class="QFrame" name="frame_14" >
<property name="frameShape" >
<widget class="QFrame" name="frame_14">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_4" >
<item row="0" column="0" >
<widget class="QLabel" name="lb_A_8" >
<property name="text" >
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="lb_A_8">
<property name="text">
<string>Analog 8</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_A_8" >
<property name="font" >
<item row="0" column="1">
<widget class="QLineEdit" name="le_A_8">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
322,27 → 323,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="lb_A_9" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="lb_A_9">
<property name="text">
<string>Analog 9</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="le_A_9" >
<property name="font" >
<item row="1" column="1">
<widget class="QLineEdit" name="le_A_9">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
349,27 → 350,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="lb_A_10" >
<property name="text" >
<item row="2" column="0">
<widget class="QLabel" name="lb_A_10">
<property name="text">
<string>Analog 10</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="le_A_10" >
<property name="font" >
<item row="2" column="1">
<widget class="QLineEdit" name="le_A_10">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
376,27 → 377,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="lb_A_11" >
<property name="text" >
<item row="3" column="0">
<widget class="QLabel" name="lb_A_11">
<property name="text">
<string>Analog 11</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="le_A_11" >
<property name="font" >
<item row="3" column="1">
<widget class="QLineEdit" name="le_A_11">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
403,27 → 404,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="lb_A_12" >
<property name="text" >
<item row="4" column="0">
<widget class="QLabel" name="lb_A_12">
<property name="text">
<string>Analog 12</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="le_A_12" >
<property name="font" >
<item row="4" column="1">
<widget class="QLineEdit" name="le_A_12">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
430,27 → 431,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="lb_A_13" >
<property name="text" >
<item row="5" column="0">
<widget class="QLabel" name="lb_A_13">
<property name="text">
<string>Analog 13</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QLineEdit" name="le_A_13" >
<property name="font" >
<item row="5" column="1">
<widget class="QLineEdit" name="le_A_13">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
457,27 → 458,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="lb_A_14" >
<property name="text" >
<item row="6" column="0">
<widget class="QLabel" name="lb_A_14">
<property name="text">
<string>Analog 14</string>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QLineEdit" name="le_A_14" >
<property name="font" >
<item row="6" column="1">
<widget class="QLineEdit" name="le_A_14">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
484,27 → 485,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="lb_A_15" >
<property name="text" >
<item row="7" column="0">
<widget class="QLabel" name="lb_A_15">
<property name="text">
<string>Analog 15</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QLineEdit" name="le_A_15" >
<property name="font" >
<item row="7" column="1">
<widget class="QLineEdit" name="le_A_15">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
511,13 → 512,13
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
526,24 → 527,24
</widget>
</item>
<item>
<widget class="QFrame" name="frame_16" >
<property name="frameShape" >
<widget class="QFrame" name="frame_16">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_3" >
<item row="0" column="0" >
<widget class="QLabel" name="lb_A_16" >
<property name="text" >
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="lb_A_16">
<property name="text">
<string>Analog 16</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_A_16" >
<property name="font" >
<item row="0" column="1">
<widget class="QLineEdit" name="le_A_16">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
550,27 → 551,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="lb_A_17" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="lb_A_17">
<property name="text">
<string>Analog 17</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="le_A_17" >
<property name="font" >
<item row="1" column="1">
<widget class="QLineEdit" name="le_A_17">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
577,27 → 578,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="lb_A_18" >
<property name="text" >
<item row="2" column="0">
<widget class="QLabel" name="lb_A_18">
<property name="text">
<string>Analog 18</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="le_A_18" >
<property name="font" >
<item row="2" column="1">
<widget class="QLineEdit" name="le_A_18">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
604,27 → 605,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="lb_A_19" >
<property name="text" >
<item row="3" column="0">
<widget class="QLabel" name="lb_A_19">
<property name="text">
<string>Analog 19</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="le_A_19" >
<property name="font" >
<item row="3" column="1">
<widget class="QLineEdit" name="le_A_19">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
631,27 → 632,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="lb_A_20" >
<property name="text" >
<item row="4" column="0">
<widget class="QLabel" name="lb_A_20">
<property name="text">
<string>Analog 20</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="le_A_20" >
<property name="font" >
<item row="4" column="1">
<widget class="QLineEdit" name="le_A_20">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
658,27 → 659,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="lb_A_21" >
<property name="text" >
<item row="5" column="0">
<widget class="QLabel" name="lb_A_21">
<property name="text">
<string>Analog 21</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QLineEdit" name="le_A_21" >
<property name="font" >
<item row="5" column="1">
<widget class="QLineEdit" name="le_A_21">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
685,27 → 686,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="lb_A_22" >
<property name="text" >
<item row="6" column="0">
<widget class="QLabel" name="lb_A_22">
<property name="text">
<string>Analog 22</string>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QLineEdit" name="le_A_22" >
<property name="font" >
<item row="6" column="1">
<widget class="QLineEdit" name="le_A_22">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
712,27 → 713,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="lb_A_23" >
<property name="text" >
<item row="7" column="0">
<widget class="QLabel" name="lb_A_23">
<property name="text">
<string>Analog 23</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QLineEdit" name="le_A_23" >
<property name="font" >
<item row="7" column="1">
<widget class="QLineEdit" name="le_A_23">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
739,13 → 740,13
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
754,24 → 755,24
</widget>
</item>
<item>
<widget class="QFrame" name="frame_17" >
<property name="frameShape" >
<widget class="QFrame" name="frame_17">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_6" >
<item row="0" column="0" >
<widget class="QLabel" name="lb_A_24" >
<property name="text" >
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<widget class="QLabel" name="lb_A_24">
<property name="text">
<string>Analog 24</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_A_24" >
<property name="font" >
<item row="0" column="1">
<widget class="QLineEdit" name="le_A_24">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
778,27 → 779,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="lb_A_25" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="lb_A_25">
<property name="text">
<string>Analog 25</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="le_A_25" >
<property name="font" >
<item row="1" column="1">
<widget class="QLineEdit" name="le_A_25">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
805,27 → 806,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="lb_A_26" >
<property name="text" >
<item row="2" column="0">
<widget class="QLabel" name="lb_A_26">
<property name="text">
<string>Analog 26</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="le_A_26" >
<property name="font" >
<item row="2" column="1">
<widget class="QLineEdit" name="le_A_26">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
832,27 → 833,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="lb_A_27" >
<property name="text" >
<item row="3" column="0">
<widget class="QLabel" name="lb_A_27">
<property name="text">
<string>Analog 27</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="le_A_27" >
<property name="font" >
<item row="3" column="1">
<widget class="QLineEdit" name="le_A_27">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
859,27 → 860,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="lb_A_28" >
<property name="text" >
<item row="4" column="0">
<widget class="QLabel" name="lb_A_28">
<property name="text">
<string>Analog 28</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="le_A_28" >
<property name="font" >
<item row="4" column="1">
<widget class="QLineEdit" name="le_A_28">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
886,27 → 887,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="lb_A_29" >
<property name="text" >
<item row="5" column="0">
<widget class="QLabel" name="lb_A_29">
<property name="text">
<string>Analog 29</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QLineEdit" name="le_A_29" >
<property name="font" >
<item row="5" column="1">
<widget class="QLineEdit" name="le_A_29">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
913,27 → 914,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="lb_A_30" >
<property name="text" >
<item row="6" column="0">
<widget class="QLabel" name="lb_A_30">
<property name="text">
<string>Analog 30</string>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QLineEdit" name="le_A_30" >
<property name="font" >
<item row="6" column="1">
<widget class="QLineEdit" name="le_A_30">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
940,27 → 941,27
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="lb_A_31" >
<property name="text" >
<item row="7" column="0">
<widget class="QLabel" name="lb_A_31">
<property name="text">
<string>Analog 31</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QLineEdit" name="le_A_31" >
<property name="font" >
<item row="7" column="1">
<widget class="QLineEdit" name="le_A_31">
<property name="font">
<font>
<family>Adobe Courier</family>
<weight>75</weight>
967,13 → 968,13
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>0</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
985,49 → 986,49
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_1" >
<attribute name="title" >
<widget class="QWidget" name="Tab_1">
<attribute name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Plotter-NO.png</normaloff>:/Actions/Images/Actions/Plotter-NO.png</iconset>
</attribute>
<attribute name="title">
<string>Plotter</string>
</attribute>
<attribute name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Plotter-NO.png</normaloff>:/Actions/Images/Actions/Plotter-NO.png</iconset>
</attribute>
<layout class="QGridLayout" name="gridLayout_35" >
<item row="0" column="0" >
<widget class="QwtPlot" name="qwtPlot" />
<layout class="QGridLayout" name="gridLayout_35">
<item row="0" column="0">
<widget class="QwtPlot" name="qwtPlot"/>
</item>
<item row="1" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_2" >
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QScrollBar" name="scroll_plot" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<widget class="QScrollBar" name="scroll_plot">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum" >
<property name="maximum">
<number>0</number>
</property>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_StartPlotter" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<widget class="QPushButton" name="pb_StartPlotter">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>Start Plotter</string>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Plotter-NO.png</normaloff>:/Actions/Images/Actions/Plotter-NO.png</iconset>
</property>
</widget>
1036,55 → 1037,55
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_3" >
<attribute name="title" >
<widget class="QWidget" name="Tab_3">
<attribute name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Terminal.png</normaloff>:/Actions/Images/Actions/Terminal.png</iconset>
</attribute>
<attribute name="title">
<string>Terminal </string>
</attribute>
<attribute name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Terminal.png</normaloff>:/Actions/Images/Actions/Terminal.png</iconset>
</attribute>
<layout class="QGridLayout" name="gridLayout_2" >
<item row="0" column="0" colspan="8" >
<widget class="QTextEdit" name="te_RX" >
<property name="font" >
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="8">
<widget class="QTextEdit" name="te_RX">
<property name="font">
<font>
<family>Adobe Courier</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Adobe Courier'; font-size:10pt; font-weight:400; font-style:normal;">
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Adobe Courier'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QCheckBox" name="cb_ShowData" >
<property name="text" >
<item row="1" column="1">
<widget class="QCheckBox" name="cb_ShowData">
<property name="text">
<string>Datenpackete </string>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QCheckBox" name="cb_ShowMSG" >
<property name="text" >
<item row="1" column="2">
<widget class="QCheckBox" name="cb_ShowMSG">
<property name="text">
<string>Meldungen </string>
</property>
<property name="checked" >
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="6" >
<spacer name="horizontalSpacer_13" >
<property name="orientation" >
<item row="1" column="6">
<spacer name="horizontalSpacer_13">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>376</width>
<height>20</height>
1092,30 → 1093,30
</property>
</spacer>
</item>
<item row="1" column="4" >
<widget class="QCheckBox" name="cb_ShowAlways" >
<property name="text" >
<item row="1" column="4">
<widget class="QCheckBox" name="cb_ShowAlways">
<property name="text">
<string>auch wenn ausgeblendet </string>
</property>
</widget>
</item>
<item row="1" column="3" >
<widget class="QCheckBox" name="cb_ShowSend" >
<property name="text" >
<item row="1" column="3">
<widget class="QCheckBox" name="cb_ShowSend">
<property name="text">
<string>gesendete Daten </string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Anzeigen: </string>
</property>
</widget>
</item>
<item row="1" column="7" >
<widget class="QPushButton" name="pb_Clear" >
<property name="text" >
<item row="1" column="7">
<widget class="QPushButton" name="pb_Clear">
<property name="text">
<string>Löschen</string>
</property>
</widget>
1122,172 → 1123,172
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_4" >
<attribute name="title" >
<widget class="QWidget" name="Tab_4">
<attribute name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Cockpit.png</normaloff>:/Actions/Images/Actions/Cockpit.png</iconset>
</attribute>
<attribute name="title">
<string>Cockpit</string>
</attribute>
<attribute name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Cockpit.png</normaloff>:/Actions/Images/Actions/Cockpit.png</iconset>
</attribute>
<layout class="QGridLayout" name="gridLayout_13" >
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<layout class="QGridLayout" name="gridLayout_13">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Informationen</string>
</property>
<layout class="QGridLayout" name="gridLayout_8" >
<item row="0" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Flugzeit:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_CTime" >
<property name="minimumSize" >
<item row="0" column="1">
<widget class="QLineEdit" name="le_CTime">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_6" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Satelliten: </string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="le_CSats" >
<property name="minimumSize" >
<item row="1" column="1">
<widget class="QLineEdit" name="le_CSats">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_7" >
<property name="text" >
<item row="2" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Entfernung:</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="le_CDistance" >
<property name="minimumSize" >
<item row="2" column="1">
<widget class="QLineEdit" name="le_CDistance">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Wegpunkte Total:</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="le_CWPT" >
<property name="minimumSize" >
<item row="3" column="1">
<widget class="QLineEdit" name="le_CWPT">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Aktueller Wegpunkt:</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="le_CWPA" >
<property name="minimumSize" >
<item row="4" column="1">
<widget class="QLineEdit" name="le_CWPA">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="1" >
<spacer name="verticalSpacer_3" >
<property name="orientation" >
<item row="5" column="1">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
1298,12 → 1299,12
</layout>
</widget>
</item>
<item row="0" column="1" >
<spacer name="horizontalSpacer_14" >
<property name="orientation" >
<item row="0" column="1">
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
1311,31 → 1312,31
</property>
</spacer>
</item>
<item row="0" column="2" >
<widget class="QGroupBox" name="box_Flugdaten" >
<property name="title" >
<item row="0" column="2">
<widget class="QGroupBox" name="box_Flugdaten">
<property name="title">
<string>Flugdaten</string>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<layout class="QVBoxLayout" name="LayOut_Speed" >
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QVBoxLayout" name="LayOut_Speed">
<item>
<widget class="QLabel" name="label_145" >
<property name="font" >
<widget class="QLabel" name="label_145">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:600; font-style:normal;">
&lt;p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Geschwindigkeit&lt;/p>
&lt;p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:11pt; font-weight:600; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Geschwindigkeit&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
1342,25 → 1343,25
</item>
</layout>
</item>
<item row="0" column="1" >
<layout class="QVBoxLayout" name="verticalLayout" >
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_143" >
<property name="font" >
<widget class="QLabel" name="label_143">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:600; font-style:normal;">
&lt;p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Ausrichtung&lt;/p>
&lt;p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:11pt; font-weight:600; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Ausrichtung&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
1367,47 → 1368,47
</item>
</layout>
</item>
<item row="0" column="2" >
<layout class="QVBoxLayout" name="verticalLayout_6" >
<item row="0" column="2">
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QLabel" name="label_142" >
<property name="font" >
<widget class="QLabel" name="label_142">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:600; font-style:normal;">
&lt;p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Flugrichtung&lt;/p>
&lt;p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:11pt; font-weight:600; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Flugrichtung&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QwtCompass" name="Compass" >
<property name="minimumSize" >
<widget class="QwtCompass" name="Compass">
<property name="minimumSize">
<size>
<width>125</width>
<height>125</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>125</width>
<height>125</height>
</size>
</property>
<property name="lineWidth" >
<property name="lineWidth">
<number>4</number>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QwtDial::Sunken</enum>
</property>
</widget>
1414,41 → 1415,41
</item>
</layout>
</item>
<item row="0" column="3" >
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item row="0" column="3">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label_144" >
<property name="font" >
<widget class="QLabel" name="label_144">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:600; font-style:normal;">
&lt;p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Höhen-&lt;/p>
&lt;p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">änderung&lt;/p>&lt;/body>&lt;/html></string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:11pt; font-weight:600; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Höhen-&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;änderung&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QwtSlider" name="qwt_Rate" >
<property name="orientation" >
<widget class="QwtSlider" name="qwt_Rate">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="scalePosition" >
<property name="scalePosition">
<enum>QwtSlider::LeftScale</enum>
</property>
<property name="bgStyle" >
<property name="bgStyle">
<enum>QwtSlider::BgTrough</enum>
</property>
<property name="thumbLength" >
<property name="thumbLength">
<number>10</number>
</property>
</widget>
1455,12 → 1456,12
</item>
</layout>
</item>
<item row="1" column="1" >
<spacer name="verticalSpacer" >
<property name="orientation" >
<item row="1" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
1471,48 → 1472,48
</layout>
</widget>
</item>
<item row="1" column="0" colspan="3" >
<widget class="QGroupBox" name="box_System" >
<property name="title" >
<item row="1" column="0" colspan="3">
<widget class="QGroupBox" name="box_System">
<property name="title">
<string>System</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_12" >
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item>
<widget class="QLabel" name="label" >
<property name="text" >
<widget class="QLabel" name="label">
<property name="text">
<string>Spannung:</string>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="bar_UBAT" >
<property name="maximum" >
<widget class="QProgressBar" name="bar_UBAT">
<property name="maximum">
<number>140</number>
</property>
<property name="value" >
<property name="value">
<number>0</number>
</property>
<property name="format" >
<property name="format">
<string>%v</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_133" >
<property name="text" >
<widget class="QLabel" name="label_133">
<property name="text">
<string>Empfang:</string>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="bar_RX" >
<property name="maximum" >
<widget class="QProgressBar" name="bar_RX">
<property name="maximum">
<number>255</number>
</property>
<property name="value" >
<property name="value">
<number>0</number>
</property>
<property name="format" >
<property name="format">
<string>%v</string>
</property>
</widget>
1522,18 → 1523,18
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_5" >
<attribute name="title" >
<widget class="QWidget" name="Tab_5">
<attribute name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Firmware.png</normaloff>:/Actions/Images/Actions/Firmware.png</iconset>
</attribute>
<attribute name="title">
<string>Firmware Update </string>
</attribute>
<attribute name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Firmware.png</normaloff>:/Actions/Images/Actions/Firmware.png</iconset>
</attribute>
<layout class="QGridLayout" name="gridLayout_37" >
<item row="0" column="0" >
<widget class="QTextEdit" name="te_Shell" >
<property name="font" >
<layout class="QGridLayout" name="gridLayout_37">
<item row="0" column="0">
<widget class="QTextEdit" name="te_Shell">
<property name="font">
<font>
<family>Adobe Courier</family>
<pointsize>10</pointsize>
1541,31 → 1542,31
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QFrame" name="frame_20" >
<property name="frameShape" >
<item row="1" column="0">
<widget class="QFrame" name="frame_20">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3" >
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="pb_SettingsReset" >
<property name="enabled" >
<widget class="QPushButton" name="pb_SettingsReset">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text" >
<property name="text">
<string>Settings zurücksetzen</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer" >
<property name="orientation" >
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>178</width>
<height>17</height>
1574,38 → 1575,38
</spacer>
</item>
<item>
<widget class="QRadioButton" name="rb_FC" >
<property name="text" >
<widget class="QRadioButton" name="rb_FC">
<property name="text">
<string>FlightCtrl </string>
</property>
<property name="checked" >
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rb_MK3MAG" >
<property name="text" >
<widget class="QRadioButton" name="rb_MK3MAG">
<property name="text">
<string>MK3Mag </string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rb_BL" >
<property name="enabled" >
<widget class="QRadioButton" name="rb_BL">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text" >
<property name="text">
<string>BL-Ctrl </string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rb_NC" >
<property name="enabled" >
<widget class="QRadioButton" name="rb_NC">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text" >
<property name="text">
<string>NaviCtrl </string>
</property>
</widget>
1613,47 → 1614,47
</layout>
</widget>
</item>
<item row="2" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_11" >
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="QPushButton" name="pb_HexFile" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<widget class="QPushButton" name="pb_HexFile">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>Firmeware-Datei auswählen</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="le_HexFile" >
<property name="text" >
<widget class="QLineEdit" name="le_HexFile">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_Update" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<widget class="QPushButton" name="pb_Update">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>Updaten</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_Flash" >
<property name="enabled" >
<widget class="QPushButton" name="pb_Flash">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text" >
<property name="text">
<string>Flashen</string>
</property>
</widget>
1662,53 → 1663,53
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_6" >
<attribute name="title" >
<widget class="QWidget" name="Tab_6">
<attribute name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Waypoints.png</normaloff>:/Actions/Images/Actions/Waypoints.png</iconset>
</attribute>
<attribute name="title">
<string>Wegpunkte</string>
</attribute>
<attribute name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Waypoints.png</normaloff>:/Actions/Images/Actions/Waypoints.png</iconset>
</attribute>
<layout class="QGridLayout" name="gridLayout_14" >
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<layout class="QGridLayout" name="gridLayout_14">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Target</string>
</property>
<layout class="QGridLayout" name="gridLayout_11" >
<item row="0" column="0" >
<layout class="QGridLayout" name="gridLayout_10" >
<item row="0" column="0" >
<widget class="QLabel" name="label_8" >
<property name="text" >
<layout class="QGridLayout" name="gridLayout_11">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_10">
<item row="0" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Longitude:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_TarLong" />
<item row="0" column="1">
<widget class="QLineEdit" name="le_TarLong"/>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_9" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Latitude:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="le_TarLat" />
<item row="1" column="1">
<widget class="QLineEdit" name="le_TarLat"/>
</item>
<item row="3" column="0" colspan="2" >
<widget class="QPushButton" name="pb_FlyTo" >
<property name="text" >
<item row="3" column="0" colspan="2">
<widget class="QPushButton" name="pb_FlyTo">
<property name="text">
<string>Fliege da hin</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2" >
<widget class="QCheckBox" name="cb_ClipBoard" >
<property name="text" >
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="cb_ClipBoard">
<property name="text">
<string>überwache Zwischenablage</string>
</property>
</widget>
1715,12 → 1716,12
</item>
</layout>
</item>
<item row="1" column="0" >
<spacer name="verticalSpacer_2" >
<property name="orientation" >
<item row="1" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>315</width>
<height>120</height>
1729,15 → 1730,14
</spacer>
</item>
</layout>
<zorder>verticalSpacer_2</zorder>
</widget>
</item>
<item row="0" column="1" >
<spacer name="horizontalSpacer_2" >
<property name="orientation" >
<item row="0" column="1">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
1747,12 → 1747,12
</item>
</layout>
</widget>
<widget class="QWidget" name="Seite" >
<attribute name="title" >
<widget class="QWidget" name="Seite">
<attribute name="title">
<string>Debug</string>
</attribute>
<widget class="QLabel" name="lb_Port" >
<property name="geometry" >
<widget class="QLabel" name="lb_Port">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
1760,12 → 1760,12
<height>27</height>
</rect>
</property>
<property name="text" >
<property name="text">
<string>Device: </string>
</property>
</widget>
<widget class="QLineEdit" name="le_Port" >
<property name="geometry" >
<widget class="QLineEdit" name="le_Port">
<property name="geometry">
<rect>
<x>100</x>
<y>20</y>
1773,18 → 1773,18
<height>27</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>/dev/ttyUSB0</string>
</property>
</widget>
<widget class="QRadioButton" name="rb_SelFC" >
<property name="geometry" >
<widget class="QRadioButton" name="rb_SelFC">
<property name="geometry">
<rect>
<x>250</x>
<y>20</y>
1792,12 → 1792,12
<height>21</height>
</rect>
</property>
<property name="text" >
<property name="text">
<string>FlightCtrl</string>
</property>
</widget>
<widget class="QRadioButton" name="rb_SelNC" >
<property name="geometry" >
<widget class="QRadioButton" name="rb_SelNC">
<property name="geometry">
<rect>
<x>410</x>
<y>20</y>
1805,12 → 1805,12
<height>21</height>
</rect>
</property>
<property name="text" >
<property name="text">
<string>NaviCtrl</string>
</property>
</widget>
<widget class="QRadioButton" name="rb_SelMag" >
<property name="geometry" >
<widget class="QRadioButton" name="rb_SelMag">
<property name="geometry">
<rect>
<x>570</x>
<y>20</y>
1818,12 → 1818,12
<height>21</height>
</rect>
</property>
<property name="text" >
<property name="text">
<string>MK3Mag</string>
</property>
</widget>
<widget class="QPushButton" name="Dec" >
<property name="geometry" >
<widget class="QPushButton" name="Dec">
<property name="geometry">
<rect>
<x>4</x>
<y>240</y>
1831,12 → 1831,12
<height>26</height>
</rect>
</property>
<property name="text" >
<property name="text">
<string>Decode</string>
</property>
</widget>
<widget class="QLineEdit" name="IN" >
<property name="geometry" >
<widget class="QLineEdit" name="IN">
<property name="geometry">
<rect>
<x>10</x>
<y>180</y>
1844,12 → 1844,12
<height>27</height>
</rect>
</property>
<property name="text" >
<string>#cO][`S>zNIP^y``====M==================================z[lS>|zGP^{]Y====M========[n======>o>m>omMq>|m`J==E=============yY </string>
<property name="text">
<string>#cO][`S&gt;zNIP^y``====M==================================z[lS&gt;|zGP^{]Y====M========[n======&gt;o&gt;m&gt;omMq&gt;|m`J==E=============yY </string>
</property>
</widget>
<widget class="QTextEdit" name="te_KML" >
<property name="geometry" >
<widget class="QTextEdit" name="te_KML">
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
1858,8 → 1858,8
</rect>
</property>
</widget>
<widget class="QComboBox" name="cb_device" >
<property name="geometry" >
<widget class="QComboBox" name="cb_device">
<property name="geometry">
<rect>
<x>350</x>
<y>140</y>
1867,7 → 1867,7
<height>26</height>
</rect>
</property>
<property name="editable" >
<property name="editable">
<bool>true</bool>
</property>
</widget>
1876,491 → 1876,502
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar" >
<property name="geometry" >
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>675</width>
<height>24</height>
<height>23</height>
</rect>
</property>
<widget class="QMenu" name="menuProgramm" >
<property name="title" >
<widget class="QMenu" name="menuProgramm">
<property name="title">
<string>&amp;Programm</string>
</property>
<addaction name="ac_ConnectTTY" />
<addaction name="ac_QMKServer" />
<addaction name="separator" />
<addaction name="ac_Quit" />
<addaction name="ac_ConnectTTY"/>
<addaction name="ac_QMKServer"/>
<addaction name="separator"/>
<addaction name="ac_Quit"/>
</widget>
<widget class="QMenu" name="menuEinstellungen" >
<property name="title" >
<widget class="QMenu" name="menuEinstellungen">
<property name="title">
<string>&amp;Einstellungen</string>
</property>
<addaction name="ac_Config" />
<addaction name="separator" />
<addaction name="ac_Preferences" />
<addaction name="ac_Config"/>
<addaction name="separator"/>
<addaction name="ac_Preferences"/>
</widget>
<widget class="QMenu" name="menu_Help" >
<property name="title" >
<widget class="QMenu" name="menu_Help">
<property name="title">
<string>Hilfe</string>
</property>
<addaction name="ac_About" />
<addaction name="ac_About"/>
</widget>
<widget class="QMenu" name="menuDaten" >
<property name="title" >
<widget class="QMenu" name="menuDaten">
<property name="title">
<string>&amp;Debug-Daten</string>
</property>
<addaction name="ac_RecordCSV" />
<addaction name="ac_StartPlotter" />
<addaction name="separator" />
<addaction name="ac_FastDebug" />
<addaction name="ac_NoDebug" />
<addaction name="separator" />
<addaction name="ac_GetLabels" />
<addaction name="ac_RecordCSV"/>
<addaction name="ac_StartPlotter"/>
<addaction name="separator"/>
<addaction name="ac_FastDebug"/>
<addaction name="ac_NoDebug"/>
<addaction name="separator"/>
<addaction name="ac_GetLabels"/>
</widget>
<widget class="QMenu" name="menuAnsicht" >
<property name="title" >
<widget class="QMenu" name="menuAnsicht">
<property name="title">
<string>&amp;Ansicht</string>
</property>
<widget class="QMenu" name="menuBereiche" >
<property name="title" >
<widget class="QMenu" name="menuBereiche">
<property name="title">
<string>Bereiche</string>
</property>
<addaction name="ac_View0" />
<addaction name="ac_View1" />
<addaction name="ac_View2" />
<addaction name="ac_View3" />
<addaction name="ac_View4" />
<addaction name="ac_View5" />
<addaction name="ac_View6" />
<addaction name="ac_View0"/>
<addaction name="ac_View1"/>
<addaction name="ac_View2"/>
<addaction name="ac_View3"/>
<addaction name="ac_View4"/>
<addaction name="ac_View5"/>
<addaction name="ac_View6"/>
</widget>
<addaction name="menuBereiche" />
<addaction name="menuBereiche"/>
</widget>
<widget class="QMenu" name="menuWerkzeuge" >
<property name="title" >
<widget class="QMenu" name="menuWerkzeuge">
<property name="title">
<string>Werkzeuge</string>
</property>
<addaction name="ac_Motortest" />
<addaction name="ac_LCD" />
<addaction name="ac_Motortest"/>
<addaction name="ac_LCD"/>
<addaction name="ac_Map"/>
</widget>
<widget class="QMenu" name="menuHardware" >
<property name="title" >
<widget class="QMenu" name="menuHardware">
<property name="title">
<string>Hardware</string>
</property>
<addaction name="ac_SelFC" />
<addaction name="ac_SelNC" />
<addaction name="ac_SelMag" />
<addaction name="ac_SelFC"/>
<addaction name="ac_SelNC"/>
<addaction name="ac_SelMag"/>
</widget>
<widget class="QMenu" name="menu_Navi_Daten" >
<property name="title" >
<widget class="QMenu" name="menu_Navi_Daten">
<property name="title">
<string>&amp;Navi-Daten</string>
</property>
<addaction name="ac_StartServer" />
<addaction name="separator" />
<addaction name="ac_FastNavi" />
<addaction name="ac_NoNavi" />
<addaction name="ac_StartServer"/>
<addaction name="separator"/>
<addaction name="ac_FastNavi"/>
<addaction name="ac_NoNavi"/>
</widget>
<addaction name="menuProgramm" />
<addaction name="menuHardware" />
<addaction name="menuAnsicht" />
<addaction name="menuDaten" />
<addaction name="menu_Navi_Daten" />
<addaction name="menuEinstellungen" />
<addaction name="menuWerkzeuge" />
<addaction name="menu_Help" />
<addaction name="menuProgramm"/>
<addaction name="menuHardware"/>
<addaction name="menuAnsicht"/>
<addaction name="menuDaten"/>
<addaction name="menu_Navi_Daten"/>
<addaction name="menuEinstellungen"/>
<addaction name="menuWerkzeuge"/>
<addaction name="menu_Help"/>
</widget>
<widget class="QToolBar" name="tb_Allgemein" >
<property name="windowTitle" >
<widget class="QToolBar" name="tb_Allgemein">
<property name="windowTitle">
<string>Allgemein</string>
</property>
<property name="iconSize" >
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolButtonStyle" >
<property name="toolButtonStyle">
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<attribute name="toolBarArea" >
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak" >
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="ac_ConnectTTY" />
<addaction name="ac_QMKServer" />
<addaction name="separator" />
<addaction name="ac_StartServer" />
<addaction name="ac_ConnectTTY"/>
<addaction name="ac_QMKServer"/>
<addaction name="separator"/>
<addaction name="ac_StartServer"/>
<addaction name="ac_Map"/>
</widget>
<widget class="QToolBar" name="tb_Werkzeuge" >
<property name="windowTitle" >
<widget class="QToolBar" name="tb_Werkzeuge">
<property name="windowTitle">
<string>Werkzeuge</string>
</property>
<property name="iconSize" >
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolButtonStyle" >
<property name="toolButtonStyle">
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<attribute name="toolBarArea" >
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak" >
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="ac_Motortest" />
<addaction name="ac_LCD" />
<addaction name="ac_Motortest"/>
<addaction name="ac_LCD"/>
</widget>
<widget class="QToolBar" name="tb_Debug" >
<property name="windowTitle" >
<widget class="QToolBar" name="tb_Debug">
<property name="windowTitle">
<string>Debug-Daten</string>
</property>
<property name="iconSize" >
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolButtonStyle" >
<property name="toolButtonStyle">
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<attribute name="toolBarArea" >
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak" >
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="ac_StartPlotter" />
<addaction name="ac_FastDebug" />
<addaction name="ac_RecordCSV" />
<addaction name="ac_StartPlotter"/>
<addaction name="ac_FastDebug"/>
<addaction name="ac_RecordCSV"/>
</widget>
<widget class="QToolBar" name="tb_TTY" >
<property name="windowTitle" >
<widget class="QToolBar" name="tb_TTY">
<property name="windowTitle">
<string>Schnittstelle</string>
</property>
<attribute name="toolBarArea" >
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak" >
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<widget class="QToolBar" name="tb_Hardware" >
<property name="windowTitle" >
<widget class="QToolBar" name="tb_Hardware">
<property name="windowTitle">
<string>Hardware</string>
</property>
<attribute name="toolBarArea" >
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak" >
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<action name="ac_LogDir" >
<property name="text" >
<action name="ac_LogDir">
<property name="text">
<string>Log-Verzeichniss</string>
</property>
</action>
<action name="ac_ParameterDir" >
<property name="text" >
<action name="ac_ParameterDir">
<property name="text">
<string>Parameter-Verzeichniss</string>
</property>
</action>
<action name="ac_Quit" >
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<action name="ac_Quit">
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Exit.png</normaloff>:/Actions/Images/Actions/Exit.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>&amp;Beenden</string>
</property>
</action>
<action name="ac_About" >
<property name="text" >
<action name="ac_About">
<property name="text">
<string>Über QMK-Groundstation</string>
</property>
</action>
<action name="ac_ConnectTTY" >
<property name="checkable" >
<action name="ac_ConnectTTY">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Seriell-NO.png</normaloff>
<normalon>:/Actions/Images/Actions/Seriell-OK.png</normalon>:/Actions/Images/Actions/Seriell-NO.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Kopter Verbinden</string>
</property>
</action>
<action name="ac_RecordCSV" >
<property name="checkable" >
<action name="ac_RecordCSV">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/CVS-Record.png</normaloff>
<normalon>:/Actions/Images/Actions/CVS-Stop.png</normalon>:/Actions/Images/Actions/CVS-Record.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>CSV Aufzeichnen</string>
</property>
</action>
<action name="ac_StartPlotter" >
<property name="checkable" >
<action name="ac_StartPlotter">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Plotter-NO.png</normaloff>
<normalon>:/Actions/Images/Actions/Plotter-OK.png</normalon>:/Actions/Images/Actions/Plotter-NO.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Start Plotter</string>
</property>
</action>
<action name="ac_Config" >
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<action name="ac_Config">
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Preferences-Data.png</normaloff>:/Actions/Images/Actions/Preferences-Data.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Datenfelder wählen</string>
</property>
</action>
<action name="ac_FastDebug" >
<property name="checkable" >
<action name="ac_FastDebug">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Fast-Data.png</normaloff>:/Actions/Images/Actions/Fast-Data.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Schnelle Debugdaten</string>
</property>
</action>
<action name="ac_View0" >
<property name="checkable" >
<action name="ac_View0">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked" >
<property name="checked">
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Debug.png</normaloff>:/Actions/Images/Actions/Debug.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Debug-Daten</string>
</property>
</action>
<action name="ac_View1" >
<property name="checkable" >
<action name="ac_View1">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked" >
<property name="checked">
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Plotter-NO.png</normaloff>:/Actions/Images/Actions/Plotter-NO.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Plotter</string>
</property>
</action>
<action name="ac_View2" >
<property name="checkable" >
<action name="ac_View2">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked" >
<property name="checked">
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/FC-Settings.png</normaloff>:/Actions/Images/Actions/FC-Settings.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>FC-Settings</string>
</property>
</action>
<action name="ac_View3" >
<property name="checkable" >
<action name="ac_View3">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked" >
<property name="checked">
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Terminal.png</normaloff>:/Actions/Images/Actions/Terminal.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Terminal</string>
</property>
</action>
<action name="ac_View4" >
<property name="checkable" >
<action name="ac_View4">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked" >
<property name="checked">
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Cockpit.png</normaloff>:/Actions/Images/Actions/Cockpit.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Cockpit</string>
</property>
</action>
<action name="ac_View5" >
<property name="checkable" >
<action name="ac_View5">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked" >
<property name="checked">
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Firmware.png</normaloff>:/Actions/Images/Actions/Firmware.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Firmware Update</string>
</property>
</action>
<action name="ac_GetLabels" >
<property name="text" >
<action name="ac_GetLabels">
<property name="text">
<string>Beschreibungen abfragen</string>
</property>
</action>
<action name="ac_Preferences" >
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<action name="ac_Preferences">
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Preferences.png</normaloff>:/Actions/Images/Actions/Preferences.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>QMK Einrichten</string>
</property>
</action>
<action name="ac_Motortest" >
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<action name="ac_Motortest">
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Motortest.png</normaloff>:/Actions/Images/Actions/Motortest.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Motortest</string>
</property>
</action>
<action name="ac_SelFC" >
<property name="checkable" >
<action name="ac_SelFC">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text" >
<property name="text">
<string>FlightCtrl</string>
</property>
</action>
<action name="ac_SelNC" >
<property name="checkable" >
<action name="ac_SelNC">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text" >
<property name="text">
<string>NaviCtrl</string>
</property>
</action>
<action name="ac_SelMag" >
<property name="checkable" >
<action name="ac_SelMag">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text" >
<property name="text">
<string>MK3Mag</string>
</property>
</action>
<action name="ac_NoDebug" >
<property name="checkable" >
<action name="ac_NoDebug">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text" >
<property name="text">
<string>Debugdaten abschalten.</string>
</property>
</action>
<action name="ac_StartServer" >
<property name="checkable" >
<action name="ac_StartServer">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Google-NO.png</normaloff>
<normalon>:/Actions/Images/Actions/Google-OK.png</normalon>:/Actions/Images/Actions/Google-NO.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Google Earth Server</string>
</property>
</action>
<action name="ac_FastNavi" >
<property name="checkable" >
<action name="ac_FastNavi">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Fast-Data.png</normaloff>:/Actions/Images/Actions/Fast-Data.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Schnelle Navi-Daten</string>
</property>
</action>
<action name="ac_NoNavi" >
<property name="checkable" >
<action name="ac_NoNavi">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text" >
<property name="text">
<string>Navidaten abschalten</string>
</property>
</action>
<action name="ac_QMKServer" >
<property name="checkable" >
<action name="ac_QMKServer">
<property name="checkable">
<bool>true</bool>
</property>
<property name="enabled" >
<property name="enabled">
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Network-NO.png</normaloff>
<normalon>:/Actions/Images/Actions/Network-OK.png</normalon>:/Actions/Images/Actions/Network-NO.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>QMK Server Verbinden</string>
</property>
</action>
<action name="ac_View6" >
<property name="checkable" >
<action name="ac_View6">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Waypoints.png</normaloff>:/Actions/Images/Actions/Waypoints.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Wegpunkte</string>
</property>
</action>
<action name="ac_LCD" >
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<action name="ac_LCD">
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/LCD.png</normaloff>:/Actions/Images/Actions/LCD.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>LCD-Display</string>
</property>
</action>
<action name="ac_Map">
<property name="icon">
<iconset resource="../MKTool.qrc">
<normaloff>:/Actions/Images/Actions/Waypoints.png</normaloff>:/Actions/Images/Actions/Waypoints.png</iconset>
</property>
<property name="text">
<string>Flug-Karte</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
2381,7 → 2392,7
</customwidget>
</customwidgets>
<resources>
<include location="../MKTool.qrc" />
<include location="../MKTool.qrc"/>
</resources>
<connections>
<connection>
2390,11 → 2401,11
<receiver>dlg_mktool_UI</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>384</x>
<y>209</y>
</hint>
2406,11 → 2417,11
<receiver>ac_StartPlotter</receiver>
<slot>trigger()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>756</x>
<y>370</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>-1</x>
<y>-1</y>
</hint>
2422,11 → 2433,11
<receiver>ac_SelFC</receiver>
<slot>setChecked(bool)</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>299</x>
<y>194</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>-1</x>
<y>-1</y>
</hint>
2438,11 → 2449,11
<receiver>ac_SelMag</receiver>
<slot>setChecked(bool)</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>504</x>
<y>194</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>-1</x>
<y>-1</y>
</hint>
2454,11 → 2465,11
<receiver>ac_SelNC</receiver>
<slot>setChecked(bool)</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>404</x>
<y>194</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>-1</x>
<y>-1</y>
</hint>
2470,11 → 2481,11
<receiver>rb_SelFC</receiver>
<slot>setChecked(bool)</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>299</x>
<y>194</y>
</hint>
2486,11 → 2497,11
<receiver>rb_SelMag</receiver>
<slot>setChecked(bool)</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>504</x>
<y>194</y>
</hint>
2502,11 → 2513,11
<receiver>rb_SelNC</receiver>
<slot>setChecked(bool)</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>404</x>
<y>194</y>
</hint>
2518,11 → 2529,11
<receiver>te_RX</receiver>
<slot>clear()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>736</x>
<y>372</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>392</x>
<y>225</y>
</hint>
/QMK-Groundstation/trunk/QMapControl.pri
0,0 → 1,50
DEPENDPATH += Classes/QMapControl
INCLUDEPATH += Classes/QMapControl
MOC_DIR = tmp
OBJECTS_DIR = obj
 
# Input
HEADERS += curve.h \
geometry.h \
imagemanager.h \
layer.h \
layermanager.h \
linestring.h \
mapadapter.h \
mapcontrol.h \
mapnetwork.h \
point.h \
tilemapadapter.h \
wmsmapadapter.h \
circlepoint.h \
imagepoint.h \
gps_position.h \
osmmapadapter.h \
maplayer.h \
geometrylayer.h \
yahoomapadapter.h \
googlemapadapter.h \
googlesatmapadapter.h
SOURCES += curve.cpp \
geometry.cpp \
imagemanager.cpp \
layer.cpp \
layermanager.cpp \
linestring.cpp \
mapadapter.cpp \
mapcontrol.cpp \
mapnetwork.cpp \
point.cpp \
tilemapadapter.cpp \
wmsmapadapter.cpp \
circlepoint.cpp \
imagepoint.cpp \
gps_position.cpp \
osmmapadapter.cpp \
maplayer.cpp \
geometrylayer.cpp \
yahoomapadapter.cpp \
googlemapadapter.cpp \
googlesatmapadapter.cpp
 
QT += network
/QMK-Groundstation/trunk/debian.pro
1,79 → 1,8
TEMPLATE = app
include(QMapControl.pri)
 
OBJECTS_DIR = build/.o_unix
UI_DIR = build/.ui
MOC_DIR = build/.moc
RCC_DIR = build/.rcc
DESTDIR = build/bin
 
DEFINES += _TTY_POSIX_
 
LIBS += -lqwt-qt4
INCLUDEPATH += $(HOME)/include /usr/include/qwt-qt4
 
QT *= gui core network
 
CONFIG += warn_on thread qt
 
TARGET = QMK-Groundstation
 
RESOURCES += MKTool.qrc
 
SOURCES = \
main.cpp \
SerialPort/qextserialbase.cpp \
SerialPort/qextserialport.cpp \
SerialPort/ManageSerialPort.cpp \
Forms/mktool.cpp \
Forms/dlg_Config.cpp \
Forms/dlg_Motortest.cpp \
Forms/dlg_Preferences.cpp \
Forms/wdg_Settings.cpp \
Classes/cSettings.cpp \
Classes/cServer.cpp \
Classes/ToolBox.cpp \
Classes/cAttitude.cpp \
Classes/cSpeedMeter.cpp \
Classes/cQMK_Server.cpp \
Logger/Logger.cpp \
Logger/CSVLogger.cpp \
Forms/dlg_LCD.cpp \
Classes/cConnection.cpp
 
win32:SOURCES += SerialPort/win_qextserialport.cpp
unix:SOURCES += SerialPort/posix_qextserialport.cpp
 
HEADERS = \
global.h \
Parameter_Positions.h \
SerialPort/qextserialbase.h \
SerialPort/qextserialport.h \
SerialPort/ManageSerialPort.h \
Forms/mktool.h \
Forms/dlg_Config.h \
Forms/dlg_Motortest.h \
Forms/dlg_Preferences.h \
Forms/wdg_Settings.h \
Classes/cSettings.h \
Classes/cServer.h \
Classes/ToolBox.h \
Classes/cAttitude.h \
Classes/cSpeedMeter.h \
Classes/cQMK_Server.h \
Logger/Logger.h \
Logger/CSVLogger.h \
Logger/DefaultLogger.h \
Forms/dlg_LCD.h \
Classes/cConnection.h \
typedefs.h
 
win32:HEADERS += SerialPort/win_qextserialport.h
unix:HEADERS += SerialPort/posix_qextserialport.h
 
FORMS += \
Forms/mktool.ui \
Forms/dlg_Config.ui \
Forms/dlg_Preferences.ui \
Forms/dlg_Motortest.ui \
Forms/wdg_Settings.ui \
Forms/dlg_LCD.ui
include(global.pri)
/QMK-Groundstation/trunk/eeepc.pro
1,10 → 1,5
TEMPLATE = app
include(QMapControl.pri)
 
OBJECTS_DIR = build/.o_unix
UI_DIR = build/.ui
MOC_DIR = build/.moc
RCC_DIR = build/.rcc
DESTDIR = build/bin
 
DEFINES += _TTY_POSIX_ _EEEPC_
 
11,69 → 6,4
LIBS += -lqwt-qt4
INCLUDEPATH += $(HOME)/include /usr/include/qwt-qt4
 
QT *= gui core network
 
CONFIG += warn_on thread qt
 
TARGET = QMK-Groundstation
 
RESOURCES += MKTool.qrc
 
SOURCES = \
main.cpp \
SerialPort/qextserialbase.cpp \
SerialPort/qextserialport.cpp \
SerialPort/ManageSerialPort.cpp \
Forms/mktool.cpp \
Forms/dlg_Config.cpp \
Forms/dlg_Motortest.cpp \
Forms/dlg_Preferences.cpp \
Forms/wdg_Settings.cpp \
Classes/cSettings.cpp \
Classes/cServer.cpp \
Classes/ToolBox.cpp \
Classes/cAttitude.cpp \
Classes/cSpeedMeter.cpp \
Classes/cQMK_Server.cpp \
Logger/Logger.cpp \
Logger/CSVLogger.cpp \
Forms/dlg_LCD.cpp \
Classes/cConnection.cpp
 
win32:SOURCES += SerialPort/win_qextserialport.cpp
unix:SOURCES += SerialPort/posix_qextserialport.cpp
 
HEADERS = \
global.h \
Parameter_Positions.h \
SerialPort/qextserialbase.h \
SerialPort/qextserialport.h \
SerialPort/ManageSerialPort.h \
Forms/mktool.h \
Forms/dlg_Config.h \
Forms/dlg_Motortest.h \
Forms/dlg_Preferences.h \
Forms/wdg_Settings.h \
Classes/cSettings.h \
Classes/cServer.h \
Classes/ToolBox.h \
Classes/cAttitude.h \
Classes/cSpeedMeter.h \
Classes/cQMK_Server.h \
Logger/Logger.h \
Logger/CSVLogger.h \
Logger/DefaultLogger.h \
Forms/dlg_LCD.h \
Classes/cConnection.h \
typedefs.h
 
win32:HEADERS += SerialPort/win_qextserialport.h
unix:HEADERS += SerialPort/posix_qextserialport.h
 
FORMS += \
Forms/mktool.ui \
Forms/dlg_Config.ui \
Forms/dlg_Preferences.ui \
Forms/dlg_Motortest.ui \
Forms/wdg_Settings.ui \
Forms/dlg_LCD.ui
include(global.pri)
/QMK-Groundstation/trunk/gentoo.pro
1,79 → 1,8
TEMPLATE = app
include(QMapControl.pri)
 
OBJECTS_DIR = build/.o_unix
UI_DIR = build/.ui
MOC_DIR = build/.moc
RCC_DIR = build/.rcc
DESTDIR = build/bin
 
DEFINES += _TTY_POSIX_
 
LIBS += -lqwt
INCLUDEPATH += $(HOME)/include /usr/include/qwt5
 
QT *= gui core network
 
CONFIG += warn_on thread qt
 
TARGET = QMK-Groundstation
 
RESOURCES += MKTool.qrc
 
SOURCES = \
main.cpp \
SerialPort/qextserialbase.cpp \
SerialPort/qextserialport.cpp \
SerialPort/ManageSerialPort.cpp \
Forms/mktool.cpp \
Forms/dlg_Config.cpp \
Forms/dlg_Motortest.cpp \
Forms/dlg_Preferences.cpp \
Forms/wdg_Settings.cpp \
Classes/cSettings.cpp \
Classes/cServer.cpp \
Classes/ToolBox.cpp \
Classes/cAttitude.cpp \
Classes/cSpeedMeter.cpp \
Classes/cQMK_Server.cpp \
Logger/Logger.cpp \
Logger/CSVLogger.cpp \
Forms/dlg_LCD.cpp \
Classes/cConnection.cpp
 
win32:SOURCES += SerialPort/win_qextserialport.cpp
unix:SOURCES += SerialPort/posix_qextserialport.cpp
 
HEADERS = \
global.h \
Parameter_Positions.h \
SerialPort/qextserialbase.h \
SerialPort/qextserialport.h \
SerialPort/ManageSerialPort.h \
Forms/mktool.h \
Forms/dlg_Config.h \
Forms/dlg_Motortest.h \
Forms/dlg_Preferences.h \
Forms/wdg_Settings.h \
Classes/cSettings.h \
Classes/cServer.h \
Classes/ToolBox.h \
Classes/cAttitude.h \
Classes/cSpeedMeter.h \
Classes/cQMK_Server.h \
Logger/Logger.h \
Logger/CSVLogger.h \
Logger/DefaultLogger.h \
Forms/dlg_LCD.h \
Classes/cConnection.h \
typedefs.h
 
win32:HEADERS += SerialPort/win_qextserialport.h
unix:HEADERS += SerialPort/posix_qextserialport.h
 
FORMS += \
Forms/mktool.ui \
Forms/dlg_Config.ui \
Forms/dlg_Preferences.ui \
Forms/dlg_Motortest.ui \
Forms/wdg_Settings.ui \
Forms/dlg_LCD.ui
include(global.pri)
/QMK-Groundstation/trunk/global.h
56,16 → 56,31
static const int SLEEP = 500000;
 
static const QString QA_NAME = "QMK-Groundstation";
static const QString QA_VERSION_NR = "0.7.3";
static const QString QA_VERSION_NR = "0.7.8";
 
#ifdef _BETA_
static const QString QA_VERSION = QA_VERSION_NR + " (BETA)";
static const QString QA_HWVERSION = "FlightCtrl v0.72f & NaviCtrl v0.13a";
static const QString QA_HWVERSION = "FlightCtrl v0.72p & NaviCtrl v0.14b";
#else
static const QString QA_VERSION = QA_VERSION_NR;
static const QString QA_HWVERSION = "FlightCtrl v0.72p & NaviCtrl v0.14a";
static const QString QA_HWVERSION = "FlightCtrl v0.72p & NaviCtrl v0.14b";
#endif
 
#ifdef Q_OS_LINUX
static const QString QA_OS = "Linux";
#else
#ifdef Q_OS_DARWIN
static const QString QA_OS = "OSX";
#else
#ifdef Q_OS_WIN32
static const QString QA_OS = "Windows";
#else
static const QString QA_OS = "n/a";
#endif
#endif
#endif
 
 
static const QString QA_DATE = "02.03.2009";
static const QString QA_YEAR = "2008-2009";
static const QString QA_AUTHOR = "Manuel Schrape";
75,7 → 90,7
"<HTML>"
"<p><b><font size=8>" + QA_NAME + "</font></b></p>"
"<br />"
"Version " + QA_VERSION + " - " + QA_DATE + ""
"Version " + QA_VERSION + " - " + QA_DATE + " on " + QA_OS + ""
"<br /><b>kompatibel zu " + QA_HWVERSION + "</b>"
"<br /><br />"
"(C) " + QA_YEAR + " by " + QA_AUTHOR + " - "
/QMK-Groundstation/trunk/global.pri
0,0 → 1,76
TEMPLATE = app
 
OBJECTS_DIR = build/.o_unix
UI_DIR = build/.ui
MOC_DIR = build/.moc
RCC_DIR = build/.rcc
DESTDIR = build/bin
 
QT *= gui core network
 
CONFIG += warn_on thread qt
 
TARGET = QMK-Groundstation
 
RESOURCES += MKTool.qrc
 
SOURCES += \
main.cpp \
SerialPort/qextserialbase.cpp \
SerialPort/qextserialport.cpp \
SerialPort/ManageSerialPort.cpp \
Forms/mktool.cpp \
Forms/dlg_Config.cpp \
Forms/dlg_Motortest.cpp \
Forms/dlg_Preferences.cpp \
Forms/wdg_Settings.cpp \
Classes/cSettings.cpp \
Classes/cServer.cpp \
Classes/ToolBox.cpp \
Classes/cAttitude.cpp \
Classes/cSpeedMeter.cpp \
Classes/cQMK_Server.cpp \
Logger/Logger.cpp \
Logger/CSVLogger.cpp \
Forms/dlg_LCD.cpp \
Classes/cConnection.cpp \
Forms/dlg_Map.cpp
win32:SOURCES += SerialPort/win_qextserialport.cpp
unix:SOURCES += SerialPort/posix_qextserialport.cpp
 
HEADERS += \
global.h \
Parameter_Positions.h \
SerialPort/qextserialbase.h \
SerialPort/qextserialport.h \
SerialPort/ManageSerialPort.h \
Forms/mktool.h \
Forms/dlg_Config.h \
Forms/dlg_Motortest.h \
Forms/dlg_Preferences.h \
Forms/wdg_Settings.h \
Classes/cSettings.h \
Classes/cServer.h \
Classes/ToolBox.h \
Classes/cAttitude.h \
Classes/cSpeedMeter.h \
Classes/cQMK_Server.h \
Logger/Logger.h \
Logger/CSVLogger.h \
Logger/DefaultLogger.h \
Forms/dlg_LCD.h \
Classes/cConnection.h \
typedefs.h \
Forms/dlg_Map.h
 
win32:HEADERS += SerialPort/win_qextserialport.h
unix:HEADERS += SerialPort/posix_qextserialport.h
 
FORMS += \
Forms/mktool.ui \
Forms/dlg_Config.ui \
Forms/dlg_Preferences.ui \
Forms/dlg_Motortest.ui \
Forms/wdg_Settings.ui \
Forms/dlg_LCD.ui \
Forms/dlg_Map.ui
/QMK-Groundstation/trunk/osx.pro
1,79 → 1,8
TEMPLATE = app
include(QMapControl.pri)
 
OBJECTS_DIR = build/.o_mac
UI_DIR = build/.ui
MOC_DIR = build/.moc
RCC_DIR = build/.rcc
DESTDIR = build/bin
 
DEFINES += _TTY_POSIX_
 
LIBS += -L/opt/local/lib -lqwt
INCLUDEPATH += /opt/local/include
 
QT *= gui core network
 
CONFIG += warn_on thread qt
 
TARGET = QMK-Groundstation
 
RESOURCES += MKTool.qrc
 
SOURCES = \
main.cpp \
SerialPort/qextserialbase.cpp \
SerialPort/qextserialport.cpp \
SerialPort/ManageSerialPort.cpp \
Forms/mktool.cpp \
Forms/dlg_Config.cpp \
Forms/dlg_Motortest.cpp \
Forms/dlg_Preferences.cpp \
Forms/wdg_Settings.cpp \
Classes/cSettings.cpp \
Classes/cServer.cpp \
Classes/ToolBox.cpp \
Classes/cAttitude.cpp \
Classes/cSpeedMeter.cpp \
Classes/cQMK_Server.cpp \
Logger/Logger.cpp \
Logger/CSVLogger.cpp \
Forms/dlg_LCD.cpp \
Classes/cConnection.cpp
 
win32:SOURCES += SerialPort/win_qextserialport.cpp
unix:SOURCES += SerialPort/posix_qextserialport.cpp
 
HEADERS = \
global.h \
Parameter_Positions.h \
SerialPort/qextserialbase.h \
SerialPort/qextserialport.h \
SerialPort/ManageSerialPort.h \
Forms/mktool.h \
Forms/dlg_Config.h \
Forms/dlg_Motortest.h \
Forms/dlg_Preferences.h \
Forms/wdg_Settings.h \
Classes/cSettings.h \
Classes/cServer.h \
Classes/ToolBox.h \
Classes/cAttitude.h \
Classes/cSpeedMeter.h \
Classes/cQMK_Server.h \
Logger/Logger.h \
Logger/CSVLogger.h \
Logger/DefaultLogger.h \
Forms/dlg_LCD.h \
Classes/cConnection.h \
typedefs.h
 
win32:HEADERS += SerialPort/win_qextserialport.h
unix:HEADERS += SerialPort/posix_qextserialport.h
 
FORMS += \
Forms/mktool.ui \
Forms/dlg_Config.ui \
Forms/dlg_Preferences.ui \
Forms/dlg_Motortest.ui \
Forms/wdg_Settings.ui \
Forms/dlg_LCD.ui
include(global.pri)
/QMK-Groundstation/trunk/qmapcontrol.h
0,0 → 1,15
#include "Classes/QMapControl/mapcontrol.h"
#include "Classes/QMapControl/gps_position.h"
#include "Classes/QMapControl/wmsmapadapter.h"
#include "Classes/QMapControl/geometry.h"
#include "Classes/QMapControl/point.h"
#include "Classes/QMapControl/imagepoint.h"
#include "Classes/QMapControl/circlepoint.h"
#include "Classes/QMapControl/linestring.h"
#include "Classes/QMapControl/gps_position.h"
#include "Classes/QMapControl/osmmapadapter.h"
#include "Classes/QMapControl/maplayer.h"
#include "Classes/QMapControl/geometrylayer.h"
#include "Classes/QMapControl/yahoomapadapter.h"
#include "Classes/QMapControl/googlemapadapter.h"
#include "Classes/QMapControl/googlesatmapadapter.h"
/QMK-Groundstation/trunk/suse.pro
1,79 → 1,8
TEMPLATE = app
include(QMapControl.pri)
 
OBJECTS_DIR = build/.o_unix
UI_DIR = build/.ui
MOC_DIR = build/.moc
RCC_DIR = build/.rcc
DESTDIR = build/bin
 
DEFINES += _TTY_POSIX_
 
LIBS += -lqwt
INCLUDEPATH += $(HOME)/include /usr/include/qwt
 
QT *= gui core network
 
CONFIG += warn_on thread qt
 
TARGET = QMK-Groundstation
 
RESOURCES += MKTool.qrc
 
SOURCES = \
main.cpp \
SerialPort/qextserialbase.cpp \
SerialPort/qextserialport.cpp \
SerialPort/ManageSerialPort.cpp \
Forms/mktool.cpp \
Forms/dlg_Config.cpp \
Forms/dlg_Motortest.cpp \
Forms/dlg_Preferences.cpp \
Forms/wdg_Settings.cpp \
Classes/cSettings.cpp \
Classes/cServer.cpp \
Classes/ToolBox.cpp \
Classes/cAttitude.cpp \
Classes/cSpeedMeter.cpp \
Classes/cQMK_Server.cpp \
Logger/Logger.cpp \
Logger/CSVLogger.cpp \
Forms/dlg_LCD.cpp \
Classes/cConnection.cpp
 
win32:SOURCES += SerialPort/win_qextserialport.cpp
unix:SOURCES += SerialPort/posix_qextserialport.cpp
 
HEADERS = \
global.h \
Parameter_Positions.h \
SerialPort/qextserialbase.h \
SerialPort/qextserialport.h \
SerialPort/ManageSerialPort.h \
Forms/mktool.h \
Forms/dlg_Config.h \
Forms/dlg_Motortest.h \
Forms/dlg_Preferences.h \
Forms/wdg_Settings.h \
Classes/cSettings.h \
Classes/cServer.h \
Classes/ToolBox.h \
Classes/cAttitude.h \
Classes/cSpeedMeter.h \
Classes/cQMK_Server.h \
Logger/Logger.h \
Logger/CSVLogger.h \
Logger/DefaultLogger.h \
Forms/dlg_LCD.h \
Classes/cConnection.h \
typedefs.h
 
win32:HEADERS += SerialPort/win_qextserialport.h
unix:HEADERS += SerialPort/posix_qextserialport.h
 
FORMS += \
Forms/mktool.ui \
Forms/dlg_Config.ui \
Forms/dlg_Preferences.ui \
Forms/dlg_Motortest.ui \
Forms/wdg_Settings.ui \
Forms/dlg_LCD.ui
include(global.pri)
/QMK-Groundstation/trunk/win.pro
1,4 → 1,5
include( ../examples.pri )
include(QMapControl.pri)
 
QWT_ROOT = ../qwt-5.1.1
 
32,69 → 33,4
 
DEFINES += _TTY_WIN_ QWT_DLL QT_DLL _WIN32_
 
QT *= gui core network
 
CONFIG += warn_on thread qt
 
TARGET = QMK-Groundstation
 
RESOURCES += MKTool.qrc
 
SOURCES = \
main.cpp \
SerialPort/qextserialbase.cpp \
SerialPort/qextserialport.cpp \
SerialPort/ManageSerialPort.cpp \
Forms/mktool.cpp \
Forms/dlg_Config.cpp \
Forms/dlg_Motortest.cpp \
Forms/dlg_Preferences.cpp \
Forms/wdg_Settings.cpp \
Classes/cSettings.cpp \
Classes/cServer.cpp \
Classes/ToolBox.cpp \
Classes/cAttitude.cpp \
Classes/cSpeedMeter.cpp \
Classes/cQMK_Server.cpp \
Logger/Logger.cpp \
Logger/CSVLogger.cpp \
Forms/dlg_LCD.cpp \
Classes/cConnection.cpp
 
win32:SOURCES += SerialPort/win_qextserialport.cpp
unix:SOURCES += SerialPort/posix_qextserialport.cpp
 
HEADERS = \
global.h \
Parameter_Positions.h \
SerialPort/qextserialbase.h \
SerialPort/qextserialport.h \
SerialPort/ManageSerialPort.h \
Forms/mktool.h \
Forms/dlg_Config.h \
Forms/dlg_Motortest.h \
Forms/dlg_Preferences.h \
Forms/wdg_Settings.h \
Classes/cSettings.h \
Classes/cServer.h \
Classes/ToolBox.h \
Classes/cAttitude.h \
Classes/cSpeedMeter.h \
Classes/cQMK_Server.h \
Logger/Logger.h \
Logger/CSVLogger.h \
Logger/DefaultLogger.h \
Forms/dlg_LCD.h \
Classes/cConnection.h \
typedefs.h
 
win32:HEADERS += SerialPort/win_qextserialport.h
unix:HEADERS += SerialPort/posix_qextserialport.h
 
FORMS += \
Forms/mktool.ui \
Forms/dlg_Config.ui \
Forms/dlg_Preferences.ui \
Forms/dlg_Motortest.ui \
Forms/wdg_Settings.ui \
Forms/dlg_LCD.ui
include(global.pri)