Kstars

opsastap.cpp
1/*
2 SPDX-FileCopyrightText: 2019 Jasem Mutlaq <mutlaqja@ikarustech.com>
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
18namespace Ekos
19{
20OpsASTAP::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
34void OpsASTAP::slotApply()
35{
36 emit settingsUpdated();
37}
38
39void OpsASTAP::slotSelectExecutable()
40{
41 QUrl executable = QFileDialog::getOpenFileUrl(this, i18nc("@title:window", "Select ASTAP executable"), QUrl(),
42 "(astap astap.exe)");
43 if (executable.isEmpty())
44 return;
45
46 kcfg_ASTAPExecutable->setText(executable.toLocalFile());
47}
48
49}
static KConfigDialog * exists(const QString &name)
This is the main window for KStars.
Definition kstars.h:89
QString i18nc(const char *context, const char *text, const TYPE &arg...)
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:83
void clicked(bool checked)
QUrl getOpenFileUrl(QWidget *parent, const QString &caption, const QUrl &dir, const QString &filter, QString *selectedFilter, Options options, const QStringList &supportedSchemes)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
bool isEmpty() const const
QString toLocalFile() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.