13#include "ksnotification.h"
16#include "ekos/auxiliary/stellarsolverprofile.h"
18#include <KConfigDialog>
20#include <ekos_align_debug.h>
24OpsAlign::OpsAlign(Align *parent) :
QWidget(
KStars::Instance())
37 emit needToLoadProfile(kcfg_SolveOptionsProfile->currentText());
40 reloadOptionsProfiles();
47void OpsAlign::setFlipPolicy(
const Ekos::OpsAlign::FlipPriority Priority)
49 if (Priority == Ekos::OpsAlign::ROTATOR_ANGLE)
50 kcfg_AstrometryFlipRotationAllowed->setChecked(
true);
51 else if (Priority == Ekos::OpsAlign::POSITION_ANGLE)
52 FlipRotationNotAllowed->setChecked(
true);
57void OpsAlign::reloadOptionsProfiles()
59 QString savedOptionsProfiles =
QDir(KSPaths::writableLocation(
62 if(
QFile(savedOptionsProfiles).exists())
63 optionsList = StellarSolver::loadSavedOptionsProfiles(savedOptionsProfiles);
65 optionsList = getDefaultAlignOptionsProfiles();
66 int currentIndex = kcfg_SolveOptionsProfile->currentIndex();
67 kcfg_SolveOptionsProfile->clear();
68 for(
auto ¶m : optionsList)
69 kcfg_SolveOptionsProfile->addItem(param.listName);
71 if (currentIndex >= 0)
73 kcfg_SolveOptionsProfile->setCurrentIndex(currentIndex);
74 Options::setSolveOptionsProfile(currentIndex);
77 kcfg_SolveOptionsProfile->setCurrentIndex(Options::solveOptionsProfile());
80void OpsAlign::slotApply()
82 emit settingsUpdated();
static KConfigDialog * exists(const QString &name)
This is the main window for KStars.
Ekos is an advanced Astrophotography tool for Linux.
QString filePath(const QString &fileName) const const
QIcon fromTheme(const QString &name)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)