From 09d8e6633d89a614249ede6864a530cc6bc1d74f Mon Sep 17 00:00:00 2001 From: TurnMeOn Date: Mon, 25 Dec 2017 10:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E5=9D=90=E6=A0=87=20?= =?UTF-8?q?=E6=94=B9=E5=8F=98=E6=97=8B=E8=BD=AC=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- car.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/car.cpp b/car.cpp index 4e13e91..7a3c162 100644 --- a/car.cpp +++ b/car.cpp @@ -30,7 +30,7 @@ Car::Car(ParkingLotManager * manager, QGraphicsItem *parent, int dir, Car::Color } m_pic = m_pic.scaled(M_WID, M_LEN); this->setPixmap(m_pic); - setTransformOriginPoint(M_WID/2, M_LEN/2); //设置旋转中心 + setTransformOriginPoint(0, M_LEN/2); //设置旋转中心 connect(posAni,QPropertyAnimation::finished,this,followPath); connect(this, &Car::queueHead, manager, &ParkingLotManager::requestIn); connect(this, &Car::exit, manager, &ParkingLotManager::leave); @@ -91,7 +91,7 @@ void Car::setPath(Path *path) m_current = m_target; m_target.action = Road::none; this->setPos(m_target.point); - + this->setRotation(m_target.dir+90); } int Car::getNum() @@ -122,7 +122,7 @@ void Car::moveTo(QPointF target) void Car::followPath() { - setRotation(m_target.dir); + setRotation(m_target.dir+90); switch (m_target.action) { case Road::entry :