[Kst] extragear/graphics/kst/src/libkstapp
George Staikos
staikos at kde.org
Mon Jul 31 23:56:33 CEST 2006
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);
More information about the Kst
mailing list