void TelescopeDialog::setAboutText() { //TODO: Expand QString aboutPage = "<html><head></head><body>"; aboutPage += QString("<h2>%1</h2>").arg(q_("Telescope Control plug-in")); aboutPage += "<h3>" + QString(q_("Version %1")).arg(TELESCOPE_CONTROL_VERSION) + "</h3>"; QFile aboutFile(":/telescopeControl/about.utf8"); aboutFile.open(QFile::ReadOnly | QFile::Text); aboutPage += aboutFile.readAll(); aboutFile.close(); aboutPage += "</body></html>"; QString helpPage = "<html><head></head><body>"; QFile helpFile(":/telescopeControl/help.utf8"); helpFile.open(QFile::ReadOnly | QFile::Text); helpPage += helpFile.readAll(); helpFile.close(); helpPage += "</body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); ui->textBrowserAbout->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); ui->textBrowserHelp->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); ui->textBrowserAbout->setHtml(aboutPage); ui->textBrowserHelp->setHtml(helpPage); }
// Initialize the dialog widgets and connect the signals/slots void ExoplanetsDialog::createDialogContent() { ep = GETSTELMODULE(Exoplanets); ui->setupUi(dialog); ui->tabs->setCurrentIndex(0); connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); // Settings tab / updates group ui->displayAtStartupCheckBox->setChecked(ep->getEnableAtStartup()); connect(ui->displayAtStartupCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setDisplayAtStartupEnabled(int))); ui->displayModeCheckBox->setChecked(ep->getDisplayMode()); connect(ui->displayModeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setDistributionEnabled(int))); ui->displayShowExoplanetsButton->setChecked(ep->getFlagShowExoplanetsButton()); connect(ui->displayShowExoplanetsButton, SIGNAL(stateChanged(int)), this, SLOT(setDisplayShowExoplanetsButton(int))); ui->timelineModeCheckBox->setChecked(ep->getTimelineMode()); connect(ui->timelineModeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setTimelineEnabled(int))); ui->habitableModeCheckBox->setChecked(ep->getHabitableMode()); connect(ui->habitableModeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setHabitableEnabled(int))); connect(ui->internetUpdatesCheckbox, SIGNAL(stateChanged(int)), this, SLOT(setUpdatesEnabled(int))); connect(ui->updateButton, SIGNAL(clicked()), this, SLOT(updateJSON())); connect(ep, SIGNAL(updateStateChanged(Exoplanets::UpdateState)), this, SLOT(updateStateReceiver(Exoplanets::UpdateState))); connect(ep, SIGNAL(jsonUpdateComplete(void)), this, SLOT(updateCompleteReceiver(void))); connect(ui->updateFrequencySpinBox, SIGNAL(valueChanged(int)), this, SLOT(setUpdateValues(int))); refreshUpdateValues(); // fetch values for last updated and so on // if the state didn't change, setUpdatesEnabled will not be called, so we force it setUpdatesEnabled(ui->internetUpdatesCheckbox->checkState()); updateTimer = new QTimer(this); connect(updateTimer, SIGNAL(timeout()), this, SLOT(refreshUpdateValues())); updateTimer->start(7000); connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(restoreDefaults())); connect(ui->saveSettingsButton, SIGNAL(clicked()), this, SLOT(saveSettings())); // About & Info tabs setAboutHtml(); setInfoHtml(); setWebsitesHtml(); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if(gui!=NULL) { ui->aboutTextBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); ui->infoTextBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); ui->websitesTextBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); } updateGuiFromSettings(); }
// Initialize the dialog widgets and connect the signals/slots void ObservabilityDialog::createDialogContent() { ui->setupUi(dialog); ui->tabs->setCurrentIndex(0); connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); // Settings: connect(ui->Today, SIGNAL(stateChanged(int)), this, SLOT(setTodayFlag(int))); connect(ui->AcroCos, SIGNAL(stateChanged(int)), this, SLOT(setAcroCosFlag(int))); connect(ui->Opposition, SIGNAL(stateChanged(int)), this, SLOT(setOppositionFlag(int))); connect(ui->Goods, SIGNAL(stateChanged(int)), this, SLOT(setGoodDatesFlag(int))); connect(ui->FullMoon, SIGNAL(stateChanged(int)), this, SLOT(setFullMoonFlag(int))); // connect(ui->Crescent, SIGNAL(stateChanged(int)), this, SLOT(setCrescentMoonFlag(int))); // connect(ui->SuperMoon, SIGNAL(stateChanged(int)), this, SLOT(setSuperMoonFlag(int))); connect(ui->Red, SIGNAL(sliderMoved(int)), this, SLOT(setRed(int))); connect(ui->Green, SIGNAL(sliderMoved(int)), this, SLOT(setGreen(int))); connect(ui->Blue, SIGNAL(sliderMoved(int)), this, SLOT(setBlue(int))); connect(ui->fontSize, SIGNAL(sliderMoved(int)), this, SLOT(setSize(int))); connect(ui->SunAltitude, SIGNAL(sliderMoved(int)), this, SLOT(setAltitude(int))); connect(ui->HorizAltitude, SIGNAL(sliderMoved(int)), this, SLOT(setHorizon(int))); connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(restoreDefaults())); connect(ui->saveSettingsButton, SIGNAL(clicked()), this, SLOT(saveSettings())); // About tab setAboutHtml(); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); ui->aboutTextBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); updateGuiFromSettings(); }
void StoredViewDialog::createDialogContent() { ui->setupUi(dialog); connect(ui->closeStelWindow, &QPushButton::clicked, this, &StelDialog::close); connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint))); mgr = GETSTELMODULE(Scenery3dMgr); Q_ASSERT(mgr); connect(ui->pushButtonAddView, &QPushButton::clicked, this, &StoredViewDialog::addUserView); connect(ui->pushButtonLoadView, &QPushButton::clicked, this, &StoredViewDialog::loadView); //also allow doubleclick to load view connect(ui->listView, &QListView::doubleClicked, this, &StoredViewDialog::loadView); connect(ui->pushButtonDeleteView, &QPushButton::clicked, this, &StoredViewDialog::deleteView); connect(ui->lineEditTitle, &QLineEdit::editingFinished, this, &StoredViewDialog::updateCurrentView); connect(ui->textEditDescription, &CustomTextEdit::editingFinished, this, &StoredViewDialog::updateCurrentView); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); ui->textEditDescription->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); //we use a sorta MVC system here viewModel = new StoredViewModel(ui->listView); ui->listView->setModel(viewModel); connect(ui->listView->selectionModel(), &QItemSelectionModel::currentChanged, this, &StoredViewDialog::updateViewSelection); connect(mgr, &Scenery3dMgr::currentSceneChanged, viewModel, &StoredViewModel::setScene); connect(viewModel, &QAbstractItemModel::modelReset, this, &StoredViewDialog::resetViewSelection); viewModel->setScene(mgr->getCurrentScene()); }
void ExoplanetsDialog::setWebsitesHtml(void) { QString html = "<html><head></head><body>"; html += "<h2>" + q_("General professional Web sites relevant to extrasolar planets") + "</h2><ul>"; html += QString("<li><a href='%1'>%2</a></li>").arg("http://codementum.org/exoplanets/").arg(q_("Exoplanets: an interactive version of XKCD 1071")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.cfa.harvard.edu/HEK/").arg(q_("HEK (The Hunt for Exomoons with Kepler)")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.univie.ac.at/adg/schwarz/multiple.html").arg(q_("Exoplanets in binaries and multiple systems (Richard Schwarz)")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.iau.org/public/naming/#exoplanets").arg(q_("Naming exoplanets (IAU)")); html += QString("<li><a href='%1'>%2</a> (<em>%3</em>)</li>").arg("http://voparis-exoplanet.obspm.fr/people.html").arg(q_("Some Astronomers and Groups active in extrasolar planets studies")).arg(q_("update: 16 April 2012")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://exoplanets.org/").arg(q_("The Exoplanet Data Explorer")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.phys.unsw.edu.au/~cgt/planet/AAPS_Home.html").arg(q_("The Anglo-Australian Planet Search")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.exoplanets.ch/").arg(q_("Geneva Extrasolar Planet Search Programmes")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://olbin.jpl.nasa.gov/").arg(q_("OLBIN (Optical Long-Baseline Interferometry News)")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://exep.jpl.nasa.gov/").arg(q_("NASA's Exoplanet Exploration Program")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.astro.psu.edu/users/alex/pulsar_planets.htm").arg(q_("Pulsar planets")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://exoplanetarchive.ipac.caltech.edu/").arg(q_("The NASA Exoplanet Archive")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.dtm.ciw.edu/boss/c53index.html").arg(q_("IAU Commission 53: Extrasolar Planets")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.exomol.com/").arg(q_("ExoMol")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.hzgallery.org/").arg(q_("The Habitable Zone Gallery")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://planetquest.jpl.nasa.gov/").arg(q_("PlanetQuest - The Search for Another Earth")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.openexoplanetcatalogue.com/").arg(q_("Open Exoplanet Catalogue")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://phl.upr.edu/projects/habitable-exoplanets-catalog").arg(q_("The Habitable Exoplanets Catalog")); html += "</ul></body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if(gui!=Q_NULLPTR) { QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); ui->websitesTextBrowser->document()->setDefaultStyleSheet(htmlStyleSheet); } ui->websitesTextBrowser->setHtml(html); }
void ExoplanetsDialog::setAboutHtml(void) { // Regexp to replace {text} with an HTML link. QRegExp a_rx = QRegExp("[{]([^{]*)[}]"); QString html = "<html><head></head><body>"; html += "<h2>" + q_("Exoplanets Plug-in") + "</h2><table width=\"90%\">"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</strong></td><td>" + EXOPLANETS_PLUGIN_VERSION + "</td></tr>"; html += "<tr><td><strong>" + q_("License") + ":</strong></td><td>" + EXOPLANETS_PLUGIN_LICENSE + "</td></tr>"; html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Alexander Wolf <[email protected]></td></tr></table>"; html += "<p>" + QString(q_("This plugin plots the position of stars with exoplanets. Exoplanets data is derived from \"%1The Extrasolar Planets Encyclopaedia%2\"")).arg("<a href=\"http://exoplanet.eu/\">").arg("</a>") + ". "; html += QString(q_("The list of potential habitable exoplanets and data about them were taken from \"%1The Habitable Exoplanets Catalog%3\" by %2Planetary Habitability Laboratory%3.")).arg("<a href=\"http://phl.upr.edu/projects/habitable-exoplanets-catalog\">").arg("<a href=\"http://phl.upr.edu/home\">").arg("</a>") + "</p>"; html += "<p>" + q_("The current catalog contains info about %1 planetary systems, which altogether have %2 exoplanets (including %3 potentially habitable exoplanets).").arg(ep->getCountPlanetarySystems()).arg(ep->getCountAllExoplanets()).arg(ep->getCountHabitableExoplanets()) + "</p>"; html += "<h3>" + q_("Links") + "</h3>"; html += "<p>" + QString(q_("Support is provided via the Github website. Be sure to put \"%1\" in the subject when posting.")).arg("Exoplanets plugin") + "</p>"; html += "<p><ul>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<li>" + q_("If you have a question, you can {get an answer here}.").toHtmlEscaped().replace(a_rx, "<a href=\"https://groups.google.com/forum/#!forum/stellarium\">\\1</a>") + "</li>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<li>" + q_("Bug reports and feature requests can be made {here}.").toHtmlEscaped().replace(a_rx, "<a href=\"https://github.com/Stellarium/stellarium/issues\">\\1</a>") + "</li>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<li>" + q_("If you want to read full information about this plugin and its history, you can {get info here}.").toHtmlEscaped().replace(a_rx, "<a href=\"http://stellarium.sourceforge.net/wiki/index.php/Exoplanets_plugin\">\\1</a>") + "</li>"; html += "</ul></p></body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if(gui!=Q_NULLPTR) { QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlStyleSheet); } ui->aboutTextBrowser->setHtml(html); }
void ExoplanetsDialog::setAboutHtml(void) { QString html = "<html><head></head><body>"; html += "<h2>" + q_("Exoplanets Plug-in") + "</h2><table width=\"90%\">"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</strong></td><td>" + EXOPLANETS_PLUGIN_VERSION + "</td></tr>"; html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Alexander Wolf <[email protected]></td></tr></table>"; html += "<p>" + QString(q_("This plugin plots the position of stars with exoplanets. Exoplanets data is derived from \"%1The Extrasolar Planets Encyclopaedia%2\"")).arg("<a href=\"http://exoplanet.eu/\">").arg("</a>") + ". "; html += QString(q_("The list of potential habitable exoplanets and data about them were taken from \"%1The Habitable Exoplanets Catalog%3\" by %2Planetary Habitability Laboratory%3.")).arg("<a href=\"http://phl.upr.edu/projects/habitable-exoplanets-catalog\">").arg("<a href=\"http://phl.upr.edu/home\">").arg("</a>") + "</p>"; html += "<p>" + q_("The current catalog contains info about %1 planetary systems, which altogether have %2 exoplanets (including %3 potentially habitable exoplanets).").arg(ep->getCountPlanetarySystems()).arg(ep->getCountAllExoplanets()).arg(ep->getCountHabitableExoplanets()) + "</p>"; html += "<h3>" + q_("Links") + "</h3>"; html += "<p>" + QString(q_("Support is provided via the Launchpad website. Be sure to put \"%1\" in the subject when posting.")).arg("Exoplanets plugin") + "</p>"; html += "<p><ul>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + QString(q_("If you have a question, you can %1get an answer here%2").arg("<a href=\"https://answers.launchpad.net/stellarium\">")).arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + QString(q_("Bug reports can be made %1here%2.")).arg("<a href=\"https://bugs.launchpad.net/stellarium\">").arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + q_("If you would like to make a feature request, you can create a bug report, and set the severity to \"wishlist\".") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + q_("If you want to read full information about the plugin, its history and format of the catalog you can %1get info here%2.").arg("<a href=\"http://stellarium.org/wiki/index.php/Exoplanets_plugin\">").arg("</a>") + "</li>"; html += "</ul></p></body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if(gui!=NULL) { QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlStyleSheet); } ui->aboutTextBrowser->setHtml(html); }
// Initialize the dialog widgets and connect the signals/slots void SupernovaeDialog::createDialogContent() { ui->setupUi(dialog); ui->tabs->setCurrentIndex(0); connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); // Settings tab / updates group connect(ui->internetUpdatesCheckbox, SIGNAL(stateChanged(int)), this, SLOT(setUpdatesEnabled(int))); connect(ui->updateButton, SIGNAL(clicked()), this, SLOT(updateJSON())); connect(GETSTELMODULE(Supernovae), SIGNAL(updateStateChanged(Supernovae::UpdateState)), this, SLOT(updateStateReceiver(Supernovae::UpdateState))); connect(GETSTELMODULE(Supernovae), SIGNAL(jsonUpdateComplete(void)), this, SLOT(updateCompleteReceiver(void))); connect(ui->updateFrequencySpinBox, SIGNAL(valueChanged(int)), this, SLOT(setUpdateValues(int))); refreshUpdateValues(); // fetch values for last updated and so on // if the state didn't change, setUpdatesEnabled will not be called, so we force it setUpdatesEnabled(ui->internetUpdatesCheckbox->checkState()); updateTimer = new QTimer(this); connect(updateTimer, SIGNAL(timeout()), this, SLOT(refreshUpdateValues())); updateTimer->start(7000); connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(restoreDefaults())); connect(ui->saveSettingsButton, SIGNAL(clicked()), this, SLOT(saveSettings())); // About tab setAboutHtml(); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); ui->aboutTextBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); updateGuiFromSettings(); }
void QuasarsDialog::setAboutHtml(void) { QString html = "<html><head></head><body>"; html += "<h2>" + q_("Quasars Plug-in") + "</h2><table width=\"90%\">"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</strong></td><td>" + QUASARS_PLUGIN_VERSION + "</td></tr>"; html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Alexander Wolf <[email protected]></td></tr>"; html += "</table>"; html += QString("<p>%1 (<a href=\"%2\">%3</a>)</p>") .arg(q_("The Quasars plugin provides visualization of some quasars brighter than 16 visual magnitude. A catalogue of quasars compiled from \"Quasars and Active Galactic Nuclei\" (13th Ed.)")) .arg("http://adsabs.harvard.edu/abs/2010A%26A...518A..10V") .arg(q_("Veron+ 2010")); html += "</ul><h3>" + q_("Links") + "</h3>"; html += "<p>" + QString(q_("Support is provided via the Launchpad website. Be sure to put \"%1\" in the subject when posting.")).arg("Quasars plugin") + "</p>"; html += "<p><ul>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + QString(q_("If you have a question, you can %1get an answer here%2").arg("<a href=\"https://answers.launchpad.net/stellarium\">")).arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + QString(q_("Bug reports can be made %1here%2.")).arg("<a href=\"https://bugs.launchpad.net/stellarium\">").arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + q_("If you would like to make a feature request, you can create a bug report, and set the severity to \"wishlist\".") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + q_("If you want to read full information about this plugin, its history and format of catalog, you can %1get info here%2.").arg("<a href=\"http://stellarium.org/wiki/index.php/Quasars_plugin\">").arg("</a>") + "</li>"; html += "</ul></p></body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlStyleSheet); ui->aboutTextBrowser->setHtml(html); }
void OcularDialog::initAboutText() { //BM: Most of the text for now is the original contents of the About widget. QString html = "<html><head><title></title></head><body>"; html += "<h2>" + q_("Oculars Plug-in") + "</h2><table width=\"90%\">"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</strong></td><td>" + OCULARS_PLUGIN_VERSION + "</td></tr>"; html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Timothy Reaves <[email protected]></td></tr>"; html += "<tr><td><strong>" + q_("Contributors") + ":</strong></td><td>Bogdan Marinov<br />Pawel Stolowski (" + q_("Barlow lens feature") + ")<br />Alexander Wolf</td></tr>"; html += "</table>"; //Overview html += "<h2>" + q_("Overview") + "</h2>"; html += "<p>" + q_("This plugin is intended to simulate what you would see through an eyepiece. This configuration dialog can be used to add, modify, or delete eyepieces and telescopes, as well as CCD Sensors. Your first time running the app will populate some samples to get your started.") + "</p>"; html += "<p>" + q_("You can choose to scale the image you see on the screen. This is intended to show you a better comparison of what one eyepiece/telescope combination will be like as compared to another. The same eyepiece in two different telescopes of differing focal length will produce two different exit circles, changing the view someone. The trade-off of this is that, with the image scaled, a good deal of the screen can be wasted. Therefore I recommend that you leave it off, unless you feel you have a need of it.") + "</p>"; html += "<p>" + q_("You can toggle a crosshair in the view. Ideally, I wanted this to be aligned to North. I've been unable to do so. So currently it aligns to the top of the screen.") + "</p>"; html += "<p>" + QString(q_("You can toggle a Telrad finder; this can only be done when you have not turned on the Ocular view. This feature draws three concentric circles of 0.5%1, 2.0%1, and 4.0%1, helping you see what you would expect to see with the naked eye through the Telrad (or similar) finder.")).arg(QChar(0x00B0)) + "</p>"; html += "<p>" + q_("If you find any issues, please let me know. Enjoy!") + "</p>"; //Keys html += "<h2>" + q_("Hot Keys") + "</h2>"; html += "<p>" + q_("The plug-in's key bindings can be edited in the General Tab.") + "</p>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); StelActionMgr* actionMgr = StelApp::getInstance().getStelActionManager(); Q_ASSERT(actionMgr); StelAction* actionOcular = actionMgr->findAction("actionShow_Ocular"); Q_ASSERT(actionOcular); StelAction* actionMenu = actionMgr->findAction("actionShow_Ocular_Menu"); Q_ASSERT(actionMenu); QKeySequence ocularShortcut = actionOcular->getShortcut(); QString ocularString = ocularShortcut.toString(QKeySequence::NativeText); ocularString = ocularString.toHtmlEscaped(); if (ocularString.isEmpty()) ocularString = q_("[no key defined]"); QKeySequence menuShortcut = actionMenu->getShortcut(); QString menuString = menuShortcut.toString(QKeySequence::NativeText); menuString = menuString.toHtmlEscaped(); if (menuString.isEmpty()) menuString = q_("[no key defined]"); html += "<ul>"; html += "<li>"; html += QString("<strong>%1:</strong> %2").arg(ocularString).arg(q_("Switches on/off the ocular overlay.")); html += "</li>"; html += "<li>"; html += QString("<strong>%1:</strong> %2").arg(menuString).arg(q_("Opens the pop-up navigation menu.")); html += "</li>"; html += "</ul>"; html += "</body></html>"; QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); ui->textBrowser->document()->setDefaultStyleSheet(htmlStyleSheet); ui->textBrowser->setHtml(html); }
void LogBookConfigDialog::updateStyle() { if(dialog) { StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); const StelStyle pluginStyle = GETSTELMODULE(LogBook)->getModuleStyleSheet(gui->getStelStyle()); dialog->setStyleSheet(pluginStyle.qtStyleSheet); } }
void TelescopeDialog::updateStyle() { if (dialog) { StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); QString style(gui->getStelStyle().htmlStyleSheet); ui->textBrowserAbout->document()->setDefaultStyleSheet(style); } }
void OcularDialog::updateStyle() { if(dialog) { StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); const StelStyle pluginStyle = plugin->getModuleStyleSheet(gui->getStelStyle()); dialog->setStyleSheet(pluginStyle.qtStyleSheet); ui->textBrowser->document()->setDefaultStyleSheet(QString(pluginStyle.htmlStyleSheet)); } }
void TargetsDialog::updateStyle() { if(dialog) { StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); const StelStyle pluginStyle = GETSTELMODULE(LogBook)->getModuleStyleSheet(gui->getStelStyle()); dialog->setStyleSheet(pluginStyle.qtStyleSheet); ui->notesTextEdit->document()->setDefaultStyleSheet(QString(pluginStyle.htmlStyleSheet)); } }
void RemoteControlDialog::setAboutHtml(void) { QString html = "<html><head></head><body>"; html += "<h2>" + q_("Remote Control Plug-in") + "</h2><table width=\"90%\">"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</strong></td><td>" + REMOTECONTROL_PLUGIN_VERSION + "</td></tr>"; html += "<tr><td><strong>" + q_("License") + ":</strong></td><td>" + REMOTECONTROL_PLUGIN_LICENSE + "</td></tr>"; html += "<tr><td rowspan=2><strong>" + q_("Authors") + ":</strong></td><td>Florian Schaukowitsch</td></tr>"; html += "<tr><td>Georg Zotti</td></tr>"; html += "<tr><td><strong>" + q_("Contributors") + ":</strong></td><td>Alexander Wolf</td></tr>"; html += "</table>"; html += "<p>" + q_("The Remote Control plugin provides a web interface to allow state changes and triggering scripts using a connected webbrowser.") + "</p>"; // TODO Add longer instructions? // Regexp to replace {text} with an HTML link. QRegExp a_rx = QRegExp("[{]([^{]*)[}]"); html += "<p>" + q_("It is also possible to send commands via command line, e.g.."); html += "<pre>\n" "wget -q --post-data 'id=myScript.ssc' http://localhost:8090/api/scripts/run >/dev/null 2>&1\n" "curl --data 'id=myScript.ssc' http://localhost:8090/api/scripts/run >/dev/null 2>&1\n" "curl -d 'id=myScript.ssc' http://localhost:8090/api/scripts/run >/dev/null 2>&1\n" "</pre>"; html += q_("This allows triggering automatic show setups for museums etc.") + "</p>"; html += "<p>" + q_("This plugin was developed during ESA SoCiS 2015.") + "</p>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<p>" + q_("This plugin uses the {QtWebApp HTTP server} by Stefan Frings.").toHtmlEscaped().replace(a_rx, "<a href=\"http://stefanfrings.de/qtwebapp/index-en.html\">\\1</a>") + "</p>"; html += "<h3>" + q_("Links") + "</h3>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<p>" + q_("Further information can be found in the {developer documentation}.").toHtmlEscaped().replace(a_rx, "<a href=\"http://stellarium.org/doc/head/\">\\1</a>") + "</p>"; html += "<p>" + QString(q_("Support is provided via the Github website. Be sure to put \"%1\" in the subject when posting.")).arg("Remote Control plugin") + "</p>"; html += "<p><ul>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<li>" + q_("If you have a question, you can {get an answer here}.").toHtmlEscaped().replace(a_rx, "<a href=\"https://groups.google.com/forum/#!forum/stellarium\">\\1</a>") + "</li>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<li>" + q_("Bug reports and feature requests can be made {here}.").toHtmlEscaped().replace(a_rx, "<a href=\"https://github.com/Stellarium/stellarium/issues\">\\1</a>") + "</li>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<li>" + q_("If you want to read full information about this plugin and its history, you can {get info here}.").toHtmlEscaped().replace(a_rx, "<a href=\"http://stellarium.sourceforge.net/wiki/index.php/RemoteControl_plugin\">\\1</a>") + "</li>"; html += "</ul></p></body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if(gui!=Q_NULLPTR) { QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlStyleSheet); } ui->aboutTextBrowser->setHtml(html); }
void ArchaeoLinesDialog::setAboutHtml(void) { QString html = "<html><head></head><body>"; html += "<h2>" + q_("ArchaeoLines Plug-in") + "</h2><table width=\"90%\">"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</strong></td><td>" + ARCHAEOLINES_VERSION + "</td></tr>"; html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Georg Zotti</td></tr>"; //html += "<tr><td><strong>" + q_("Contributors") + ":</strong></td><td> List with br separators </td></tr>"; html += "</table>"; html += "<p>" + q_("The ArchaeoLines plugin displays any combination of declination arcs most relevant to archaeo- or ethnoastronomical studies.") + "</p>"; html += "<ul><li>" + q_("Declinations of equinoxes (i.e. equator) and the solstices") + "</li>"; html += "<li>" + q_("Declinations of the crossquarter days (days right between solstices and equinoxes)") + "</li>"; html += "<li>" + q_("Declinations of the Major Lunar Standstills") + "</li>"; html += "<li>" + q_("Declinations of the Minor Lunar Standstills") + "</li>"; html += "<li>" + q_("Declination of the Zenith passage") + "</li>"; html += "<li>" + q_("Declination of the Nadir passage") + "</li>"; html += "<li>" + q_("Declination of the currently selected object") + "</li>"; html += "<li>" + q_("Current declination of the sun") + "</li>"; html += "<li>" + q_("Current declination of the moon") + "</li>"; html += "<li>" + q_("Current declination of a naked-eye planet") + "</li></ul>"; html += "<p>" + q_("The lunar lines include horizon parallax effects. " "There are two lines each drawn, for maximum and minimum distance of the moon. " "Note that declination of the moon at the major standstill can exceed the " "indicated limits if it is high in the sky due to parallax effects.") + "</p>"; html += "<p>" + q_("In addition, up to two vertical lines with arbitrary azimuth and custom label can be shown.") + "</p>"; html += "<h3>" + q_("Links") + "</h3>"; html += "<p>" + QString(q_("Support is provided via the Launchpad website. Be sure to put \"%1\" in the subject when posting.")).arg("ArchaeoLines plugin") + "</p>"; html += "<p><ul>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + QString(q_("If you have a question, you can %1get an answer here%2").arg("<a href=\"https://answers.launchpad.net/stellarium\">")).arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + QString(q_("Bug reports can be made %1here%2.")).arg("<a href=\"https://bugs.launchpad.net/stellarium\">").arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + q_("If you would like to make a feature request, you can create a bug report, and set the severity to \"wishlist\".") + "</li>"; //// TRANSLATORS: The numbers contain the opening and closing tag of an HTML link //html += "<li>" + q_("If you want to read full information about this plugin and its history, you can %1get info here%2.").arg("<a href=\"http://stellarium.org/wiki/index.php/ArchaeoLines_plugin\">").arg("</a>") + "</li>"; html += "</ul></p></body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if(gui!=NULL) { QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlStyleSheet); } ui->aboutTextBrowser->setHtml(html); }
void SupernovaeDialog::setAboutHtml(void) { // Regexp to replace {text} with an HTML link. QRegExp a_rx = QRegExp("[{]([^{]*)[}]"); QString html = "<html><head></head><body>"; html += "<h2>" + q_("Historical Supernovae Plug-in") + "</h2><table width=\"90%\">"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</strong></td><td>" + SUPERNOVAE_PLUGIN_VERSION + "</td></tr>"; html += "<tr><td><strong>" + q_("License") + ":</strong></td><td>" + SUPERNOVAE_PLUGIN_LICENSE + "</td></tr>"; html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Alexander Wolf <[email protected]></td></tr>"; html += "</table>"; html += "<p>" + q_("This plugin allows you to see some bright historical supernovae: "); html += sn->getSupernovaeList(); html += ". " + q_("This list altogether contains %1 stars.").arg(sn->getCountSupernovae()); html += " " + q_("All those supernovae are brighter %1 at peak of brightness.").arg(QString::number(sn->getLowerLimitBrightness(), 'f', 2) + "<sup>m</sup>") + "</p>"; html += "<h3>" + q_("Light curves") + "</h3>"; html += "<p>" + QString(q_("This plugin implements a simple model of light curves for different supernovae. Typical views of light curves for type I and type II supernova can be seen %1here%2 (right scale in days), and this model is used for this plugin.")).arg("<a href=\"http://stellarium.sourceforge.net/wiki/index.php/Historical_Supernovae_plugin#Light_curves\">").arg("</a>") + "</p>"; html += "<h3>" + q_("Acknowledgments") + "</h3>"; html += "<p>" + q_("We thank the following people for their contribution and valuable comments:") + "</p><ul>"; html += "<li>" + QString("%1 (<a href='%2'>%3</a> %4)") .arg(q_("Sergei Blinnikov")) .arg("http://www.itep.ru/") .arg(q_("Institute for Theoretical and Experimental Physics")) .arg(q_("in Russia")) + "</li>"; html += "</ul><h3>" + q_("Links") + "</h3>"; html += "<p>" + QString(q_("Support is provided via the Github website. Be sure to put \"%1\" in the subject when posting.")).arg("Historical Supernovae plugin") + "</p>"; html += "<p><ul>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<li>" + q_("If you have a question, you can {get an answer here}.").toHtmlEscaped().replace(a_rx, "<a href=\"https://groups.google.com/forum/#!forum/stellarium\">\\1</a>") + "</li>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<li>" + q_("Bug reports and feature requests can be made {here}.").toHtmlEscaped().replace(a_rx, "<a href=\"https://github.com/Stellarium/stellarium/issues\">\\1</a>") + "</li>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<li>" + q_("If you want to read full information about this plugin and its history, you can {get info here}.").toHtmlEscaped().replace(a_rx, "<a href=\"http://stellarium.sourceforge.net/wiki/index.php/Historical_Supernovae_plugin\">\\1</a>") + "</li>"; html += "</ul></p></body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if(gui!=Q_NULLPTR) { QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlStyleSheet); } ui->aboutTextBrowser->setHtml(html); }
void PulsarsDialog::setAboutHtml(void) { QString html = "<html><head></head><body>"; html += "<h2>" + q_("Pulsars Plug-in") + "</h2><table width=\"90%\">"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</strong></td><td>" + PULSARS_PLUGIN_VERSION + "</td></tr>"; html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Alexander Wolf <[email protected]></td></tr>"; html += "</table>"; html += "<p>" + q_("This plugin plots the position of various pulsars, with object information about each one.") + "</p>"; html += "<p>" + QString(q_("Pulsar data is derived from 'The ATNF Pulsar Catalogue' (Manchester, R. N., Hobbs, G. B., Teoh, A. & Hobbs, M., Astron. J., 129, 1993-2006 (2005) (%1astro-ph/0412641%2)).")) .arg("<a href=\"http://arxiv.org/abs/astro-ph/0412641\">") .arg("</a>") + "</p>"; html += "<p>" + QString("<strong>%1:</strong> %2") .arg(q_("Note")) .arg(q_("pulsar identifiers have the prefix 'PSR'")) + "</p>"; html += "<h3>" + q_("Acknowledgment") + "</h3>"; html += "<p>" + q_("We thank the following people for their contribution and valuable comments:") + "</p><ul>"; html += "<li>" + QString("%1 (<a href='%2'>%3</a> %4)") .arg(q_("Vladimir Samodourov")) .arg("http://www.prao.ru/") .arg(q_("Pushchino Radio Astronomy Observatory")) .arg(q_("in Russia")) + "</li>"; html += "<li>" + QString("%1 (<a href='%2'>%3</a> %4)") .arg(q_("Maciej Serylak")) .arg("http://www.obs-nancay.fr/") .arg(q_("Nancay Radioastronomical Observatory")) .arg(q_("in France")) + "</li>"; html += "</ul><h3>" + q_("Links") + "</h3>"; html += "<p>" + QString(q_("Support is provided via the Launchpad website. Be sure to put \"%1\" in the subject when posting.")).arg("Pulsars plugin") + "</p>"; html += "<p><ul>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + QString(q_("If you have a question, you can %1get an answer here%2").arg("<a href=\"https://answers.launchpad.net/stellarium\">")).arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + QString(q_("Bug reports can be made %1here%2.")).arg("<a href=\"https://bugs.launchpad.net/stellarium\">").arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + q_("If you would like to make a feature request, you can create a bug report, and set the severity to \"wishlist\".") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + q_("If you want to read full information about this plugin, its history and format of catalog, you can %1get info here%2.").arg("<a href=\"http://stellarium.org/wiki/index.php/Pulsars_plugin\">").arg("</a>") + "</li>"; html += "</ul></p></body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlStyleSheet); ui->aboutTextBrowser->setHtml(html); }
void ExoplanetsDialog::setInfoHtml(void) { QString html = "<html><head></head><body>"; html += "<h2>" + q_("Potential habitable exoplanets") + "</h2>"; html += QString("<p>%1</p>").arg(q_("This plugin can display potential habitable exoplanets (orange marker) and some information about those planets - habitable class, mean surface temperature and Earth Similarity Index.")); html += QString("<p><b>%1</b> — %2</p>").arg(q_("Habitable Class")).arg(q_("Classifies habitable planets based on temperature: hypopsychroplanets (O or hP) = very cold (less −50°C); psychroplanets (P) = cold; mesoplanets (M) = medium-temperature (0–50°C); thermoplanets (T) = hot; hyperthermoplanets (E or hT) = very hot (above 100°C). Mesoplanets would be ideal for complex life, whereas class O or E would only support extremophilic life. Non-habitable planets are simply given the class X (or NH).")); html += QString("<p><b>%1</b> — %2</p>").arg(q_("Mean Surface Temperature")).arg(q_("Temperature in (°C) based on a similar terrestrial atmosphere to planet mass ratio and a greenhouse effect due to 1 percent of CO2 (assuming an albedo of 0.3 in all cases).")); html += QString("<p><b><a href='http://phl.upr.edu/projects/earth-similarity-index-esi'>%1</a></b> — %2</p>").arg(q_("Earth Similarity Index (ESI)")).arg(q_("Similarity to Earth on a scale from 0 to 1, with 1 being the most Earth-like. ESI depends on the planet's radius, density, escape velocity, and surface temperature.")); html += "</body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if(gui!=NULL) { QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); ui->infoTextBrowser->document()->setDefaultStyleSheet(htmlStyleSheet); } ui->infoTextBrowser->setHtml(html); }
// Initialize the dialog widgets and connect the signals/slots void NovaeDialog::createDialogContent() { nova = GETSTELMODULE(Novae); ui->setupUi(dialog); ui->tabs->setCurrentIndex(0); connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); #ifdef Q_OS_WIN //Kinetic scrolling for tablet pc and pc QList<QWidget *> addscroll; addscroll << ui->aboutTextBrowser; installKineticScrolling(addscroll); #endif // Settings tab / updates group connect(ui->internetUpdatesCheckbox, SIGNAL(stateChanged(int)), this, SLOT(setUpdatesEnabled(int))); connect(ui->updateButton, SIGNAL(clicked()), this, SLOT(updateJSON())); connect(nova, SIGNAL(updateStateChanged(Novae::UpdateState)), this, SLOT(updateStateReceiver(Novae::UpdateState))); connect(nova, SIGNAL(jsonUpdateComplete(void)), this, SLOT(updateCompleteReceiver(void))); connect(ui->updateFrequencySpinBox, SIGNAL(valueChanged(int)), this, SLOT(setUpdateValues(int))); refreshUpdateValues(); // fetch values for last updated and so on // if the state didn't change, setUpdatesEnabled will not be called, so we force it setUpdatesEnabled(ui->internetUpdatesCheckbox->checkState()); updateTimer = new QTimer(this); connect(updateTimer, SIGNAL(timeout()), this, SLOT(refreshUpdateValues())); updateTimer->start(7000); connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint))); connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(restoreDefaults())); connect(ui->saveSettingsButton, SIGNAL(clicked()), this, SLOT(saveSettings())); // About tab setAboutHtml(); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if(gui!=NULL) ui->aboutTextBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); updateGuiFromSettings(); }
void NovaeDialog::setAboutHtml(void) { QString html = "<html><head></head><body>"; html += "<h2>" + q_("Bright Novae Plug-in") + "</h2><table width=\"90%\">"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</strong></td><td>" + NOVAE_PLUGIN_VERSION + "</td></tr>"; html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Alexander Wolf <[email protected]></td></tr>"; html += "</table>"; html += "<p>" + q_("A plugin that shows some bright novae in the Milky Way galaxy."); html += " " + q_("You can find novae via search tool by entering designation of nova or its common name (e.g. 'Nova Cygni 1975' or 'V1500 Cyg').") + "</p>"; html += "<p>" + q_("This plugin allows you to see recent bright novae: "); html += nova->getNovaeList(); html += ". " + q_("This list altogether contains %1 stars.").arg(nova->getCountNovae()); html += " " + q_("All those novae are brighter than %1 at peak of brightness.").arg(QString::number(nova->getLowerLimitBrightness(), 'f', 2) + "<sup>m</sup>") + "</p>"; html += "<h3>" + q_("Light curves") + "</h3>"; html += q_("This plugin uses a very simple model for calculation of light curves for novae stars.") + " "; html += q_("This model is based on time for decay by %1 magnitudes from the maximum value, where %1 is 2, 3, 6 and 9.").arg("<em>N</em>") + " "; html += q_("If a nova has no values for decay of magnitude then this plugin will use generalized values for it."); html += "<p>"; html += "<h3>" + q_("Links") + "</h3>"; html += "<p>" + QString(q_("Support is provided via the Launchpad website. Be sure to put \"%1\" in the subject when posting.")).arg("Bright Novae plugin") + "</p>"; html += "<p><ul>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + QString(q_("If you have a question, you can %1get an answer here%2").arg("<a href=\"https://answers.launchpad.net/stellarium\">")).arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + QString(q_("Bug reports can be made %1here%2.")).arg("<a href=\"https://bugs.launchpad.net/stellarium\">").arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + q_("If you would like to make a feature request, you can create a bug report, and set the severity to \"wishlist\".") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + q_("If you want to read full information about this plugin, its history and catalog format, you can %1get info here%2.").arg("<a href=\"http://stellarium.org/wiki/index.php/Bright_Novae_plugin\">").arg("</a>") + "</li>"; html += "</ul></p></body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if(gui!=NULL) { QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlStyleSheet); } ui->aboutTextBrowser->setHtml(html); }
void SupernovaeDialog::setAboutHtml(void) { QString html = "<html><head></head><body>"; html += "<h2>" + q_("Historical Supernovae Plug-in") + "</h2><table width=\"90%\">"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</strong></td><td>" + SUPERNOVAE_PLUGIN_VERSION + "</td></tr>"; html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Alexander Wolf <[email protected]></td></tr>"; html += "</table>"; html += "<p>" + q_("This plugin allows you to see some bright historical supernovae: "); html += GETSTELMODULE(Supernovae)->getSupernovaeList(); html += ". " + q_("All those supernovae are brighter %1 at peak of brightness.").arg(QString::number(GETSTELMODULE(Supernovae)->getLowerLimitBrightness(), 'f', 2) + "<sup>m</sup>") + "</p>"; html += "<h3>" + q_("Light curves") + "</h3>"; html += "<p>" + QString(q_("This plugin implements a simple model of light curves for different supernovae. Typical views of light curves for type I and type II supernova can be seen %1here%2 (right scale in days), and this model is used for this plugin.")).arg("<a href=\"http://stellarium.org/wiki/index.php/Historical_Supernovae_plugin#Light_curves\">").arg("</a>") + "</p>"; html += "<h3>" + q_("Acknowledgments") + "</h3>"; html += "<p>" + q_("We thank the following people for their contribution and valuable comments:") + "</p><ul>"; html += "<li>" + QString("%1 (<a href='%2'>%3</a> %4)") .arg(q_("Sergei Blinnikov")) .arg("http://www.itep.ru/") .arg(q_("Institute for Theoretical and Experimental Physics")) .arg(q_("in Russia")) + "</li>"; html += "</ul><h3>" + q_("Links") + "</h3>"; html += "<p>" + QString(q_("Support is provided via the Launchpad website. Be sure to put \"%1\" in the subject when posting.")).arg("Historical Supernovae plugin") + "</p>"; html += "<p><ul>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + QString(q_("If you have a question, you can %1get an answer here%2").arg("<a href=\"https://answers.launchpad.net/stellarium\">")).arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + QString(q_("Bug reports can be made %1here%2.")).arg("<a href=\"https://bugs.launchpad.net/stellarium\">").arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + q_("If you would like to make a feature request, you can create a bug report, and set the severity to \"wishlist\".") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link html += "<li>" + q_("If you want to read full information about this plugin, its history and format of catalog, you can %1get info here%2.").arg("<a href=\"http://stellarium.org/wiki/index.php/Historical_Supernovae_plugin\">").arg("</a>") + "</li>"; html += "</ul></p></body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlStyleSheet); ui->aboutTextBrowser->setHtml(html); }
void AngleMeasureDialog::setAboutHtml(void) { // Regexp to replace {text} with an HTML link. QRegExp a_rx = QRegExp("[{]([^{]*)[}]"); QString html = "<html><head></head><body>"; html += "<h2>" + q_("Angle Measure Plug-in") + "</h2><table width=\"90%\">"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</strong></td><td>" + ANGLEMEASURE_PLUGIN_VERSION + "</td></tr>"; html += "<tr><td><strong>" + q_("License") + ":</strong></td><td>" + ANGLEMEASURE_PLUGIN_LICENSE + "</td></tr>"; html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Matthew Gates</td></tr>"; html += "<tr><td rowspan=3><strong>" + q_("Contributors") + ":</strong></td><td>Bogdan Marinov</td></tr>"; html += "<tr><td>Alexander Wolf <[email protected]></td></tr>"; html += "<tr><td>Georg Zotti</td></tr>"; html += "</table>"; html += "<p>" + q_("The Angle Measure plugin is a small tool which is used to measure the angular distance between two points on the sky (and calculation of position angle between those two points).") + "</p>"; html += "<p>" + q_("Start and end points in horizontal mode can be linked to the rotating sky, which may be helpful to keep relations between landscape and some celestial object or (with both linked) for Dobsonian starhopping.") + "</p>"; html += "<p>" + q_("*goes misty eyed* I recall measuring the size of the Cassini Division when I was a student. It was not the high academic glamor one might expect... It was cloudy... It was rainy... The observatory lab had some old scopes set up at one end, pointing at a <em>photograph</em> of Saturn at the other end of the lab. We measured. We calculated. We wished we were in Hawaii.") + "</p>"; html += "<h3>" + q_("Links") + "</h3>"; html += "<p>" + QString(q_("Support is provided via the Github website. Be sure to put \"%1\" in the subject when posting.")).arg("Angle Measure plugin") + "</p>"; html += "<p><ul>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<li>" + q_("If you have a question, you can {get an answer here}.").toHtmlEscaped().replace(a_rx, "<a href=\"https://groups.google.com/forum/#!forum/stellarium\">\\1</a>") + "</li>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<li>" + q_("Bug reports and feature requests can be made {here}.").toHtmlEscaped().replace(a_rx, "<a href=\"https://github.com/Stellarium/stellarium/issues\">\\1</a>") + "</li>"; // TRANSLATORS: The text between braces is the text of an HTML link. html += "<li>" + q_("If you want to read full information about this plugin and its history, you can {get info here}.").toHtmlEscaped().replace(a_rx, "<a href=\"http://stellarium.sourceforge.net/wiki/index.php/AngleMeasure_plugin\">\\1</a>") + "</li>"; html += "</ul></p></body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if(gui!=Q_NULLPTR) { QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlStyleSheet); } ui->aboutTextBrowser->setHtml(html); }
void StelDialog::setVisible(bool v) { if (v) { QSize screenSize = StelMainView::getInstance().size(); if (dialog) { dialog->show(); StelMainView::getInstance().scene()->setActiveWindow(proxy); // If the main window has been resized, it is possible the dialog // will be off screen. Check for this and move it to a visible // position if necessary QPointF newPos = proxy->pos(); if (newPos.x()>=screenSize.width()) newPos.setX(screenSize.width() - dialog->size().width()); if (newPos.y()>=screenSize.height()) newPos.setY(screenSize.height() - dialog->size().height()); if (newPos != dialog->pos()) proxy->setPos(newPos); proxy->setFocus(); return; } QGraphicsWidget* parent = qobject_cast<QGraphicsWidget*>(this->parent()); dialog = new QDialog(NULL); // dialog->setParent(parent); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); //dialog->setAttribute(Qt::WA_OpaquePaintEvent, true); connect(dialog, SIGNAL(rejected()), this, SLOT(close())); createDialogContent(); dialog->setStyleSheet(gui->getStelStyle().qtStyleSheet); proxy = new CustomProxy(parent, Qt::Tool); proxy->setWidget(dialog); QSizeF size = proxy->size(); // centre with dialog according to current window size. int newX = (int)((screenSize.width() - size.width())/2); int newY = (int)((screenSize.height() - size.height())/2); // Make sure that the window's title bar is accessible if (newY <-0) newY = 0; proxy->setPos(newX, newY); proxy->setWindowFrameMargins(2,0,2,2); // (this also changes the bounding rectangle size) // The caching is buggy on all plateforms with Qt 4.5.2 proxy->setCacheMode(QGraphicsItem::ItemCoordinateCache); proxy->setZValue(100); StelMainView::getInstance().scene()->setActiveWindow(proxy); proxy->setFocus(); } else { dialog->hide(); emit visibleChanged(false); //proxy->clearFocus(); StelMainView::getInstance().focusSky(); } }
// Initialize the dialog widgets and connect the signals/slots void MeteorShowerDialog::createDialogContent() { ui->setupUi(dialog); ui->tabs->setCurrentIndex(0); connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); plugin = GETSTELMODULE(MeteorShowers); // Settings tab / updates group connect(ui->internetUpdates, SIGNAL(clicked(bool)), this, SLOT(setUpdatesEnabled(bool))); connect(ui->updateButton, SIGNAL(clicked()), this, SLOT(updateJSON())); connect(plugin, SIGNAL(updateStateChanged(MeteorShowers::UpdateState)), this, SLOT(updateStateReceiver(MeteorShowers::UpdateState))); connect(plugin, SIGNAL(jsonUpdateComplete(void)), this, SLOT(updateCompleteReceiver(void))); connect(ui->updateFrequencySpinBox, SIGNAL(valueChanged(int)), this, SLOT(setUpdateValues(int))); refreshUpdateValues(); // fetch values for last updated and so on updateTimer = new QTimer(this); connect(updateTimer, SIGNAL(timeout()), this, SLOT(refreshUpdateValues())); updateTimer->start(7000); // Settings tab / event group connect(ui->searchButton, SIGNAL(clicked()), this, SLOT(checkDates())); refreshRangeDates(); treeWidget = ui->listEvents; initListEvents(); connect(treeWidget, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(selectEvent(QModelIndex))); // Settings tab / radiant group ui->displayRadiant->setChecked(plugin->getFlagRadiant()); connect(ui->displayRadiant, SIGNAL(clicked(bool)), plugin, SLOT(setFlagRadiant(bool))); ui->activeRadiantsOnly->setChecked(plugin->getFlagActiveRadiant()); connect(ui->activeRadiantsOnly, SIGNAL(clicked(bool)), plugin, SLOT(setFlagActiveRadiant(bool))); ui->radiantLabels->setChecked(plugin->getFlagLabels()); connect(ui->radiantLabels, SIGNAL(clicked(bool)), plugin, SLOT(setFlagLabels(bool))); ui->fontSizeSpinBox->setValue(plugin->getLabelFontSize()); connect(ui->fontSizeSpinBox, SIGNAL(valueChanged(int)), plugin, SLOT(setLabelFontSize(int))); // Settings tab / meteor showers group ui->displayMeteorShower->setChecked(plugin->getEnableAtStartup()); connect(ui->displayMeteorShower, SIGNAL(clicked(bool)), plugin, SLOT(setEnableAtStartup(bool))); ui->displayShowMeteorShowerButton->setChecked(plugin->getFlagShowMSButton()); connect(ui->displayShowMeteorShowerButton, SIGNAL(clicked(bool)), plugin, SLOT(setFlagShowMSButton(bool))); // ///////////////////////////////////////// connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(restoreDefaults())); connect(ui->saveSettingsButton, SIGNAL(clicked()), this, SLOT(saveSettings())); // Markers tab refreshColorMarkers(); connect(ui->changeColorARG, SIGNAL(clicked()), this, SLOT(setColorARG())); connect(ui->changeColorARR, SIGNAL(clicked()), this, SLOT(setColorARR())); connect(ui->changeColorIR, SIGNAL(clicked()), this, SLOT(setColorIR())); // About tab setAboutHtml(); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if (gui != NULL) { ui->aboutTextBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); } updateGuiFromSettings(); }
void StelMainView::init(QSettings* conf) { gui = new StelGui(); #if STEL_USE_NEW_OPENGL_WIDGETS //glWidget->initializeGL(); // protected... //Q_ASSERT(glWidget->isValid()); #else Q_ASSERT(glWidget->isValid()); glWidget->makeCurrent(); #endif // Should be check of requirements disabled? if (conf->value("main/check_requirements", true).toBool()) { // Find out lots of debug info about supported version of OpenGL and vendor/renderer. processOpenGLdiagnosticsAndWarnings(conf, glWidget); } stelApp= new StelApp(); stelApp->setGui(gui); stelApp->init(conf); StelActionMgr *actionMgr = stelApp->getStelActionManager(); actionMgr->addAction("actionSave_Screenshot_Global", N_("Miscellaneous"), N_("Save screenshot"), this, "saveScreenShot()", "Ctrl+S"); actionMgr->addAction("actionSet_Full_Screen_Global", N_("Display Options"), N_("Full-screen mode"), this, "fullScreen", "F11"); StelPainter::initGLShaders(); skyItem = new StelSkyItem(); guiItem = new StelGuiItem(); QGraphicsAnchorLayout* l = new QGraphicsAnchorLayout(rootItem); l->setSpacing(0); l->setContentsMargins(0,0,0,0); l->addCornerAnchors(skyItem, Qt::TopLeftCorner, l, Qt::TopLeftCorner); l->addCornerAnchors(skyItem, Qt::BottomRightCorner, l, Qt::BottomRightCorner); l->addCornerAnchors(guiItem, Qt::BottomLeftCorner, l, Qt::BottomLeftCorner); l->addCornerAnchors(guiItem, Qt::TopRightCorner, l, Qt::TopRightCorner); rootItem->setLayout(l); scene()->addItem(rootItem); nightModeEffect = new NightModeGraphicsEffect(this); updateNightModeProperty(); rootItem->setGraphicsEffect(nightModeEffect); QSize size = glWidget->windowHandle()->screen()->size(); size = QSize(conf->value("video/screen_w", size.width()).toInt(), conf->value("video/screen_h", size.height()).toInt()); bool fullscreen = conf->value("video/fullscreen", true).toBool(); // Without this, the screen is not shown on a Mac + we should use resize() for correct work of fullscreen/windowed mode switch. --AW WTF??? resize(size); QDesktopWidget *desktop = QApplication::desktop(); int screen = conf->value("video/screen_number", 0).toInt(); if (screen < 0 || screen >= desktop->screenCount()) { qWarning() << "WARNING: screen" << screen << "not found"; screen = 0; } QRect screenGeom = desktop->screenGeometry(screen); if (fullscreen) { // The "+1" below is to work around Linux/Gnome problem with mouse focus. move(screenGeom.x()+1, screenGeom.y()+1); // The fullscreen window appears on screen where is the majority of // the normal window. Therefore we crop the normal window to the // screen area to ensure that the majority is not on another screen. setGeometry(geometry() & screenGeom); setFullScreen(true); } else { setFullScreen(false); int x = conf->value("video/screen_x", 0).toInt(); int y = conf->value("video/screen_y", 0).toInt(); move(x + screenGeom.x(), y + screenGeom.y()); } flagInvertScreenShotColors = conf->value("main/invert_screenshots_colors", false).toBool(); setFlagCursorTimeout(conf->value("gui/flag_mouse_cursor_timeout", false).toBool()); setCursorTimeout(conf->value("gui/mouse_cursor_timeout", 10.f).toFloat()); maxfps = conf->value("video/maximum_fps",10000.f).toFloat(); minfps = conf->value("video/minimum_fps",10000.f).toFloat(); flagMaxFpsUpdatePending = false; // XXX: This should be done in StelApp::init(), unfortunately for the moment we need init the gui before the // plugins, because the gui create the QActions needed by some plugins. StelApp::getInstance().initPlugIns(); // activate DE430/431 StelApp::getInstance().getCore()->initEphemeridesFunctions(); // The script manager can only be fully initialized after the plugins have loaded. StelApp::getInstance().initScriptMgr(); // Set the global stylesheet, this is only useful for the tooltips. StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if (gui!=NULL) setStyleSheet(gui->getStelStyle().qtStyleSheet); connect(&StelApp::getInstance(), SIGNAL(visionNightModeChanged(bool)), this, SLOT(updateNightModeProperty())); QThread::currentThread()->setPriority(QThread::HighestPriority); startMainLoop(); }
void HelpDialog::updateHelpText(void) const { QString htmlText = "<html><head><title>"; htmlText += q_("Stellarium Help").toHtmlEscaped(); htmlText += "</title></head><body>\n"; // WARNING! Section titles are re-used below! htmlText += "<p align=\"center\"><a href=\"#keys\">" + q_("Keys").toHtmlEscaped() + "</a> • <a href=\"#links\">" + q_("Further Reading").toHtmlEscaped() + "</a></p>\n"; htmlText += "<h2 id='keys'>" + q_("Keys").toHtmlEscaped() + "</h2>\n"; htmlText += "<table cellpadding=\"10%\">\n"; // Describe keys for those keys which do not have actions. // navigate htmlText += "<tr><td>" + q_("Pan view around the sky").toHtmlEscaped() + "</td>"; htmlText += "<td><b>" + q_("Arrow keys & left mouse drag").toHtmlEscaped() + "</b></td></tr>\n"; // zoom in/out htmlText += "<tr><td rowspan='2'>" + q_("Zoom in/out").toHtmlEscaped() + "</td>"; htmlText += "<td><b>" + q_("Page Up/Down").toHtmlEscaped() + "</b></td></tr>\n"; htmlText += "<tr><td><b>" + q_("Ctrl+Up/Down").toHtmlEscaped() + "</b></td></tr>\n"; // time dragging/scrolling htmlText += "<tr><td>" + q_("Time dragging").toHtmlEscaped() + "</td><td><b>" + q_("Ctrl & left mouse drag").toHtmlEscaped() + "</b></td></tr>"; htmlText += "<tr><td>" + q_("Time scrolling: minutes").toHtmlEscaped() + "</td><td><b>" + q_("Ctrl & mouse wheel").toHtmlEscaped() + "</b></td></tr>"; htmlText += "<tr><td>" + q_("Time scrolling: hours").toHtmlEscaped() + "</td><td><b>" + q_("Ctrl+Shift & mouse wheel").toHtmlEscaped() + "</b></td></tr>"; htmlText += "<tr><td>" + q_("Time scrolling: days").toHtmlEscaped() + "</td><td><b>" + q_("Ctrl+Alt & mouse wheel").toHtmlEscaped() + "</b></td></tr>"; htmlText += "<tr><td>" + q_("Time scrolling: years").toHtmlEscaped() + "</td><td><b>" + q_("Ctrl+Alt+Shift & mouse wheel").toHtmlEscaped() + "</b></td></tr>"; // select object htmlText += "<tr><td>" + q_("Select object").toHtmlEscaped() + "</td>"; htmlText += "<td><b>" + q_("Left click").toHtmlEscaped() + "</b></td></tr>\n"; // clear selection htmlText += "<tr><td>"; htmlText += q_("Clear selection").toHtmlEscaped() + "</td>"; #ifdef Q_OS_MAC htmlText += "<td><b>" + q_("Ctrl & left click").toHtmlEscaped() + "</b></td></tr>\n"; #else htmlText += "<td><b>" + q_("Right click").toHtmlEscaped() + "</b></td></tr>\n"; #endif // add custom marker htmlText += "<tr><td>" + q_("Add custom marker").toHtmlEscaped() + "</td>"; htmlText += "<td><b>" + q_("Shift & left click").toHtmlEscaped() + "</b></td></tr>\n"; // delete one custom marker htmlText += "<tr><td>" + q_("Delete marker closest to mouse cursor").toHtmlEscaped() + "</td>"; htmlText += "<td><b>" + q_("Shift & right click").toHtmlEscaped() + "</b></td></tr>\n"; // delete all custom markers htmlText += "<tr><td>" + q_("Delete all custom markers").toHtmlEscaped() + "</td>"; htmlText += "<td><b>" + q_("Shift & Alt & right click").toHtmlEscaped() + "</b></td></tr>\n"; htmlText += "</table>\n<p>" + q_("Below are listed only the actions with assigned keys. Further actions may be available via the \"%1\" button.") .arg(ui->editShortcutsButton->text()).toHtmlEscaped() + "</p><table cellpadding=\"10%\">\n"; // Append all StelAction shortcuts. StelActionMgr* actionMgr = StelApp::getInstance().getStelActionManager(); typedef QPair<QString, QString> KeyDescription; for (auto group : actionMgr->getGroupList()) { QList<KeyDescription> descriptions; for (auto* action : actionMgr->getActionList(group)) { if (action->getShortcut().isEmpty()) continue; QString text = action->getText(); QString key = action->getShortcut().toString(QKeySequence::NativeText); descriptions.append(KeyDescription(text, key)); } qSort(descriptions); htmlText += "<tr></tr><tr><td><b><u>" + q_(group) + ":</u></b></td></tr>\n"; for (const auto& desc : descriptions) { htmlText += "<tr><td>" + desc.first.toHtmlEscaped() + "</td>"; htmlText += "<td><b>" + desc.second.toHtmlEscaped() + "</b></td></tr>\n"; } } htmlText += "<tr></tr><tr><td><b><u>" + q_("Text User Interface (TUI)") + ":</u></b></td></tr>\n"; htmlText += "<tr><td>" + q_("Activate TUI") + "</td>"; htmlText += "<td><b>Alt+T</b></td></tr>\n"; htmlText += "</table>"; // Regexp to replace {text} with an HTML link. QRegExp a_rx = QRegExp("[{]([^{]*)[}]"); // WARNING! Section titles are re-used above! htmlText += "<h2 id=\"links\">" + q_("Further Reading").toHtmlEscaped() + "</h2>\n"; htmlText += q_("The following links are external web links, and will launch your web browser:\n").toHtmlEscaped(); htmlText += "<p>"; // TRANSLATORS: The text between braces is the text of an HTML link. htmlText += q_("{Frequently Asked Questions} about Stellarium. Answers too.").toHtmlEscaped().replace(a_rx, "<a href=\"https://github.com/Stellarium/stellarium/wiki/FAQ\">\\1</a>"); htmlText += "</p>\n"; htmlText += "<p>"; // TRANSLATORS: The text between braces is the text of an HTML link. htmlText += q_("{The Stellarium Wiki} - general information.").toHtmlEscaped().replace(a_rx, "<a href=\"https://github.com/Stellarium/stellarium/wiki\">\\1</a>"); htmlText += "</p>\n"; htmlText += "<p>"; // TRANSLATORS: The text between braces is the text of an HTML link. htmlText += q_("{The landscapes} - user-contributed landscapes for Stellarium.").toHtmlEscaped().replace(a_rx, "<a href=\"https://stellarium.org/landscapes.html\">\\1</a>"); htmlText += "</p>\n"; htmlText += "<p>"; // TRANSLATORS: The text between braces is the text of an HTML link. htmlText += q_("{The scripts} - user-contributed and official scripts for Stellarium.").toHtmlEscaped().replace(a_rx, "<a href=\"https://stellarium.org/scripts.html\">\\1</a>"); htmlText += "</p>\n"; htmlText += "<p>"; // TRANSLATORS: The text between braces is the text of an HTML link. htmlText += q_("{Bug reporting and feature request system} - if something doesn't work properly or is missing and is not listed in the tracker, you can open bug reports here.").toHtmlEscaped().replace(a_rx, "<a href=\"https://github.com/Stellarium/stellarium/issues\">\\1</a>"); htmlText += "</p>\n"; htmlText += "<p>"; // TRANSLATORS: The text between braces is the text of an HTML link. htmlText += q_("{Google Groups} - discuss Stellarium with other users.").toHtmlEscaped().replace(a_rx, "<a href=\"https://groups.google.com/forum/#!forum/stellarium\">\\1</a>"); htmlText += "</p>\n"; htmlText += "<p>"; // TRANSLATORS: The text between braces is the text of an HTML link. htmlText += q_("{Open Collective} - donations to the Stellarium development team.").toHtmlEscaped().replace(a_rx, "<a href=\"https://opencollective.com/stellarium\">\\1</a>"); htmlText += "</p>\n"; htmlText += "</body></html>\n"; ui->helpBrowser->clear(); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); ui->helpBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); ui->helpBrowser->insertHtml(htmlText); ui->helpBrowser->scrollToAnchor("top"); }
void HelpDialog::updateAboutText(void) const { QStringList contributors; contributors << "Vladislav Bataron" << "Barry Gerdes" << "Peter Walser" << "Michal Sojka" << "Nick Fedoseev" << "Clement Sommelet" << "Ivan Marti-Vidal" << "Nicolas Martignoni" << "Oscar Roig Felius" << "M.S. Adityan" << "Tomasz Buchert" << "Adam Majer" << "Roland Bosa" << "Łukasz 'sil2100' Zemczak" << "Gábor Péterffy" << "Mircea Lite" << "Alexey Dokuchaev" << "William Formyduval" << "Daniel De Mickey" << "François Scholder" << "Anton Samoylov" << "Mykyta Sytyi" << "Shantanu Agarwal" << "Teemu Nätkinniemi" << "Kutaibaa Akraa" << "J.L.Canales" << "Leonid Froenchenko" << "Peter Mousley" << "Greg Alexander" << "Yuri Chornoivan" << "Daniel Michalik" << "Hleb Valoshka" << "Matthias Drochner" << "Kenan Dervišević" << "Alex Gamper" << "Volker Hören" << "Max Digruber" << "Dan Smale" << "Victor Reijs" << "Tanmoy Saha" << "Oleg Ginzburg" << "Peter Hickey" << "Bernd Kreuss" << "Alexander Miller" << "Eleni Maria Stea" << "Kirill Snezhko" << "Simon Parzer" << "Peter Neubauer" << "Andrei Borza" << "Allan Johnson" << "Felix Zeltner" << "Paolo Cancedda" << "Ross Mitchell" << "David Baucum" << "Maciej Serylak" << "Adriano Steffler" << "Sibi Antony" << "Tony Furr" << "misibacsi" << "Pavel Klimenko" << "Rumen G. Bogdanovski" << "Colin Gaudion" << "Annette S. Lee" << "Vancho Stojkoski" << "Robert S. Fuller" << "Giuseppe Putzolu" << "henrysky" << "Nick Kanel" << "Petr Kubánek" << "Matwey V. Kornilov" << "Alessandro Siniscalchi" << "Ruslan Kabatsayev" << "Pawel Stolowski" << "Antoine Jacoutot" << "Sebastian Jennen" << "Matt Hughes" << "Sun Shuwei" << "Alexey Sokolov" << "Paul Krizak" << "ChrUnger" << "Minmin Gong"; contributors.sort(); // populate About tab QString newHtml = "<h1>" + StelUtils::getApplicationName() + "</h1>"; // Note: this legal notice is not suitable for traslation newHtml += QString("<h3>Copyright © %1 Stellarium Developers</h3>").arg(COPYRIGHT_YEARS); if (!message.isEmpty()) newHtml += "<p><strong>" + message + "</strong></p>"; // newHtml += "<p><em>Version 0.15 is dedicated in memory of our team member Barry Gerdes.</em></p>"; newHtml += "<p>This program is free software; you can redistribute it and/or "; newHtml += "modify it under the terms of the GNU General Public License "; newHtml += "as published by the Free Software Foundation; either version 2 "; newHtml += "of the License, or (at your option) any later version.</p>"; newHtml += "<p>This program is distributed in the hope that it will be useful, "; newHtml += "but WITHOUT ANY WARRANTY; without even the implied "; newHtml += "warranty of MERCHANTABILITY or FITNESS FOR A "; newHtml += "PARTICULAR PURPOSE. See the GNU General Public "; newHtml += "License for more details.</p>"; newHtml += "<p>You should have received a copy of the GNU General Public "; newHtml += "License along with this program; if not, write to:</p>"; newHtml += "<pre>Free Software Foundation, Inc.\n"; newHtml += "51 Franklin Street, Suite 500\n"; newHtml += "Boston, MA 02110-1335, USA.\n</pre>"; newHtml += "<p><a href=\"http://www.fsf.org\">www.fsf.org</a></p>"; newHtml += "<h3>" + q_("Developers").toHtmlEscaped() + "</h3><ul>"; newHtml += "<li>" + q_("Project coordinator & lead developer: %1").arg(QString("Fabien Ch%1reau").arg(QChar(0x00E9))).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Graphic/other designer: %1").arg(QString("Johan Meuris")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Developer: %1").arg(QString("Guillaume Ch%1reau").arg(QChar(0x00E9))).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Developer: %1").arg(QString("Georg Zotti")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Developer: %1").arg(QString("Alexander Wolf")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Developer: %1").arg(QString("Marcos Cardinot")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Continuous Integration: %1").arg(QString("Hans Lambermont")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Tester: %1").arg(QString("Khalid AlAjaji")).toHtmlEscaped() + "</li></ul>"; newHtml += "<h3>" + q_("Former Developers").toHtmlEscaped() + "</h3>"; newHtml += "<p>" + q_("Several people have made significant contributions, but are no longer active. Their work has made a big difference to the project:").toHtmlEscaped() + "</p><ul>"; newHtml += "<li>" + q_("Doc author/developer: %1").arg(QString("Matthew Gates")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Developer: %1").arg(QString("Johannes Gajdosik")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Developer: %1").arg(QString("Rob Spearman")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Developer: %1").arg(QString("Bogdan Marinov")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Developer: %1").arg(QString("Timothy Reaves")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Developer: %1").arg(QString("Florian Schaukowitsch")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Developer: %1").arg(QString("Andr%1s Mohari").arg(QChar(0x00E1))).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Developer: %1").arg(QString("Mike Storm")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Developer: %1").arg(QString("Ferdinand Majerech")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("Developer: %1").arg(QString("Jörg Müller")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("OSX Developer: %1").arg(QString("Nigel Kerr")).toHtmlEscaped() + "</li>"; newHtml += "<li>" + q_("OSX Developer: %1").arg(QString("Diego Marcos")).toHtmlEscaped() + "</li></ul>"; newHtml += "<h3>" + q_("Contributors").toHtmlEscaped() + "</h3>"; newHtml += "<p>" + q_("Several people have made contributions to the project and their work has made Stellarium better (sorted alphabetically): %1.").arg(contributors.join(", ")).toHtmlEscaped() + "</p>"; newHtml += "<p>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); ui->aboutBrowser->clear(); ui->aboutBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); ui->aboutBrowser->insertHtml(newHtml); ui->aboutBrowser->scrollToAnchor("top"); }
void TelescopeDialog::setAboutText() { //TODO: Expand QString aboutPage = "<html><head></head><body>"; aboutPage += "<h2>" + q_("Telescope Control plug-in") + "</h2><table width=\"90%\">"; aboutPage += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</strong></td><td>" + TELESCOPE_CONTROL_VERSION + "</td></tr>"; aboutPage += "<tr><td rowspan=4><strong>" + q_("Authors") + "</strong></td><td>Johannes Gajdosik</td></td>"; aboutPage += "<tr><td>Michael Heinz</td></tr>"; aboutPage += "<tr><td>Bogdan Marinov <[email protected]> (" + q_("Plug-in and GUI programming") + ")</td></tr>"; aboutPage += "</table>"; aboutPage += "<p>" + q_("This plug-in is based on and reuses a lot of code under the GNU General Public License:") + "</p><ul>"; aboutPage += "<li>" + q_("the Telescope, TelescopeDummy, TelescopeTcp and TelescopeMgr classes in Stellarium's code (the client side of Stellarium's original telescope control feature);") + "</li>"; aboutPage += "<li>" + q_("the telescope server core code (licensed under the LGPL)") + "</li>"; aboutPage += "<li>" + q_("the TelescopeServerLx200 telescope server core code (originally licensed under the LGPL)"); aboutPage += "<br/>" + q_("Author of all of the above - the client, the server core, and the LX200 server, along with the Stellarium telescope control network protocol (over TCP/IP), is <b>Johannes Gajdosik</b>.") + "</li>"; aboutPage += "<li>" + q_("the TelescopeServerNexStar telescope server core code (originally licensed under the LGPL, based on TelescopeServerLx200) by <b>Michael Heinz</b>.") + "</li></ul>"; aboutPage += "<h3>" + q_("Links") + "</h3>"; aboutPage += "<p>" + QString(q_("Support is provided via the Launchpad website. Be sure to put \"%1\" in the subject when posting.")).arg("Telescope Control plug-in") + "</p>"; aboutPage += "<p><ul>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link aboutPage += "<li>" + QString(q_("If you have a question, you can %1get an answer here%2").arg("<a href=\"https://answers.launchpad.net/stellarium\">")).arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link aboutPage += "<li>" + QString(q_("Bug reports can be made %1here%2.")).arg("<a href=\"https://bugs.launchpad.net/stellarium\">").arg("</a>") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link aboutPage += "<li>" + q_("If you would like to make a feature request, you can create a bug report, and set the severity to \"wishlist\".") + "</li>"; // TRANSLATORS: The numbers contain the opening and closing tag of an HTML link aboutPage += "<li>" + q_("If you want to read full information about this plugin, its history and format of catalog, you can %1get info here%2.").arg("<a href=\"http://stellarium.org/wiki/index.php/Telescope_Control_plug-in\">").arg("</a>") + "</li>"; aboutPage += "</ul></p></body></html>"; QString helpPage = "<html><head></head><body>"; helpPage += "<p>" + QString(q_("A more complete and up-to-date documentation for this plug-in can be found on the %1Telescope Control%2 page in the Stellarium Wiki.")).arg("<a href=\"http://stellarium.org/wiki/index.php/Telescope_Control_plug-in\">").arg("</a>") + "</p>"; helpPage += "<h3><a name=\"top\" />" + q_("Contents") + "</h3><ul>"; helpPage += "<li><a href=\"#Abilities_and_limitations\">" + q_("Abilities and limitations") + "</a></li>"; helpPage += "<li><a href=\"#originalfeature\">" + q_("The original telescope control feature") + "</a></li>"; helpPage += "<li><a href=\"#usingthisplugin\">" + q_("Using this plug-in") + "</a></li>"; helpPage += "<li><a href=\"#mainwindow\">" + q_("Main window ('Telescopes')") + "</a></li>"; helpPage += "<li><a href=\"#configwindow\">" + q_("Telescope configuration window") + "</a><ul>"; helpPage += "<li><a href=\"#connection_type\">" + q_("Connection type") + "</a></li>"; helpPage += "<li><a href=\"#telescope_properties\">" + q_("Telescope properties") + "</a></li>"; helpPage += "<li><a href=\"#device_settings\">" + q_("Device settings") + "</a></li>"; helpPage += "<li><a href=\"#connection_settings\">" + q_("Connection settings") + "</a></li>"; helpPage += "<li><a href=\"#fovcircles\">" + q_("Field of view indicators") + "</a></li></ul></li>"; helpPage += "<li><a href=\"#slew_to\">" + q_("'Slew telescope to' window") + "</a></li>"; helpPage += "<li><a href=\"#commands\">" + q_("Telescope commands") + "</a></li>"; helpPage += "<li><a href=\"#devices\">" + q_("Supported devices") + "</a></li>"; helpPage += "<li><a href=\"#virtual_telescope\">" + q_("Virtual telescope") + "</a></li></ul>"; helpPage += "<h3><a name=\"Abilities_and_limitations\" />" + q_("Abilities and limitations") + "</h3>"; helpPage += "<p>" + q_("This plug-in allows Stellarium to send only '<b>slew</b>' ('go to') commands to the device and to receive its current position. It cannot issue any other commands, so users should be aware of the possibility for mount collisions and similar situations. (To abort a slew, you can start another one to a safe position.)") + "</p>"; helpPage += "<p>" + q_("As of the current version, this plug-in doesn't allow satellite tracking, and is not very suitable for lunar or planetary observations.") + "</p>"; helpPage += "<p><span style=\"color: red; font-weight: bolder;\">" + q_("WARNING: Stellarium CANNOT prevent your telescope from being pointed at the Sun.") + "</span></p><ul>"; helpPage += "<li>" + q_("Never point your telescope at the Sun without a proper solar filter installed. The powerful light amplified by the telescope WILL cause irreversible damage to your eyes and/or your equipment.") + "</li>"; helpPage += "<li>" + q_("Even if you don't do it deliberately, a slew during daylight hours may cause your telescope to point at the sun on its way to the given destination, so it is strongly recommended to avoid using the telescope control feature before sunset without appropriate protection.") + "</li></ul>"; helpPage += "<p><a href=\"#top\"><small>[" + q_("Back to top") + "]</small></a></p>"; helpPage += "<h3><a name=\"originalfeature\" />" + q_("The original telescope control feature") + "</h3>"; helpPage += "<p>" + q_("As of Stellarium 0.10.5, the original telescope control feature has been removed. There is no longer a way to control a telescope with Stellarium without this plug-in.") + "</p>"; helpPage += "<p><a href=\"#top\"><small>[" + q_("Back to top") + "]</small></a></p>"; helpPage += "<h3><a name=\"usingthisplugin\" />" + q_("Using this plug-in") + "</h3>"; helpPage += "<p>" + q_("Here are two general ways to control a device with this plug-in, depending on the situation:") + "</p><ul>"; helpPage += "<li><b>" + q_("DIRECT CONNECTION") + "</b>: " + QString(q_("A %1device supported by the plug-in%2 is connected with a cable to the computer running Stellarium;")).arg("<a href=\"#devices\">").arg("</a>") + "</li>"; helpPage += "<li><b>" + q_("INDIRECT CONNECTION") + "</b>: <ul>"; helpPage += "<li>" + QString(q_("A device is connected to the same computer but it is driven by a %1stand-alone telescope server program%2 or a %3third-party application%4 <b>that can 'talk' to Stellarium</b>;")).arg("<a href=\"http://stellarium.org/wiki/index.php/Telescope_Control_%28client-server%29\">").arg("</a>").arg("<a href=\"http://stellarium.org/wiki/index.php/Telescope_Control#Third_party_applications\">").arg("</a>") + "</li>"; helpPage += "<li>" + q_("A device is connected to a remote computer and the software that drives it can 'talk' to Stellarium <i>over the network</i>; this software can be either one of Stellarium's stand-alone telescope servers, or a third party application.") + "</li></ul></li></ul>"; helpPage += "<p>" + QString(q_("Most older telescopes use cables that connect to a %1serial port%2 (RS-232), the newer ones use %3USB%4 (Universal Serial Bus).")).arg("<a href=\"http://meta.wikimedia.org/wiki/wikipedia:en:serial_port\">").arg("</a>").arg("<a href=\"http://meta.wikimedia.org/wiki/wikipedia:en:Universal_Serial_Bus\">").arg("</a>") + " " + q_("On Linux and Mac OS X both cases are handled identically by the plug-in. On Windows, a USB connection may require a 'virtual serial port' software, if it is not supplied with the cable or the telescope.") + " " + q_("Such a software creates a virtual ('fake') COM port that corresponds to the real USB port so it can be used by the plug-in.") + " " + q_("On all three platforms, if the computer has no 'classic' serial ports and the telescope can connect only to a serial port, a serial-to-USB (RS-232-to-USB) adapter may be necessary.") + "</p>"; helpPage += "<p>" + q_("Telescope set-up (setting geographical coordinates, performing alignment, etc.) should be done before connecting the telescope to Stellarium.") + "</p>"; helpPage += "<p><a href=\"#top\"><small>[" + q_("Back to top") + "]</small></a></p>"; helpPage += "<h3><a name=\"mainwindow\" />" + q_("Main window ('Telescopes')") + "</h3>"; helpPage += "<p>" + q_("The plug-in's main window can be opened:") + "</p><ul>"; helpPage += "<li>" + q_("By pressing the 'configure' button for the plug-in in the 'Plugins' tab of Stellarium's Configuration window (opened by pressing <b>F2</b> or the respective button in the left toolbar).") + "</li>"; helpPage += "<li>" + QString(q_("By pressing the 'Configure telescopes...' button in the %1'Slew to' window%2 (opened by pressing <b>Ctrl+0</b> or the respective button on the bottom toolbar).")).arg("<a href=\"#slew_to\">").arg("</a>") + "</li></ul>"; helpPage += "<p>" + q_("The <b>Telescopes</b> tab displays a list of the telescope connections that have been set up:") + "</p><ul>"; helpPage += "<li>" + q_("The number (<b>#</b>) column shows the number used to control this telescope. For example, for telescope #2, the shortcut is Ctrl+2.") + "</li>"; helpPage += "<li>" + q_("The <b>Status</b> column indicates if this connection is currently active or not. Unfortunately, there are some cases in which 'Connected' is displayed when no working connection exists.") + "</li>"; helpPage += "<li>" + q_("The <b>Type</b> field indicates what kind of connection is this:") + "</li><ul>"; helpPage += "<li>" + QString(q_("<b>virtual</b> means a %1virtual telescope%2;")).arg("<a href=\"#virtual_telescope\">").arg("</a>") + "</li>"; helpPage += "<li>" + QString(q_("<b>local, Stellarium</b> means a DIRECT connection to the telescope (see %1above%2);")).arg("<a href=\"#usingthisplugin\">").arg("</a>") + "</li>"; helpPage += "<li>" + q_("<b>local, external</b> means an INDIRECT connection to a program running on the same computer;") + "</li>"; helpPage += "<li>" + q_("<b>remote, unknown</b> means an INDIRECT connection over a network to a remote machine.") + "</li></ul></li></ul>"; helpPage += "<p>" + q_("To set up a new telescope connection, press the <b>Add</b> button. To modify the configuration of an existing connection, select it in the list and press the <b>Configure</b> button. In both cases, a telescope connection configuration window will open.") + "</p>"; helpPage += "<p><a href=\"#top\"><small>[" + q_("Back to top") + "]</small></a></p>"; helpPage += "<h3><a name=\"configwindow\" />" + q_("Telescope configuration window") + "</h3>"; helpPage += "<h4><a name=\"connection_type\" />" + q_("Connection type") + "</h4>"; helpPage += "<p>" + QString(q_("The topmost field represents the choice between the two types of connections (see %1above%2):")).arg("<a href=\"#usingthisplugin\">").arg("</a>") + "</p>"; helpPage += "<p><b>" + q_("Telescope controlled by:") + "</b></p><ul>"; helpPage += "<li>" + q_("<b>Stellarium, directly through a serial port</b> is the DIRECT case") + "</li>"; helpPage += "<li>" + q_("<b>External software or a remote computer</b> is the INDIRECT case") + "</li>"; helpPage += "<li>" + QString(q_("<b>Nothing, just simulate one (a moving reticle)</b> is a %1virtual telescope%2 (no connection)")).arg("<a href=\"#virtual_telescope\">").arg("</a>") + "</li></ul>"; helpPage += "<p><a href=\"#top\"><small>[" + q_("Back to top") + "]</small></a></p>"; helpPage += "<h4><a name=\"telescope_properties\" />" + q_("Telescope properties") + "</h4>"; helpPage += "<p>" + q_("<b>Name</b> is the label that will be displayed on the screen next to the telescope reticle.") + "</p>"; helpPage += "<p>" + q_("<b>Connection delay</b>: If the movement of the telescope reticle on the screen is uneven, you can try increasing or decreasing this value.") + "</p>"; helpPage += "<p>" + q_("<b>Coordinate system</b>: Some Celestron telescopes have had their firmware updated and now interpret the coordinates they receive as coordinates that use the equinox of the date (EOD, also known as JNow), making necessary this override.") + "</p>"; helpPage += "<p>" + q_("<b>Start/connect at startup</b>: Check this option if you want Stellarium to attempt to connect to the telescope immediately after it starts.") + " " + q_("Otherwise, to start the telescope, you need to open the main window, select that telescope and press the 'Start/Connect' button.") + "</p>"; helpPage += "<p><a href=\"#top\"><small>[" + q_("Back to top") + "]</small></a></p>"; helpPage += "<h4><a name=\"device_settings\" />" + q_("Device settings") + "</h4>"; helpPage += "<p>" + QString(q_("This section is active only for DIRECT connections (see %1above%2).")).arg("<a href=\"#usingthisplugin\">").arg("</a>") + "</p>"; helpPage += "<p>" + q_("<b>Serial port</b> sets the serial port used by the telescope.") + "</p>"; helpPage += "<p>" + q_("There is a pop-up box that suggests some default values:") + "</p><ul>"; helpPage += "<li>" + q_("On Windows, serial ports COM1 to COM10;") + "</li>"; helpPage += "<li>" + q_("On Linux, serial ports /dev/ttyS0 to /dev/ttyS3 and USB ports /dev/ttyUSB0 to /dev/ttyUSB3;") + "</li>"; helpPage += "<li>" + q_("On Mac OS X, the list is empty as it names its ports in a peculiar way.") + "</li></ul>"; helpPage += "<p>" + q_("If you are using an USB cable, the default serial port of your telescope most probably is not in the list of suggestions.") + "</p>"; helpPage += "<p>" + q_("To list all valid serial port names in Mac OS X, open a terminal and type:") + "<br /><samp>ls /dev/*</samp></p>"; helpPage += "<p>" + q_("This will list all devices, the full name of your serial port should be somewhere in the list (for example, '/dev/cu.usbserial-FTDFZVMK').") + "</p>"; helpPage += "<p>" + QString(q_("<b>Device model</b>: see %1Supported devices%2 below.")).arg("<a href=\"#devices\">").arg("</a>") + "</p>"; helpPage += "<p><a href=\"#top\"><small>[" + q_("Back to top") + "]</small></a></p>"; helpPage += "<h4><a name=\"connection_settings\" />" + q_("Connection settings") + "</h4>"; helpPage += "<p>" + QString(q_("Both fields here refer to communication over a network (%1TCP/IP%2).")).arg("<a href=\"http://meta.wikimedia.org/wiki/wikipedia:en:TCP/IP\">").arg("</a>") + " " + QString(q_("Doing something with them is necessary only for INDIRECT connections (see %1above%2).")).arg("<a href=\"#usingthisplugin\">").arg("</a>") + "</p>"; helpPage += "<p>" + QString(q_("<b>Host</b> can be either a host name or an %1IPv4%2 address such as '127.0.0.1'. The default value of 'localhost' means 'this computer'.")).arg("<a href=\"http://meta.wikimedia.org/wiki/wikipedia:en:IPv4\">").arg("</a>") + "</p>"; helpPage += "<p>" + q_("<b>Port</b> refers to the TCP port used for communication. The default value depends on the telescope number and ranges between 10001 and 10009.") + "</p>"; helpPage += "<p>" + q_("Both values are ignored for DIRECT connections.") + "</p>"; helpPage += "<p>" + q_("For INDIRECT connections, modifying the default host name value makes sense only if you are attempting a remote connection over a network.") + " " + q_("In this case, it should be the name or IP address of the computer that runs a program that runs the telescope.") + "</p>"; helpPage += "<p><a href=\"#top\"><small>[" + q_("Back to top") + "]</small></a></p>"; helpPage += "<h4><a name=\"fovcircles\" />" + q_("Field of view indicators") + "</h4>"; helpPage += "<p>" + q_("A series of circles representing different fields of view can be added around the telescope marker. This is a relic from the times before the <strong>Oculars</strong> plug-in existed.") + "</p>"; helpPage += "<p>" + q_("In the telescope configuration window, click on 'User Interface Settings'.") + " " + q_("Mark the 'Use field of view indicators' option, then enter a list of values separated with commas in the field below.") + " " + q_("The values are interpreted as degrees of arc.") + "</p>"; helpPage += "<p>" + QString(q_("This can be used in combination with a %1virtual telescope%2 to display a moving reticle with the Telrad circles.")).arg("<a href=\"#virtual_telescope\">").arg("</a>") + "</p>"; helpPage += "<p><a href=\"#top\"><small>[" + q_("Back to top") + "]</small></a></p>"; helpPage += "<h3><a name=\"slew_to\" />" + q_("'Slew telescope to' window") + "</h3>"; helpPage += "<p>" + q_("The 'Slew telescope to' window can be opened by pressing <b>Ctrl+0</b> or the respective button in the bottom toolbar.") + "</p>"; helpPage += "<p>" + q_("It contains two fields for entering celestial coordinates, selectors for the preferred format (Hours-Minutes-Seconds, Degrees-Minutes-Seconds, or Decimal degrees), a drop-down list and two buttons.") + "</p>"; helpPage += "<p>" + q_("The drop-down list contains the names of the currently connected devices.") + " " + q_("If no devices are connected, it will remain empty, and the 'Slew' button will be disabled.") + "</p>"; helpPage += "<p>" + q_("Pressing the <b>Slew</b> button slews the selected device to the selected set of coordinates.") + " " + QString(q_("See the section about %1keyboard commands%2 below for other ways of controlling the device.")).arg("<a href=\"#commands\">").arg("</a>") + "</p>"; helpPage += "<p>" + QString(q_("Pressing the <b>Configure telescopes...</b> button opens the %1main window%2 of the plug-in.")).arg("<a href=\"#mainwindow\">").arg("</a>") + "</p>"; helpPage += "<p>" + q_("<b>TIP:</b> Inside the 'Slew' window, underlined letters indicate that pressing 'Alt + underlined letter' can be used instead of clicking.") + " " + q_("For example, pressing <b>Alt+S</b> is equivalent to clicking the 'Slew' button, pressing <b>Alt+E</b> switches to decimal degree format, etc.") + "</p>"; helpPage += "<p><a href=\"#top\"><small>[" + q_("Back to top") + "]</small></a></p>"; helpPage += "<h3><a name=\"commands\" />" + q_("Sending commands") + "</h3>"; helpPage += "<p>" + q_("Once a telescope is successfully started/connected, Stellarium displays a telescope reticle labelled with the telescope's name on its current position in the sky.") + " " + q_("The reticle is an object like every other in Stellarium - it can be selected with the mouse, it can be tracked and it appears as an object in the 'Search' window.") + "</p>"; helpPage += "<p>" + q_("<b>To point a device to an object:</b> Select an object (e.g. a star) and press the number of the device while holding down the <b>Ctrl</b> key.") + " (" + q_("For example, Ctrl+1 for telescope #1.") + ") " + q_("This will move the telescope to the selected object.") + "</p>"; helpPage += "<p>" + q_("<b>To point a device to the center of the view:</b> Press the number of the device while holding down the <b>Alt</b> key.") + " (" + q_("For example, Alt+1 for telescope #1.") + ") " + q_("This will slew the device to the point in the center of the current view.") + " (" + q_("If you move the view after issuing the command, the target won't change unless you issue another command.") + ")</p>"; helpPage += "<p>" + QString(q_("<b>To point a device to a given set of coordinates:</b> Use the %1'Slew to' window%2 (press <b>Ctrl+0</b>).")).arg("<a href=\"#slew_to\">").arg("</a>") + "</p>"; helpPage += "<p><a href=\"#top\"><small>[" + q_("Back to top") + "]</small></a></p>"; helpPage += "<h3><a name=\"devices\" />" + q_("Supported devices") + "</h3>"; helpPage += "<p>" + QString(q_("All devices listed in the %1'Device model' list%2 are convenience definitions using one of the two built-in interfaces: the Meade LX200 (the Meade Autostar controller) interface and the Celestron NexStar interface.")).arg("<a href=\"#device_settings\">").arg("</a>") + "</p>"; helpPage += "<p>" + q_("The device list contains the following:") + "</p><dl>"; helpPage += "<dt><b>Celestron NexStar (compatible)</b></dt><dd>" + q_("Any device using the NexStar interface.") + "</dd>"; helpPage += "<dt><b>Losmandy G-11</b></dt><dd>" + q_("A computerized telescope mount made by Losmandy (Meade LX-200/Autostar interface).") + "</dd>"; helpPage += "<dt><b>Meade Autostar compatible</b></dt><dd>" + q_("Any device using the LX-200/Autostar interface.") + "</dd>"; helpPage += "<dt><b>Meade ETX-70 (#494 Autostar, #506 CCS)</b></dt><dd>" + q_("The Meade ETX-70 telescope with the #494 Autostar controller and the #506 Connector Cable Set.") + " " + QString(q_("According to the tester, it is a bit slow, so its default setting of %1'Connection delay'%2 is 1.5 seconds instead of 0.5 seconds.")).arg("<a href=\"#telescope_properties\">").arg("</a>") + "</dd>"; helpPage += "<dt><b>Meade LX200 (compatible)</b></dt><dd>" + q_("Any device using the LX-200/Autostar interface.") + "</dd>"; helpPage += "<dt><b>Sky-Watcher SynScan AZ mount</b></dt><dd>" + q_("The Sky-Watcher SynScan AZ GoTo mount is used in a number of telescopes.") + "</dd>"; helpPage += "<dt><b>Sky-Watcher SynScan (version 3 or later)</b></dt><dd>" + q_("<b>SynScan</b> is also the name of the hand controller used in other Sky-Watcher GoTo mounts, and it seems that any mount that uses a SynScan controller version 3.0 or greater is supported by the plug-in, as it uses the NexStar protocol.") + "</dd>"; helpPage += "<dt><b>Wildcard Innovations Argo Navis (Meade mode)</b></dt><dd>" + q_("Argo Navis is a 'Digital Telescope Computer' by Wildcard Innovations.") + " " + q_("It is an advanced digital setting circle that turns an ordinary telescope (for example, a dobsonian) into a 'Push To' telescope (a telescope that uses a computer to find targets and human power to move the telescope itself).") + " " + QString(q_("Just don't forget to set it to Meade compatibility mode and set the baud rate to 9600B%1.")).arg("<sup><a href=\"http://www.iceinspace.com.au/forum/showpost.php?p=554948&postcount=18\">1</a></sup>") + "</dd></dl>"; helpPage += "<p><a href=\"#top\"><small>[" + q_("Back to top") + "]</small></a></p>"; helpPage += "<h3><a name=\"virtual_telescope\" />" + q_("Virtual telescope") + "</h3>"; helpPage += "<p>" + q_("If you want to test this plug-in without an actual device connected to the computer, choose <b>Nothing, just simulate one (a moving reticle)</b> in the <b>Telescope controlled by:</b> field. It will show a telescope reticle that will react in the same way as the reticle of a real telescope controlled by the plug-in.") + "</p>"; helpPage += "<p>" + QString(q_("See the section above about %1field of view indicators%2 for a possible practical application (emulating 'Telrad' circles).")).arg("<a href=\"#fovcircles\">").arg("</a>") + "</p>"; helpPage += "<p>" + QString(q_("This feature is equivalent to the 'Dummy' type of telescope supported by %1Stellarium's original telescope control feature%2.")).arg("<a href=\"http://stellarium.org/wiki/index.php/Telescope_Control_%28client-server%29\">").arg("</a>") + "</p>"; helpPage += "<p><a href=\"#top\"><small>[" + q_("Back to top") + "]</small></a></p>"; helpPage += "</body></html>"; StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); Q_ASSERT(gui); ui->textBrowserAbout->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); ui->textBrowserHelp->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); ui->textBrowserAbout->setHtml(aboutPage); ui->textBrowserHelp->setHtml(helpPage); }
// Initialize the dialog widgets and connect the signals/slots void ObservabilityDialog::createDialogContent() { ui->setupUi(dialog); ui->tabs->setCurrentIndex(0); connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); Observability* plugin = GETSTELMODULE(Observability); #ifdef Q_OS_WIN //Kinetic scrolling for tablet pc and pc QList<QWidget *> addscroll; addscroll << ui->aboutTextBrowser; installKineticScrolling(addscroll); #endif // Settings: // clicked() is called only when the user makes an input, // so we avoid an endless loop when setting the value in updateControls(). connect(ui->todayCheckBox, SIGNAL(clicked(bool)), plugin, SLOT(enableTodayField(bool))); connect(ui->acroCosCheckBox, SIGNAL(clicked(bool)), plugin, SLOT(enableAcroCosField(bool))); connect(ui->oppositionCheckBox, SIGNAL(clicked(bool)), plugin, SLOT(enableOppositionField(bool))); connect(ui->goodNightsCheckBox, SIGNAL(clicked(bool)), plugin, SLOT(enableGoodNightsField(bool))); connect(ui->fullMoonCheckBox, SIGNAL(clicked(bool)), plugin, SLOT(enableFullMoonField(bool))); connect(ui->redSlider, SIGNAL(sliderMoved(int)), this, SLOT(setColor())); connect(ui->greenSlider, SIGNAL(sliderMoved(int)), this, SLOT(setColor())); connect(ui->blueSlider, SIGNAL(sliderMoved(int)), this, SLOT(setColor())); // Isn't valueChanged() better? But then we'll have to block // signlas when settting the slider values. connect(ui->fontSize, SIGNAL(sliderMoved(int)), plugin, SLOT(setFontSize(int))); connect(ui->sunAltitudeSlider, SIGNAL(sliderMoved(int)), plugin, SLOT(setTwilightAltitude(int))); connect(ui->sunAltitudeSlider, SIGNAL(sliderMoved(int)), this, SLOT(updateAltitudeLabel(int))); connect(ui->horizonAltitudeSlider, SIGNAL(sliderMoved(int)), plugin, SLOT(setHorizonAltitude(int))); connect(ui->horizonAltitudeSlider, SIGNAL(sliderMoved(int)), this, SLOT(updateHorizonLabel(int))); connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint))); connect(ui->restoreDefaultsButton, SIGNAL(clicked()), plugin, SLOT(resetConfiguration())); // TODO: The plug-in should emit a signal when settings are changed. // This works, because slots are called in the order they were connected. connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(updateControls())); connect(ui->saveSettingsButton, SIGNAL(clicked()), plugin, SLOT(saveConfiguration())); // About tab setAboutHtml(); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if(gui!=NULL) ui->aboutTextBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); updateControls(); }