modCalcEquinox::modCalcEquinox(QWidget *parentSplit) : QFrame(parentSplit), dSpring(), dSummer(), dAutumn(), dWinter() { setupUi(this); connect( Year, SIGNAL( valueChanged(int) ), this, SLOT( slotCompute() ) ); connect( InputFileBatch, SIGNAL(urlSelected(const KUrl&)), this, SLOT(slotCheckFiles()) ); connect( OutputFileBatch, SIGNAL(urlSelected(const KUrl&)), this, SLOT(slotCheckFiles()) ); connect( RunButtonBatch, SIGNAL(clicked()), this, SLOT(slotRunBatch())); connect( ViewButtonBatch, SIGNAL(clicked()), this, SLOT(slotViewBatch())); Plot->axis(KPlotWidget::LeftAxis)->setLabel( i18n("Sun's Declination") ); Plot->setTopPadding( 40 ); //Don't draw Top & Bottom axes; custom axes drawn as plot objects Plot->axis(KPlotWidget::BottomAxis)->setVisible( false ); Plot->axis(KPlotWidget::TopAxis)->setVisible( false ); //This will call slotCompute(): Year->setValue( KStarsData::Instance()->lt().date().year() ); RunButtonBatch->setEnabled( false ); ViewButtonBatch->setEnabled( false ); show(); }
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(); }
modCalcSidTime::modCalcSidTime(QWidget *parent) : QFrame(parent) { setupUi(this); //Preset date and location showCurrentTimeAndLocation(); // signals and slots connections connect(LocationButton, SIGNAL(clicked()), this, SLOT(slotChangeLocation())); connect(Date, SIGNAL(dateChanged(const QDate&)), this, SLOT(slotChangeDate())); connect(LT, SIGNAL(timeChanged(const QTime&)), this, SLOT(slotConvertST(const QTime&))); connect(ST, SIGNAL(timeChanged(const QTime&)), this, SLOT(slotConvertLT(const QTime&))); connect(LocationCheckBatch, SIGNAL(clicked()), this, SLOT(slotLocationChecked())); connect(DateCheckBatch, SIGNAL(clicked()), this, SLOT(slotDateChecked())); connect(LocationCheckBatch, SIGNAL(clicked()), this, SLOT(slotHelpLabel())); connect(DateCheckBatch, SIGNAL(clicked()), this, SLOT(slotHelpLabel())); connect(ComputeComboBatch, SIGNAL(currentIndexChanged(int)), this, SLOT(slotHelpLabel())); connect( InputFileBatch, SIGNAL(urlSelected(const QUrl&)), this, SLOT(slotCheckFiles()) ); connect( OutputFileBatch, SIGNAL(urlSelected(const QUrl&)), this, SLOT(slotCheckFiles()) ); connect(LocationButtonBatch, SIGNAL(clicked()), this, SLOT(slotLocationBatch())); connect(RunButtonBatch, SIGNAL(clicked()), this, SLOT(slotRunBatch())); connect(ViewButtonBatch, SIGNAL(clicked()), this, SLOT(slotViewBatch())); RunButtonBatch->setEnabled( false ); ViewButtonBatch->setEnabled( false ); show(); }
modCalcJD::modCalcJD(QWidget *parentSplit) : QFrame(parentSplit) { setupUi(this); // signals and slots connections connect(NowButton, SIGNAL(clicked()), this, SLOT(showCurrentTime())); connect( DateTimeBox, SIGNAL(dateTimeChanged(const QDateTime&)), this, SLOT(slotUpdateCalendar()) ); connect( JDBox, SIGNAL(editingFinished()), this, SLOT(slotUpdateJD()) ); connect( ModJDBox, SIGNAL(editingFinished()), this, SLOT(slotUpdateModJD()) ); connect( InputFileBatch, SIGNAL(urlSelected(const KUrl&)), this, SLOT(slotCheckFiles()) ); connect( OutputFileBatch, SIGNAL(urlSelected(const KUrl&)), this, SLOT(slotCheckFiles()) ); connect( RunButtonBatch, SIGNAL(clicked()), this, SLOT(slotRunBatch()) ); connect( ViewButtonBatch, SIGNAL(clicked()), this, SLOT(slotViewBatch()) ); RunButtonBatch->setEnabled( false ); ViewButtonBatch->setEnabled( false ); showCurrentTime(); slotUpdateCalendar(); show(); }
modCalcGalCoord::modCalcGalCoord(QWidget *parentSplit) : QFrame(parentSplit) { setupUi(this); RA->setDegType(false); connect( RA, SIGNAL(editingFinished()), this, SLOT(slotComputeCoords()) ); connect( Dec, SIGNAL(editingFinished()), this, SLOT(slotComputeCoords()) ); connect( GalLongitude, SIGNAL(editingFinished()), this, SLOT(slotComputeCoords()) ); connect( GalLatitude, SIGNAL(editingFinished()), this, SLOT(slotComputeCoords()) ); connect( ObjectButton, SIGNAL(clicked()), this, SLOT(slotObject()) ); connect(decCheckBatch, SIGNAL(clicked()), this, SLOT(slotDecCheckedBatch())); connect(raCheckBatch, SIGNAL(clicked()), this, SLOT(slotRaCheckedBatch())); connect(epochCheckBatch, SIGNAL(clicked()), this, SLOT(slotEpochCheckedBatch())); connect(galLongCheckBatch, SIGNAL(clicked()), this, SLOT(slotGalLongCheckedBatch())); connect(galLatCheckBatch, SIGNAL(clicked()), this, SLOT(slotGalLatCheckedBatch())); connect(runButtonBatch, SIGNAL(clicked()), this, SLOT(slotRunBatch())); show(); }
modCalcAngDist::modCalcAngDist(QWidget *parentSplit) : QFrame(parentSplit) { setupUi(this); FirstRA->setDegType(false); SecondRA->setDegType(false); connect( FirstRA, SIGNAL(editingFinished()), this, SLOT(slotValidatePositions()) ); connect( FirstDec, SIGNAL(editingFinished()), this, SLOT(slotValidatePositions()) ); connect( SecondRA, SIGNAL(editingFinished()), this, SLOT(slotValidatePositions()) ); connect( SecondDec, SIGNAL(editingFinished()), this, SLOT(slotValidatePositions()) ); connect( FirstRA, SIGNAL(textEdited(QString)), this, SLOT(slotResetTitle()) ); connect( FirstDec, SIGNAL(textEdited(QString)), this, SLOT(slotResetTitle()) ); connect( SecondRA, SIGNAL(textEdited(QString)), this, SLOT(slotResetTitle()) ); connect( SecondDec, SIGNAL(textEdited(QString)), this, SLOT(slotResetTitle()) ); connect( FirstObjectButton, SIGNAL(clicked()), this, SLOT(slotObjectButton()) ); connect( SecondObjectButton, SIGNAL(clicked()), this, SLOT(slotObjectButton()) ); connect( runButtonBatch, SIGNAL(clicked()), this, SLOT(slotRunBatch()) ); show(); slotValidatePositions(); }
modCalcDayLength::modCalcDayLength(QWidget *parentSplit) : QFrame(parentSplit) { setupUi(this); showCurrentDate(); initGeo(); slotComputeAlmanac(); connect( Date, SIGNAL(dateChanged(const QDate&)), this, SLOT(slotComputeAlmanac() ) ); connect( Location, SIGNAL( clicked() ), this, SLOT( slotLocation() ) ); connect( LocationBatch, SIGNAL( clicked() ), this, SLOT( slotLocationBatch() ) ); connect( InputFileBatch, SIGNAL(urlSelected(const QUrl&)), this, SLOT(slotCheckFiles()) ); connect( OutputFileBatch, SIGNAL(urlSelected(const QUrl&)), this, SLOT(slotCheckFiles()) ); connect( RunButtonBatch, SIGNAL(clicked()), this, SLOT(slotRunBatch()) ); connect( ViewButtonBatch, SIGNAL(clicked()), this, SLOT(slotViewBatch()) ); RunButtonBatch->setEnabled( false ); ViewButtonBatch->setEnabled( false ); show(); }