10#include "kstarsdata.h"
13#include "skycomponents/catalogscomponent.h"
14#include "skycomponents/skymapcomposite.h"
15#include "widgets/magnitudespinbox.h"
18#include <KActionCollection>
19#include <KConfigDialog>
22#include <QListWidgetItem>
34 kcfg_StarDensity->setValue(Options::starDensity());
37 m_StarDensity = kcfg_StarDensity->value();
43 kcfg_DSOCachePercentage->setValue(Options::dSOCachePercentage());
45 [&] { isDirty =
true; });
47 kcfg_DSOMinZoomFactor->setValue(Options::dSOMinZoomFactor());
50 kcfg_ShowUnknownMagObjects->setChecked(Options::showUnknownMagObjects());
52 [&] { isDirty =
true; });
55 if (!kcfg_ShowStars->isChecked())
56 slotStarWidgets(
false);
64 connect(kcfg_ShowStars, SIGNAL(toggled(
bool)), SLOT(slotStarWidgets(
bool)));
65 connect(kcfg_ShowDeepSky, SIGNAL(toggled(
bool)), SLOT(slotDeepSkyWidgets(
bool)));
66 connect(kcfg_ShowDeepSkyNames, SIGNAL(toggled(
bool)), kcfg_DeepSkyLongLabels,
67 SLOT(setEnabled(
bool)));
80 kcfg_MagLimitDrawDeepSky->setMaximum(FAINTEST_MAGNITUDE);
83 kcfg_MagLimitDrawDeepSkyZoomOut->setMaximum(kcfg_MagLimitDrawDeepSky->value());
89void OpsCatalog::slotApply()
96 Options::setStarDensity(kcfg_StarDensity->value());
110 Options::setDSOCachePercentage(kcfg_DSOCachePercentage->value());
112 kcfg_DSOCachePercentage->value());
114 Options::setDSOMinZoomFactor(kcfg_DSOMinZoomFactor->value());
115 Options::setShowUnknownMagObjects(kcfg_ShowUnknownMagObjects->isChecked());
118void OpsCatalog::slotCancel()
122 m_StarDensity = Options::starDensity();
126void OpsCatalog::slotStarWidgets(
bool on)
129 LabelStarDensity->setEnabled(on);
131 LabelDensity->setEnabled(on);
135 kcfg_StarDensity->setEnabled(on);
136 LabelStarDensity->setEnabled(on);
138 kcfg_StarLabelDensity->setEnabled(on);
139 kcfg_ShowStarNames->setEnabled(on);
140 kcfg_ShowStarMagnitudes->setEnabled(on);
143void OpsCatalog::slotDeepSkyWidgets(
bool on)
145 LabelMagDeepSky->setEnabled(on);
146 LabelMagDeepSkyZoomOut->setEnabled(on);
147 kcfg_MagLimitDrawDeepSky->setEnabled(on);
148 kcfg_MagLimitDrawDeepSkyZoomOut->setEnabled(on);
149 kcfg_ShowDeepSkyNames->setEnabled(on);
150 kcfg_ShowDeepSkyMagnitudes->setEnabled(on);
151 kcfg_DSOCachePercentage->setEnabled(on);
152 DSOCacheLabel->setEnabled(on);
153 kcfg_DSOMinZoomFactor->setEnabled(on);
154 kcfg_ShowUnknownMagObjects->setEnabled(on);
155 DSOMInZoomLabel->setEnabled(on);
156 DeepSkyLabelDensityLabel->setEnabled(on);
157 kcfg_DeepSkyLabelDensity->setEnabled(on);
158 kcfg_DeepSkyLongLabels->setEnabled(on);
159 LabelMag3->setEnabled(on);
160 LabelMag4->setEnabled(on);
void resizeCache(const int percentage)
Set the cache size to the new percentage.
static KConfigDialog * exists(const QString &name)
void setFullTimeUpdate()
The Sky is updated more frequently than the moon, which is updated more frequently than the planets.
SkyMapComposite * skyComposite()
This is the main window for KStars.
static KStars * Instance()
void slotDSOCatalogGUI()
Show the DSO Catalog Management GUI.
KStarsData * data() const
void updateTime(const bool automaticDSTchange=true)
Update time-dependent data and (possibly) repaint the sky map.
void forceUpdate(bool now=false)
Recalculates the positions of objects in the sky, and then repaints the sky map.
void valueChanged(int value)
void stateChanged(int state)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)