Exemple #1
0
void ActivityPartitionCanvas::connexion(UmlCode action, DiagramItem * dest,
						  const QPoint &, const QPoint &) {
  ArrowCanvas * a =
    new ArrowCanvas(the_canvas(), this, dest, action, 0, FALSE, -1.0, -1.0);
  
  a->show();
  the_canvas()->select(a);
}
Exemple #2
0
void OdClassInstCanvas::connexion(UmlCode t, DiagramItem * dest, const QPoint &, const QPoint &) {
  ArrowCanvas * l;
  
  if (t == UmlObjectLink)
    l = new ObjectLinkCanvas(the_canvas(), this, dest, UmlObjectLink, 0, -1.0, -1.0, 0);
  else
    l = new ArrowCanvas(the_canvas(), this, dest, t, 0, FALSE, -1.0, -1.0);
  
  l->show();
  the_canvas()->select(l);
}
Exemple #3
0
void UcUseCaseCanvas::connexion(UmlCode action, DiagramItem * dest,
				const QPoint &, const QPoint &) {
  ArrowCanvas * a;
  
  if (IsaSimpleRelation(action))
    a = new SimpleRelationCanvas(the_canvas(), this, dest, 0, action, 0, -1.0, -1.0);
  else
    a = new ArrowCanvas(the_canvas(), this, dest, action, 0, FALSE, -1.0, -1.0);
  
  a->show();
  the_canvas()->select(a);
}
void DeploymentNodeCanvas::connexion(UmlCode action, DiagramItem * dest,
				     const QPoint &, const QPoint &) {
  ArrowCanvas * a;
  
  if (action == UmlDependOn)
    a = new SimpleRelationCanvas(the_canvas(), this, dest, 0, action, 0, -1.0, -1.0);
  else
    a = new ArrowCanvas(the_canvas(), this, dest, action, 0, FALSE, -1.0, -1.0);
  
  a->show();
  the_canvas()->select(a);
}
Exemple #5
0
void UcClassCanvas::connexion(UmlCode action, DiagramItem * dest,
			      const QPoint &, const QPoint &) {
  ArrowCanvas * a;
  
  if ((dest->type() == UmlClass) && IsaRelation(action))
    a = new RelationCanvas(the_canvas(), this, dest, 0, action, 0, -1.0, -1.0);
  else
    a = new ArrowCanvas(the_canvas(), this, dest, action, 0, FALSE, -1.0, -1.0);
  
  a->show();
  the_canvas()->select(a);
}
Exemple #6
0
void PackageCanvas::connexion(UmlCode action, DiagramItem * dest,
			      const QPoint &, const QPoint &) {
  ArrowCanvas * r;
  
  if (IsaSimpleRelation(action))
    r = new SimpleRelationCanvas(the_canvas(), this, dest, 0, action, 0, -1.0, -1.0);
  else
    r = new ArrowCanvas(the_canvas(), this, dest, action, 0, FALSE, -1.0, -1.0);
  
  r->show();
  the_canvas()->select(r);
}
Exemple #7
0
void CodObjCanvas::connexion(UmlCode l, DiagramItem * dest,
                             const QPoint & s, const QPoint & e)
{
    switch (l) {
    case UmlSelfLink:
        self_link = new CodSelfLinkCanvas(the_canvas(), this, s, 0);
        self_link->show();
        the_canvas()->select(self_link);
        break;

    case UmlAnchor:
        DiagramCanvas::connexion(l, dest, s, e);
        break;

    default:
        if (dest != this) {
            ArrowCanvas * a =
                new CodLinkCanvas(the_canvas(), this, dest, 0, -1.0, -1.0);

            a->show();
            the_canvas()->select(a);
        }
    }
}
void ArrowPointCanvas::connexion(UmlCode action, DiagramItem * dest,
                                 const QPoint &, const QPoint &)
{
    ArrowCanvas * a;

    switch (the_canvas()->browser_diagram()->get_type()) {
    case UmlClassDiagram:
        if (IsaRelation(action)) {
            a = new RelationCanvas(the_canvas(), this, dest, 0, action, 0, -1.0, -1.0);
            a->show();
            the_canvas()->select(a);
            return;
        }

        break;

    case UmlColDiagram:
        if (action == UmlLink) {
            a = new CodLinkCanvas(the_canvas(), this, dest, 0, -1.0, -1.0);
            a->show();
            the_canvas()->select(a);
            return;
        }

        break;

    case UmlObjectDiagram:
        if (action == UmlObjectLink) {
            a = new ObjectLinkCanvas(the_canvas(), this, dest, UmlObjectLink, 0, -1.0, -1.0);
            a->show();
            the_canvas()->select(a);
            return;
        }
        break;

    case UmlDeploymentDiagram:
    case UmlComponentDiagram:
        if (action == UmlContain) {
            a = new AssocContainCanvas(the_canvas(), this, dest, 0, -1.0, -1.0);
            a->show();
            the_canvas()->select(a);
            return;
        }

    case UmlStateDiagram:
        if (action == UmlTransition) {
            a = new TransitionCanvas(the_canvas(), this, dest, 0, 0, -1.0, -1.0);
            a->show();
            the_canvas()->select(a);
            return;
        }

    case UmlActivityDiagram:
        if (action == UmlFlow) {
            a = new FlowCanvas(the_canvas(), this, dest, 0, 0, -1.0, -1.0);
            a->show();
            the_canvas()->select(a);
            return;
        }
    default:	// to avoid warning
        break;
    }
    if (IsaSimpleRelation(action))
        a = new SimpleRelationCanvas(the_canvas(), this, dest, 0, action, 0, -1.0, -1.0);
    else
        a = new ArrowCanvas(the_canvas(), this, dest, action, 0, FALSE, -1.0, -1.0);

    a->show();
    the_canvas()->select(a);
}