Files
gcs-nf/opmap/mapwidget/geoFencecircle.h
T
2022-05-11 15:12:08 +08:00

57 lines
1.3 KiB
C++

#ifndef GEOFENCECIRCLE_H
#define GEOFENCECIRCLE_H
#include <QGraphicsItem>
#include <QPainter>
#include <QLabel>
#include "pointlatlng.h"
#include <QObject>
#include "mapgraphicitem.h"
#include "geoFenceitem.h"
namespace mapcontrol {
#ifdef QtopmapWidget
#include <mapwidgetglobal.h>
class OPMAPWIDGETSHARED_EXPORT geoFencecircle : public QObject, public QGraphicsEllipseItem {
#else
class geoFencecircle : public QObject, public QGraphicsEllipseItem {
#endif
Q_OBJECT Q_INTERFACES(QGraphicsItem)
public:
enum { Type = UserType + 11 };
geoFencecircle(int g, int count, int index, bool inclusion, geoFenceitem *center, double radius, QBrush color, MapGraphicItem *map, bool dashed = false, int width = 3);
int type() const;
internals::PointLatLng coord;
int number;
private:
QBrush m_brush;
MapGraphicItem *m_map;
bool m_inclusion = true;
qreal m_radius = 0;//1
int m_group = 0; //2
qreal m_latitude = 0;//5
qreal m_longitide = 0;//6
QLineF line;
geoFenceitem *m_center;
bool dashed;
int lineWidth;
protected:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
public slots:
void refreshLocations();
void waypointdeleted();
void setOpacitySlot(qreal opacity);
};
}
#endif // GEOFENCECIRCLE_H