修正gear

This commit is contained in:
hm
2022-07-29 01:43:16 +08:00
parent 3985416e2c
commit 6ce3fdd7ac
75 changed files with 11009 additions and 1716 deletions
+83
View File
@@ -0,0 +1,83 @@
#ifndef GEOFENCEITEMLINE_H
#define GEOFENCEITEMLINE_H
#include <QGraphicsItem>
#include <QPainter>
#include <QLabel>
#include "pointlatlng.h"
#include "mapgraphicitem.h"
#include "waypointitem.h"
#include <QObject>
#include <QPoint>
#include "geoFenceitem.h"
namespace mapcontrol {
#ifdef QtopmapWidget
#include <mapwidgetglobal.h>
class OPMAPWIDGETSHARED_EXPORT geoFenceitemline : public QObject, public QGraphicsLineItem {
#else
class geoFenceitemline : public QObject, public QGraphicsLineItem {
#endif
Q_OBJECT Q_INTERFACES(QGraphicsItem)
public:
enum { Type = UserType + 12 };
geoFenceitemline(geoFenceitem *from, geoFenceitem *to, MapGraphicItem *map, QColor color = Qt::green, bool dashed = false, int width = 3);
int type() const;
QPainterPath shape() const;
void setColor(const QColor &color)
{
myColor = color;
}
void setEdit(bool value);
bool Edit(void)
{
return isEdit;
}
private:
QGraphicsItem *source;
QGraphicsItem *destination;
MapGraphicItem *my_map;
QPolygonF arrowHead;
QColor myColor;
bool dashed;
int lineWidth;
protected:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
public slots:
QGraphicsItem *WPLineFrom(void)
{
return this->source;
}
QGraphicsItem *WPLineTo(void)
{
return this->destination;
}
void WPLinedelete(geoFenceitem *from, geoFenceitem *to);
void refreshLocations();
void waypointdeleted();
void setOpacitySlot(qreal opacity);
private:
bool isEdit = false;
};
}
#endif