#include "debug.h"
#include "global.h"
#include "mainwindow.h"
+#include "mathconstants.h"
#include "ttedit.h"
#include "vector.h"
}
else
{
- // Figure out the angle between the "zero" vector and the current one,
- // then rotate all points relative to the "zero" vector (done by paint())
+ // Figure out the angle between the "zero" vector and the
+ // current one, then rotate all points relative to the
+ // "zero" vector (done by paint())
// QPoint currentPoint = GetAdjustedMousePosition(event);
Vector currentPoint = Painter::QtToCartesianCoords(Vector(event->x(), event->y()));
Vector v1(rotationZeroPoint.x, rotationZeroPoint.y, 0,
rotationAngle = v2.Angle(v1);
QString s;
- s.sprintf("%.3f degrees", rotationAngle * 180.0 / 3.14159265358979323);
- ((TTEdit *)qApp)->mainWindow->statusBar()->showMessage(s);
+ s.sprintf("%.3f degrees", rotationAngle * RADIANS_TO_DEGREES);
+ Global::mainWindow->statusBar()->showMessage(s);
}
update();
}
update();
- ((TTEdit *)qApp)->mainWindow->statusBar()->showMessage("");
+ Global::mainWindow->statusBar()->showMessage("");
}
// if (tool == TOOLScroll || tool == TOOLZoom)
// ReleaseMouse();
//this is prolly too much
- ((TTEdit *)qApp)->charWnd->MakePathFromPoints(&pts);
- ((TTEdit *)qApp)->charWnd->update();
+ Global::charWnd->MakePathFromPoints(&pts);
+ Global::charWnd->update();
if (tool == TOOLMultiSelect)
{
//Not need but you need to call the base class for some reason??
// event->accept();
update();
- ((TTEdit *)qApp)->charWnd->MakePathFromPoints(&pts);
- ((TTEdit *)qApp)->charWnd->update();
+ Global::charWnd->MakePathFromPoints(&pts);
+ Global::charWnd->update();
}