Kstars

opsastap.cpp
1 /*
2  SPDX-FileCopyrightText: 2019 Jasem Mutlaq <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #include "opsastap.h"
8 
9 #include "align.h"
10 #include "fov.h"
11 #include "kstars.h"
12 #include "ksnotification.h"
13 #include "Options.h"
14 
15 #include <KConfigDialog>
16 #include <QProcess>
17 
18 namespace Ekos
19 {
20 OpsASTAP::OpsASTAP(Align *parent) : QWidget(KStars::Instance())
21 {
22  setupUi(this);
23 
24  alignModule = parent;
25 
26  //Get a pointer to the KConfigDialog
27  m_ConfigDialog = KConfigDialog::exists("alignsettings");
28 
29  connect(m_ConfigDialog->button(QDialogButtonBox::Apply), SIGNAL(clicked()), SLOT(slotApply()));
30  connect(m_ConfigDialog->button(QDialogButtonBox::Ok), SIGNAL(clicked()), SLOT(slotApply()));
31  connect(selectASTAPExecB, &QPushButton::clicked, this, &OpsASTAP::slotSelectExecutable);
32 }
33 
34 void OpsASTAP::slotApply()
35 {
36  emit settingsUpdated();
37 }
38 
39 void OpsASTAP::slotSelectExecutable()
40 {
41  QUrl executable = QFileDialog::getOpenFileUrl(this, i18nc("@title:window", "Select ASTAP executable"), QUrl(), "(astap astap.exe)");
42  if (executable.isEmpty())
43  return;
44 
45  kcfg_ASTAPExecutable->setText(executable.toLocalFile());
46 }
47 
48 }
QUrl getOpenFileUrl(QWidget *parent, const QString &caption, const QUrl &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options, const QStringList &supportedSchemes)
Ekos is an advanced Astrophotography tool for Linux. It is based on a modular extensible framework to...
Definition: align.cpp:70
void clicked(bool checked)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool isEmpty() const const
QString toLocalFile() const const
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)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Aug 15 2022 04:04:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.