Kstars
8 #include "rotatorsettings.h"
11 #include "kstarsdata.h"
12 #include "ekos/auxiliary/solverutils.h"
15 #include <basedevice.h>
18 RotatorSettings::RotatorSettings(
QWidget *parent) :
QDialog(parent)
22 rotatorGauge->setFormat(
"%v");
23 rotatorGauge->setMinimum(0);
24 rotatorGauge->setMaximum(360);
28 angleSpin->setValue(angle);
31 PAMulSpin->setValue(Options::pAMultiplier());
32 PAOffsetSpin->setValue(Options::pAOffset());
34 syncFOVPA->setChecked(Options::syncFOVPA());
37 Options::setSyncFOVPA(toggled);
38 if (toggled) syncPA(targetPASpin->value());
41 connect(enforceRotationCheck, SIGNAL(toggled(
bool)), targetPASpin, SLOT(setEnabled(
bool)));
42 connect(targetPASpin, SIGNAL(valueChanged(
double)),
this, SLOT(syncPA(
double)));
45 Options::setPAMultiplier(PAMulSpin->value());
51 Options::setPAOffset(PAOffsetSpin->value());
57 void RotatorSettings::setCurrentAngle(
double angle)
61 rotatorGauge->setValue(angle);
65 void RotatorSettings::updatePA()
70 double PA = SolverUtils::rangePA((rotatorGauge->value() * PAMulSpin->value()) - PAOffsetSpin->value());
74 void RotatorSettings::refresh()
76 PAMulSpin->setValue(Options::pAMultiplier());
77 PAOffsetSpin->setValue(Options::pAOffset());
81 void RotatorSettings::syncPA(
double PA)
83 if (syncFOVPA->isChecked())
85 for (
auto oneFOV : KStarsData::Instance()->getTransientFOVs())
88 if (oneFOV->objectName() ==
"sensor_fov")
91 if (!Options::showSensorFOV())
93 Options::setShowSensorFOV(
true);
94 oneFOV->setProperty(
"visible",
true);
QString number(int n, int base)
void valueChanged(int value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 11 2022 04:00:04 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.