Kstars

opsekos.cpp
1/*
2 SPDX-FileCopyrightText: 2017 Jasem Mutlaq <mutlaqja@ikarustech.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "opsekos.h"
8
9#include "manager.h"
10#include "kspaths.h"
11#include "kstars.h"
12#include "kstarsdata.h"
13#include "Options.h"
14
15#include <KConfigDialog>
16
17OpsEkos::OpsEkos() : QTabWidget(KStars::Instance())
18{
19 setupUi(this);
20
21 //Get a pointer to the KConfigDialog
22 m_ConfigDialog = KConfigDialog::exists("settings");
23
25 {
26 KStarsData::Instance()->userdb()->DeleteAllDSLRInfo();
27 });
28
30 {
31 if (Options::ekosTopIcons() != kcfg_EkosTopIcons->isChecked())
32 KSNotification::info(i18n("You must restart KStars for this change to take effect."));
33 });
34
35 if (Options::analyzeAlternativeImageDirectory().size() == 0)
36 Options::setAnalyzeAlternativeImageDirectory(QDir::homePath());
37
38 kcfg_AnalyzeAlternativeDirectoryName->setText(Options::analyzeAlternativeImageDirectory());
39
41 {
43 this, i18n("Set an alternate base directory for Analyze's captured images"),
46 if (dir.size() > 0)
47 {
48 Options::setAnalyzeAlternativeImageDirectory(dir);
49 kcfg_AnalyzeAlternativeDirectoryName->setText(Options::analyzeAlternativeImageDirectory());
50 }
51 });
53 {
55
56 QFileInfo newdir(text);
57 if (text.size() > 0 && newdir.exists() && newdir.isDir())
58 Options::setAnalyzeAlternativeImageDirectory(text);
59 else
60 kcfg_AnalyzeAlternativeDirectoryName->setText(Options::analyzeAlternativeImageDirectory());
61 });
62}
static KConfigDialog * exists(const QString &name)
This is the main window for KStars.
Definition kstars.h:91
QString i18n(const char *text, const TYPE &arg...)
KIOCORE_EXPORT QString dir(const QString &fileClass)
void clicked(bool checked)
void toggled(bool checked)
QString homePath()
QString getExistingDirectory(QWidget *parent, const QString &caption, const QString &dir, Options options)
void editingFinished()
qsizetype size() const const
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:48:26 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.