[Uml-devel] KDE/kdesdk/umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Fri Nov 2 09:43:25 UTC 2012
SVN commit 1323670 by fischer:
Some indirections used for the move to QGraphicsView removed.
M +0 -36 umlscene.h
M +8 -8 widgets/associationline.cpp
M +1 -1 widgets/associationline.h
--- trunk/KDE/kdesdk/umbrello/umbrello/umlscene.h #1323669:1323670
@@ -88,17 +88,6 @@
#define UMLSceneMouseEvent QGraphicsSceneMouseEvent
-class UMLSceneMoveEvent : public QGraphicsSceneMoveEvent
-{
-public:
- UMLSceneMoveEvent() {}
-
- UMLScenePoint pos()
- {
- return newPos();
- }
-};
-
// Qt3 migration wrapper for QGraphicsScene items
typedef QGraphicsItem UMLSceneItem;
typedef QList<QGraphicsItem*> UMLSceneItemList;
@@ -176,31 +165,6 @@
}
};
-class UMLScenePolygonItem : public QGraphicsPolygonItem
-{
-public:
- UMLScenePolygonItem()
- : QGraphicsPolygonItem(0)
- {
- }
-
- void setZ(UMLSceneValue z)
- {
- setZValue(z);
- }
-
- void setPoints(const UMLScenePolygon &p)
- {
- setPolygon(p);
- }
-
- void setCanvas(QGraphicsScene *scene)
- {
- scene->addItem(this);
- }
-
-};
-
class UMLSceneEllipseItem : public QGraphicsEllipseItem
{
public:
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationline.cpp #1323669:1323670
@@ -989,24 +989,24 @@
case Uml::AssociationType::Generalization:
case Uml::AssociationType::Realization:
growList(m_HeadList, 3);
- m_pClearPoly = new UMLScenePolygonItem;
- m_pClearPoly->setCanvas( canvas() );
+ m_pClearPoly = new QGraphicsPolygonItem;
+ canvas()->addItem(m_pClearPoly);
m_pClearPoly->setVisible( true );
m_pClearPoly->setBrush( QBrush( Qt::white ) );
- m_pClearPoly->setZ( -1 );
+ m_pClearPoly->setZValue( -1 );
break;
case Uml::AssociationType::Composition:
case Uml::AssociationType::Aggregation:
growList(m_HeadList, 4);
- m_pClearPoly = new UMLScenePolygonItem;
- m_pClearPoly->setCanvas( canvas() );
+ m_pClearPoly = new QGraphicsPolygonItem;
+ canvas()->addItem(m_pClearPoly);
m_pClearPoly->setVisible( true );
if( getAssocType() == Uml::AssociationType::Aggregation )
m_pClearPoly->setBrush( QBrush( Qt::white ) );
else
m_pClearPoly->setBrush( QBrush( lineColor() ) );
- m_pClearPoly->setZ( -1 );
+ m_pClearPoly->setZValue( -1 );
break;
case Uml::AssociationType::Containment:
@@ -1080,7 +1080,7 @@
line = m_HeadList.at( 2 );
line->setPoints( m_ArrowPointA.x(), m_ArrowPointA.y(), m_ArrowPointB.x(), m_ArrowPointB.y() );
- m_pClearPoly->setPoints( m_PointArray );
+ m_pClearPoly->setPolygon( m_PointArray );
break;
case Uml::AssociationType::Composition:
@@ -1098,7 +1098,7 @@
line = m_HeadList.at( 3 );
line->setPoints( m_PointArray[ 3 ].x(), m_PointArray[ 3 ].y(), m_PointArray[ 0 ].x(), m_PointArray[ 0 ].y() );
- m_pClearPoly->setPoints( m_PointArray );
+ m_pClearPoly->setPolygon( m_PointArray );
break;
case Uml::AssociationType::Containment:
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationline.h #1323669:1323670
@@ -180,7 +180,7 @@
*/
UMLScenePoint m_ArrowPointA, m_ArrowPointB, m_MidPoint, m_EgdePoint;
- UMLScenePolygonItem* m_pClearPoly; ///< A polygon object to blank out any lines we don't want to see.
+ QGraphicsPolygonItem* m_pClearPoly; ///< A polygon object to blank out any lines we don't want to see.
Circle* m_pCircle; ///< The transparent circle required by containment associations.
SubsetSymbol* m_pSubsetSymbol; ///< The subset notation required by Child to Category associations.
UMLScenePolygon m_ParallelLines; ///< Contains the calculated points for the parallel line on a collaboration message to use.
More information about the umbrello-devel
mailing list