modCalcVlsr::modCalcVlsr(QWidget *parentSplit) : QFrame(parentSplit), velocityFlag(0) { setupUi(this); RA->setDegType(false); Date->setDateTime( KStarsDateTime::currentDateTime().dateTime() ); initGeo(); VLSR->setValidator( new QDoubleValidator( VLSR ) ); VHelio->setValidator( new QDoubleValidator( VHelio ) ); VGeo->setValidator( new QDoubleValidator( VGeo ) ); VTopo->setValidator( new QDoubleValidator( VTopo ) ); // signals and slots connections connect(Date, SIGNAL( dateTimeChanged( const QDateTime & ) ), this, SLOT( slotCompute() ) ); connect(NowButton, SIGNAL( clicked() ), this, SLOT( slotNow() ) ); connect(LocationButton, SIGNAL( clicked() ), this, SLOT( slotLocation() ) ); connect(ObjectButton, SIGNAL( clicked() ), this, SLOT( slotFindObject() ) ); connect(RA, SIGNAL( editingFinished() ), this, SLOT( slotCompute() ) ); connect(Dec, SIGNAL( editingFinished() ), this, SLOT( slotCompute() ) ); connect(VLSR, SIGNAL( editingFinished() ), this, SLOT( slotCompute() ) ); connect(VHelio, SIGNAL( editingFinished() ), this, SLOT( slotCompute() ) ); connect(VGeo, SIGNAL( editingFinished() ), this, SLOT( slotCompute() ) ); connect(VTopo, SIGNAL( editingFinished() ), this, SLOT( slotCompute() ) ); connect(RunButtonBatch, SIGNAL(clicked()), this, SLOT(slotRunBatch())); show(); }
modCalcAltAz::modCalcAltAz(QWidget *parentSplit) : QFrame(parentSplit) { setupUi(this); KStarsData *data = KStarsData::Instance(); RA->setDegType(false); //Initialize Date/Time and Location data geoPlace = data->geo(); LocationButton->setText( geoPlace->fullName() ); //Make sure slotDateTime() gets called, so that LST will be set connect(DateTime, SIGNAL(dateTimeChanged(const QDateTime&)), this, SLOT(slotDateTimeChanged(const QDateTime&))); DateTime->setDateTime( data->lt().dateTime() ); connect(NowButton, SIGNAL(clicked()), this, SLOT(slotNow())); connect(LocationButton, SIGNAL(clicked()), this, SLOT(slotLocation())); connect(ObjectButton, SIGNAL(clicked()), this, SLOT(slotObject())); connect(RA, SIGNAL(editingFinished()), this, SLOT(slotCompute())); connect(Dec, SIGNAL(editingFinished()), this, SLOT(slotCompute())); connect(Az, SIGNAL(editingFinished()), this, SLOT(slotCompute())); connect(Alt, SIGNAL(editingFinished()), this, SLOT(slotCompute())); show(); }