[Uml-devel] branches/work/soc-umbrello/umbrello
Gopala Krishna A
krishna.ggk at gmail.com
Fri Jun 19 20:00:14 UTC 2009
SVN commit 984040 by gopala:
Moved datastrucutres required only by AssociationSpaceManager class into the
private section of class for clarity and to avoid name collision.
M +5 -4 associationspacemanager.cpp
M +25 -25 associationspacemanager.h
--- branches/work/soc-umbrello/umbrello/associationspacemanager.cpp #984039:984040
@@ -50,12 +50,12 @@
return second;
}
-PointPair::PointPair(const QPointF& p1, const QPointF& p2) :
+AssociationSpaceManager::PointPair::PointPair(const QPointF& p1, const QPointF& p2) :
first(p1), second(p2)
{
}
-QPointF& PointPair::operator[](Uml::Role_Type role)
+QPointF& AssociationSpaceManager::PointPair::operator[](Uml::Role_Type role)
{
if (role == Uml::A) {
return first;
@@ -63,7 +63,7 @@
return second;
}
-const QPointF& PointPair::operator[](Uml::Role_Type role) const
+const QPointF& AssociationSpaceManager::PointPair::operator[](Uml::Role_Type role) const
{
if (role == Uml::A) {
return first;
@@ -170,7 +170,8 @@
* the reference point pair is always the penultimate points from both ends as
* a self association line has atleast 4 points.
*/
-PointPair AssociationSpaceManager::referencePoints(New::AssociationWidget *assoc) const
+AssociationSpaceManager::PointPair
+AssociationSpaceManager::referencePoints(New::AssociationWidget *assoc) const
{
New::AssociationLine *line = assoc->associationLine();
if (!assoc->isSelf()) {
--- branches/work/soc-umbrello/umbrello/associationspacemanager.h #984039:984040
@@ -47,31 +47,6 @@
};
/**
- * This helper structure is used to store two points corresponding to Uml::A
- * role and Uml::B role.
- * The two points can be end points, penultimate end points etc.
- */
-struct PointPair
-{
- PointPair(const QPointF& p1 = QPointF(), const QPointF& p2 = QPointF());
- QPointF& operator[](Uml::Role_Type role);
- const QPointF& operator[](Uml::Role_Type role) const;
-
-private:
- QPointF first, second;
-};
-
-/**
- * This structure is used to store some extra data for self association
- * widgets.
- */
-struct SelfAssociationItem
-{
- New::AssociationWidget *associationWidget;
- RegionPair regions;
-};
-
-/**
* @short A class to manage distribution of AssociationWidget around UMLWidget.
*
* This class mainly has the following duties
@@ -101,6 +76,31 @@
QSet<New::AssociationWidget*> associationWidgets() const;
private:
+ /**
+ * This helper structure is used to store two points corresponding to Uml::A
+ * role and Uml::B role.
+ * The two points can be end points, penultimate end points etc.
+ */
+ struct PointPair
+ {
+ PointPair(const QPointF& p1 = QPointF(), const QPointF& p2 = QPointF());
+ QPointF& operator[](Uml::Role_Type role);
+ const QPointF& operator[](Uml::Role_Type role) const;
+
+ private:
+ QPointF first, second;
+ };
+
+ /**
+ * This structure is used to store some extra data for self association
+ * widgets.
+ */
+ struct SelfAssociationItem
+ {
+ New::AssociationWidget *associationWidget;
+ RegionPair regions;
+ };
+
PointPair referencePoints(New::AssociationWidget *assoc) const;
/// Store for non self associations.
More information about the umbrello-devel
mailing list