PointerCoordinatesWindow.cpp   PointerCoordinatesWindow.cpp 
skipping to change at line 28 skipping to change at line 28
*/ */
#include "PointerCoordinates.hpp" #include "PointerCoordinates.hpp"
#include "PointerCoordinatesWindow.hpp" #include "PointerCoordinatesWindow.hpp"
#include "ui_pointerCoordinatesWindow.h" #include "ui_pointerCoordinatesWindow.h"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelModule.hpp" #include "StelModule.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelGui.hpp"
PointerCoordinatesWindow::PointerCoordinatesWindow() PointerCoordinatesWindow::PointerCoordinatesWindow()
: coord(NULL) : coord(NULL)
{ {
ui = new Ui_pointerCoordinatesWindowForm(); ui = new Ui_pointerCoordinatesWindowForm();
dialogName = "PointerCoordinates";
} }
PointerCoordinatesWindow::~PointerCoordinatesWindow() PointerCoordinatesWindow::~PointerCoordinatesWindow()
{ {
delete ui; delete ui;
} }
void PointerCoordinatesWindow::retranslate() void PointerCoordinatesWindow::retranslate()
{ {
if (dialog) if (dialog)
{ {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
updateAboutText(); setAboutHtml();
populateCoordinatesPlacesList(); populateCoordinatesPlacesList();
populateCoordinateSystemsList(); populateCoordinateSystemsList();
} }
} }
void PointerCoordinatesWindow::createDialogContent() void PointerCoordinatesWindow::createDialogContent()
{ {
coord = GETSTELMODULE(PointerCoordinates); coord = GETSTELMODULE(PointerCoordinates);
ui->setupUi(dialog); ui->setupUi(dialog);
connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate())); connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate()));
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ; connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ;
connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMove dTo(QPoint)));
populateValues(); populateValues();
connect(ui->checkBoxEnableAtStartup, SIGNAL(clicked(bool)), coord, S LOT(setFlagEnableAtStartup(bool))); connect(ui->checkBoxEnableAtStartup, SIGNAL(clicked(bool)), coord, S LOT(setFlagEnableAtStartup(bool)));
connect(ui->spinBoxFontSize, SIGNAL(valueChanged(int)), coord, SLOT( setFontSize(int))); connect(ui->spinBoxFontSize, SIGNAL(valueChanged(int)), coord, SLOT( setFontSize(int)));
connect(ui->checkBoxShowButton, SIGNAL(clicked(bool)), coord, SLOT(s etFlagShowCoordinatesButton(bool))); connect(ui->checkBoxShowButton, SIGNAL(clicked(bool)), coord, SLOT(s etFlagShowCoordinatesButton(bool)));
// Place of the string with coordinates // Place of the string with coordinates
populateCoordinatesPlacesList(); populateCoordinatesPlacesList();
QString currentPlaceKey = coord->getCurrentCoordinatesPlaceKey(); QString currentPlaceKey = coord->getCurrentCoordinatesPlaceKey();
skipping to change at line 94 skipping to change at line 97
} }
ui->coordinateSystemComboBox->setCurrentIndex(idx); ui->coordinateSystemComboBox->setCurrentIndex(idx);
connect(ui->coordinateSystemComboBox, SIGNAL(currentIndexChanged(int )), this, SLOT(setCoordinateSystem(int))); connect(ui->coordinateSystemComboBox, SIGNAL(currentIndexChanged(int )), this, SLOT(setCoordinateSystem(int)));
connect(ui->spinBoxX, SIGNAL(valueChanged(int)), this, SLOT(setCusto mCoordinatesPlace())); connect(ui->spinBoxX, SIGNAL(valueChanged(int)), this, SLOT(setCusto mCoordinatesPlace()));
connect(ui->spinBoxY, SIGNAL(valueChanged(int)), this, SLOT(setCusto mCoordinatesPlace())); connect(ui->spinBoxY, SIGNAL(valueChanged(int)), this, SLOT(setCusto mCoordinatesPlace()));
connect(ui->pushButtonSave, SIGNAL(clicked()), this, SLOT(saveCoordi natesSettings())); connect(ui->pushButtonSave, SIGNAL(clicked()), this, SLOT(saveCoordi natesSettings()));
connect(ui->pushButtonReset, SIGNAL(clicked()), this, SLOT(resetCoor dinatesSettings())); connect(ui->pushButtonReset, SIGNAL(clicked()), this, SLOT(resetCoor dinatesSettings()));
updateAboutText(); // About tab
setAboutHtml();
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui(
));
if(gui!=NULL)
ui->aboutTextBrowser->document()->setDefaultStyleSheet(QStri
ng(gui->getStelStyle().htmlStyleSheet));
} }
void PointerCoordinatesWindow::populateValues() void PointerCoordinatesWindow::populateValues()
{ {
ui->checkBoxEnableAtStartup->setChecked(coord->getFlagEnableAtStartu p()); ui->checkBoxEnableAtStartup->setChecked(coord->getFlagEnableAtStartu p());
ui->spinBoxFontSize->setValue(coord->getFontSize()); ui->spinBoxFontSize->setValue(coord->getFontSize());
ui->checkBoxShowButton->setChecked(coord->getFlagShowCoordinatesButt on()); ui->checkBoxShowButton->setChecked(coord->getFlagShowCoordinatesButt on());
QPair<int, int> cc = coord->getCustomCoordinatesPlace(); QPair<int, int> cc = coord->getCustomCoordinatesPlace();
ui->spinBoxX->setValue(cc.first); ui->spinBoxX->setValue(cc.first);
ui->spinBoxY->setValue(cc.second); ui->spinBoxY->setValue(cc.second);
} }
void PointerCoordinatesWindow::updateAboutText() void PointerCoordinatesWindow::setAboutHtml(void)
{ {
ui->labelTitle->setText(q_("Pointer Coordinates plug-in")); QString html = "<html><head></head><body>";
QString version = QString(q_("Version %1")).arg(POINTERCOORDINATES_P html += "<h2>" + q_("Pointer Coordinates plug-in") + "</h2><table wi
LUGIN_VERSION); dth=\"90%\">";
ui->labelVersion->setText(version); html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</stron
g></td><td>" + POINTERCOORDINATES_PLUGIN_VERSION + "</td></tr>";
html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Alex
ander Wolf &lt;alex.v.wolf@gmail.com&gt;</td></tr>";
html += "</table>";
html += "<p>" + q_("Show coordinates of the mouse cursor on the scre
en.");
html += "<p>";
html += "<h3>" + q_("Links") + "</h3>";
html += "<p>" + QString(q_("Support is provided via the Launchpad we
bsite. Be sure to put \"%1\" in the subject when posting.")).arg("Pointer
Coordinates plugin") + "</p>";
html += "<p><ul>";
// TRANSLATORS: The numbers contain the opening and closing tag of a
n HTML link
html += "<li>" + QString(q_("If you have a question, you can %1get a
n answer here%2").arg("<a href=\"https://answers.launchpad.net/stellarium\"
>")).arg("</a>") + "</li>";
// TRANSLATORS: The numbers contain the opening and closing tag of a
n HTML link
html += "<li>" + QString(q_("Bug reports can be made %1here%2.")).ar
g("<a href=\"https://bugs.launchpad.net/stellarium\">").arg("</a>") + "</li
>";
// TRANSLATORS: The numbers contain the opening and closing tag of a
n HTML link
html += "<li>" + q_("If you would like to make a feature request, yo
u can create a bug report, and set the severity to \"wishlist\".") + "</li>
";
// TRANSLATORS: The numbers contain the opening and closing tag of a
n 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/Pointer_Coordinates_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(htmlS
tyleSheet);
}
ui->aboutTextBrowser->setHtml(html);
} }
void PointerCoordinatesWindow::saveCoordinatesSettings() void PointerCoordinatesWindow::saveCoordinatesSettings()
{ {
coord->saveConfiguration(); coord->saveConfiguration();
} }
void PointerCoordinatesWindow::resetCoordinatesSettings() void PointerCoordinatesWindow::resetCoordinatesSettings()
{ {
coord->restoreDefaultConfiguration(); coord->restoreDefaultConfiguration();
 End of changes. 7 change blocks. 
7 lines changed or deleted 63 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/