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); }
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(); } }
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); }
PseudoStateCanvas::PseudoStateCanvas(BrowserNode * bn, UmlCanvas * canvas, int x, int y) : DiagramCanvas(0, canvas, x, y, 16, 16, 0), horiz(FALSE), manual_size(FALSE) { browser_node = bn; set_xpm(); check_stereotypeproperties(); connect(bn->get_data(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(deleted()), this, SLOT(deleted())); connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); if (canvas->must_draw_all_relations()) { //draw_all_simple_relations(); draw_all_transitions(); } if (!bn->allow_empty()) { double zoom = canvas->zoom(); QFontMetrics fm(canvas->get_font(UmlNormalFont)); label = new LabelCanvas(bn->get_name(), canvas, x + (((int) (width() * zoom)) - fm.width(bn->get_name()))/2, y + ((int) (height() * zoom))); } }
ActivityActionCanvas::ActivityActionCanvas(BrowserNode * bn, UmlCanvas * canvas, int x, int y) : DiagramCanvas(0, canvas, x, y, ACTIVITYACTION_MIN_SIZE*5/2, ACTIVITYACTION_MIN_SIZE*3/2, 0) { browser_node = bn; pre = 0; post = 0; constraint = 0; show_opaque_action_definition = UmlDefaultState; itscolor = UmlDefaultColor; update(); check_pins(); check_parametersets(); check_conditions_constraint(); check_stereotypeproperties(); connect(bn->get_data(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(deleted()), this, SLOT(deleted())); connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); if (canvas->must_draw_all_relations()) { draw_all_flows(); draw_all_simple_relations(); } }
OdClassInstCanvas::OdClassInstCanvas(BrowserClassInstance * bn, UmlCanvas * canvas, int x, int y, int id) : DiagramCanvas(0, canvas, x, y, CLASSINST_CANVAS_MIN_SIZE, 1, id), ClassInstCanvas() { browser_node = bn; itscolor = UmlDefaultColor; BasicData * d = bn->get_data(); connect(d, SIGNAL(changed()), this, SLOT(modified())); connect(d, SIGNAL(deleted()), this, SLOT(deleted())); connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); if (id == 0) { // not on read compute_size(); // update used_settings if (browser_node->get_type() != UmlClass) check_stereotypeproperties(); if (canvas->must_draw_all_relations()) draw_all_relations(); } }
void ParameterSetCanvas::modified() { hide(); update(); show(); check_stereotypeproperties(); canvas()->update(); package_modified(); }
void TransitionCanvas::modified() { if (visible()) { hide(); update(TRUE); show(); if (begin->type() != UmlArrowPoint) check_stereotypeproperties(); canvas()->update(); package_modified(); } }
void ActivityPartitionCanvas::modified() { hide(); hide_lines(); check_size(); show(); update_show_lines(); check_stereotypeproperties(); canvas()->update(); force_sub_inside(FALSE); package_modified(); }
void PackageCanvas::modified() { // force son reaffichage hide(); check_size(); show(); check_stereotypeproperties(); force_self_rel_visible(); if (the_canvas()->must_draw_all_relations()) draw_all_simple_relations(); canvas()->update(); package_modified(); }
void DeploymentNodeCanvas::modified() { used_color = (itscolor == UmlDefaultColor) ? the_canvas()->browser_diagram()->get_color(UmlDeploymentNode) : itscolor; // force son reaffichage hide(); check_size(); show(); force_self_rel_visible(); check_stereotypeproperties(); canvas()->update(); package_modified(); }
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(); }
InterruptibleActivityRegionCanvas::InterruptibleActivityRegionCanvas(BrowserNode * bn, UmlCanvas * canvas, int x, int y) : ActivityContainerCanvas(0, canvas, x, y, INTERRUPTIBLE_ACTIVITY_REGION_CANVAS_MIN_SIZE, INTERRUPTIBLE_ACTIVITY_REGION_CANVAS_MIN_SIZE, 0) { browser_node = bn; itscolor = UmlDefaultColor; update(); check_stereotypeproperties(); connect(bn->get_data(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(deleted()), this, SLOT(deleted())); connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); }
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(); } }
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(); }
UcUseCaseCanvas::UcUseCaseCanvas(BrowserNode * bn, UmlCanvas * canvas, int x, int y, int id) : DiagramCanvas(bn, canvas, x, y, USECASE_CANVAS_MIN_WIDTH, USECASE_CANVAS_MIN_HEIGHT, id), itscolor(UmlDefaultColor), used_color(UmlDefaultColor) { connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(deleted()), this, SLOT(deleted())); if (id == 0) { // not on read if (canvas->must_draw_all_relations()) draw_all_simple_relations(); check_stereotypeproperties(); } }
void UcUseCaseCanvas::modified() { used_color = (itscolor == UmlDefaultColor) ? the_canvas()->browser_diagram()->get_color(UmlUseCase) : itscolor; update_name(); // force son reaffichage hide(); show(); force_self_rel_visible(); if (the_canvas()->must_draw_all_relations()) draw_all_simple_relations(); check_stereotypeproperties(); canvas()->update(); package_modified(); }
ParameterSetCanvas::ParameterSetCanvas(BrowserNode * bn, UmlCanvas * canvas, int id, ActivityActionCanvas * a) : DiagramCanvas(0, canvas, 0, 0, 2, 2, id), act(a) { browser_node = bn; itscolor = UmlDefaultColor; if (id == 0) { // not on read update(); setZ(a->z()); // note : pins have z+2 to be upper the parameter sets with their lines check_stereotypeproperties(); } connect(bn->get_data(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(deleted()), this, SLOT(deleted())); connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); }
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(); } }
ArtifactCanvas::ArtifactCanvas(BrowserNode * bn, UmlCanvas * canvas, int x, int y) : DiagramCanvas(0, canvas, x, y, ARTIFACT_CANVAS_MIN_SIZE, 1, 0) { browser_node = bn; itscolor = UmlDefaultColor; compute_size(); check_stereotypeproperties(); connect(bn->get_data(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(deleted()), this, SLOT(deleted())); connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); if (canvas->must_draw_all_relations()) { draw_all_relations(); draw_all_simple_relations(); } }
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(); }
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(); }
DeploymentNodeCanvas::DeploymentNodeCanvas(BrowserNode * bn, UmlCanvas * canvas, int x, int y, int id) : DiagramCanvas(0, canvas, x, y, DEPLOYMENTNODE_CANVAS_MIN_SIZE, DEPLOYMENTNODE_CANVAS_MIN_SIZE, id), itscolor(UmlDefaultColor), used_color(UmlDefaultColor) { browser_node = bn; write_horizontally = UmlDefaultState; show_stereotype_properties = UmlDefaultState; check_size(); if (id == 0) { // not on read check_stereotypeproperties(); } connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(deleted()), this, SLOT(deleted())); }
StateActionCanvas::StateActionCanvas(BrowserNode * bn, UmlCanvas * canvas, int x, int y) : DiagramCanvas(0, canvas, x, y, STATE_ACTION_CANVAS_MIN_SIZE, 1, 0) { browser_node = bn; itscolor = UmlDefaultColor; language = DefaultDrawingLanguage; show_stereotype_properties = UmlDefaultState; compute_size(); check_stereotypeproperties(); connect(bn->get_data(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(deleted()), this, SLOT(deleted())); connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); if (canvas->must_draw_all_relations()) { //draw_all_simple_relations(); draw_all_transitions(); } }
ActivityPartitionCanvas::ActivityPartitionCanvas(BrowserNode * bn, UmlCanvas * canvas, int x, int y) : ActivityContainerCanvas(0, canvas, x, y, ACTIVITY_PARTITION_CANVAS_MIN_SIZE, ACTIVITY_PARTITION_CANVAS_MIN_SIZE, 0) { browser_node = bn; itscolor = UmlDefaultColor; BrowserNode * parent = (BrowserNode *) browser_node->parent(); if (parent->get_type() == UmlActivityPartition) { Q3CanvasItemList all = the_canvas()->allItems(); Q3CanvasItemList::Iterator cit; for (cit = all.begin(); cit != all.end(); ++cit) { if ((*cit)->visible()) { DiagramItem * di = QCanvasItemToDiagramItem(*cit); if ((di != 0) && (di->get_bn() == parent)) { horiz = ((ActivityPartitionCanvas *) di)->horiz; break; } } } if (cit == all.end()) horiz = FALSE; } else horiz = FALSE; check_size(); check_stereotypeproperties(); ActivityPartitionData * data = (ActivityPartitionData *) browser_node->get_data(); connect(data, SIGNAL(changed()), this, SLOT(modified())); connect(data, SIGNAL(deleted()), this, SLOT(deleted())); connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); }
CodClassInstCanvas::CodClassInstCanvas(BrowserNode * bn, UmlCanvas * canvas, int x, int y, int id) : CodObjCanvas(0, canvas, x, y, CLASSINST_CANVAS_MIN_SIZE, 1, id), ClassInstCanvas() { // bn may a class instance or a class browser_node = bn; itscolor = UmlDefaultColor; if (id == 0) { // not on read compute_size(); if (browser_node->get_type() != UmlClass) check_stereotypeproperties(); } BasicData * d = bn->get_data(); connect(d, SIGNAL(changed()), this, SLOT(modified())); connect(d, SIGNAL(deleted()), this, SLOT(deleted())); connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); }
PackageCanvas::PackageCanvas(BrowserNode * bn, UmlCanvas * canvas, int x, int y, int id) : DiagramCanvas(0, canvas, x, y, PACKAGE_CANVAS_MIN_WIDTH, PACKAGE_CANVAS_MIN_HEIGHT, id) { browser_node = bn; show_context_mode = DefaultShowContextMode; name_in_tab = UmlDefaultState; show_stereotype_properties = UmlDefaultState; itscolor = UmlDefaultColor; check_size(); connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(deleted()), this, SLOT(deleted())); if (id == 0) { // not from read if (canvas->must_draw_all_relations()) draw_all_simple_relations(); check_stereotypeproperties(); } }
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(); } }
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(); } }
UcClassCanvas::UcClassCanvas(BrowserNode * bn, UmlCanvas * canvas, int x, int y, int id) : DiagramCanvas(0, canvas, x, y, ACTOR_CANVAS_SIZE, ACTOR_CANVAS_SIZE, id) { browser_node = bn; templ = 0; // may be updated by compute_size() connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(changed()), this, SLOT(modified())); connect(bn->get_data(), SIGNAL(deleted()), this, SLOT(deleted())); itscolor = UmlDefaultColor; compute_size(); // update used_settings if (id == 0) { // not on old read if (canvas->must_draw_all_relations()) { draw_all_depend_gene(); draw_all_simple_relations(); } check_stereotypeproperties(); } }