summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-08-12 07:23:28 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-08-12 07:23:28 (GMT)
commitd9c71c2dde2d5cc527e573d07f32783a7a494d63 (patch)
treecf44bcb908134fc93472f51de426c5bbb188b6dc
parent1dc7d87f68e4b93c6ad325ac20faa3127e99bb14 (diff)
Fix focus signal with new status updates. Include number of captured and total images
-rw-r--r--kstars/ekos/ekosmanager.cpp16
-rw-r--r--kstars/ekos/ekosmanager.h2
2 files changed, 10 insertions, 8 deletions
diff --git a/kstars/ekos/ekosmanager.cpp b/kstars/ekos/ekosmanager.cpp
index b42768f..cbfe0ca 100644
--- a/kstars/ekos/ekosmanager.cpp
+++ b/kstars/ekos/ekosmanager.cpp
@@ -84,6 +84,7 @@ EkosManager::EkosManager()
captureProgress->setValue(0);
sequenceProgress->setValue(0);
+ sequenceProgress->setDecimals(0);
sequenceProgress->setFormat("%v");
countdownTimer.setInterval(1000);
connect(&countdownTimer, SIGNAL(timeout()), this, SLOT(updateCaptureCountDown()));
@@ -1415,7 +1416,7 @@ void EkosManager::initFocus()
int index = toolsWidget->addTab( focusProcess, QIcon(":/icons/ekos_focus.png"), "");
toolsWidget->tabBar()->setTabToolTip(index, i18n("Focus"));
connect(focusProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
- connect(focusProcess, SIGNAL(statusUpdated(bool)), this, SLOT(updateFocusStatus(bool)));
+ connect(focusProcess, SIGNAL(newStatus(Ekos::FocusState)), this, SLOT(updateFocusStatus(Ekos::FocusState)));
connect(focusProcess, SIGNAL(newStarPixmap(QPixmap&)), this, SLOT(updateFocusStarPixmap(QPixmap&)));
connect(focusProcess, SIGNAL(newProfilePixmap(QPixmap&)), this, SLOT(updateFocusProfilePixmap(QPixmap&)));
@@ -1834,7 +1835,8 @@ void EkosManager::updateCaptureImage(QImage *image, Ekos::SequenceJob *job)
if (job->isPreview() == false)
{
- sequenceLabel->setText(QString("# %1/%2 %3").arg(captureProcess->getActiveJobID()+1).arg(captureProcess->getJobCount()).arg(job->getPrefix()));
+ sequenceLabel->setText(QString("Job # %1/%2 %3 (%4/%5)").arg(captureProcess->getActiveJobID()+1).arg(captureProcess->getJobCount()).arg(job->getPrefix())
+ .arg(job->getCompleted()+1).arg(job->getCount()));
sequenceProgress->setRange(0, job->getCount());
sequenceProgress->setValue(static_cast<int>(job->getCompleted()+1));
}
@@ -1878,17 +1880,17 @@ void EkosManager::updateFocusProfilePixmap(QPixmap &profilePixmap)
focusProfileImage->setToolTip(QString("<img src='%1'>").arg(focusProfileFile.fileName()));
}
-void EkosManager::updateFocusStatus(bool status)
+void EkosManager::updateFocusStatus(Ekos::FocusState status)
{
- if (status)
- {
- focusStatus->setText(i18n("In Progress"));
+ focusStatus->setText(Ekos::getFocusStatusString(status));
+
+ if (status >= Ekos::FOCUS_PROGRESS)
+ {
if (focusPI->isAnimated() == false)
focusPI->startAnimation();
}
else
{
- focusStatus->setText(i18n("Stopped"));
if (focusPI->isAnimated())
focusPI->stopAnimation();
}
diff --git a/kstars/ekos/ekosmanager.h b/kstars/ekos/ekosmanager.h
index 03f182c..55740ad 100644
--- a/kstars/ekos/ekosmanager.h
+++ b/kstars/ekos/ekosmanager.h
@@ -193,7 +193,7 @@ private slots:
void updateCaptureCountDown();
// Focus summary
- void updateFocusStatus(bool status);
+ void updateFocusStatus(Ekos::FocusState status);
void updateFocusStarPixmap(QPixmap &starPixmap);
void updateFocusProfilePixmap(QPixmap &profilePixmap);