Пример #1
0
void ImageCanvas::open() {
    QString s = path;
    ImageDialog d(s);

    if ((d.exec() == QDialog::Accepted) &&
            !s.isEmpty() &&
            (s != path)) {
        QPixmap * p = get_pixmap(s);

        if (p != 0) {
            path = s;
            width_scale100 = p->width();
            height_scale100 = p->height();
            px = get_pixmap(path, the_canvas()->zoom());

            hide();
            hide_lines();
            setSize(px->width(), px->height());
            recenter();
            show();
            update_show_lines();
            canvas()->update();
            package_modified();
        }
    }
}
Пример #2
0
void ActivityPartitionCanvas::modified() {
  hide();
  hide_lines();
  check_size();
  show();
  update_show_lines();
  check_stereotypeproperties();
  canvas()->update();
  force_sub_inside(FALSE);
  package_modified();
}
Пример #3
0
void DiagramCanvas::moveBy(double dx, double dy)
{
    hide_lines();

    QGraphicsRectItem::moveBy(dx, dy);

    if (!((UmlCanvas *) canvas())->do_zoom())
        set_center100();
    if ((label != 0) && !label->isSelected())
        label->moveBy(dx, dy);
    if ((stereotypeproperties != 0) && !stereotypeproperties->selected())
        stereotypeproperties->moveBy(dx, dy);
    update_show_lines();
}
Пример #4
0
void ArtifactCanvas::modified() {
  hide();
  hide_lines();
  compute_size();
  show();
  update_show_lines();
  check_stereotypeproperties();
  if (the_canvas()->must_draw_all_relations()) {
    draw_all_relations();
    draw_all_simple_relations();
  }
  canvas()->update();
  package_modified();
}
Пример #5
0
void CodClassInstCanvas::modified() {
  if (visible()) {
    hide();
    hide_lines();
    compute_size();
    show();
    update_show_lines();
    if (self_link)
      self_link->update_pos();
    if (browser_node->get_type() != UmlClass)
      check_stereotypeproperties();
    canvas()->update();
    package_modified();
  }
}
Пример #6
0
void StateActionCanvas::modified() {
  hide();
  hide_lines();
  compute_size();
  show();
  update_show_lines();
  force_self_rel_visible();
  if (the_canvas()->must_draw_all_relations()) {
    //draw_all_simple_relations();
    draw_all_transitions();
  }
  check_stereotypeproperties();
  canvas()->update();
  package_modified();
}
Пример #7
0
void UcClassCanvas::modified() {
  if (visible()) {
    hide();    
    hide_lines();
    compute_size();
    recenter();
    show();
    update_show_lines();
    force_self_rel_visible();
    if (the_canvas()->must_draw_all_relations()) {
      draw_all_depend_gene();    
      draw_all_simple_relations();
    }
    check_stereotypeproperties();
    canvas()->update();
    package_modified();
  }
}
Пример #8
0
void ActivityActionCanvas::modified() {
  hide();
  hide_lines();
  update();
  show();
  update_show_lines();
  force_pins_arround();
  check_pins();
  check_parametersets();
  if (the_canvas()->must_draw_all_relations()) {
    draw_all_flows();
    draw_all_simple_relations();
  }
  check_conditions_constraint();
  check_stereotypeproperties();
  canvas()->update();
  package_modified();
}
Пример #9
0
void PseudoStateCanvas::modified() {
  hide();
  hide_lines();
  if (browser_node->get_type() == ChoicePS)
    set_xpm();
  show();
  update_show_lines();
  force_self_rel_visible();
  if (the_canvas()->must_draw_all_relations()) {
    //draw_all_simple_relations();
    draw_all_transitions();
  }
  check_stereotypeproperties();
  canvas()->update();
  if (label != 0)
    label->set_name(browser_node->get_name());
  package_modified();
}
Пример #10
0
void OdClassInstCanvas::modified()
{
    if (visible()) {
        hide();
        hide_lines();
        compute_size();
        show();
        update_show_lines();

        if (browser_node->get_type() != UmlClass)
            check_stereotypeproperties();

        if (the_canvas()->must_draw_all_relations())
            draw_all_relations();

        foreach (ArrowCanvas *canvas, lines)
            if (IsaRelation(canvas->type()))
                // useless to check UmlObjectLink ie unset link
                ((ObjectLinkCanvas *) canvas)->check();

        canvas()->update();
        package_modified();
    }
}
Пример #11
0
void OdClassInstCanvas::modified() {
  if (visible()) {
    hide();
    hide_lines();
    compute_size();
    show();
    update_show_lines();
    if (browser_node->get_type() != UmlClass)
      check_stereotypeproperties();
    
    if (the_canvas()->must_draw_all_relations())
      draw_all_relations();
    
    QListIterator<ArrowCanvas> it(lines);
    
    for (; it.current(); ++it)
      if (IsaRelation(it.current()->type()))
	// useless to check UmlObjectLink ie unset link
	((ObjectLinkCanvas *) it.current())->check();
    
    canvas()->update();
    package_modified();
  }
}