Kstars
13#include <KLocalizedString>
26void dmsBox::setPlaceholderText()
28 if (m_unit == DEGREES)
37 const bool t = (m_unit == Unit::DEGREES);
47 "The three numbers displayed are the angle's "
48 "degrees, arcminutes, and arcseconds.");
53 "The three numbers displayed are the angle's "
54 "hours, minutes, and seconds.");
61 sTip +=
i18n(
" You may enter a simple integer, or a floating-point value, "
62 "or space- or colon-delimited values specifying "
63 "degrees, arcminutes and arcseconds");
65 sWhatsThis =
i18n(
"Enter an angle value in degrees. The angle can be expressed "
66 "as a simple integer (\"12\"), a floating-point value "
67 "(\"12.33\"), or as space- or colon-delimited "
68 "values specifying degrees, arcminutes and arcseconds (\"12:20\", \"12:20:00\", "
69 "\"12 20\", \"12 20 00.0\", etc.).");
73 sTip +=
i18n(
" You may enter a simple integer, or a floating-point value, "
74 "or space- or colon-delimited values specifying "
75 "hours, minutes and seconds");
77 sWhatsThis =
i18n(
"Enter an angle value in hours. The angle can be expressed "
78 "as a simple integer (\"12\"), a floating-point value "
79 "(\"12.33\"), or as space- or colon-delimited "
80 "values specifying hours, minutes and seconds (\"12:20\", \"12:20:00\", "
81 "\"12 20\", \"12 20 00.0\", etc.).");
94 if (m_unit == Unit::DEGREES)
96 double seconds = d.arcsec() + d.marcsec() / 1000.;
99 else if (m_unit == Unit::HOURS)
101 double seconds = d.second() + d.msecond() / 1000.;
114 check =
dmsAngle.setFromString(
text(), (m_unit == Unit::DEGREES));
dmsBox(QWidget *parent, Unit unit)
Constructor for the dmsBox object.
void setUnits(Unit unit)
set the dmsBox to Degrees or Hours
dms createDms(bool *ok=nullptr)
Parse the text in the dmsBox as an angle.
An angle, stored as degrees, but expressible in many ways.
QString i18n(const char *text, const TYPE &arg...)
void setPlaceholderText(const QString &)
bool isReadOnly() const const
void setText(const QString &)
QString asprintf(const char *cformat,...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:04 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.