コード例 #1
0
ファイル: FlowCanvas.cpp プロジェクト: SciBoy/douml
FlowCanvas::FlowCanvas(UmlCanvas * canvas, DiagramItem * b,
		       DiagramItem * e, BrowserNode * bb, int id,
		       float d_start, float d_end, FlowData * d)
      : ArrowCanvas(canvas, b, e, UmlFlow, id, TRUE, d_start, d_end),
        br_begin(bb), data(d), selection(0),
  	transformation(0), stereotypeproperties(0),
  	write_horizontally(UmlDefaultState) {
  if ((e->type() != UmlArrowPoint) && (bb == 0)) {
    // end of line construction
    update_begin(e);
  }
  else if (d != 0) {
    if (e->type() != UmlArrowPoint)
      check_stereotypeproperties();
    connect(d, SIGNAL(changed()), this, SLOT(modified()));
    connect(d, SIGNAL(deleted()), this, SLOT(deleted()));
  }
  
  connect(DrawingSettings::instance(), SIGNAL(changed()),
	  this, SLOT(modified()));
  
  // manages the case start == end
  if (b == e)
    cut_self();
  
  if (d != 0) {
    update(TRUE);
    check_sel_trans();
  }
}
コード例 #2
0
SimpleRelationCanvas::SimpleRelationCanvas(UmlCanvas * canvas,
        DiagramItem * b, DiagramItem * e,
        BrowserNode * bb, UmlCode t, int id,
        float d_start, float d_end,
        SimpleRelationData * d)
    : ArrowCanvas(canvas, b, e, t, id, TRUE, d_start, d_end),
      br_begin(bb), data(d), stereotypeproperties(0)
{
    if ((e->type() != UmlArrowPoint) && (bb == 0)) {
        // end of line construction
        update_begin(e);
    }
    else if (d != 0) {
        if (e->type() != UmlArrowPoint)
            check_stereotypeproperties();

        connect(d, SIGNAL(changed()), this, SLOT(modified()));
        connect(d, SIGNAL(deleted()), this, SLOT(deleted()));
    }

    // manages the case start == end
    if (b == e)
        cut_self();

    if (d != 0)
        update(TRUE);
}
コード例 #3
0
TransitionCanvas::TransitionCanvas(UmlCanvas * canvas,
				   DiagramItem * b, DiagramItem * e,
				   BrowserNode * bb, int id,
				   float d_begin, float d_end,
				   TransitionData * d)
      : ArrowCanvas(canvas, b, e, UmlTransition, id, TRUE, d_begin, d_end),
  	br_begin(bb), data(d), stereotypeproperties(0) {
  if ((e->type() != UmlArrowPoint) && (bb == 0)) {
    // end of line construction
    update_begin(e);
  }
  else if (d != 0) {
    if (e->type() != UmlArrowPoint)
      check_stereotypeproperties();
    connect(d, SIGNAL(changed()), this, SLOT(modified()));
    connect(d, SIGNAL(deleted()), this, SLOT(deleted()));
  }
  
  drawing_language = DefaultDrawingLanguage;
  write_horizontally = UmlDefaultState;
  show_definition = UmlDefaultState;
  
  connect(DrawingSettings::instance(), SIGNAL(changed()),
	  this, SLOT(modified()));
  
  // manages the case start == end
  if (b == e)
    cut_self();
  
  if (d != 0)
    update(TRUE);
}