Kstars

opsprograms.cpp
1/*
2 SPDX-FileCopyrightText: 2017 Jasem Mutlaq <mutlaqja@ikarustech.com>
3 SPDX-FileCopyrightText: 2017 Robert Lancaster <rlancaste@gmail.com>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6*/
7
8#include "opsprograms.h"
9
10#include "align.h"
11#include "fov.h"
12#include "kstars.h"
13#include "ksnotification.h"
14#include "Options.h"
15
16#include <stellarsolver.h>
17#include <KConfigDialog>
18#include <QProcess>
19
20namespace Ekos
21{
22OpsPrograms::OpsPrograms(Align *parent) : QWidget(KStars::Instance())
23{
24 setupUi(this);
25
26 alignModule = parent;
27
28 connect(defaultPathSelector, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
29 &OpsPrograms::loadDefaultPaths);
30
31 //Get a pointer to the KConfigDialog
32 m_ConfigDialog = KConfigDialog::exists("alignsettings");
33
34 connect(m_ConfigDialog->button(QDialogButtonBox::Apply), SIGNAL(clicked()), SLOT(slotApply()));
35 connect(m_ConfigDialog->button(QDialogButtonBox::Ok), SIGNAL(clicked()), SLOT(slotApply()));
36
37}
38
39void OpsPrograms::slotApply()
40{
41 emit settingsUpdated();
42}
43
44void OpsPrograms::loadDefaultPaths(int option)
45{
46 if(option == 0)
47 return;
48 ExternalProgramPaths paths = StellarSolver::getDefaultExternalPaths((SSolver::ComputerSystemType) (option - 1));
49
50 kcfg_SextractorBinary->setText(paths.sextractorBinaryPath);
51 kcfg_AstrometryConfFile->setText(paths.confPath);
52 kcfg_AstrometrySolverBinary->setText(paths.solverPath);
53 kcfg_ASTAPExecutable->setText(paths.astapBinaryPath);
54 kcfg_WatneyBinary->setText(paths.watneyBinaryPath);
55 kcfg_AstrometryWCSInfo->setText(paths.wcsPath);
56
57 defaultPathSelector->setCurrentIndex(0);
58}
59}
static KConfigDialog * exists(const QString &name)
This is the main window for KStars.
Definition kstars.h:91
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:79
void currentIndexChanged(int index)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:59:51 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.