added more cpp files for faster compile speeds

removed many obsolte elements
many improvements and fixes
This commit is contained in:
2018-07-20 15:00:43 +02:00
parent 7ee4e122e8
commit 5d002c3f2b
43 changed files with 1257 additions and 1361 deletions

View File

@@ -28,12 +28,13 @@ void MV2DElementFloorObstacleDoor::paint(Painter& p) {
return;
}
// selected endpoints?
if (hasFocus()) {
p.setPenBrush(Qt::NoPen, CFG::SEL_COLOR);
if (selectedUserIdx == 0) {p.drawCircle(fo->from);}
if (selectedUserIdx == 1) {p.drawCircle(fo->to);}
}
// DEPRECATED
// // selected endpoints?
// if (hasFocus()) {
// p.setPenBrush(Qt::NoPen, CFG::SEL_COLOR);
// if (selectedUserIdx == 0) {p.drawCircle(fo->from);}
// if (selectedUserIdx == 1) {p.drawCircle(fo->to);}
// }
QPen pen;
pen.setColor(QColor(0.5,0.5,0.5));
@@ -80,13 +81,13 @@ void MV2DElementFloorObstacleDoor::paint(Painter& p) {
}
// available endpoints
if (hasFocus()) {
p.setPenBrush(Qt::black, Qt::NoBrush);
p.drawCircle(fo->from);
p.drawCircle(fo->to);
}
// DEPRECATED
// // available endpoints
// if (hasFocus()) {
// p.setPenBrush(Qt::black, Qt::NoBrush);
// p.drawCircle(fo->from);
// p.drawCircle(fo->to);
// }
// obstacle length
if (hasFocus()) {
@@ -129,10 +130,13 @@ std::vector<MoveableNode> MV2DElementFloorObstacleDoor::getMoveableNodes() const
}
void MV2DElementFloorObstacleDoor::onNodeMoved(MapView2D* v, const int userIdx, const Point2 newPos) {
(void) userIdx;
(void) newPos;
emit v->onElementChange(this);
}
void MV2DElementFloorObstacleDoor::onNodeMove(MapView2D* v, const int userIdx, const Point2 newPos) {
(void) v;
switch (userIdx) {
case 0: fo->from = newPos; break;
case 1: fo->to = newPos; break;