Kstars

opsdither.cpp
1 /*
2  SPDX-FileCopyrightText: 2003 Jasem Mutlaq <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #include "opsdither.h"
8 
9 #include "Options.h"
10 #include "kstars.h"
11 #include "auxiliary/ksnotification.h"
12 #include "internalguide/internalguider.h"
13 
14 #include <KConfigDialog>
15 
16 #include <QCheckBox>
17 #include <QComboBox>
18 #include <QFileDialog>
19 #include <QPushButton>
20 #include <QStringList>
21 
22 namespace Ekos
23 {
24 OpsDither::OpsDither() : QFrame(KStars::Instance())
25 {
26  setupUi(this);
27 
28  //Get a pointer to the KConfigDialog
29  m_ConfigDialog = KConfigDialog::exists("guidesettings");
30 
31  connect(kcfg_DitherNoGuiding, &QCheckBox::toggled, this, [&](bool checked)
32  {
33  if (checked && kcfg_DitherEnabled->isChecked())
34  {
35  KSNotification::error("Guided dithering cannot be used along with non-guided dithering.");
36  kcfg_DitherEnabled->setChecked(false);
37  }
38  });
39 
40  connect(kcfg_DitherEnabled, &QCheckBox::toggled, this, [&](bool checked)
41  {
42  if (checked && kcfg_DitherNoGuiding->isChecked())
43  {
44  KSNotification::error("Guided dithering cannot be used along with non-guided dithering.");
45  kcfg_DitherNoGuiding->setChecked(false);
46  }
47  });
48 
49  connect(kcfg_DitherWithOnePulse, &QCheckBox::toggled, this, [&](bool checked)
50  {
51  kcfg_DitherMaxIterations->setEnabled(!checked);
52  });
53 
54  connect(m_ConfigDialog, SIGNAL(settingsChanged(QString)), this, SIGNAL(settingsUpdated()));
55 
56 }
57 
58 }
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)
void toggled(bool checked)
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)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 11 2022 04:00:02 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.