Kstars

opsprograms.cpp
1 /*
2  SPDX-FileCopyrightText: 2017 Jasem Mutlaq <[email protected]>
3  SPDX-FileCopyrightText: 2017 Robert Lancaster <[email protected]>
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 
20 namespace Ekos
21 {
22 OpsPrograms::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 
39 void OpsPrograms::slotApply()
40 {
41  emit settingsUpdated();
42 }
43 
44 void 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 }
Ekos is an advanced Astrophotography tool for Linux. It is based on a modular extensible framework to...
Definition: align.cpp:70
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
static KConfigDialog * exists(const QString &name)
This is the main window for KStars. In addition to the GUI elements, the class contains the program c...
Definition: kstars.h:92
void setupUi(QWidget *widget)
void currentIndexChanged(int index)
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Aug 8 2022 04:13:23 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.