void vgGetText(char *outText, int knownDbCount, char **knownDbs) /* vgGetText - Get text for full text indexing for VisiGene. */ { FILE *f = mustOpen(outText, "w"); struct sqlConnection *conn = sqlConnect(db); struct sqlConnection *imageConn = sqlConnect(db); struct sqlResult *sr; char **row; verbose(2, "hashComplexTables\n"); hashComplexTables(conn); verbose(2, "makeKnownGeneHashes\n"); makeKnownGeneHashes(knownDbCount, knownDbs); sr = sqlGetResult(imageConn, "NOSQLINJ select id from image"); while ((row = sqlNextRow(sr)) != NULL) { verbose(3, "imageText on %s\n", row[0]); imageText(conn, row[0], f); } sqlFreeResult(&sr); carefulClose(&f); }
// id is an old ident in case of an import SeqDiagramWindow::SeqDiagramWindow(const QString & s, BrowserSeqDiagram * b, int id) : DiagramWindow(b, s), view(0) { Q3ToolBar * toolbar = new Q3ToolBar(this, "sequence diagram operations"); addToolBar(toolbar, TR("Toolbar"), Qt::DockTop, TRUE); add_edit_button(toolbar); select = new QToolButton(*selectButton, TR("Select"), QString(), this, SLOT(hit_select()), toolbar, "select"); select->setToggleButton(TRUE); select->setOn(TRUE); current_button = UmlSelect; addFragment = new QToolButton(*fragmentButton, TR("Add Fragment"), QString(), this, SLOT(hit_fragment()), toolbar, "add fragment"); addFragment->setToggleButton(TRUE); Q3WhatsThis::add(addFragment, addfragmentText()); addClassInstance = new QToolButton(*classinstanceButton, TR("Add modeled Class instance"), QString(), this, SLOT(hit_classinstance()), toolbar, "add modeled class instance"); addClassInstance->setToggleButton(TRUE); Q3WhatsThis::add(addClassInstance, addmodeledclassinstanceText()); addClass = new QToolButton(*classButton, TR("Add Class instance"), QString(), this, SLOT(hit_class()), toolbar, "add class"); addClass->setToggleButton(TRUE); Q3WhatsThis::add(addClass, addclassinstanceText()); addContinuation = new QToolButton(*continuationButton, TR("Add Continuation"), QString(), this, SLOT(hit_continuation()), toolbar, "add continuation"); addContinuation->setToggleButton(TRUE); Q3WhatsThis::add(addContinuation, addcontinuationText()); syncMsg = new QToolButton(*syncmsgButton, TR("Synchronous message"), QString(), this, SLOT(hit_syncmsg()), toolbar, "synchronous message"); syncMsg->setToggleButton(TRUE); Q3WhatsThis::add(syncMsg, syncmsgText()); asyncMsg = new QToolButton(*directionalAssociationButton, TR("Asynchronous message"), QString(), this, SLOT(hit_asyncmsg()), toolbar, "asynchronous message"); asyncMsg->setToggleButton(TRUE); Q3WhatsThis::add(asyncMsg, asyncmsgText()); syncSelfMsg = new QToolButton(*syncselfmsgButton, TR("Synchronous Reflexive message"), QString(), this, SLOT(hit_syncselfmsg()), toolbar, "synchronous reflexive message"); syncSelfMsg->setToggleButton(TRUE); Q3WhatsThis::add(syncSelfMsg, syncselfmsgText()); asyncSelfMsg = new QToolButton(*asyncselfmsgButton, TR("Asynchronous Reflexive message"), QString(), this, SLOT(hit_asyncselfmsg()), toolbar, "asynchronous reflexive message"); asyncSelfMsg->setToggleButton(TRUE); Q3WhatsThis::add(asyncSelfMsg, asyncselfmsgText()); foundsyncMsg = new QToolButton(*foundsyncmsgButton, TR("Synchronous found message"), QString(), this, SLOT(hit_foundsyncmsg()), toolbar, "synchronous found message"); foundsyncMsg->setToggleButton(TRUE); Q3WhatsThis::add(foundsyncMsg, foundsyncmsgText()); foundasyncMsg = new QToolButton(*foundasyncmsgButton, TR("Asynchronous found message"), QString(), this, SLOT(hit_foundasyncmsg()), toolbar, "asynchronous found message"); foundasyncMsg->setToggleButton(TRUE); Q3WhatsThis::add(foundasyncMsg, foundasyncmsgText()); lostsyncMsg = new QToolButton(*lostsyncmsgButton, TR("Synchronous lost message"), QString(), this, SLOT(hit_lostsyncmsg()), toolbar, "synchronous lost message"); lostsyncMsg->setToggleButton(TRUE); Q3WhatsThis::add(lostsyncMsg, lostsyncmsgText()); lostasyncMsg = new QToolButton(*lostasyncmsgButton, TR("Asynchronous lost message"), QString(), this, SLOT(hit_lostasyncmsg()), toolbar, "asynchronous lost message"); lostasyncMsg->setToggleButton(TRUE); Q3WhatsThis::add(lostasyncMsg, lostasyncmsgText()); returnMsg = new QToolButton(*returnmsgButton, TR("Explicit return"), QString(), this, SLOT(hit_returnmsg()), toolbar, "explicit return"); returnMsg->setToggleButton(TRUE); Q3WhatsThis::add(returnMsg, returnmsgText()); selfreturnMsg = new QToolButton(*selfreturnmsgButton, TR("Explicit reflexive return"), QString(), this, SLOT(hit_selfreturnmsg()), toolbar, "explicit reflexive return"); selfreturnMsg->setToggleButton(TRUE); Q3WhatsThis::add(selfreturnMsg, selfreturnmsgText()); note = new QToolButton(*noteButton, TR("Note"), QString(), this, SLOT(hit_note()), toolbar, "note"); note->setToggleButton(TRUE); Q3WhatsThis::add(note, noteText()); anchor = new QToolButton(*anchorButton, TR("Anchor"), QString(), this, SLOT(hit_anchor()), toolbar, "anchor"); anchor->setToggleButton(TRUE); Q3WhatsThis::add(anchor, anchorText()); text = new QToolButton(*textButton, TR("Text"), QString(), this, SLOT(hit_text()), toolbar, "text"); text->setToggleButton(TRUE); Q3WhatsThis::add(text, textText()); image = new QToolButton(*imageButton, TR("Image"), QString(), this, SLOT(hit_image()), toolbar, "image"); image->setToggleButton(TRUE); Q3WhatsThis::add(image, imageText()); toolbar->addSeparator(); add_scale_cmd(toolbar); // view = new SeqDiagramView(this, canvas, (id != -1) ? id : b->get_ident()); setFocusProxy(view); setCentralWidget(view); //qApp->setMainWidget(this); QWorkspace * w = UmlWindow::get_workspace(); resize((w->width() * 4) / 5, (w->height() * 4) / 5); /*if (w->windowList().isEmpty()) showMaximized(); else*/ show(); view->preferred_size_zoom(); //qApp->setMainWidget(0); }
// id is an old ident in case of an import ClassDiagramWindow::ClassDiagramWindow(const QString & s, BrowserClassDiagram * b, int id) : DiagramWindow(b, s), view(0) { Q3ToolBar * toolbar = new Q3ToolBar(this, "class diagram operations"); addToolBar(toolbar, TR("Toolbar"), Qt::DockTop, TRUE); add_edit_button(toolbar); toolbar->addSeparator(); select = new QToolButton(*selectButton, TR("Select"), QString::null, this, SLOT(hit_select()), toolbar, "select"); select->setToggleButton(TRUE); select->setOn(TRUE); current_button = UmlSelect; addClass = new QToolButton(*classButton, TR("Add Class"), QString::null, this, SLOT(hit_class()), toolbar, "add class"); addClass->setToggleButton(TRUE); Q3WhatsThis::add(addClass, addclassText()); addPackage = new QToolButton(*packageButton, TR("Add Package"), QString::null, this, SLOT(hit_package()), toolbar, "add package"); addPackage->setToggleButton(TRUE); Q3WhatsThis::add(addPackage, addpackageText()); addFragment = new QToolButton(*fragmentButton, TR("Add Fragment"), QString::null, this, SLOT(hit_fragment()), toolbar, "add fragment"); addFragment->setToggleButton(TRUE); Q3WhatsThis::add(addFragment, addfragmentText()); inherit = new QToolButton(*generalisationButton, TR("Generalisation"), QString::null, this, SLOT(hit_inherit()), toolbar, "generalisation"); inherit->setToggleButton(TRUE); Q3WhatsThis::add(inherit, inheritText()); realize = new QToolButton(*realizeButton, TR("Realize"), QString::null, this, SLOT(hit_realize()), toolbar, "realize"); realize->setToggleButton(TRUE); Q3WhatsThis::add(realize, realizeText()); dependency = new QToolButton(*dependencyButton, TR("Dependency"), QString::null, this, SLOT(hit_dependency()), toolbar, "dependency"); dependency->setToggleButton(TRUE); Q3WhatsThis::add(dependency, dependencyText()); association = new QToolButton(*associationButton, TR("Association"), QString::null, this, SLOT(hit_association()), toolbar, "association"); association->setToggleButton(TRUE); Q3WhatsThis::add(association, associationText()); directionalassociation = new QToolButton(*directionalAssociationExtensionButton, TR("Directional Association / Extension"), QString::null, this, SLOT(hit_directionalassociation()), toolbar, "directional association"); directionalassociation->setToggleButton(TRUE); Q3WhatsThis::add(directionalassociation, directionalassociationextensionText()); aggregation = new QToolButton(*aggregationButton, TR("Aggregation"), QString::null, this, SLOT(hit_aggregation()), toolbar, "aggregation"); aggregation->setToggleButton(TRUE); Q3WhatsThis::add(aggregation, aggregationText()); aggregationbyvalue = new QToolButton(*aggregationByValueButton, TR("Composition"), QString::null, this, SLOT(hit_aggregationbyvalue()), toolbar, "composition"); aggregationbyvalue->setToggleButton(TRUE); Q3WhatsThis::add(aggregationbyvalue, aggregationbyvalueText()); directionalaggregation = new QToolButton(*directionalAggregationButton, TR("Directional Aggregation"), QString::null, this, SLOT(hit_directionalaggregation()), toolbar, "directional aggregation"); directionalaggregation->setToggleButton(TRUE); Q3WhatsThis::add(directionalaggregation, directionalaggregationText()); directionalaggregationbyvalue = new QToolButton(*directionalAggregationByValueButton, TR("Directional Composition"), QString::null, this, SLOT(hit_directionalaggregationbyvalue()), toolbar, "directional composition"); directionalaggregationbyvalue->setToggleButton(TRUE); Q3WhatsThis::add(directionalaggregationbyvalue, directionalaggregationbyvalueText()); note = new QToolButton(*noteButton, TR("Note"), QString::null, this, SLOT(hit_note()), toolbar, "note"); note->setToggleButton(TRUE); Q3WhatsThis::add(note, noteText()); anchor = new QToolButton(*anchorButton, TR("Anchor / Class association"), QString::null, this, SLOT(hit_anchor()), toolbar, "anchor"); anchor->setToggleButton(TRUE); Q3WhatsThis::add(anchor, anchorText()); text = new QToolButton(*textButton, TR("Text"), QString::null, this, SLOT(hit_text()), toolbar, "text"); text->setToggleButton(TRUE); Q3WhatsThis::add(text, textText()); image = new QToolButton(*imageButton, TR("Image"), QString::null, this, SLOT(hit_image()), toolbar, "image"); image->setToggleButton(TRUE); Q3WhatsThis::add(image, imageText()); toolbar->addSeparator(); add_grid_cmd(toolbar); toolbar->addSeparator(); add_scale_cmd(toolbar); // view = new ClassDiagramView(this, canvas, (id != -1) ? id : b->get_ident()); setFocusProxy(view); setCentralWidget(view); //qApp->setMainWidget(this); QWorkspace * w = UmlWindow::get_workspace(); resize((w->width() * 4)/5, (w->height() * 4)/5); /*if (w->windowList().isEmpty()) showMaximized(); else*/ show(); view->preferred_size_zoom(); //qApp->setMainWidget(0); }
// id is an old ident in case of an import ColDiagramWindow::ColDiagramWindow(const QString & s, BrowserColDiagram * b, int id) : DiagramWindow(b, s), view(0) { QToolBar * toolbar = new QToolBar("communication diagram operations", this); toolbar->setMinimumHeight(50); toolbar->setOrientation(Qt::Horizontal); addToolBar(Qt::TopToolBarArea, toolbar); add_edit_button(toolbar); select = ToolBarFactory::createToolButton(*selectButton, TR("Select"), QString(), this, SLOT(hit_select()), toolbar, "select"); select->setCheckable(TRUE); select->setChecked(TRUE); current_button = UmlSelect; addPackage = ToolBarFactory::createToolButton(*packageButton, TR("Add Package"), QString(), this, SLOT(hit_package()), toolbar, "add package"); addPackage->setCheckable(TRUE); addPackage->setWhatsThis(addpackageText()); addFragment = ToolBarFactory::createToolButton(*fragmentButton, TR("Add Fragment"), QString(), this, SLOT(hit_fragment()), toolbar, "add fragment"); addFragment->setCheckable(TRUE); addFragment->setWhatsThis(addfragmentText()); addClassInstance = ToolBarFactory::createToolButton(*classinstanceButton, TR("Add modeled Class instance"), QString(), this, SLOT(hit_classinstance()), toolbar, "add modeled class instance"); addClassInstance->setCheckable(TRUE); addClassInstance->setWhatsThis(addmodeledclassinstanceText()); addClass = ToolBarFactory::createToolButton(*classButton, TR("Add Class instance"), QString(), this, SLOT(hit_class()), toolbar, "add class instance"); addClass->setCheckable(TRUE); addClass->setWhatsThis(addclassinstanceText()); addLink = ToolBarFactory::createToolButton(*associationButton, TR("Add Link"), QString(), this, SLOT(hit_link()), toolbar, "add link"); addLink->setCheckable(TRUE); addLink->setWhatsThis(linkText()); addSelfLink = ToolBarFactory::createToolButton(*selflinkButton, TR("Add Self Link"), QString(), this, SLOT(hit_selflink()), toolbar, "add self link"); addSelfLink->setCheckable(TRUE); addSelfLink->setWhatsThis(selflinkText()); note = ToolBarFactory::createToolButton(*noteButton, TR("Note"), QString(), this, SLOT(hit_note()), toolbar, "note"); note->setCheckable(TRUE); note->setWhatsThis(noteText()); anchor = ToolBarFactory::createToolButton(*anchorButton, TR("Anchor"), QString(), this, SLOT(hit_anchor()), toolbar, "anchor"); anchor->setCheckable(TRUE); anchor->setWhatsThis(anchorText()); text = ToolBarFactory::createToolButton(*textButton, TR("Text"), QString(), this, SLOT(hit_text()), toolbar, "text"); text->setCheckable(TRUE); text->setWhatsThis(textText()); image = ToolBarFactory::createToolButton(*imageButton, TR("Image"), QString(), this, SLOT(hit_image()), toolbar, "image"); image->setCheckable(TRUE); image->setWhatsThis(imageText()); toolbar->addSeparator(); add_scale_cmd(toolbar); // view = new ColDiagramView(this, canvas, (id != -1) ? id : b->get_ident()); setFocusProxy(view); setCentralWidget(view); //qApp->setMainWidget(this); QMdiArea * w = UmlWindow::get_workspace(); m_containingSubWindow->resize((w->width() * 4) / 5, (w->height() * 4) / 5); /*if (w->windowList().isEmpty()) showMaximized(); else*/ show(); view->preferred_size_zoom(); //qApp->setMainWidget(0); }
// id is an old ident in case of an import DeploymentDiagramWindow::DeploymentDiagramWindow(const QString & s, BrowserDeploymentDiagram * b, int id) : DiagramWindow(b, s), view(0) { Q3ToolBar * toolbar = new Q3ToolBar(this, "deployment operations"); addToolBar(toolbar, TR("Toolbar"), Qt::DockTop, TRUE); add_edit_button(toolbar); toolbar->addSeparator(); select = new QToolButton(*selectButton, TR("Select"), QString::null, this, SLOT(hit_select()), toolbar, "select"); select->setToggleButton(TRUE); select->setOn(TRUE); current_button = UmlSelect; addPackage = new QToolButton(*packageButton, TR("Add Package"), QString::null, this, SLOT(hit_package()), toolbar, "add package"); addPackage->setToggleButton(TRUE); Q3WhatsThis::add(addPackage, addpackageText()); addFragment = new QToolButton(*fragmentButton, TR("Add Fragment"), QString::null, this, SLOT(hit_fragment()), toolbar, "add fragment"); addFragment->setToggleButton(TRUE); Q3WhatsThis::add(addFragment, addfragmentText()); addDeploymentNode = new QToolButton(*deploymentNodeButton, TR("Add Deployment Node"), QString::null, this, SLOT(hit_deploymentnode()), toolbar, "add deployment node"); addDeploymentNode->setToggleButton(TRUE); Q3WhatsThis::add(addDeploymentNode, adddeploymentnodeText()); addArtifact = new QToolButton(*artifactButton, TR("Add Artifact"), QString::null, this, SLOT(hit_artifact()), toolbar, "add artifact"); addArtifact->setToggleButton(TRUE); Q3WhatsThis::add(addArtifact, addartifactText()); addComponent = new QToolButton(*componentButton, TR("Add Component"), QString::null, this, SLOT(hit_component()), toolbar, "add component"); addComponent->setToggleButton(TRUE); Q3WhatsThis::add(addComponent, addcomponentText()); hub = new QToolButton(*hubButton, TR("Network connexion/ending"), QString::null, this, SLOT(hit_hub()), toolbar, "network connexion/ending"); hub->setToggleButton(TRUE); Q3WhatsThis::add(hub, hubText()); network = new QToolButton(*associationButton, TR("Network"), QString::null, this, SLOT(hit_network()), toolbar, "network"); network->setToggleButton(TRUE); Q3WhatsThis::add(network, networkText()); inherit = new QToolButton(*generalisationButton, TR("Inheritance"), QString::null, this, SLOT(hit_inherit()), toolbar, "inheritance"); inherit->setToggleButton(TRUE); Q3WhatsThis::add(inherit, inheritText()); association = new QToolButton(*directionalAssociationButton, TR("Association"), QString::null, this, SLOT(hit_association()), toolbar, "association"); association->setToggleButton(TRUE); Q3WhatsThis::add(association, associationText()); dependency = new QToolButton(*dependencyButton, TR("Dependency"), QString::null, this, SLOT(hit_dependency()), toolbar, "dependency"); dependency->setToggleButton(TRUE); Q3WhatsThis::add(dependency, dependencyText()); note = new QToolButton(*noteButton, TR("Note"), QString::null, this, SLOT(hit_note()), toolbar, "note"); note->setToggleButton(TRUE); Q3WhatsThis::add(note, noteText()); anchor = new QToolButton(*anchorButton, TR("Anchor"), QString::null, this, SLOT(hit_anchor()), toolbar, "anchor"); anchor->setToggleButton(TRUE); Q3WhatsThis::add(anchor, anchorText()); text = new QToolButton(*textButton, TR("Text"), QString::null, this, SLOT(hit_text()), toolbar, "text"); text->setToggleButton(TRUE); Q3WhatsThis::add(text, textText()); image = new QToolButton(*imageButton, TR("Image"), QString::null, this, SLOT(hit_image()), toolbar, "image"); image->setToggleButton(TRUE); Q3WhatsThis::add(image, imageText()); toolbar->addSeparator(); add_grid_cmd(toolbar); toolbar->addSeparator(); add_scale_cmd(toolbar); // view = new DeploymentDiagramView(this, canvas, (id != -1) ? id : b->get_ident()); setFocusProxy(view); setCentralWidget(view); //qApp->setMainWidget(this); QWorkspace * w = UmlWindow::get_workspace(); resize((w->width() * 4)/5, (w->height() * 4)/5); /*if (w->windowList().isEmpty()) showMaximized(); else*/ show(); view->preferred_size_zoom(); //qApp->setMainWidget(0); }
// id is an old ident in case of an import StateDiagramWindow::StateDiagramWindow(const QString & s, BrowserStateDiagram * b, int id) : DiagramWindow(b, s), view(0) { Q3ToolBar * toolbar = new Q3ToolBar(this, "state operations"); addToolBar(toolbar, TR("Toolbar"), Qt::DockTop, TRUE); add_edit_button(toolbar); toolbar->addSeparator(); select = new QToolButton(*selectButton, TR("Select"), QString::null, this, SLOT(hit_select()), toolbar, "select"); select->setToggleButton(TRUE); select->setOn(TRUE); current_button = UmlSelect; addPackage = new QToolButton(*packageButton, TR("Add Package"), QString::null, this, SLOT(hit_package()), toolbar, "add package"); addPackage->setToggleButton(TRUE); Q3WhatsThis::add(addPackage, addpackageText()); addFragment = new QToolButton(*fragmentButton, TR("Add Fragment"), QString::null, this, SLOT(hit_fragment()), toolbar, "add fragment"); addFragment->setToggleButton(TRUE); Q3WhatsThis::add(addFragment, addfragmentText()); addState = new QToolButton(*stateButton, TR("Add State"), QString::null, this, SLOT(hit_state()), toolbar, "add state"); addState->setToggleButton(TRUE); Q3WhatsThis::add(addState, addstateText()); addRegion = new QToolButton(*regionButton, TR("Add Region"), QString::null, this, SLOT(hit_region()), toolbar, "add region"); addRegion->setToggleButton(TRUE); Q3WhatsThis::add(addRegion, addregionText()); addInitial = new QToolButton(*initialButton, TR("Add Initial pseudo state"), QString::null, this, SLOT(hit_initial()), toolbar, "add initial"); addInitial->setToggleButton(TRUE); Q3WhatsThis::add(addInitial, addinitialText()); addEntryPoint = new QToolButton(*entrypointButton, TR("Add Entry Point"), QString::null, this, SLOT(hit_entryPoint()), toolbar, "add entry point"); addEntryPoint->setToggleButton(TRUE); Q3WhatsThis::add(addEntryPoint, addentrypointText()); addFinal = new QToolButton(*finalButton, TR("Add Final state"), QString::null, this, SLOT(hit_final()), toolbar, "add final"); addFinal->setToggleButton(TRUE); Q3WhatsThis::add(addFinal, addfinalText()); addExitPoint = new QToolButton(*exitpointButton, TR("Add Exit Point"), QString::null, this, SLOT(hit_exitPoint()), toolbar, "add exit point"); addExitPoint->setToggleButton(TRUE); Q3WhatsThis::add(addExitPoint, addexitpointText()); addTerminate = new QToolButton(*terminateButton, TR("Add Terminate node"), QString::null, this, SLOT(hit_terminate()), toolbar, "add terminate"); addTerminate->setToggleButton(TRUE); Q3WhatsThis::add(addTerminate, addterminateText()); addDeepHistory = new QToolButton(*deephistoryButton, TR("Add Deep History"), QString::null, this, SLOT(hit_deepHistory()), toolbar, "add deep history"); addDeepHistory->setToggleButton(TRUE); Q3WhatsThis::add(addDeepHistory, adddeephistoryText()); addShallowHistory = new QToolButton(*shallowhistoryButton, TR("Add Shallow History"), QString::null, this, SLOT(hit_shallowHistory()), toolbar, "add shallow history"); addShallowHistory->setToggleButton(TRUE); Q3WhatsThis::add(addShallowHistory, addshallowhistoryText()); addJunction = new QToolButton(*junctionButton, TR("Add Junction"), QString::null, this, SLOT(hit_junction()), toolbar, "add junction"); addJunction->setToggleButton(TRUE); Q3WhatsThis::add(addJunction, addjunctionText()); addChoice = new QToolButton(*choiceButton, TR("Add Choice"), QString::null, this, SLOT(hit_choice()), toolbar, "add choice"); addChoice->setToggleButton(TRUE); Q3WhatsThis::add(addChoice, addchoiceText()); addFork = new QToolButton(*forkButton, TR("Add Fork"), QString::null, this, SLOT(hit_fork()), toolbar, "add fork"); addFork->setToggleButton(TRUE); Q3WhatsThis::add(addFork, addforkText()); addJoin = new QToolButton(*joinButton, TR("Add Join"), QString::null, this, SLOT(hit_join()), toolbar, "add join"); addJoin->setToggleButton(TRUE); Q3WhatsThis::add(addJoin, addjoinText()); addAction = new QToolButton(*actionButton, TR("Add Action"), QString::null, this, SLOT(hit_action()), toolbar, "add action"); addAction->setToggleButton(TRUE); Q3WhatsThis::add(addAction, addactionText()); addSignalIn = new QToolButton(*signalinButton, TR("Add receive signal action"), QString::null, this, SLOT(hit_signalin()), toolbar, "add receive signal action"); addSignalIn->setToggleButton(TRUE); Q3WhatsThis::add(addSignalIn, addsignalinText()); addSignalOut = new QToolButton(*signaloutButton, TR("Add send signal action"), QString::null, this, SLOT(hit_signalout()), toolbar, "add send signal action"); addSignalOut->setToggleButton(TRUE); Q3WhatsThis::add(addSignalOut, addsignaloutText()); addTransition = new QToolButton(*directionalAssociationButton, TR("Add Transition"), QString::null, this, SLOT(hit_transition()), toolbar, "add transition"); addTransition->setToggleButton(TRUE); Q3WhatsThis::add(addTransition, addtransitionText()); /* dependency = new QToolButton(*dependencyButton, "Dependency", QString::null, this, SLOT(hit_dependency()), toolbar, "dependency"); dependency->setToggleButton(TRUE); QWhatsThis::add(dependency, dependencyText()); */ note = new QToolButton(*noteButton, TR("Note"), QString::null, this, SLOT(hit_note()), toolbar, "note"); note->setToggleButton(TRUE); Q3WhatsThis::add(note, noteText()); anchor = new QToolButton(*anchorButton, TR("Anchor"), QString::null, this, SLOT(hit_anchor()), toolbar, "anchor"); anchor->setToggleButton(TRUE); Q3WhatsThis::add(anchor, anchorText()); text = new QToolButton(*textButton, TR("Text"), QString::null, this, SLOT(hit_text()), toolbar, "text"); text->setToggleButton(TRUE); Q3WhatsThis::add(text, textText()); image = new QToolButton(*imageButton, TR("Image"), QString::null, this, SLOT(hit_image()), toolbar, "image"); image->setToggleButton(TRUE); Q3WhatsThis::add(image, imageText()); toolbar->addSeparator(); add_grid_cmd(toolbar); toolbar->addSeparator(); add_scale_cmd(toolbar); // view = new StateDiagramView(this, canvas, (id != -1) ? id : b->get_ident()); setFocusProxy(view); setCentralWidget(view); //qApp->setMainWidget(this); QWorkspace * w = UmlWindow::get_workspace(); resize((w->width() * 4)/5, (w->height() * 4)/5); /*if (w->windowList().isEmpty()) showMaximized(); else*/ show(); view->preferred_size_zoom(); //qApp->setMainWidget(0); }
// id is an old ident in case of an import DeploymentDiagramWindow::DeploymentDiagramWindow(const QString & s, BrowserDeploymentDiagram * b, int id) : DiagramWindow(b, s), view(0) { QToolBar * toolbar = new QToolBar("deployment operations", this); toolbar->setMinimumHeight(50); toolbar->setOrientation(Qt::Horizontal); addToolBar(Qt::TopToolBarArea, toolbar); add_edit_button(toolbar); select = ToolBarFactory::createToolButton(*selectButton, tr("Select"), QString(), this, SLOT(hit_select()), toolbar, "select"); select->setCheckable(TRUE); select->setChecked(TRUE); current_button = UmlSelect; addPackage = ToolBarFactory::createToolButton(*packageButton, tr("Add Package"), QString(), this, SLOT(hit_package()), toolbar, "add package"); addPackage->setCheckable(TRUE); addPackage->setWhatsThis(addpackageText()); addFragment = ToolBarFactory::createToolButton(*fragmentButton, tr("Add Fragment"), QString(), this, SLOT(hit_fragment()), toolbar, "add fragment"); addFragment->setCheckable(TRUE); addFragment->setWhatsThis(addfragmentText()); addDeploymentNode = ToolBarFactory::createToolButton(*deploymentNodeButton, tr("Add Deployment Node"), QString(), this, SLOT(hit_deploymentnode()), toolbar, "add deployment node"); addDeploymentNode->setCheckable(TRUE); addDeploymentNode->setWhatsThis(adddeploymentnodeText()); addArtifact = ToolBarFactory::createToolButton(*artifactButton, tr("Add Artifact"), QString(), this, SLOT(hit_artifact()), toolbar, "add artifact"); addArtifact->setCheckable(TRUE); addArtifact->setWhatsThis(addartifactText()); addComponent = ToolBarFactory::createToolButton(*componentButton, tr("Add Component"), QString(), this, SLOT(hit_component()), toolbar, "add component"); addComponent->setCheckable(TRUE); addComponent->setWhatsThis(addcomponentText()); hub = ToolBarFactory::createToolButton(*hubButton, tr("Network connexion/ending"), QString(), this, SLOT(hit_hub()), toolbar, "network connexion/ending"); hub->setCheckable(TRUE); hub->setWhatsThis(hubText()); network = ToolBarFactory::createToolButton(*associationButton, tr("Network"), QString(), this, SLOT(hit_network()), toolbar, "network"); network->setCheckable(TRUE); network->setWhatsThis(networkText()); inherit = ToolBarFactory::createToolButton(*generalisationButton, tr("Inheritance"), QString(), this, SLOT(hit_inherit()), toolbar, "inheritance"); inherit->setCheckable(TRUE); inherit->setWhatsThis(inheritText()); association = ToolBarFactory::createToolButton(*directionalAssociationButton, tr("Association"), QString(), this, SLOT(hit_association()), toolbar, "association"); association->setCheckable(TRUE); association->setWhatsThis(associationText()); dependency = ToolBarFactory::createToolButton(*dependencyButton, tr("Dependency"), QString(), this, SLOT(hit_dependency()), toolbar, "dependency"); dependency->setCheckable(TRUE); dependency->setWhatsThis(dependencyText()); note = ToolBarFactory::createToolButton(*noteButton, tr("Note"), QString(), this, SLOT(hit_note()), toolbar, "note"); note->setCheckable(TRUE); note->setWhatsThis(noteText()); anchor = ToolBarFactory::createToolButton(*anchorButton, tr("Anchor"), QString(), this, SLOT(hit_anchor()), toolbar, "anchor"); anchor->setCheckable(TRUE); anchor->setWhatsThis(anchorText()); text = ToolBarFactory::createToolButton(*textButton, tr("Text"), QString(), this, SLOT(hit_text()), toolbar, "text"); text->setCheckable(TRUE); text->setWhatsThis(textText()); image = ToolBarFactory::createToolButton(*imageButton, tr("Image"), QString(), this, SLOT(hit_image()), toolbar, "image"); image->setCheckable(TRUE); image->setWhatsThis(imageText()); toolbar->addSeparator(); add_scale_cmd(toolbar); // view = new DeploymentDiagramView(this, canvas, (id != -1) ? id : b->get_ident()); setFocusProxy(view); setCentralWidget(view); //qApp->setMainWidget(this); QMdiArea * w = UmlWindow::get_workspace(); m_containingSubWindow->resize((w->width() * 4) / 5, (w->height() * 4) / 5); /*if (w->windowList().isEmpty()) showMaximized(); else*/ show(); view->preferred_size_zoom(); //qApp->setMainWidget(0); }
// id is an old ident in case of an import ColDiagramWindow::ColDiagramWindow(const QString & s, BrowserColDiagram * b, int id) : DiagramWindow(b, s), view(0) { Q3ToolBar * toolbar = new Q3ToolBar(this, "communication diagram operations"); addToolBar(toolbar, TR("Toolbar"), Qt::DockTop, TRUE); add_edit_button(toolbar); toolbar->addSeparator(); select = new QToolButton(*selectButton, TR("Select"), QString::null, this, SLOT(hit_select()), toolbar, "select"); select->setToggleButton(TRUE); select->setOn(TRUE); current_button = UmlSelect; addPackage = new QToolButton(*packageButton, TR("Add Package"), QString::null, this, SLOT(hit_package()), toolbar, "add package"); addPackage->setToggleButton(TRUE); Q3WhatsThis::add(addPackage, addpackageText()); addFragment = new QToolButton(*fragmentButton, TR("Add Fragment"), QString::null, this, SLOT(hit_fragment()), toolbar, "add fragment"); addFragment->setToggleButton(TRUE); Q3WhatsThis::add(addFragment, addfragmentText()); addClassInstance = new QToolButton(*classinstanceButton, TR("Add modeled Class instance"), QString::null, this, SLOT(hit_classinstance()), toolbar, "add modeled class instance"); addClassInstance->setToggleButton(TRUE); Q3WhatsThis::add(addClassInstance, addmodeledclassinstanceText()); addClass = new QToolButton(*classButton, TR("Add Class instance"), QString::null, this, SLOT(hit_class()), toolbar, "add class instance"); addClass->setToggleButton(TRUE); Q3WhatsThis::add(addClass, addclassinstanceText()); addLink = new QToolButton(*associationButton, TR("Add Link"), QString::null, this, SLOT(hit_link()), toolbar, "add link"); addLink->setToggleButton(TRUE); Q3WhatsThis::add(addLink, linkText()); addSelfLink = new QToolButton(*selflinkButton, TR("Add Self Link"), QString::null, this, SLOT(hit_selflink()), toolbar, "add self link"); addSelfLink->setToggleButton(TRUE); Q3WhatsThis::add(addSelfLink, selflinkText()); note = new QToolButton(*noteButton, TR("Note"), QString::null, this, SLOT(hit_note()), toolbar, "note"); note->setToggleButton(TRUE); Q3WhatsThis::add(note, noteText()); anchor = new QToolButton(*anchorButton, TR("Anchor"), QString::null, this, SLOT(hit_anchor()), toolbar, "anchor"); anchor->setToggleButton(TRUE); Q3WhatsThis::add(anchor, anchorText()); text = new QToolButton(*textButton, TR("Text"), QString::null, this, SLOT(hit_text()), toolbar, "text"); text->setToggleButton(TRUE); Q3WhatsThis::add(text, textText()); image = new QToolButton(*imageButton, TR("Image"), QString::null, this, SLOT(hit_image()), toolbar, "image"); image->setToggleButton(TRUE); Q3WhatsThis::add(image, imageText()); toolbar->addSeparator(); add_grid_cmd(toolbar); toolbar->addSeparator(); add_scale_cmd(toolbar); // view = new ColDiagramView(this, canvas, (id != -1) ? id : b->get_ident()); setFocusProxy(view); setCentralWidget(view); //qApp->setMainWidget(this); QWorkspace * w = UmlWindow::get_workspace(); resize((w->width() * 4)/5, (w->height() * 4)/5); /*if (w->windowList().isEmpty()) showMaximized(); else*/ show(); view->preferred_size_zoom(); //qApp->setMainWidget(0); }
// id is an old ident in case of an import ActivityDiagramWindow::ActivityDiagramWindow(const QString & s, BrowserActivityDiagram * b, int id) : DiagramWindow(b, s), view(0) { QToolBar * toolbar = new QToolBar(this, "activity operations"); addToolBar(toolbar, TR("Toolbar"), Top, TRUE); add_edit_button(toolbar); select = new QToolButton(*selectButton, TR("Select"), QString::null, this, SLOT(hit_select()), toolbar, "select"); select->setToggleButton(TRUE); select->setOn(TRUE); current_button = UmlSelect; addPackage = new QToolButton(*packageButton, TR("New Package"), QString::null, this, SLOT(hit_package()), toolbar, "add package"); addPackage->setToggleButton(TRUE); QWhatsThis::add(addPackage, addpackageText()); addFragment = new QToolButton(*fragmentButton, TR("New Fragment"), QString::null, this, SLOT(hit_fragment()), toolbar, "add fragment"); addFragment->setToggleButton(TRUE); QWhatsThis::add(addFragment, addfragmentText()); addActivity = new QToolButton(*activityButton, TR("New Activity"), QString::null, this, SLOT(hit_activity()), toolbar, "add activity"); addActivity->setToggleButton(TRUE); QWhatsThis::add(addActivity, addactivityText()); addInterruptibleActivityRegion = new QToolButton(*interruptibleactivityregionButton, TR("New Interruptible Activity Region"), QString::null, this, SLOT(hit_interruptibleactivityregion()), toolbar, "add interruptible activity region"); addInterruptibleActivityRegion->setToggleButton(TRUE); QWhatsThis::add(addInterruptibleActivityRegion, addinterruptibleactivityregionText()); addExpansionRegion = new QToolButton(*expansionregionButton, TR("New Expansion Region"), QString::null, this, SLOT(hit_expansionregion()), toolbar, "add expansion region"); addExpansionRegion->setToggleButton(TRUE); QWhatsThis::add(addExpansionRegion, addexpansionregionText()); addActivityPartition = new QToolButton(*activitypartitionButton, TR("New Activity Partition"), QString::null, this, SLOT(hit_activitypartition()), toolbar, "add activity partition"); addActivityPartition->setToggleButton(TRUE); QWhatsThis::add(addActivityPartition, addactivitypartitionText()); addAction = new QToolButton(*activityactionButton, TR("New Action"), QString::null, this, SLOT(hit_action()), toolbar, "add action"); addAction->setToggleButton(TRUE); QWhatsThis::add(addAction, addactionText()); addObject = new QToolButton(*actionButton, TR("New Object Node"), QString::null, this, SLOT(hit_object()), toolbar, "add object node"); addObject->setToggleButton(TRUE); QWhatsThis::add(addObject, addobjectText()); addInitial = new QToolButton(*initialButton, TR("New Initial node"), QString::null, this, SLOT(hit_initial()), toolbar, "add initial"); addInitial->setToggleButton(TRUE); QWhatsThis::add(addInitial, addinitialText()); addActivityFinal = new QToolButton(*finalButton, TR("New Activity Final"), QString::null, this, SLOT(hit_activityfinal()), toolbar, "add activity final"); addActivityFinal->setToggleButton(TRUE); QWhatsThis::add(addActivityFinal, addactivityfinalText()); addFlowFinal = new QToolButton(*exitpointButton, TR("New Flow Final"), QString::null, this, SLOT(hit_flowfinal()), toolbar, "add flow final"); addFlowFinal->setToggleButton(TRUE); QWhatsThis::add(addFlowFinal, addflowfinalText()); addMerge = new QToolButton(*mergeButton, TR("New Merge"), QString::null, this, SLOT(hit_merge()), toolbar, "add merge"); addMerge->setToggleButton(TRUE); QWhatsThis::add(addMerge, addmergeText()); addDecision = new QToolButton(*decisionButton, TR("New Decision"), QString::null, this, SLOT(hit_decision()), toolbar, "add decision"); addDecision->setToggleButton(TRUE); QWhatsThis::add(addDecision, adddecisionText()); addFork = new QToolButton(*forkButton, TR("New Fork"), QString::null, this, SLOT(hit_fork()), toolbar, "add fork"); addFork->setToggleButton(TRUE); QWhatsThis::add(addFork, addforkText()); addJoin = new QToolButton(*joinButton, TR("New Join"), QString::null, this, SLOT(hit_join()), toolbar, "add join"); addJoin->setToggleButton(TRUE); QWhatsThis::add(addJoin, addjoinText()); addFlow = new QToolButton(*directionalAssociationButton, TR("New Flow"), QString::null, this, SLOT(hit_flow()), toolbar, "add flow"); addFlow->setToggleButton(TRUE); QWhatsThis::add(addFlow, addflowText()); dependency = new QToolButton(*dependencyButton, TR("Dependency"), QString::null, this, SLOT(hit_dependency()), toolbar, "dependency"); dependency->setToggleButton(TRUE); QWhatsThis::add(dependency, dependencyText()); note = new QToolButton(*noteButton, TR("Note"), QString::null, this, SLOT(hit_note()), toolbar, "note"); note->setToggleButton(TRUE); QWhatsThis::add(note, noteText()); anchor = new QToolButton(*anchorButton, TR("Anchor"), QString::null, this, SLOT(hit_anchor()), toolbar, "anchor"); anchor->setToggleButton(TRUE); QWhatsThis::add(anchor, anchorText()); text = new QToolButton(*textButton, TR("Text"), QString::null, this, SLOT(hit_text()), toolbar, "text"); text->setToggleButton(TRUE); QWhatsThis::add(text, textText()); image = new QToolButton(*imageButton, TR("Image"), QString::null, this, SLOT(hit_image()), toolbar, "image"); image->setToggleButton(TRUE); QWhatsThis::add(image, imageText()); toolbar->addSeparator(); add_scale_cmd(toolbar); // view = new ActivityDiagramView(this, canvas, (id != -1) ? id : b->get_ident()); setFocusProxy(view); setCentralWidget(view); //qApp->setMainWidget(this); QWorkspace * w = UmlWindow::get_workspace(); resize((w->width() * 4)/5, (w->height() * 4)/5); /*if (w->windowList().isEmpty()) showMaximized(); else*/ show(); view->preferred_size_zoom(); //qApp->setMainWidget(0); }