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

Ralf Habacker ralf.habacker at gmail.com
Fri Feb 3 16:43:58 UTC 2012


SVN commit 1277944 by habacker:

Renamed UMLSceneLine to UMLSceneLineItem to avoid collidates with basic QLine type.

 M  +2 -2      toolbarstatearrow.cpp  
 M  +1 -1      toolbarstatearrow.h  
 M  +1 -1      toolbarstateassociation.cpp  
 M  +1 -1      toolbarstateassociation.h  
 M  +2 -2      toolbarstatemessages.cpp  
 M  +1 -1      toolbarstatemessages.h  
 M  +2 -1      umlscene.h  
 M  +28 -28    widgets/associationline.cpp  
 M  +1 -1      widgets/associationline.h  
 M  +1 -1      widgets/associationwidget.cpp  
 M  +1 -1      widgets/associationwidget.h  
 M  +4 -4      widgets/seqlinewidget.cpp  
 M  +3 -3      widgets/seqlinewidget.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/toolbarstatearrow.cpp #1277943:1277944
@@ -84,7 +84,7 @@
         m_startPosition = m_pMouseEvent->pos();
 
         for (int i = 0; i < 4; i++) {
-            UMLSceneLine* line = new UMLSceneLine(m_pUMLScene->canvas());
+            UMLSceneLineItem* line = new UMLSceneLineItem(m_pUMLScene->canvas());
             line->setPoints(m_pMouseEvent->x(), m_pMouseEvent->y(),
                             m_pMouseEvent->x(), m_pMouseEvent->y());
             line->setPen(QPen(QColor("grey"), 0, Qt::DotLine));
@@ -178,7 +178,7 @@
 void ToolBarStateArrow::mouseMoveEmpty()
 {
     if (m_selectionRect.count() == 4) {
-        UMLSceneLine* line = m_selectionRect.at(0);
+        UMLSceneLineItem* line = m_selectionRect.at(0);
         line->setPoints(m_startPosition.x(), m_startPosition.y(),
                         m_pMouseEvent->x(), m_startPosition.y());
 
--- trunk/KDE/kdesdk/umbrello/umbrello/toolbarstatearrow.h #1277943:1277944
@@ -56,7 +56,7 @@
     /**
      * The selection rectangle that contains the four lines of its borders.
      */
-    QList<UMLSceneLine *> m_selectionRect;
+    QList<UMLSceneLineItem *> m_selectionRect;
 
     /**
      * The start position of the selection rectangle.
--- trunk/KDE/kdesdk/umbrello/umbrello/toolbarstateassociation.cpp #1277943:1277944
@@ -186,7 +186,7 @@
 
     m_firstWidget = widget;
 
-    m_associationLine = new UMLSceneLine(m_pUMLScene->canvas());
+    m_associationLine = new UMLSceneLineItem(m_pUMLScene->canvas());
     m_associationLine->setPoints(pos.x(), pos.y(), pos.x(), pos.y());
     m_associationLine->setPen(QPen(m_pUMLScene->lineColor(), m_pUMLScene->lineWidth(), Qt::DashLine));
 
--- trunk/KDE/kdesdk/umbrello/umbrello/toolbarstateassociation.h #1277943:1277944
@@ -77,7 +77,7 @@
      * The association line shown while the first widget is selected and the
      * second one wasn't selected yet.
      */
-    UMLSceneLine* m_associationLine;
+    UMLSceneLineItem* m_associationLine;
 
 };
 
--- trunk/KDE/kdesdk/umbrello/umbrello/toolbarstatemessages.cpp #1277943:1277944
@@ -198,7 +198,7 @@
         xclick = m_pMouseEvent->x();
         yclick = m_pMouseEvent->y();
 
-        m_messageLine = new UMLSceneLine(m_pUMLScene->canvas());
+        m_messageLine = new UMLSceneLineItem(m_pUMLScene->canvas());
         m_messageLine->setPoints(m_pMouseEvent->x(), m_pMouseEvent->y(), m_pMouseEvent->x(), m_pMouseEvent->y());
         m_messageLine->setPen(QPen(m_pUMLScene->lineColor(), m_pUMLScene->lineWidth(), Qt::DashLine));
 
@@ -241,7 +241,7 @@
         UMLApp::app()->document()->setModified();
     }
     else {
-        m_messageLine = new UMLSceneLine(m_pUMLScene->canvas());
+        m_messageLine = new UMLSceneLineItem(m_pUMLScene->canvas());
         m_messageLine->setPoints(m_pMouseEvent->x(), m_pMouseEvent->y(), m_pMouseEvent->x(), m_pMouseEvent->y());
         m_messageLine->setPen(QPen(m_pUMLScene->lineColor(), m_pUMLScene->lineWidth(), Qt::DashLine));
 
--- trunk/KDE/kdesdk/umbrello/umbrello/toolbarstatemessages.h #1277943:1277944
@@ -98,7 +98,7 @@
      * The message line shown while the first widget is selected and the
      * second one wasn't selected yet.
      */
-    UMLSceneLine* m_messageLine;
+    UMLSceneLineItem* m_messageLine;
 
     /**
      * If there is a current widget, it is true if the press event happened on
--- trunk/KDE/kdesdk/umbrello/umbrello/umlscene.h #1277943:1277944
@@ -34,6 +34,7 @@
 typedef QPoint UMLScenePoint;
 typedef QRect UMLSceneRect;
 typedef QSize UMLSceneSize;
+typedef QLine UMLSceneLine;
 typedef int UMLSceneValue;
 
 // event types
@@ -42,7 +43,7 @@
 typedef QContextMenuEvent UMLSceneContextMenuEvent;
 //typedef QDragDropEvent UMLSceneDragDropEvent;
 
-typedef Q3CanvasLine UMLSceneLine;
+typedef Q3CanvasLine UMLSceneLineItem;
 typedef Q3CanvasRectangle UMLSceneRectangle;
 typedef Q3CanvasItem UMLSceneItem;
 typedef Q3CanvasPolygon UMLScenePolygon;
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationline.cpp #1277943:1277944
@@ -112,10 +112,10 @@
         return QPoint( -1, -1 );
 
     if( pointIndex == count ) {
-        UMLSceneLine * line = m_LineList.last();
+        UMLSceneLineItem * line = m_LineList.last();
         return line -> endPoint();
     }
-    UMLSceneLine * line = m_LineList.at( pointIndex );
+    UMLSceneLineItem * line = m_LineList.at( pointIndex );
     return line -> startPoint();
 }
 
@@ -133,7 +133,7 @@
     }
 
     if( pointIndex == count) {
-        UMLSceneLine * line = m_LineList.last();
+        UMLSceneLineItem * line = m_LineList.last();
         QPoint p = line -> startPoint();
         line -> setPoints( p.x(), p.y(), point.x(), point.y() );
         moveSelected( pointIndex );
@@ -141,14 +141,14 @@
         return true;
     }
     if( pointIndex == 0 ) {
-        UMLSceneLine * line = m_LineList.first();
+        UMLSceneLineItem * line = m_LineList.first();
         QPoint p = line -> endPoint();
         line -> setPoints( point.x(), point.y(), p.x(), p.y() );
         moveSelected( pointIndex );
         update();
         return true;
     }
-    UMLSceneLine * line = m_LineList.at( pointIndex  );
+    UMLSceneLineItem * line = m_LineList.at( pointIndex  );
     QPoint p = line -> endPoint();
     line -> setPoints( point.x(), point.y(), p.x(), p.y() );
     line = m_LineList.at( pointIndex - 1 );
@@ -186,11 +186,11 @@
     const bool bLoading = UMLApp::app()->document()->loading();
 
     if( count == 1 || pointIndex == 1) {
-        UMLSceneLine * first = m_LineList.first();
+        UMLSceneLineItem * first = m_LineList.first();
         QPoint sp = first -> startPoint();
         QPoint ep = first -> endPoint();
         first -> setPoints( sp.x(), sp.y(), point.x(), point.y() );
-        UMLSceneLine * line = new UMLSceneLine( getScene() );
+        UMLSceneLineItem * line = new UMLSceneLineItem( getScene() );
         line -> setZ( -2 );
         line -> setPoints( point.x(), point.y(), ep.x(), ep.y() );
         line -> setPen( getPen() );
@@ -201,11 +201,11 @@
         return true;
     }
     if( count + 1 == pointIndex ) {
-        UMLSceneLine * before = m_LineList.last();
+        UMLSceneLineItem * before = m_LineList.last();
         QPoint sp = before -> startPoint();
         QPoint ep = before -> endPoint();
         before -> setPoints( sp.x(), sp.y(), point.x(), point.y() );
-        UMLSceneLine * line = new UMLSceneLine( getScene() );
+        UMLSceneLineItem * line = new UMLSceneLineItem( getScene() );
         line -> setPoints( point.x(), point.y(), ep.x(), ep.y() );
         line -> setZ( -2 );
         line -> setPen( getPen() );
@@ -215,11 +215,11 @@
             setupSelected();
         return true;
     }
-    UMLSceneLine * before = m_LineList.at( pointIndex - 1 );
+    UMLSceneLineItem * before = m_LineList.at( pointIndex - 1 );
     QPoint sp = before -> startPoint();
     QPoint ep = before -> endPoint();
     before -> setPoints( sp.x(), sp.y(), point.x(), point.y() );
-    UMLSceneLine * line = new UMLSceneLine(getScene() );
+    UMLSceneLineItem * line = new UMLSceneLineItem(getScene() );
     line -> setPoints( point.x(), point.y(), ep.x(), ep.y() );
     line -> setZ( -2 );
     line -> setPen( getPen() );
@@ -244,7 +244,7 @@
     if (!point.isNull()) {
         /* we don't know if the user clicked on the start- or endpoint of a
         * line segment */
-        UMLSceneLine * current_line = m_LineList.at( pointIndex );
+        UMLSceneLineItem * current_line = m_LineList.at( pointIndex );
         if (abs( current_line -> endPoint().x() - point.x() ) <= delta
                 &&
                 abs( current_line -> endPoint().y() - point.y() ) <= delta)
@@ -256,7 +256,7 @@
 
             /* the next segment will get the starting point from the current one,
             * which is going to be removed */
-            UMLSceneLine * next_line = m_LineList.at( pointIndex + 1 );
+            UMLSceneLineItem * next_line = m_LineList.at( pointIndex + 1 );
             QPoint startPoint = current_line -> startPoint();
             QPoint endPoint = next_line -> endPoint();
             next_line -> setPoints(startPoint.x(), startPoint.y(),
@@ -274,7 +274,7 @@
 
                 /* the previous segment will get the end point from the current one,
                 * which is going to be removed */
-                UMLSceneLine * previous_line = m_LineList.at( pointIndex - 1 );
+                UMLSceneLineItem * previous_line = m_LineList.at( pointIndex - 1 );
                 QPoint startPoint = previous_line -> startPoint();
                 QPoint endPoint = current_line -> endPoint();
                 previous_line -> setPoints(startPoint.x(), startPoint.y(),
@@ -354,7 +354,7 @@
 
     UMLSceneItemList::iterator end(list.end());
     for(UMLSceneItemList::iterator item_it(list.begin()); item_it != end; ++item_it ) {
-        if( ( index = m_LineList.indexOf( (UMLSceneLine*)*item_it ) ) != -1 )
+        if( ( index = m_LineList.indexOf( (UMLSceneLineItem*)*item_it ) ) != -1 )
             break;
     }//end for
     return index;
@@ -371,7 +371,7 @@
     if ( pointIndex >= count )
         return false;
 
-    UMLSceneLine * line = m_LineList.at( pointIndex );
+    UMLSceneLineItem * line = m_LineList.at( pointIndex );
 
     /* check if the given point is the start or end point of the line */
     if ( (
@@ -396,7 +396,7 @@
 {
     int count = m_LineList.count();
     if( count == 0 ) {
-        UMLSceneLine * line = new UMLSceneLine(getScene() );
+        UMLSceneLineItem * line = new UMLSceneLineItem(getScene() );
         line -> setPoints( start.x(), start.y(),end.x(),end.y() );
         line -> setZ( -2 );
         line -> setPen( getPen() );
@@ -524,7 +524,7 @@
 void AssociationLine::setLineColor( const QColor &color )
 {
     uint linewidth = 0;
-    UMLSceneLine * line = 0;
+    UMLSceneLineItem * line = 0;
 
     Q_FOREACH( line, m_LineList ) {
         linewidth = line->pen().width();
@@ -586,7 +586,7 @@
 void AssociationLine::setLineWidth( uint width )
 {
     QColor linecolor;
-    UMLSceneLine * line = 0;
+    UMLSceneLineItem * line = 0;
 
     Q_FOREACH( line, m_LineList ) {
         linecolor = line->pen().color();
@@ -653,8 +653,8 @@
  */
 void AssociationLine::setAssocType( Uml::AssociationType type )
 {
-    QList<UMLSceneLine*>::Iterator it = m_LineList.begin();
-    QList<UMLSceneLine*>::Iterator end = m_LineList.end();
+    QList<UMLSceneLineItem*>::Iterator it = m_LineList.begin();
+    QList<UMLSceneLineItem*>::Iterator end = m_LineList.end();
 
     for( ; it != end; ++it )
         (*it) -> setPen( getPen() );
@@ -750,7 +750,7 @@
     if (canvas == NULL)
         return;
     for (int i = 0; i < count ; i++) {
-        UMLSceneLine *line = m_LineList.at(i);
+        UMLSceneLineItem *line = m_LineList.at(i);
         line -> setCanvas( canvas );
         line -> setPen( getPen() );
     }
@@ -836,7 +836,7 @@
     if( (int)m_RectList.count() + 1 != lineCount )
         setupSelected();
     UMLSceneRectangle * rect = 0;
-    UMLSceneLine * line = 0;
+    UMLSceneLineItem * line = 0;
     if( pointIndex == lineCount || lineCount == 1) {
         line = m_LineList.last();
         QPoint p = line -> endPoint();
@@ -861,7 +861,7 @@
 {
     qDeleteAll( m_RectList.begin(), m_RectList.end() );
     m_RectList.clear();
-    UMLSceneLine * line = 0;
+    UMLSceneLineItem * line = 0;
 
     Q_FOREACH( line, m_LineList ) {
         QPoint sp = line -> startPoint();
@@ -1021,7 +1021,7 @@
 void AssociationLine::updateHead()
 {
     int count = m_HeadList.count();
-    UMLSceneLine * line = 0;
+    UMLSceneLineItem * line = 0;
 
     switch( getAssocType() ) {
     case Uml::AssociationType::State:
@@ -1177,7 +1177,7 @@
 {
     if( !m_bParallelLineCreated )
         return;
-    UMLSceneLine * line = 0;
+    UMLSceneLineItem * line = 0;
     QPoint common = m_ParallelLines.at( 0 );
     QPoint p = m_ParallelLines.at( 1 );
     line = m_ParallelList.at( 0 );
@@ -1223,7 +1223,7 @@
     if ( m_LineList.count() < 1 ) {
         return;
     }
-    UMLSceneLine* firstLine = m_LineList.first();
+    UMLSceneLineItem* firstLine = m_LineList.first();
     QPoint startPoint = firstLine->startPoint();
     QPoint endPoint = firstLine->endPoint();
     QPoint centrePoint;
@@ -1267,7 +1267,7 @@
 {
     QPen pen( lineColor(), lineWidth() );
     for (int i = 0; i < by; i++) {
-        UMLSceneLine * line = new UMLSceneLine( getScene() );
+        UMLSceneLineItem * line = new UMLSceneLineItem( getScene() );
         line -> setZ( 0 );
         line -> setPen( pen );
         line -> setVisible( true );
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationline.h #1277943:1277944
@@ -38,7 +38,7 @@
     Q_OBJECT
 public:
     // typedefs
-    typedef QList<UMLSceneLine*> LineList;
+    typedef QList<UMLSceneLineItem*> LineList;
     typedef QList<UMLSceneRectangle*> RectList;
 
     AssociationLine();
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationwidget.cpp #1277943:1277944
@@ -2746,7 +2746,7 @@
 void AssociationWidget::createAssocClassLine()
 {
     if (m_pAssocClassLine == NULL)
-        m_pAssocClassLine = new UMLSceneLine(m_scene->canvas());
+        m_pAssocClassLine = new UMLSceneLineItem(m_scene->canvas());
     computeAssocClassLine();
     QPen pen(lineColor(), lineWidth(), Qt::DashLine);
     m_pAssocClassLine->setPen(pen);
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationwidget.h #1277943:1277944
@@ -414,7 +414,7 @@
     QPoint m_oldRoleBPoint;
 
     int         m_nLinePathSegmentIndex; ///< anchor for m_pAssocClassLine
-    UMLSceneLine *m_pAssocClassLine;  ///< used for connecting assoc. class
+    UMLSceneLineItem *m_pAssocClassLine;  ///< used for connecting assoc. class
     /// selection adornment for the endpoints of the assoc. class connecting line
     UMLSceneRectangle *m_pAssocClassLineSel0, *m_pAssocClassLineSel1;
 
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/seqlinewidget.cpp #1277943:1277944
@@ -26,7 +26,7 @@
  * Constructor.
  */
 SeqLineWidget::SeqLineWidget(UMLView * pView, ObjectWidget * pObject)
-  : UMLSceneLine( pView -> canvas() )
+  : UMLSceneLineItem( pView -> canvas() )
 {
     m_scene = pView;
     m_pObject = pObject;
@@ -109,7 +109,7 @@
 {
     int endX = startX;
     int endY = startY + m_nLengthY;
-    UMLSceneLine::setPoints( startX, startY, endX, endY );
+    UMLSceneLineItem::setPoints( startX, startY, endX, endY );
     moveDestructionBox();
 }
 
@@ -141,13 +141,13 @@
     rect.setWidth( 14 );
     rect.setHeight( 14 );
 
-    m_DestructionBox.line1 = new UMLSceneLine( m_scene->canvas() );
+    m_DestructionBox.line1 = new UMLSceneLineItem( m_scene->canvas() );
     m_DestructionBox.setLine1Points(rect);
     m_DestructionBox.line1->setVisible( true );
     m_DestructionBox.line1->setPen( QPen(m_pObject->lineColor(), 2) );
     m_DestructionBox.line1->setZ( 3 );
 
-    m_DestructionBox.line2 = new UMLSceneLine( m_scene -> canvas() );
+    m_DestructionBox.line2 = new UMLSceneLineItem( m_scene -> canvas() );
     m_DestructionBox.setLine2Points(rect);
     m_DestructionBox.line2->setVisible( true );
     m_DestructionBox.line2->setPen( QPen(m_pObject->lineColor(), 2) );
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/seqlinewidget.h #1277943:1277944
@@ -20,7 +20,7 @@
  * @author Paul Hensgen
  * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
  */
-class SeqLineWidget : public UMLSceneLine
+class SeqLineWidget : public UMLSceneLineItem
 {
 public:
     SeqLineWidget(UMLView * pView, ObjectWidget * pObject);
@@ -65,8 +65,8 @@
     UMLView*      m_scene;    ///< view displayed on
 
     struct DestructionBox {
-        UMLSceneLine * line1;
-        UMLSceneLine * line2;
+        UMLSceneLineItem * line1;
+        UMLSceneLineItem * line2;
         void setLine1Points(QRect rect) {
             line1->setPoints( rect.x(), rect.y(),
                               rect.x() + rect.width(), rect.y() + rect.height() );




More information about the umbrello-devel mailing list