/** * Set the ID of the diagram hyperlinked to this note. * To switch off the hyperlink, set this to Uml::id_None. * * @param sceneID ID of an UMLScene. * @todo Fix the display of diagram link. */ void NoteWidget::setDiagramLink(Uml::IDType sceneID) { UMLView *view = umlDoc()->findView(sceneID); if (view == 0) { uError() << "no view found for viewID " << ID2STR(sceneID); return; } QString linkText("Diagram: " + view->umlScene()->name()); m_diagramLink = sceneID; }
/** * Set the ID of the diagram hyperlinked to this note. * To switch off the hyperlink, set this to Uml::id_None. * * @param viewID ID of an UMLScene. */ void NoteWidget::setDiagramLink(Uml::ID::Type viewID) { UMLDoc *umldoc = UMLApp::app()->document(); UMLView *view = umldoc->findView(viewID); if (view == NULL) { uError() << "no view found for viewID " << Uml::ID::toString(viewID); return; } QString linkText(QLatin1String("Diagram: ") + view->umlScene()->name()); setDocumentation(linkText); m_diagramLink = viewID; update(); }
void SolarSystemManagerWindow::updateTexts() { //Solar System tab // TRANSLATORS: Appears as the text of hyperlinks linking to websites. :) QString linkText(q_("website")); QString linkCode = QString("<a href=\"http://www.minorplanetcenter.net/\">%1</a>").arg(linkText); // TRANSLATORS: IAU = International Astronomical Union QString mpcText(q_("You can import comet and asteroid data formatted in the export formats of the IAU's Minor Planet Center (%1). You can import files with lists of objects, download such lists from the Internet or search the online Minor Planet and Comet Ephemeris Service (MPES).")); ui->labelMPC->setText(QString(mpcText).arg(linkCode)); //About tab ui->labelTitle->setText(q_("Solar System Editor plug-in")); ui->labelVersion->setText(QString(q_("Version %1")).arg(SOLARSYSTEMEDITOR_VERSION)); }
void MpcImportWindow::updateTexts() { QString linkText("<a href=\"http://www.minorplanetcenter.net/iau/MPEph/MPEph.html\">Minor Planet & Comet Ephemeris Service</a>"); // TRANSLATORS: A link showing the text "Minor Planet & Comet Ephemeris Service" is inserted. QString queryString(q_("Query the MPC's %1:")); ui->labelQueryLink->setText(QString(queryString).arg(linkText)); QString firstLine(q_("Only one result will be returned if the query is successful.")); QString secondLine(q_("Both comets and asteroids can be identified with their number, name (in English) or provisional designation.")); QString cPrefix("<b>C/</b>"); QString pPrefix("<b>P/</b>"); QString cometQuery("<tt>C/Halley</tt>"); QString cometName("1P/Halley"); QString asteroidQuery("<tt>Halley</tt>"); QString asteroidName("(2688) Halley"); QString nameWarning(q_("Comet <i>names</i> need to be prefixed with %1 or %2. If more than one comet matches a name, only the first result will be returned. For example, searching for \"%3\" will return %4, Halley's Comet, but a search for \"%5\" will return the asteroid %6.")); QString thirdLine = QString(nameWarning).arg(cPrefix, pPrefix, cometQuery, cometName, asteroidQuery, asteroidName); ui->labelQueryInstructions->setText(QString("%1<br/>%2<br/>%3").arg(firstLine, secondLine, thirdLine)); }
// 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 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); }