修正gear
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user