8#include "focusprogresswidget.h"
14FocusProgressWidget::FocusProgressWidget(
QWidget * parent) :
QWidget(parent)
19void FocusProgressWidget::updateCurrentHFR(
double newHFR)
21 currentHFR->setText(
QString(
"%1").arg(newHFR, 0,
'f', 2) +
" px");
22 profilePlot->drawProfilePlot(newHFR);
25void FocusProgressWidget::updateFocusDetailView()
27 const int pos = focusDetailView->currentIndex();
28 if (pos == 1 && focusStarPixmap.get() !=
nullptr)
30 focusStarView->setPixmap(focusStarPixmap.get()->scaled(focusDetailView->width(), focusDetailView->height(),
35void FocusProgressWidget::updateFocusStarPixmap(
QPixmap &starPixmap)
40 focusStarPixmap.reset(
new QPixmap(starPixmap));
41 updateFocusDetailView();
44void FocusProgressWidget::updateFocusStatus(Ekos::FocusState status)
46 focusStatus->setFocusState(status);
49void FocusProgressWidget::init()
55 const int pos = focusDetailView->currentIndex();
56 if (pos == 0 || (pos == 1 && focusStarPixmap.get() !=
nullptr))
57 focusDetailView->setCurrentIndex(pos + 1);
59 focusDetailView->setCurrentIndex(0);
60 updateFocusDetailView();
64 const int pos = focusDetailView->currentIndex();
65 if (pos == 0 && focusStarPixmap.get() !=
nullptr)
66 focusDetailView->setCurrentIndex(pos + 2);
68 focusDetailView->setCurrentIndex(pos + 1);
70 focusDetailView->setCurrentIndex(pos - 1);
71 updateFocusDetailView();
75void FocusProgressWidget::reset()
77 focusStatus->setFocusState(FOCUS_IDLE);
Ekos is an advanced Astrophotography tool for Linux.
bool isNull() const const
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)