1 // AirportDiagram.hxx - part of GUI launcher using Qt5
3 // Written by James Turner, started December 2014.
5 // Copyright (C) 2014 James Turner <zakalawe@mac.com>
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #include <QPainterPath>
24 #include <Airports/airports_fwd.hxx>
25 #include <simgear/math/sg_geodesy.hxx>
27 class AirportDiagram : public QWidget
30 AirportDiagram(QWidget* pr);
32 void setAirport(FGAirportRef apt);
34 void addRunway(FGRunwayRef rwy);
35 void addParking(FGParking* park);
37 virtual void paintEvent(QPaintEvent* pe);
38 // wheel event for zoom
44 void extendBounds(const QPointF& p);
45 QPointF project(const SGGeod& geod) const;
48 void buildPavements();
50 FGAirportRef m_airport;
51 SGGeod m_projectionCenter;
61 QList<RunwayData> m_runways;
67 bool operator<(const TaxiwayData& other) const
69 return widthM < other.widthM;
73 QList<TaxiwayData> m_taxiways;
74 QList<QPainterPath> m_pavements;