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

@@ -44,27 +44,31 @@ public:
if (selectedUserIdx == 1) {p.drawCircle(fo->to);}
}
// convert wall's thickness from meter to pixels
const float thickness_px = p.s.ms(fo->thickness_m);
p.setPenBrush(MapElementHelper::getPen(fo->material, fo->type, hasFocus()), Qt::NoBrush);
// remember the old pen
QPen pen = p.getPen();
// see notes within MapElementHelper!
// lines only get thicker, but not longer!
p.setPenBrush(MapElementHelper::getPen(fo->material, fo->type, hasFocus(), thickness_px), Qt::NoBrush);
p.drawLine(fo->from, fo->to);
// // door?
// if (fo->type == Floorplan::ObstacleType::DOOR) {
// paintDoor(p);
// } else {
// p.setPenBrush(MapElementHelper::getPen(fo->material, fo->type, hasFocus()), Qt::NoBrush);
// p.drawLine(fo->from, fo->to);
// }
// reset the old pen
p.setPen(pen);
// available endpoints
if (hasFocus()) {
p.setPenBrush(Qt::black, Qt::NoBrush);
p.drawCircle(fo->from);
p.drawCircle(fo->to);
// obstacle length
p.setPenBrush(Qt::black, Qt::NoBrush);
p.drawLength(fo->from, fo->to, fo->from.getDistance(fo->to));
p.drawLength(fo->from, fo->to, fo->from.getDistance(fo->to), thickness_px/2);
} else {
//p.setPenBrush(Qt::NoPen, Qt::black);