[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/graphics/kst/src/libkstapp
From:       George Staikos <staikos () kde ! org>
Date:       2006-07-31 21:56:33
Message-ID: 1154382993.497362.22927.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 568356 by staikos:

add a topLevelParent() call for Barth


 M  +14 -0     kstviewobject.cpp  
 M  +1 -0      kstviewobject.h  


--- trunk/extragear/graphics/kst/src/libkstapp/kstviewobject.cpp #568355:568356
@@ -2010,5 +2010,19 @@
   return static_cast<KstViewObject*>(_parent);
 }
 
+
+KstViewObjectPtr KstViewObject::topLevelParent() const {
+  KstViewObject *p = _parent;
+  if (!p) {
+    return 0L;
+  }
+
+  while (p->_parent) {
+    p = p->_parent;
+  }
+    
+  return static_cast<KstViewObject*>(p);
+}
+
 #include "kstviewobject.moc"
 // vim: ts=2 sw=2 et
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewobject.h #568355:568356
@@ -159,6 +159,7 @@
     bool isContainer() const;
     
     KstViewObjectPtr parent() const;
+    KstViewObjectPtr topLevelParent() const;
 
     void recursively(void (KstViewObject::*)(), bool self = false);
     template<class T, class U> void recursively(void (U::*)(T), T, bool self = false);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic