b
This commit is contained in:
@@ -76,11 +76,14 @@ class OPMAPWIDGETSHARED_EXPORT WayPointItem : public QObject, public QGraphicsIt
|
||||
#else
|
||||
class WayPointItem : public QObject, public QGraphicsItem {
|
||||
#endif
|
||||
|
||||
Q_OBJECT Q_INTERFACES(QGraphicsItem)
|
||||
public:
|
||||
enum { Type = UserType + 1 };
|
||||
enum wptype { absolute, relative };
|
||||
|
||||
|
||||
//一个航点的属性
|
||||
typedef struct {
|
||||
typedef struct{
|
||||
float param1;
|
||||
float param2;
|
||||
float param3;
|
||||
@@ -88,10 +91,8 @@ class WayPointItem : public QObject, public QGraphicsItem {
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
float z;
|
||||
|
||||
uint16_t seq;
|
||||
uint16_t group;//多组航线
|
||||
|
||||
uint16_t group;
|
||||
uint16_t command;
|
||||
uint8_t target_system;
|
||||
uint8_t target_component;
|
||||
@@ -99,11 +100,9 @@ class WayPointItem : public QObject, public QGraphicsItem {
|
||||
uint8_t current;
|
||||
uint8_t autocontinue;
|
||||
uint8_t mission_type;
|
||||
|
||||
}_property;
|
||||
|
||||
public:
|
||||
enum { Type = UserType + 1 };
|
||||
enum wptype { absolute, relative };
|
||||
|
||||
|
||||
WayPointItem(internals::PointLatLng const & coord, int const & altitude, MapGraphicItem *map, wptype type = absolute);
|
||||
@@ -117,15 +116,10 @@ public:
|
||||
}
|
||||
void SetDescription(QString const & value);
|
||||
|
||||
|
||||
WayPointItem(const double &lat, const double &lng, const float &alt, MapGraphicItem *map);
|
||||
|
||||
|
||||
bool Reached()
|
||||
{
|
||||
return reached;
|
||||
}
|
||||
|
||||
void SetReached(bool const & value);
|
||||
|
||||
int Number()
|
||||
@@ -136,7 +130,6 @@ public:
|
||||
{
|
||||
return property.seq + 1;
|
||||
}
|
||||
|
||||
void SetNumber(int const & value);
|
||||
|
||||
internals::PointLatLng Coord()
|
||||
@@ -169,11 +162,18 @@ public:
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
QWidget *widget);
|
||||
QPixmap picture;
|
||||
QString customString()
|
||||
{
|
||||
return myCustomString;
|
||||
}
|
||||
void setCustomString(QString arg)
|
||||
{
|
||||
myCustomString = arg;
|
||||
}
|
||||
void setFlag(GraphicsItemFlag flag, bool enabled);
|
||||
~WayPointItem();
|
||||
|
||||
static int snumber;
|
||||
|
||||
void setWPType(wptype type);
|
||||
wptype WPType()
|
||||
{
|
||||
@@ -271,6 +271,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
@@ -289,12 +290,19 @@ private:
|
||||
|
||||
distBearingAltitude relativeCoord;
|
||||
bool reached;
|
||||
QString description;
|
||||
bool shownumber;
|
||||
bool isDragging;
|
||||
float altitude;
|
||||
MapGraphicItem *map;
|
||||
int number;
|
||||
bool isMagic;
|
||||
|
||||
QGraphicsSimpleTextItem *numberI;
|
||||
QTransform transf;
|
||||
HomeItem *myHome;
|
||||
wptype myType;
|
||||
QString myCustomString;
|
||||
|
||||
|
||||
double Elevation = 0;
|
||||
@@ -328,6 +336,7 @@ public slots:
|
||||
|
||||
void setPosition(QPointF p);
|
||||
|
||||
|
||||
void WPDeleted(int const & number, WayPointItem *waypoint);
|
||||
void WPRenumbered(int const & oldnumber, int const & newnumber, WayPointItem *waypoint);
|
||||
void WPInserted(int const & number, WayPointItem *waypoint);
|
||||
|
||||
Reference in New Issue
Block a user