Документ взят из кэша поисковой машины. Адрес оригинального документа : http://astro.uni-altai.ru/~aw/stellarium/api/classAngleSpinBox.html
Дата изменения: Unknown
Дата индексирования: Fri Feb 28 07:27:26 2014
Кодировка: ISO8859-5

Поисковые слова: ultraviolet
Stellarium: AngleSpinBox Class Reference
Stellarium 0.12.3
List of all members | Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions
AngleSpinBox Class Reference

A spin box for displaying/entering angular values. More...

#include <AngleSpinBox.hpp>

Public Types

enum  DisplayFormat {
  DMSLetters, DMSSymbols, HMSLetters, HMSSymbols,
  DecimalDeg
}
 Used to decide how to display the angle. More...
 
enum  PrefixType {
  Normal, NormalPlus, Longitude, Latitude,
  Unknown
}
 Determines how positive and negative values are indicated. More...
 

Public Slots

virtual void clear ()
 Set the value to default 0 angle. More...
 
void setRadians (double radians)
 Set the value of the spin box in radians. More...
 
void setDegrees (double degrees)
 Set the value of the spin box in decimal degrees. More...
 

Signals

void valueChanged ()
 Emitted when the value changes. More...
 

Public Member Functions

 AngleSpinBox (QWidget *parent=0, DisplayFormat format=DMSSymbols, PrefixType prefix=Normal)
 
virtual void stepBy (int steps)
 
virtual QValidator::State validate (QString &input, int &pos) const
 
double valueRadians ()
 Get the angle held in the AngleSpinBox. More...
 
double valueDegrees ()
 Get the angle held in the AngleSpinBox. More...
 
void setDecimals (int places)
 Set the number of decimal places to express float values to (e.g. More...
 
int decimals ()
 Get the number of decimal places to express float values to (e.g. More...
 
void setDisplayFormat (DisplayFormat format)
 Set the display format. More...
 
DisplayFormat displayFormat ()
 Get the current display format. More...
 
void setPrefixType (PrefixType prefix)
 Set the prefix type. More...
 
PrefixType prefixType ()
 Get the current display format. More...
 

Protected Member Functions

virtual StepEnabled stepEnabled () const
 

Detailed Description

A spin box for displaying/entering angular values.

This class can accept angles in various formats commonly used in astronomy including decimal degrees, DMS and HMS.

Definition at line 30 of file AngleSpinBox.hpp.

Member Enumeration Documentation

Used to decide how to display the angle.

Enumerator
DMSLetters 

Degrees, minutes and seconds, e.g. 180d 4m 8s.

DMSSymbols 

Degrees, minutes and seconds, e.g. 180ТА 4' 8".

HMSLetters 

Hours, minutes and seconds, e.g. 12h 4m 6s.

HMSSymbols 

Hours, minutes and seconds, e.g. 12h 4' 6s".

DecimalDeg 

Decimal degrees, e.g. 180.06888.

Definition at line 37 of file AngleSpinBox.hpp.

Determines how positive and negative values are indicated.

Enumerator
Normal 

negative values have '-' prefix

NormalPlus 

positive values have '+' prefix, negative values have '-' prefix.

Longitude 

positive values have 'E' prefix, negative values have 'W' prefix.

Latitude 

positive values have 'N' prefix, negative values have 'S' prefix.

Definition at line 48 of file AngleSpinBox.hpp.

Member Function Documentation

virtual void AngleSpinBox::clear ( )
virtualslot

Set the value to default 0 angle.

int AngleSpinBox::decimals ( )
inline

Get the number of decimal places to express float values to (e.g.

seconds in DMSLetters format).

Returns
the number of decimal places used.

Definition at line 77 of file AngleSpinBox.hpp.

DisplayFormat AngleSpinBox::displayFormat ( )
inline

Get the current display format.

Returns
the current DisplayFormat.

Definition at line 85 of file AngleSpinBox.hpp.

PrefixType AngleSpinBox::prefixType ( )
inline

Get the current display format.

Returns
the current DisplayFormat.

Definition at line 93 of file AngleSpinBox.hpp.

void AngleSpinBox::setDecimals ( int  places)
inline

Set the number of decimal places to express float values to (e.g.

seconds in DMSLetters format).

Parameters
placesthe number of decimal places to use.

Definition at line 73 of file AngleSpinBox.hpp.

void AngleSpinBox::setDegrees ( double  degrees)
slot

Set the value of the spin box in decimal degrees.

Parameters
degreesthe value to set, in decimal degrees.
void AngleSpinBox::setDisplayFormat ( DisplayFormat  format)
inline

Set the display format.

Parameters
formatthe new format to use.

Definition at line 81 of file AngleSpinBox.hpp.

void AngleSpinBox::setPrefixType ( PrefixType  prefix)
inline

Set the prefix type.

Parameters
prefixthe new prefix type to use.

Definition at line 89 of file AngleSpinBox.hpp.

void AngleSpinBox::setRadians ( double  radians)
slot

Set the value of the spin box in radians.

Parameters
radiansthe value to set, in radians.
void AngleSpinBox::valueChanged ( )
signal

Emitted when the value changes.

double AngleSpinBox::valueDegrees ( )

Get the angle held in the AngleSpinBox.

Returns
the angle in degrees
double AngleSpinBox::valueRadians ( )

Get the angle held in the AngleSpinBox.

Returns
the angle in radians

The documentation for this class was generated from the following file: