kstars
#include <dmsbox.h>

Public Member Functions | |
dmsBox (QWidget *parent, bool deg=true) | |
~dmsBox () | |
void | clearFields (void) |
dms | createDms (bool deg=true, bool *ok=0) |
bool | degType (void) const |
bool | isEmpty () |
void | setDegType (bool t) |
void | setDMS (const QString &s) |
void | show (dms t, bool deg=true) |
void | show (const dms *t, bool deg=true) |
void | showInDegrees (dms t) |
void | showInDegrees (const dms *t) |
void | showInHours (dms t) |
void | showInHours (const dms *t) |
Protected Member Functions | |
void | focusInEvent (QFocusEvent *e) |
void | focusOutEvent (QFocusEvent *e) |
Properties | |
bool | degType |
Detailed Description
A KLineEdit which is capable of displaying and parsing angle values flexibly and robustly.
Angle values can be displayed and parsed as Degrees or Hours. When displaying a value, it uses a space-delimited triplet of integers representing the degrees, arcminutes, and arcseconds of the angle (or hours, minutes, seconds). For example, "-34 45 57". When parsing a value input by the user, it can also understand a number of other formats:
- colon-delimited fields ("-34:45:57")
- one or two fields ("-35"; "-34 46")
- fields with unit-labels ("-34d 45m 57s")
- floating-point numbers ("-34.76583")
- Note
- Inherits KLineEdit.
- Version
- 1.0
Constructor & Destructor Documentation
|
explicit |
Constructor for the dmsBox object.
- Parameters
-
parent pointer to the parent QWidget deg if true use deg/arcmin/arcsec; otherwise use hours/min/sec.
Definition at line 29 of file dmsbox.cpp.
dmsBox::~dmsBox | ( | ) |
Destructor (empty)
Definition at line 173 of file dmsbox.cpp.
Member Function Documentation
|
inline |
dms dmsBox::createDms | ( | bool | deg = true , |
bool * | ok = 0 |
||
) |
Parse the text in the dmsBox as an angle.
The text may be an integer or double value, or it may be a triplet of integer values (separated by spaces or colons) representing deg/hrs, min, sec. It is also possible to have two fields. In this case, if the second field is a double, it is converted to decimal min and double sec.
- Parameters
-
deg if true use deg/arcmin/arcsec; otherwise use hours/min/sec. ok set to true if a dms object was succedssfully created.
- Returns
- a dms object constructed from the fields of the dmsbox
Definition at line 163 of file dmsbox.cpp.
|
inline |
|
protected |
Definition at line 60 of file dmsbox.cpp.
|
protected |
Definition at line 70 of file dmsbox.cpp.
void dmsBox::setDegType | ( | bool | t | ) |
set the dmsBox to Degrees or Hours
- Parameters
-
t if true, the box expects angle values in degrees; otherwise it expects values in hours
Definition at line 90 of file dmsbox.cpp.
|
inline |
void dmsBox::show | ( | dms | t, |
bool | deg = true |
||
) |
Display an angle.
Simply calls showInDegrees(t) or showInHours(t) depending on the value of deg.
- Parameters
-
t the dms object which is to be displayed. deg if true, display Deg/Arcmin/Arcsec; otherwise display Hours/Min/Sec.
Definition at line 155 of file dmsbox.cpp.
void dmsBox::show | ( | const dms * | t, |
bool | deg = true |
||
) |
Display an angle.
Simply calls showInDegrees(t) or showInHours(t) depending on the value of deg. This behaves essentially like the above function. It differs only in the data type of its argument.
- Parameters
-
t the dms object which is to be displayed. deg if true, display Deg/Arcmin/Arcsec; otherwise display Hours/Min/Sec.
Definition at line 154 of file dmsbox.cpp.
void dmsBox::showInDegrees | ( | dms | t | ) |
Display an angle using Deg/Arcmin/Arcsec.
t
the dms object which is to be displayed
Definition at line 141 of file dmsbox.cpp.
void dmsBox::showInDegrees | ( | const dms * | t | ) |
Display an angle using Deg/Arcmin/Arcsec.
This behaves just like the above function. It differs only in the data type of the argument. t
pointer to the dms object which is to be displayed
Definition at line 140 of file dmsbox.cpp.
void dmsBox::showInHours | ( | dms | t | ) |
Display an angle using Hours/Min/Sec.
t
the dms object which is to be displayed
Definition at line 148 of file dmsbox.cpp.
void dmsBox::showInHours | ( | const dms * | t | ) |
Display an angle using Hours/Min/Sec.
This behaves just like the above function. It differs only in the data type of the argument. t
pointer to the dms object which is to be displayed
Definition at line 147 of file dmsbox.cpp.
Property Documentation
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.