[Uml-devel] KDE/kdesdk/umbrello/umbrello/widgets

Andi Fischer andi.fischer at hispeed.ch
Wed Mar 7 18:54:39 UTC 2012


SVN commit 1284126 by fischer:

getPen() renamed to pen(). Some spaces removed.

 M  +7 -8      associationline.cpp  
 M  +1 -1      associationline.h  
 M  +1 -1      associationwidget.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationline.cpp #1284125:1284126
@@ -101,7 +101,6 @@
 {
 }
 
-
 /**
  * Returns the point at the point index.
  */
@@ -193,7 +192,7 @@
         UMLSceneLineItem * line = new UMLSceneLineItem( getScene() );
         line -> setZ( -2 );
         line -> setPoints( point.x(), point.y(), ep.x(), ep.y() );
-        line -> setPen( getPen() );
+        line->setPen( pen() );
         line -> setVisible( true );
         m_LineList.insert( 1, line );
         if (!bLoading)
@@ -208,7 +207,7 @@
         UMLSceneLineItem * line = new UMLSceneLineItem( getScene() );
         line -> setPoints( point.x(), point.y(), ep.x(), ep.y() );
         line -> setZ( -2 );
-        line -> setPen( getPen() );
+        line->setPen( pen() );
         line -> setVisible( true );
         m_LineList.append( line );
         if (!bLoading)
@@ -222,7 +221,7 @@
     UMLSceneLineItem * line = new UMLSceneLineItem(getScene() );
     line -> setPoints( point.x(), point.y(), ep.x(), ep.y() );
     line -> setZ( -2 );
-    line -> setPen( getPen() );
+    line->setPen( pen() );
     line -> setVisible( true );
     m_LineList.insert( pointIndex, line );
     if (!bLoading)
@@ -399,7 +398,7 @@
         UMLSceneLineItem * line = new UMLSceneLineItem(getScene() );
         line -> setPoints( start.x(), start.y(),end.x(),end.y() );
         line -> setZ( -2 );
-        line -> setPen( getPen() );
+        line->setPen( pen() );
         line -> setVisible( true );
         m_LineList.append( line );
         return true;
@@ -495,7 +494,7 @@
 /**
  * Returns the type of pen to use depending on the type of Association.
  */
-QPen AssociationLine::getPen()
+QPen AssociationLine::pen()
 {
     Uml::AssociationType type = getAssocType();
     if( type == Uml::AssociationType::Dependency || type == Uml::AssociationType::Realization || type == Uml::AssociationType::Anchor )
@@ -657,7 +656,7 @@
     QList<UMLSceneLineItem*>::Iterator end = m_LineList.end();
 
     for( ; it != end; ++it )
-        (*it) -> setPen( getPen() );
+        (*it)->setPen( pen() );
 
     delete m_pClearPoly;
     m_pClearPoly = 0;
@@ -752,7 +751,7 @@
     for (int i = 0; i < count ; i++) {
         UMLSceneLineItem *line = m_LineList.at(i);
         line -> setCanvas( canvas );
-        line -> setPen( getPen() );
+        line->setPen( pen() );
     }
 }
 
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationline.h #1284125:1284126
@@ -66,7 +66,7 @@
     bool loadFromXMI( QDomElement & qElement );
     void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
 
-    QPen getPen();
+    QPen pen();
 
     QColor lineColor();
     void setLineColor( const QColor &color );
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationwidget.cpp #1284125:1284126
@@ -3839,7 +3839,7 @@
     int pos = m_associationLine->count();
 
     /* the lines have the width of the pen */
-    uint pen_width = m_associationLine->getPen().width();
+    uint pen_width = m_associationLine->pen().width();
 
     if (pen_width == 0)
         pen_width = 1; // width must be at least 1




More information about the umbrello-devel mailing list