Updating FITS header
This commit is contained in:
+31
-3
@@ -1,5 +1,6 @@
|
||||
#include "platesolving.h"
|
||||
#include <QSettings>
|
||||
#include <QMessageBox>
|
||||
#include "ui_platesolving.h"
|
||||
#include "solver.h"
|
||||
#include "imageringlist.h"
|
||||
@@ -33,6 +34,8 @@ PlateSolving::PlateSolving(QWidget *parent)
|
||||
connect(_ui->extractButton, &QPushButton::clicked, this, &PlateSolving::extract);
|
||||
connect(_ui->solveButton, &QPushButton::clicked, this, &PlateSolving::solve);
|
||||
connect(_ui->settingsButton, &QPushButton::clicked, this, &PlateSolving::settings);
|
||||
connect(_ui->abortButton, &QPushButton::clicked, this, &PlateSolving::abort);
|
||||
connect(_ui->updateButton, &QPushButton::clicked, this, &PlateSolving::updateHeader);
|
||||
connect(_solver, &Solver::solvingDone, this, &PlateSolving::solvingDone);
|
||||
connect(_solver, &Solver::extractionDone, this, &PlateSolving::extractionDone);
|
||||
connect(_solver, &Solver::logOutput, [this](const QString &log){ _ui->log->appendPlainText(log); });
|
||||
@@ -132,6 +135,18 @@ void PlateSolving::solvingDone()
|
||||
_ui->log->appendPlainText(QString("Solving finished in %1 ms").arg(_solvingTime.elapsed()));
|
||||
}
|
||||
|
||||
void PlateSolving::abort()
|
||||
{
|
||||
_solver->abort();
|
||||
}
|
||||
|
||||
void PlateSolving::updateHeader()
|
||||
{
|
||||
QString error;
|
||||
if(!_solver->updateHeader(error))
|
||||
QMessageBox::warning(this, tr("Header update failed"), error);
|
||||
}
|
||||
|
||||
void PlateSolving::imageLoaded(Image *image)
|
||||
{
|
||||
if(image && image->rawImage())
|
||||
@@ -153,11 +168,24 @@ void PlateSolving::imageLoaded(Image *image)
|
||||
{
|
||||
_ui->raStart->setValue(pointScale.point.RAHour());
|
||||
_ui->decStart->setValue(pointScale.point.DEC());
|
||||
_ui->usePosition->setChecked(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_ui->usePosition->setChecked(false);
|
||||
}
|
||||
|
||||
_ui->scaleUnit->setCurrentIndex(2);
|
||||
_ui->fovLow->setValue(pointScale.scaleLow);
|
||||
_ui->fovHigh->setValue(pointScale.scaleHigh);
|
||||
if(pointScale.scaleValid)
|
||||
{
|
||||
_ui->scaleUnit->setCurrentIndex(2);
|
||||
_ui->fovLow->setValue(pointScale.scaleLow);
|
||||
_ui->fovHigh->setValue(pointScale.scaleHigh);
|
||||
_ui->usePosition->setChecked(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_ui->useScale->setChecked(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user