gridSpacing(12.0), collided(false), rotateTool(false), rx(150.0), ry(150.0),
scrollDrag(false), addLineTool(false), addCircleTool(false),
addDimensionTool(false),
- selectionInProgress(false),
+// selectionInProgress(false),
toolAction(NULL)
{
document.isTopLevelContainer = true;
if (toolAction)
toolAction->Draw(&painter);
- if (selectionInProgress)
+ if (Object::selectionInProgress)
{
// painter.SetPen(QPen(Qt::green, 1.0, Qt::SolidLine));
painter.SetPen(QPen(QColor(255, 127, 0, 255)));
// painter.SetBrush(QBrush(Qt::NoBrush));
painter.SetBrush(QBrush(QColor(255, 127, 0, 100)));
- painter.DrawRect(selection);
+ painter.DrawRect(Object::selection);
}
}
// Didn't hit any object and not using a tool, so do a selection rectangle
if (!(collided || toolAction))
{
- selectionInProgress = true;
- selection.setTopLeft(QPointF(point.x, point.y));
- selection.setBottomRight(QPointF(point.x, point.y));
+ Object::selectionInProgress = true;
+ Object::selection.setTopLeft(QPointF(point.x, point.y));
+ Object::selection.setBottomRight(QPointF(point.x, point.y));
}
}
else if (event->button() == Qt::MiddleButton)
void DrawingView::mouseMoveEvent(QMouseEvent * event)
{
Vector point = Painter::QtToCartesianCoords(Vector(event->x(), event->y()));
- selection.setBottomRight(QPointF(point.x, point.y));
+ Object::selection.setBottomRight(QPointF(point.x, point.y));
if (event->buttons() & Qt::MiddleButton)
{
//changed...
document.PointerMoved(point);
- if (document.NeedsUpdate() || selectionInProgress)
+ if (document.NeedsUpdate() || Object::selectionInProgress)
update();
if (toolAction)
if (toolAction)
toolAction->MouseReleased();
- if (selectionInProgress)
+ if (Object::selectionInProgress)
{
// Select all the stuff inside of selection
- selectionInProgress = false;
+ Object::selectionInProgress = false;
}
}
else if (event->button() == Qt::MiddleButton)