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);