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

List:       kde-commits
Subject:    kdesdk/umbrello/umbrello/diagram
From:       Luis De la Parra Blum <lparrab () gmx ! net>
Date:       2003-03-31 23:00:23
[Download RAW message or body]

CVS commit by luis: 

Revert change to QList<QPoint>.
using qpointarray instead.

minor fixes.


  M +9 -7      diagram.cpp   1.9
  M +2 -1      diagram.h   1.6


--- kdesdk/umbrello/umbrello/diagram/diagram.h  #1.5:1.6
@@ -25,4 +25,5 @@ class QDropEvent;
 class QDragEnterEvent;
 class QPopupMenu;
+class QPointArray;
 
 namespace Umbrello{
@@ -77,5 +78,5 @@ public:
          * 
          */
-        void createAssociationWidget( UMLAssociation *assoc, UMLWidget *wA, \
UMLWidget *wB, const QPtrList<QPoint> &path ); +        void createAssociationWidget( \
UMLAssociation *assoc, UMLWidget *wA, UMLWidget *wB, const QPointArray &path );  
         void fillContextMenu(QPopupMenu &menu) const;

--- kdesdk/umbrello/umbrello/diagram/diagram.cpp  #1.8:1.9
@@ -35,5 +35,5 @@
 #include <algorithm>
 #include <list>
-
+#include <qpointarray.h>
 #include <qpopupmenu.h>
 #include <qcolor.h>
@@ -153,13 +153,15 @@ void Diagram::createUMLWidget( UMLObject
 }
 
-void Diagram::createAssociationWidget( UMLAssociation *assoc,UMLWidget *wA, \
UMLWidget *wB, const QPtrList<QPoint> &path ) +void Diagram::createAssociationWidget( \
UMLAssociation *assoc,UMLWidget *wA, UMLWidget *wB, const QPointArray &path )  {
-        DiagramElement *w;
-        if( ( w = WidgetFactory::createAssociationWidget( assoc, wA, wB, path, this \
                ) ) )
-        {
+        DiagramElement *w = WidgetFactory::createAssociationWidget( assoc, wA, wB, \
path, this ); +        if( w )
+        {kdDebug()<<"showing association"<<endl;
+                w->moveAbs(wA->x(), wA->y());
                 w->show();
                 update();
                 emit modified( );
         }
+        else kdDebug()<<"widget factory regturned null assoc widget"<<endl;
 
 }
@@ -182,5 +184,5 @@ void Diagram::createCustomWidget( int ty
 
 bool Diagram::acceptType(const std::type_info &type)
-{kdDebug()<<"accept? "<<type.name()<<endl;
+{//kdDebug()<<"accept? "<<type.name()<<endl;
 return (find((allowedTypes[m_type]).begin(),
                      (allowedTypes[m_type]).end(),
@@ -207,5 +209,5 @@ void Diagram::dropEvent(QDropEvent *e)
         if(!o)
         {
-                kdDebug()<<"object with id = "<<data->getID()<<" not found in \
document"<<endl; +                kdWarning()<<"object with id = "<<data->getID()<<" \
not found in document"<<endl;  return;
         }


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

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