[Kst] extragear/graphics/kst/src/libkstapp

George Staikos staikos at kde.org
Thu May 11 10:04:46 CEST 2006


SVN commit 539616 by staikos:

canParent() is unneeded since we already have it in _container.   Make it use
that member, make it non-virtual, rename it to isContainer(), and make it const.


 M  +0 -5      kstviewarrow.cpp  
 M  +1 -2      kstviewarrow.h  
 M  +3 -2      kstviewmanager_i.cpp  
 M  +2 -2      kstviewobject.cpp  
 M  +1 -1      kstviewobject.h  


--- trunk/extragear/graphics/kst/src/libkstapp/kstviewarrow.cpp #539615:539616
@@ -86,11 +86,6 @@
 }
 
 
-bool KstViewArrow::canParent() {
-  return false;
-}
-
-
 void KstViewArrow::paintArrow(KstPainter& p, const QPoint& to, const QPoint &from, int w) {
   double deltax = _toArrowScaling * 2.0 * double(w);
   double theta = atan2(double(from.y() - to.y()), double(from.x() - to.x())) - M_PI / 2.0;
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewarrow.h #539615:539616
@@ -40,8 +40,7 @@
     QMap<QString, QVariant > widgetHints(const QString& propertyName) const;
 
     virtual KstViewObject* copyObjectQuietly(KstViewObject& parent, const QString& name = QString::null) const;
-    virtual bool canParent();
-        
+
     void paintSelf(KstPainter& p, const QRegion& bounds);
     void paintArrow(KstPainter& p, const QPoint& to, const QPoint &from, int w);
     // true if either end has an arrow 
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewmanager_i.cpp #539615:539616
@@ -2,7 +2,8 @@
                        kstviewmanager_i.cpp  -  Part of KST
                              -------------------
     begin                :
-    copyright            : (C) 2003 The University of British Columbia
+    copyright            : (C) 2003 The University of Toronto
+                           (C) 2003-2006 The University of British Columbia
     email                :
  ***************************************************************************/
 
@@ -165,7 +166,7 @@
     KstViewObject *obj = viewObject(&win);
     
     if (mime->provides(PlotMimeSource::mimeType())) {
-      if (obj && obj->canParent()) {
+      if (obj && obj->isContainer()) {
         retVal = true;
       }
     } else {     
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewobject.cpp #539615:539616
@@ -1734,8 +1734,8 @@
 }
 
 
-bool KstViewObject::canParent() {
-  return true;
+bool KstViewObject::isContainer() const {
+  return _container;
 }
 
 
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewobject.h #539615:539616
@@ -158,7 +158,7 @@
     virtual bool followsFlow() const;
 
     virtual void updateSelection(const QRect& region);
-    virtual bool canParent();
+    bool isContainer() const;
     
     KstViewObjectPtr parent() const;
 


More information about the Kst mailing list