fixed some issues

added new tools for creating APs, Beacons, GTP, POI, Fingerprints
fixed selection issue
changed new-element creation
added missing layer parameters
This commit is contained in:
2017-06-01 16:26:09 +02:00
parent 489a64fd69
commit 7a23001b82
29 changed files with 763 additions and 265 deletions

View File

@@ -120,10 +120,10 @@ public:
p->drawImage(s.xms(pt.x)-img.width()/2, s.yms(pt.y)-img.height()/2, img);
}
void drawLength(Point2 p1, Point2 p2, const float len) {
void drawLength(Point2 p1, Point2 p2, const float len, const float offset = 0) {
if (p1.x < p2.x) {swap(p1, p2);}
const Point2 center_m = (p1 + p2) / 2;
Point2 dir_px = (p2 - p1).perpendicular().normalized() * 5;
Point2 dir_px = (p2 - p1).perpendicular().normalized() * (5+offset);
if (dir_px.x <= 0) {dir_px = -dir_px;}
const Point2 pos_m = center_m + dir_px / getScaler().getScale();
char buf[64]; sprintf(buf, "%.1f", len);
@@ -138,6 +138,8 @@ public:
void setPen(const Qt::PenStyle& pen) {p->setPen(pen); }
const QPen& getPen() {return p->pen();}
template <typename Pen, typename Brush> void setPenBrush(const Pen& pen, const Brush& brush) {setPen(pen); setBrush(brush);}