[Marble-commits] KDE/kdeedu/marble/src/lib/geodata/data

Thibaut Gridel tgridel at free.fr
Fri Jul 16 23:09:33 CEST 2010


SVN commit 1150812 by tgridel:

GeoDataObject: provide parent()

 M  +13 -1     GeoDataObject.cpp  
 M  +6 -0      GeoDataObject.h  


--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataObject.cpp #1150811:1150812
@@ -27,7 +27,8 @@
   public:
     GeoDataObjectPrivate()
         : m_id(0),
-          m_targetId(0)
+          m_targetId(0),
+          m_parent(0)
     {
     }
 
@@ -38,6 +39,7 @@
 
     int  m_id;
     int  m_targetId;
+    GeoDataObject *m_parent;
 };
 
 GeoDataObject::GeoDataObject()
@@ -68,6 +70,16 @@
     return d->nodeType();
 }
 
+GeoDataObject *GeoDataObject::parent() const
+{
+    return d->m_parent;
+}
+
+void GeoDataObject::setParent(GeoDataObject *parent)
+{
+    d->m_parent = parent;
+}
+
 int GeoDataObject::id() const
 {
     return d->m_id;
--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataObject.h #1150811:1150812
@@ -57,6 +57,12 @@
     /// Provides type information for downcasting a GeoNode
     virtual QString nodeType() const;
 
+    /// Provides the parent of the object in GeoDataContainers
+    virtual GeoDataObject *parent() const;
+
+    /// Sets the parent of the object
+    virtual void setParent(GeoDataObject *parent);
+
     /**
      * @brief Get the id of the object.
      */


More information about the Marble-commits mailing list