From 5317083b36d6ca9d119751c4e34ed6b26b679d56 Mon Sep 17 00:00:00 2001 From: w-mj Date: Fri, 22 Dec 2017 09:15:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9B=E7=A5=96=E4=B8=8D=E5=87=BA=E8=AD=A6?= =?UTF-8?q?=E5=91=8A=E5=95=A6=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataStructureProject.pro | 3 ++- ParkingSpaceWidget.h | 1 - parkingLotManager.cpp | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/DataStructureProject.pro b/DataStructureProject.pro index f817db9..a8c944e 100644 --- a/DataStructureProject.pro +++ b/DataStructureProject.pro @@ -17,9 +17,10 @@ TEMPLATE = app # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS +QMAKE_CXXFLAGS += -Wno-comment # 防止佛祖出警告 # You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. +# In order to do so, the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 diff --git a/ParkingSpaceWidget.h b/ParkingSpaceWidget.h index f63dc31..d900775 100644 --- a/ParkingSpaceWidget.h +++ b/ParkingSpaceWidget.h @@ -4,7 +4,6 @@ #include #include #include "ParkingLotWidget.h" -#include "MyEvent.h" class ParkingLotWidget; class ParkingSpaceWidget: public QWidget diff --git a/parkingLotManager.cpp b/parkingLotManager.cpp index 73a6027..e52fe87 100644 --- a/parkingLotManager.cpp +++ b/parkingLotManager.cpp @@ -2,7 +2,6 @@ #include "ParkingLotWidget.h" #include "ParkingSpaceWidget.h" #include "path.h" -#include "MyEvent.h" #include #include #include @@ -100,7 +99,7 @@ ParkingLotGraph::Node::Type getType(int n) { void ParkingLotManager::drawPath(int n1, int n2) { - Path *p = m_graph[1]->finaPath(getType(n1), n1, getType(n2), n2); + Path *p = m_graph[m_current_floor]->finaPath(getType(n1), n1, getType(n2), n2); for(int i = 1; i < p->pointsCount(); i++) { QLineF line(p->getPoint(i-1).point, p->getPoint(i).point); m_scene->addLine(line);