x-y richtung eingezeichnet

git-svn-id: http://svn.lsim.tuxzone.org/trunk@43 4bec179b-ab65-46ed-a5f8-55b8b5c735d0
This commit is contained in:
catdog2
2009-01-10 15:17:44 +00:00
parent d9d19dc78d
commit 96881b3214

View File

@@ -63,9 +63,22 @@ SimulScene::SimulScene ( QObject* parent ) : QGraphicsScene ( parent ) {
setFlightPathVisible();
/*addLine(0,-298,0,298,QPen(Qt::green, 1, Qt::SolidLine) )->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
addLine(-398,0,398,0,QPen(Qt::green, 1, Qt::SolidLine) )->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
int coordinateLenth = 100;
addLine(0,0,coordinateLenth,0,QPen(Qt::darkMagenta, 1, Qt::SolidLine) )->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
addLine(coordinateLenth - 10,-5,coordinateLenth,0,QPen(Qt::darkMagenta, 1, Qt::SolidLine) )->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
addLine(coordinateLenth - 10,5,coordinateLenth,0,QPen(Qt::darkMagenta, 1, Qt::SolidLine) )->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
QGraphicsSimpleTextItem* xText = addSimpleText("x");
xText->setPos(coordinateLenth - 18, -16);
xText -> setPen(QPen(Qt::darkMagenta, 1, Qt::SolidLine));
addLine(0,0,0,coordinateLenth,QPen(Qt::darkMagenta , 1, Qt::SolidLine) )->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
addLine(-5,coordinateLenth - 10,0,coordinateLenth,QPen(Qt::darkMagenta, 1, Qt::SolidLine) )->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
addLine(5,coordinateLenth - 10,0,coordinateLenth,QPen(Qt::darkMagenta, 1, Qt::SolidLine) )->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
QGraphicsSimpleTextItem* yText = addSimpleText("y");
yText->setPos(-11,coordinateLenth - 27);
yText -> setPen(QPen(Qt::darkMagenta, 1, Qt::SolidLine));
/*
for (int i = -39; i< 39; ++i) {
if(i!=0) {
QGraphicsLineItem *line = addLine(i*10,-298,i*10,298,QPen(Qt::lightGray, 1, Qt::DotLine) );