SolarSystemManagerWindow.cpp   SolarSystemManagerWindow.cpp 
skipping to change at line 18 skipping to change at line 18
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "SolarSystemEditor.hpp" #include "SolarSystemEditor.hpp"
#include "SolarSystemManagerWindow.hpp" #include "SolarSystemManagerWindow.hpp"
#include "ui_solarSystemManagerWindow.h" #include "ui_solarSystemManagerWindow.h"
#include "MpcImportWindow.hpp" #include "MpcImportWindow.hpp"
#include "ManualImportWindow.hpp" #include "ManualImportWindow.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelTranslator.hpp"
#include "Planet.hpp" #include "Planet.hpp"
#include "SolarSystem.hpp" #include "SolarSystem.hpp"
#include <QFileDialog> #include <QFileDialog>
SolarSystemManagerWindow::SolarSystemManagerWindow() SolarSystemManagerWindow::SolarSystemManagerWindow()
{ {
ui = new Ui_solarSystemManagerWindow(); ui = new Ui_solarSystemManagerWindow();
mpcImportWindow = new MpcImportWindow(); mpcImportWindow = new MpcImportWindow();
manualImportWindow = NULL; manualImportWindow = NULL;
skipping to change at line 61 skipping to change at line 62
delete mpcImportWindow; delete mpcImportWindow;
if (manualImportWindow) if (manualImportWindow)
delete manualImportWindow; delete manualImportWindow;
} }
void SolarSystemManagerWindow::createDialogContent() void SolarSystemManagerWindow::createDialogContent()
{ {
ui->setupUi(dialog); ui->setupUi(dialog);
//Signals //Signals
connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL connect(&StelApp::getInstance(), SIGNAL(languageChanged()),
OT(languageChanged())); this, SLOT(retranslate()));
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ; connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ;
connect(ui->pushButtonCopyFile, SIGNAL(clicked()), this, SLOT(copyCo nfiguration())); connect(ui->pushButtonCopyFile, SIGNAL(clicked()), this, SLOT(copyCo nfiguration()));
connect(ui->pushButtonReplaceFile, SIGNAL(clicked()), this, SLOT(rep laceConfiguration())); connect(ui->pushButtonReplaceFile, SIGNAL(clicked()), this, SLOT(rep laceConfiguration()));
connect(ui->pushButtonRemove, SIGNAL(clicked()), this, SLOT(removeOb ject())); connect(ui->pushButtonRemove, SIGNAL(clicked()), this, SLOT(removeOb ject()));
connect(ui->pushButtonImportMPC, SIGNAL(clicked()), this, SLOT(newIm portMPC())); connect(ui->pushButtonImportMPC, SIGNAL(clicked()), this, SLOT(newIm portMPC()));
connect(ui->pushButtonManual, SIGNAL(clicked()), this, SLOT(newImpor tManual())); //connect(ui->pushButtonManual, SIGNAL(clicked()), this, SLOT(newImp ortManual()));
connect(ssoManager, SIGNAL(solarSystemChanged()), this, SLOT(populat eSolarSystemList())); connect(ssoManager, SIGNAL(solarSystemChanged()), this, SLOT(populat eSolarSystemList()));
connect(ui->pushButtonReset, SIGNAL(clicked()), ssoManager, SLOT(res etSolarSystemToDefault())); connect(ui->pushButtonReset, SIGNAL(clicked()), ssoManager, SLOT(res etSolarSystemToDefault()));
ui->labelVersion->setText(QString("Version %1").arg(PLUGIN_VERSION)) updateTexts();
;
//Remove the "Data Import" tab
//TODO: (temporary, until the ManualImportWindow is finished)
ui->tabWidget->removeTab(2);
Q_ASSERT(mpcImportWindow); Q_ASSERT(mpcImportWindow);
//Rebuild the list if any planets have been imported //Rebuild the list if any planets have been imported
connect(mpcImportWindow, SIGNAL(objectsImported()), this, SLOT(popul ateSolarSystemList())); connect(mpcImportWindow, SIGNAL(objectsImported()), this, SLOT(popul ateSolarSystemList()));
ui->lineEditUserFilePath->setText(ssoManager->getCustomSolarSystemFi lePath()); ui->lineEditUserFilePath->setText(ssoManager->getCustomSolarSystemFi lePath());
populateSolarSystemList(); populateSolarSystemList();
} }
void SolarSystemManagerWindow::languageChanged() void SolarSystemManagerWindow::updateTexts()
{
//Solar System tab
// TRANSLATORS: Appears as the text of hyperlinks linking to website
s. :)
QString linkText(q_("website"));
QString linkCode = QString("<a href=\"http://www.minorplanetcenter.n
et/\">%1</a>").arg(linkText);
// TRANSLATORS: IAU = International Astronomical Union
QString mpcText(q_("You can import comet and asteroid data formatted
in the export formats of the IAU's Minor Planet Center (%1). You can impor
t files with lists of objects, download such lists from the Internet or sea
rch the online Minor Planet and Comet Ephemeris Service (MPES)."));
ui->labelMPC->setText(QString(mpcText).arg(linkCode));
//About tab
ui->labelTitle->setText(q_("Solar System Editor plug-in"));
ui->labelVersion->setText(QString(q_("Version %1")).arg(SOLARSYSTEME
DITOR_VERSION));
}
void SolarSystemManagerWindow::retranslate()
{ {
if (dialog) if (dialog)
{ {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
populateSolarSystemList(); populateSolarSystemList();
ui->labelVersion->setText(QString("Version %1").arg(PLUGIN_V ERSION)); updateTexts();
} }
} }
void SolarSystemManagerWindow::newImportMPC() void SolarSystemManagerWindow::newImportMPC()
{ {
Q_ASSERT(mpcImportWindow); Q_ASSERT(mpcImportWindow);
mpcImportWindow->setVisible(true); mpcImportWindow->setVisible(true);
} }
 End of changes. 7 change blocks. 
11 lines changed or deleted 30 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/