SlewDialog.cpp   SlewDialog.cpp 
skipping to change at line 38 skipping to change at line 38
#include "TelescopeControl.hpp" #include "TelescopeControl.hpp"
#include "SlewDialog.hpp" #include "SlewDialog.hpp"
#include "ui_slewDialog.h" #include "ui_slewDialog.h"
#include <QDebug> #include <QDebug>
using namespace TelescopeControlGlobals; using namespace TelescopeControlGlobals;
SlewDialog::SlewDialog() SlewDialog::SlewDialog()
{ {
ui = new Ui_slewDialog; ui = new Ui_slewDialog();
dialogName = "TelescopeControlSlew";
//TODO: Fix this - it's in the same plugin //TODO: Fix this - it's in the same plugin
telescopeManager = GETSTELMODULE(TelescopeControl); telescopeManager = GETSTELMODULE(TelescopeControl);
storedPointsDialog = NULL; storedPointsDialog = NULL;
} }
SlewDialog::~SlewDialog() SlewDialog::~SlewDialog()
{ {
delete ui; delete ui;
storedPointsDialog = NULL; storedPointsDialog = NULL;
skipping to change at line 64 skipping to change at line 65
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
} }
void SlewDialog::createDialogContent() void SlewDialog::createDialogContent()
{ {
ui->setupUi(dialog); ui->setupUi(dialog);
//Inherited connect //Inherited connect
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)));
connect(ui->radioButtonHMS, SIGNAL(toggled(bool)), this, SLOT(setFor matHMS(bool))); connect(ui->radioButtonHMS, SIGNAL(toggled(bool)), this, SLOT(setFor matHMS(bool)));
connect(ui->radioButtonDMS, SIGNAL(toggled(bool)), this, SLOT(setFor matDMS(bool))); connect(ui->radioButtonDMS, SIGNAL(toggled(bool)), this, SLOT(setFor matDMS(bool)));
connect(ui->radioButtonDecimal, SIGNAL(toggled(bool)), this, SLOT(se tFormatDecimal(bool))); connect(ui->radioButtonDecimal, SIGNAL(toggled(bool)), this, SLOT(se tFormatDecimal(bool)));
connect(ui->pushButtonSlew, SIGNAL(clicked()), this, SLOT(slew())); connect(ui->pushButtonSlew, SIGNAL(clicked()), this, SLOT(slew()));
connect(ui->pushButtonConfigure, SIGNAL(clicked()), this, SLOT(showC onfiguration())); connect(ui->pushButtonConfigure, SIGNAL(clicked()), this, SLOT(showC onfiguration()));
connect(telescopeManager, SIGNAL(clientConnected(int, QString)), thi s, SLOT(addTelescope(int, QString))); connect(telescopeManager, SIGNAL(clientConnected(int, QString)), thi s, SLOT(addTelescope(int, QString)));
connect(telescopeManager, SIGNAL(clientDisconnected(int)), this, SLO T(removeTelescope(int))); connect(telescopeManager, SIGNAL(clientDisconnected(int)), this, SLO T(removeTelescope(int)));
skipping to change at line 86 skipping to change at line 88
connect(ui->toolButtonStoredPoints, SIGNAL(clicked()), this, SLOT(ed itStoredPoints())); connect(ui->toolButtonStoredPoints, SIGNAL(clicked()), this, SLOT(ed itStoredPoints()));
connect(ui->pushButtonCurrent, SIGNAL(clicked()), this, SLOT(getCurr entObjectInfo())); connect(ui->pushButtonCurrent, SIGNAL(clicked()), this, SLOT(getCurr entObjectInfo()));
connect(ui->pushButtonCenter, SIGNAL(clicked()), this, SLOT(getCente rInfo())); connect(ui->pushButtonCenter, SIGNAL(clicked()), this, SLOT(getCente rInfo()));
//Coordinates are in HMS by default: //Coordinates are in HMS by default:
ui->radioButtonHMS->setChecked(true); ui->radioButtonHMS->setChecked(true);
storedPointsDialog = new StoredPointsDialog; storedPointsDialog = new StoredPointsDialog;
// add point and remove // add point and remove
connect(storedPointsDialog, SIGNAL(addStoredPoint(int, QString, doub connect(storedPointsDialog, SIGNAL(addStoredPoint(int, QString, doub
le, double)), le, double)), this, SLOT(addStoredPointToComboBox(int, QString, double, dou
this, SLOT(addStoredPointToComboBox(int, QString, double, do ble)));
uble)));
// remove point // remove point
connect(storedPointsDialog, SIGNAL(removeStoredPoint(int)), connect(storedPointsDialog, SIGNAL(removeStoredPoint(int)), this, SL
this, SLOT(removeStoredPointFromComboBox(int))); OT(removeStoredPointFromComboBox(int)));
// clean points
connect(storedPointsDialog, SIGNAL(clearStoredPoints()), this, SLOT(
clearStoredPointsFromComboBox()));
updateTelescopeList(); updateTelescopeList();
updateStoredPointsList(); updateStoredPointsList();
} }
void SlewDialog::showConfiguration() void SlewDialog::showConfiguration()
{ {
//Hack to work around having no direct way to do display the window //Hack to work around having no direct way to do display the window
telescopeManager->configureGui(true); telescopeManager->configureGui(true);
} }
skipping to change at line 280 skipping to change at line 282
savePointsToFile(); savePointsToFile();
} }
void SlewDialog::removeStoredPointFromComboBox(int number) void SlewDialog::removeStoredPointFromComboBox(int number)
{ {
ui->comboBoxStoredPoints->removeItem(number+1); ui->comboBoxStoredPoints->removeItem(number+1);
if (1 == ui->comboBoxStoredPoints->count()) if (1 == ui->comboBoxStoredPoints->count())
{ {
ui->comboBoxStoredPoints->removeItem(0); ui->comboBoxStoredPoints->removeItem(0);
} }
this->savePointsToFile(); savePointsToFile();
}
void SlewDialog::clearStoredPointsFromComboBox()
{
ui->comboBoxStoredPoints->blockSignals(true);
ui->comboBoxStoredPoints->clear();
ui->comboBoxStoredPoints->addItem(q_("Select one"));
ui->comboBoxStoredPoints->blockSignals(false);
savePointsToFile();
} }
void SlewDialog::getStoredPointInfo() void SlewDialog::getStoredPointInfo()
{ {
QVariant var = ui->comboBoxStoredPoints->currentData(); QVariant var = ui->comboBoxStoredPoints->currentData();
storedPoint sp = var.value<storedPoint>(); storedPoint sp = var.value<storedPoint>();
ui->spinBoxRA->setRadians(sp.radiansRA); ui->spinBoxRA->setRadians(sp.radiansRA);
ui->spinBoxDec->setRadians(sp.radiansDec); ui->spinBoxDec->setRadians(sp.radiansDec);
} }
 End of changes. 5 change blocks. 
8 lines changed or deleted 21 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/