[Uml-devel] branches/work/isi-umbrello/umbrello/umbrello

Hassan Kouch hkouch at hotmail.com
Wed Mar 21 18:13:44 UTC 2007


SVN commit 645124 by kouch:

pin widget 


 M  +3 -17     pinwidget.cpp  
 M  +10 -14    pinwidget.h  


--- branches/work/isi-umbrello/umbrello/umbrello/pinwidget.cpp #645123:645124
@@ -34,6 +34,7 @@
 PinWidget::PinWidget(UMLView * view, ActivityWidget* a, Uml::IDType id ): UMLWidget(view, id){
     
     init();
+    setZ(50);
     m_pOw[Uml::A] = a;
     int y = getY();
     m_nY = y;
@@ -111,33 +112,18 @@
     return heightA;
 }
 
-// int PinWidget::getMaxY() {
-//     if( !m_pOw[Uml::A]) {
-//         return 0;
-//     }
-// 
-//     int heightA = (int)((ActivityWidget*)m_pOw[Uml::A])->getEndLineY();
-//     int height = heightA;
-//     return (height - this->height());
-// }
-
 void PinWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) { 
     QDomElement PinElement = qDoc.createElement( "pinwidget" );
     UMLWidget::saveToXMI( qDoc, PinElement ); 
-    //PinElement.setAttribute( "pinname", m_Text ); 
-   // PinElement.setAttribute( "documentation", m_Doc ); 
     qElement.appendChild( PinElement ); 
 }
 
+/*
 bool PinWidget::loadFromXMI( QDomElement & qElement ) { 
     if( !UMLWidget::loadFromXMI( qElement ) ) 
         return false; 
-    //m_Text = qElement.attribute( "pinname", "" ); 
-   // m_Doc = qElement.attribute( "documentation", "" );
-    //QString type = qElement.attribute( "objectflowtype", "1" );
-  //  setObjectFlowType( (ObjectFlowType)type.toInt() );
     return true; 
-}
+}*/
 
 
 #include "pinwidget.moc"
--- branches/work/isi-umbrello/umbrello/umbrello/pinwidget.h #645123:645124
@@ -24,11 +24,11 @@
 class UMLOperation;
 
 /**
- * This class is the graphical version of a UML Object Flow.  A ObjectFlowWidget is created
- * by a @ref UMLView.  An ObjectFlowWidget belongs to only one @ref UMLView instance.
+ * This class is the graphical version of a UML Pin.  A pinWidget is created
+ * by a @ref UMLView.  An pinWidget belongs to only one @ref UMLView instance.
  * When the @ref UMLView instance that this class belongs to, it will be automatically deleted.
  *
- * The ObjectFlowWidget class inherits from the @ref UMLWidget class which adds most of the functionality
+ * The pinWidget class inherits from the @ref UMLWidget class which adds most of the functionality
  * to this class.
  *
  * @short  A graphical version of a UML pin.
@@ -41,7 +41,7 @@
 public:
   
     /**
-     * Creates a Object Flow widget.
+     * Creates a Pin widget.
      *
      * @param view              The parent of the widget.
      * @param id                The ID to assign (-1 will prompt a new ID.)
@@ -62,14 +62,7 @@
      * Overrides the standard paint event.
      */
     void draw(QPainter & p, int offsetX, int offsetY);
-/*
-     * Activates a PreconditionWidget.  Connects it m_pOw[] pointer
-     * to UMLObject
-     */
 
-
-//    void activate(IDChangeLog * Log = 0);
-
     /**
      * Returns the minimum height this widget should be set at on
      * a sequence diagrams.  Takes into account the widget positions
@@ -85,15 +78,17 @@
     int getMaxY();
 
     /**
-     * Saves the widget to the <objectflowwidget> XMI element.
+     * Saves the widget to the <pinwidget> XMI element.
      */
     void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
 
     /**
-     * Loads the widget from the <objectflowwidget> XMI element.
+     * Loads the widget from the <pinwidget> XMI element.
      */
-    bool loadFromXMI( QDomElement & qElement );
+//     bool loadFromXMI( QDomElement & qElement );
 
+
+
 protected:
     /**
      * Overrides method from UMLWidget
@@ -112,6 +107,7 @@
      */
    // void slotMenuSelection(int sel);
 
+
 private:
     ActivityWidget * m_pOw[1];
    int m_nY;




More information about the umbrello-devel mailing list