• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

Functions
KSUtils Namespace Reference

Functions

template<typename T >
T clamp (T x, T min, T max)
 
Vector3d fromSperical (dms longitude, dms latitude)
 
QString getDSSURL (const SkyPoint *const p)
 
QString getDSSURL (const dms &ra, const dms &dec, float width=0, float height=0, const QString &type="gif")
 
bool openDataFile (QFile &file, const QString &filename)
 
Vector2f pointToVec (const QPointF &p)
 
template<typename T >
T reduceAngle (T x, T min, T max)
 
QString toDirectionString (dms angle)
 
QPointF vecToPoint (const Vector2f &vec)
 

Function Documentation

template<typename T >
T KSUtils::clamp ( T  x,
T  min,
T  max 
)
inline

Clamp value into range.

x value to clamp. min minimal allowed value. max maximum allowed value.

Definition at line 59 of file ksutils.h.

Vector3d KSUtils::fromSperical ( dms  longitude,
dms  latitude 
)
inline

Convert from spherical to cartesian coordiate system.

Resulting vector have unit length

Definition at line 82 of file ksutils.h.

QString KSUtils::getDSSURL ( const SkyPoint *const  p)

Create a URL to obtain a DSS image for a given SkyPoint.

Note
If SkyPoint is a DeepSkyObject, this method automatically decides the image size required to fit the object.
QString KSUtils::getDSSURL ( const dms &  ra,
const dms &  dec,
float  width = 0,
float  height = 0,
const QString &  type = "gif" 
)

Create a URL to obtain a DSS image for a given RA, Dec.

Parameters
RAThe J2000.0 Right Ascension of the point
DecThe J2000.0 Declination of the point
widthThe width of the image in arcminutes
heightThe height of the image in arcminutes
typeThe image type, either gif or fits.
Note
This method resets height and width to fall within the range accepted by DSS
bool KSUtils::openDataFile ( QFile &  file,
const QString &  filename 
)

Attempt to open the data file named filename, using the QFile object "file".

First look in the standard KDE directories, then look in a local "data" subdirectory. If the data file cannot be found or opened, display a warning messagebox. Open a data file.

Parameters
&fileThe QFile object to be opened
filenameThe name of the data file.
Returns
bool Returns true if data file was opened successfully.
a reference to the opened file.
Vector2f KSUtils::pointToVec ( const QPointF &  p)
inline

Convert a point to a vector.

Definition at line 96 of file ksutils.h.

template<typename T >
T KSUtils::reduceAngle ( T  x,
T  min,
T  max 
)
inline

Put angle into range.

Period is equal to max-min.

x angle value min minimal angle max maximal angle

Definition at line 74 of file ksutils.h.

QString KSUtils::toDirectionString ( dms  angle)

Return a string corresponding to an angle specifying direction.

The angle must measure direction from North, towards East. Both the azimuth and position angle follow this convention, so this method can be used to return a string corresponding to the general heading of a given azimuth / position angle.

Parameters
angleangle as dms (measured from North, towards East)
Returns
A localized string corresponding to the approximate direction (eg: NNW)
QPointF KSUtils::vecToPoint ( const Vector2f &  vec)
inline

Convert a vector to a point.

Definition at line 91 of file ksutils.h.

This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal