]> git.mxchange.org Git - flightgear.git/blobdiff - src/Autopilot/route_mgr.hxx
Merge branch 'jmt/gpswidget'
[flightgear.git] / src / Autopilot / route_mgr.hxx
index 2cc6b42f99882356408f1bab067a5ebbac182c4d..a8168924807a5ec582759dfd63becd271d527ce6 100644 (file)
@@ -32,6 +32,9 @@
 class SGRoute;
 class SGPath;
 
+class FGAirport;
+typedef SGSharedPtr<FGAirport> FGAirportRef;
+
 /**
  * Top level route manager class
  * 
@@ -44,7 +47,9 @@ private:
     SGRoute* _route;
     time_t _takeoffTime;
     time_t _touchdownTime;
+    FGAirportRef _departure;
+    FGAirportRef _destination;
+    
     // automatic inputs
     SGPropertyNode_ptr lon;
     SGPropertyNode_ptr lat;
@@ -70,6 +75,8 @@ private:
     
     
     SGPropertyNode_ptr _pathNode;
+    SGPropertyNode_ptr _currentWpt;
+    
     
     /** 
      * Signal property to notify people that the route was edited
@@ -106,6 +113,12 @@ private:
      */
     SGWayPoint* make_waypoint(const string& target);
     
+    /**
+     * Helper to keep various pieces of state in sync when the SGRoute is
+     * modified (waypoints added, inserted, removed). Notably, this fires the
+     * 'edited' signal.
+     */
+    void waypointsChanged();
     
     void update_mirror();
     
@@ -121,6 +134,16 @@ private:
      * Returns true if we have.
      */
     bool checkFinished();
+    
+// tied getters and setters
+    const char* getDepartureICAO() const;
+    const char* getDepartureName() const;
+    void setDepartureICAO(const char* aIdent);
+    
+    const char* getDestinationICAO() const;
+    const char* getDestinationName() const;
+    void setDestinationICAO(const char* aIdent);
+    
 public:
 
     FGRouteMgr();
@@ -171,6 +194,11 @@ public:
      */
     void jumpToIndex(int index);
     
+    /**
+     * 
+     */
+    void setWaypointTargetAltitudeFt(unsigned int index, int altFt);
+    
     void saveRoute();
     void loadRoute();
 };