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 
13 #include <KConfigDialog>
14 
15 #include <QCheckBox>
16 #include <QComboBox>
17 #include <QFileDialog>
18 #include <QPushButton>
19 #include <QStringList>
20 
21 namespace Ekos
22 {
23 OpsDither::OpsDither() : QFrame(KStars::Instance())
24 {
25  setupUi(this);
26 
27  //Get a pointer to the KConfigDialog
28  m_ConfigDialog = KConfigDialog::exists("guidesettings");
29 
30  connect(kcfg_DitherNoGuiding, &QCheckBox::toggled, this, [&](bool checked)
31  {
32  if (checked && kcfg_DitherEnabled->isChecked())
33  {
34  KSNotification::error("Guided dithering cannot be used along with non-guided dithering.");
35  kcfg_DitherEnabled->setChecked(false);
36  }
37  });
38 
39  connect(kcfg_DitherEnabled, &QCheckBox::toggled, this, [&](bool checked)
40  {
41  if (checked && kcfg_DitherNoGuiding->isChecked())
42  {
43  KSNotification::error("Guided dithering cannot be used along with non-guided dithering.");
44  kcfg_DitherNoGuiding->setChecked(false);
45  }
46  });
47 
48  connect(kcfg_DitherWithOnePulse, &QCheckBox::toggled, this, [&](bool checked)
49  {
50  kcfg_DitherMaxIterations->setEnabled(!checked);
51  });
52 
53  connect(m_ConfigDialog, SIGNAL(settingsChanged(QString)), this, SIGNAL(settingsUpdated()));
54 
55 }
56 
57 }
Ekos is an advanced Astrophotography tool for Linux. It is based on a modular extensible framework to...
Definition: align.cpp:76
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:90
void setupUi(QWidget *widget)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 04:03:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.