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

kstars

KStars Class Reference

#include <kstars.h>

Inheritance diagram for KStars:

Inheritance graph
[legend]

List of all members.


Detailed Description

This is the main window for KStars.

In addition to the GUI elements, the class contains the program clock, KStarsData, and SkyMap objects. It also contains functions for the DCOP interface.

Author:
Jason Harris
Version:
1.0

Definition at line 67 of file kstars.h.


Public Slots

Q_SCRIPTABLE Q_NOREPLY void addLabel (const QString &name)
Q_SCRIPTABLE Q_NOREPLY void addTrail (const QString &name)
Q_SCRIPTABLE Q_NOREPLY void changeViewOption (const QString &option, const QString &value)
void clearCachedFindDialog ()
Q_SCRIPTABLE Q_NOREPLY void defaultZoom ()
Q_SCRIPTABLE Q_NOREPLY void drawLine (int x1, int y1, int x2, int y2, int speed)
Q_SCRIPTABLE Q_NOREPLY void exportImage (const QString &filename, int width, int height)
QString getOption (const QString &name)
Q_SCRIPTABLE Q_NOREPLY void loadColorScheme (const QString &name)
Q_SCRIPTABLE Q_NOREPLY void lookTowards (const QString &direction)
Q_SCRIPTABLE Q_NOREPLY void popupMessage (int x, int y, const QString &message)
Q_SCRIPTABLE Q_NOREPLY void printImage (bool usePrintDialog, bool useChartColors)
Q_SCRIPTABLE Q_NOREPLY void readConfig ()
Q_SCRIPTABLE Q_NOREPLY void removeLabel (const QString &name)
Q_SCRIPTABLE Q_NOREPLY void removeTrail (const QString &name)
Q_SCRIPTABLE Q_NOREPLY void setAltAz (double alt, double az)
Q_SCRIPTABLE Q_NOREPLY void setColor (const QString &colorName, const QString &value)
Q_SCRIPTABLE Q_NOREPLY void setGeoLocation (const QString &city, const QString &province, const QString &country)
Q_SCRIPTABLE Q_NOREPLY void setLocalTime (int yr, int mth, int day, int hr, int min, int sec)
Q_SCRIPTABLE Q_NOREPLY void setRaDec (double ra, double dec)
Q_SCRIPTABLE Q_NOREPLY void setTracking (bool track)
void slotApplyConfigChanges ()
void slotApplyToolbarConfig ()
void slotClearAllTrails ()
void slotDefaultZoom ()
void slotGeoLocator ()
void slotSetZoom ()
void slotTrack ()
void slotZoomIn ()
void slotZoomOut ()
void updateTime (const bool automaticDSTchange=true)
Q_SCRIPTABLE Q_NOREPLY void waitFor (double t)
Q_SCRIPTABLE Q_NOREPLY void waitForKey (const QString &k)
Q_SCRIPTABLE Q_NOREPLY void writeConfig ()
Q_SCRIPTABLE Q_NOREPLY void zoom (double z)
void zoomIn (const double factor)
Q_SCRIPTABLE Q_NOREPLY void zoomIn ()
void zoomOut (const double factor)
Q_SCRIPTABLE Q_NOREPLY void zoomOut ()

Public Member Functions

void addColorMenuItem (const QString &name, const QString &actionName)
ImageViewer * addImageViewer (const KUrl &url, const QString &message)
void applyConfig (bool doApplyFocus=true)
KStarsData * data ()
KLed * diskLED ()
void establishINDI ()
GeoLocation * geo ()
INDIDriver * getINDIDriver ()
INDIMenu * getINDIMenu ()
InfoBoxes * infoBoxes ()
 KStars (bool doSplash, bool startClockRunning=true, const QString &startDateString=QString())
dms * LST ()
SkyMap * map ()
ObservingList * observingList ()
void removeColorMenuItem (const QString &actionName)
void removeImageViewer (ImageViewer *)
 ~KStars ()

Constructor & Destructor Documentation

KStars::KStars ( bool  doSplash,
bool  startClockRunning = true,
const QString &  startDateString = QString() 
) [explicit]

Constructor.

Parameters:
doSplash should the splash panel be displayed during initialization.
startClockRunning should the clock be running on startup?
startDateString date (in string representation) to start running from.
Todo:
Refer to documentation on date format.

Definition at line 56 of file kstars.cpp.

KStars::~KStars (  ) 

Destructor.

Synchs config file. Deletes objects.

Definition at line 125 of file kstars.cpp.


Member Function Documentation

void KStars::addColorMenuItem ( const QString &  name,
const QString &  actionName 
)

Add an item to the color-scheme action manu.

Parameters:
name The name to use in the menu
actionName The internal name for the action (derived from filename)

Definition at line 1100 of file kstarsactions.cpp.

ImageViewer * KStars::addImageViewer ( const KUrl &  url,
const QString &  message 
)

Definition at line 250 of file kstars.cpp.

void KStars::addLabel ( const QString &  name  )  [slot]

DBUS interface function.

Add a name label to the named object

Parameters:
name the name of the object to which the label will be attached

Definition at line 102 of file kstarsdcop.cpp.

void KStars::addTrail ( const QString &  name  )  [slot]

DBUS interface function.

Add a trail to the named solar system body

Parameters:
name the name of the body to which the trail will be attached

Definition at line 120 of file kstarsdcop.cpp.

void KStars::applyConfig ( bool  doApplyFocus = true  ) 

Apply config options throughout the program.

In most cases, options are set in the "Options" object directly, but for some things we have to manually react to config changes.

Parameters:
doApplyFocus If true, then focus posiiton will be set from config file

Definition at line 155 of file kstars.cpp.

void KStars::changeViewOption ( const QString &  option,
const QString &  value 
) [slot]

DBUS interface function.

modify a view option.

Parameters:
option the name of the option to be modified
value the option's new value

Definition at line 262 of file kstarsdcop.cpp.

void KStars::clearCachedFindDialog (  )  [slot]

Delete FindDialog because ObjNames list has changed in KStarsData due to reloading star data.

So list in FindDialog must be new filled with current data.

Delete findDialog only if it is not opened

Definition at line 140 of file kstars.cpp.

KStarsData * KStars::data (  ) 

Returns:
pointer to KStarsData object which contains application data.

Definition at line 262 of file kstars.cpp.

Q_SCRIPTABLE Q_NOREPLY void KStars::defaultZoom (  )  [inline, slot]

DBUS interface function.

reset to the default zoom level.

Definition at line 198 of file kstars.h.

KLed* KStars::diskLED (  )  [inline]

Definition at line 113 of file kstars.h.

void KStars::drawLine ( int  x1,
int  y1,
int  x2,
int  y2,
int  speed 
) [slot]

DBUS interface function.

Draw a line on the sky map.

Note:
Not Yet Implemented
Parameters:
x1 starting x-coordinate of line
y1 starting y-coordinate of line
x2 ending x-coordinate of line
y2 ending y-coordinate of line
speed speed at which line should appear from start to end points (in pixels per second)

Definition at line 173 of file kstarsdcop.cpp.

void KStars::establishINDI (  ) 

Establish the INDI system.

No GUI

Definition at line 1114 of file kstarsactions.cpp.

void KStars::exportImage ( const QString &  filename,
int  width,
int  height 
) [slot]

DBUS interface function.

Export the sky image to a file.

Parameters:
filename the filename for the exported image
width the width for the exported image
height the height for the exported image

Definition at line 410 of file kstarsdcop.cpp.

GeoLocation * KStars::geo (  ) 

Returns:
pointer to GeoLocation object which is the current geographic location.

Definition at line 268 of file kstars.cpp.

INDIDriver* KStars::getINDIDriver (  )  [inline]

Returns:
pointer to the INDI driver

Definition at line 117 of file kstars.h.

INDIMenu* KStars::getINDIMenu (  )  [inline]

Returns:
pointer to the INDI menu

Definition at line 121 of file kstars.h.

QString KStars::getOption ( const QString &  name  )  [slot]

DBUS interface function.

Parameters:
name the name of the option to query
Returns:
the current value of the named option

Definition at line 251 of file kstarsdcop.cpp.

InfoBoxes * KStars::infoBoxes (  ) 

Returns:
pointer to InfoBoxes object.

Definition at line 266 of file kstars.cpp.

void KStars::loadColorScheme ( const QString &  name  )  [slot]

DBUS interface function.

Load a color scheme.

Parameters:
name the name of the color scheme to load (e.g., "Moonless Night")

Definition at line 389 of file kstarsdcop.cpp.

void KStars::lookTowards ( const QString &  direction  )  [slot]

DBUS interface function.

Point in the direction described by the string argument.

Parameters:
direction either an object name, a compass direction (e.g., "north"), or "zenith"

Definition at line 65 of file kstarsdcop.cpp.

dms * KStars::LST (  ) 

Returns:
pointer to the local sidereal time.

Definition at line 272 of file kstars.cpp.

SkyMap * KStars::map (  ) 

Returns:
pointer to SkyMap object which is the sky display widget.

Definition at line 264 of file kstars.cpp.

ObservingList * KStars::observingList (  ) 

Definition at line 274 of file kstars.cpp.

void KStars::popupMessage ( int  x,
int  y,
const QString &  message 
) [slot]

DBUS interface function.

Show text message in a popup window.

Note:
Not Yet Implemented
Parameters:
x x-coordinate for message window
y y-coordinate for message window
message the text to display in the message window

Definition at line 169 of file kstarsdcop.cpp.

void KStars::printImage ( bool  usePrintDialog,
bool  useChartColors 
) [slot]

DBUS interface function.

Print the sky image.

Parameters:
usePrintDialog if true, the KDE print dialog will be shown; otherwise, default parameters will be used
useChartColors if true, the "Star Chart" color scheme will be used for the printout, which will save ink.

Definition at line 485 of file kstarsdcop.cpp.

void KStars::readConfig (  )  [slot]

DBUS interface function.

Read config file. This function is useful for restoring the user settings from the config file, after having modified the settings in memory.

See also:
writeConfig()

Definition at line 229 of file kstarsdcop.cpp.

void KStars::removeColorMenuItem ( const QString &  actionName  ) 

Remove an item from the color-scheme action manu.

Parameters:
actionName The internal name of the action (derived from filename)

Definition at line 1109 of file kstarsactions.cpp.

void KStars::removeImageViewer ( ImageViewer *  iv  ) 

Definition at line 256 of file kstars.cpp.

void KStars::removeLabel ( const QString &  name  )  [slot]

DBUS interface function.

Remove a name label from the named object

Parameters:
name the name of the object from which the label will be removed

Definition at line 111 of file kstarsdcop.cpp.

void KStars::removeTrail ( const QString &  name  )  [slot]

DBUS interface function.

Remove a trail from the named solar system body

Parameters:
name the name of the object from which the trail will be removed

Definition at line 128 of file kstarsdcop.cpp.

void KStars::setAltAz ( double  alt,
double  az 
) [slot]

DBUS interface function.

Set focus to given Alt/Az coordinates.

Parameters:
alt the Altitude coordinate for the focus (in Degrees)
az the Azimuth coordinate for the focus (in Degrees)

Definition at line 61 of file kstarsdcop.cpp.

void KStars::setColor ( const QString &  colorName,
const QString &  value 
) [slot]

DBUS interface function.

Modify a color.

Parameters:
colorName the name of the color to be modified (e.g., "SkyColor")
value the new color to use

Definition at line 381 of file kstarsdcop.cpp.

void KStars::setGeoLocation ( const QString &  city,
const QString &  province,
const QString &  country 
) [slot]

DBUS interface function.

Set the geographic location.

Parameters:
city the city name of the location
province the province name of the location
country the country name of the location

Definition at line 177 of file kstarsdcop.cpp.

void KStars::setLocalTime ( int  yr,
int  mth,
int  day,
int  hr,
int  min,
int  sec 
) [slot]

DBUS interface function.

Set local time and date.

Parameters:
yr year of date
mth month of date
day day of date
hr hour of time
min minute of time
sec second of time

Definition at line 144 of file kstarsdcop.cpp.

void KStars::setRaDec ( double  ra,
double  dec 
) [slot]

DBUS interface function.

Set focus to given Ra/Dec coordinates

Parameters:
ra the Right Ascension coordinate for the focus (in Hours)
dec the Declination coordinate for the focus (in Degrees)

Definition at line 57 of file kstarsdcop.cpp.

void KStars::setTracking ( bool  track  )  [slot]

DBUS interface function.

Toggle tracking.

Parameters:
track engage tracking if true; else disengage tracking

Definition at line 165 of file kstarsdcop.cpp.

void KStars::slotApplyConfigChanges (  )  [slot]

Apply new settings and redraw skymap.

Definition at line 429 of file kstarsactions.cpp.

void KStars::slotApplyToolbarConfig (  )  [slot]

action slot: Generate toolbars with new user-specified configuration

Definition at line 394 of file kstarsactions.cpp.

void KStars::slotClearAllTrails (  )  [slot]

Remove all trails which may have been added to solar system bodies.

Definition at line 1045 of file kstarsactions.cpp.

void KStars::slotDefaultZoom (  )  [slot]

action slot: Set the zoom level to its default value

Definition at line 826 of file kstarsactions.cpp.

void KStars::slotGeoLocator (  )  [slot]

action slot: open dialog for selecting a new geographic location

Definition at line 354 of file kstarsactions.cpp.

void KStars::slotSetZoom (  )  [slot]

action slot: Allow user to specify a field-of-view angle for the display window in degrees, and set the zoom level accordingly.

Definition at line 838 of file kstarsactions.cpp.

void KStars::slotTrack (  )  [slot]

action slot: Toggle whether kstars is tracking current position

Definition at line 711 of file kstarsactions.cpp.

void KStars::slotZoomIn (  )  [slot]

action slot: Zoom in one step

Definition at line 788 of file kstarsactions.cpp.

void KStars::slotZoomOut (  )  [slot]

action slot: Zoom out one step

Definition at line 792 of file kstarsactions.cpp.

void KStars::updateTime ( const bool  automaticDSTchange = true  )  [slot]

Update time-dependent data and (possibly) repaint the sky map.

Parameters:
automaticDSTchange change DST status automatically?

Definition at line 219 of file kstars.cpp.

void KStars::waitFor ( double  t  )  [slot]

DBUS interface function.

Delay further execution of DBUS commands.

Parameters:
t number of seconds to delay

Definition at line 148 of file kstarsdcop.cpp.

void KStars::waitForKey ( const QString &  k  )  [slot]

DBUS interface function.

Pause further DBUS execution until a key is pressed.

Parameters:
k the key which will resume DBUS execution

Definition at line 154 of file kstarsdcop.cpp.

void KStars::writeConfig (  )  [slot]

DBUS interface function.

Write current settings to config file. This function is useful for storing user settings before modifying them with a DBUS script. The original settings can be restored with readConfig().

See also:
readConfig()

Definition at line 244 of file kstarsdcop.cpp.

void KStars::zoom ( double  z  )  [slot]

DBUS interface function.

Set zoom level to specified value.

Parameters:
z the zoom level. Units are pixels per radian.

Definition at line 136 of file kstarsdcop.cpp.

void KStars::zoomIn ( const double  factor  )  [slot]

Zoom in by a given factor.

Definition at line 796 of file kstarsactions.cpp.

Q_SCRIPTABLE Q_NOREPLY void KStars::zoomIn (  )  [inline, slot]

DBUS interface function.

Zoom in one step.

Definition at line 192 of file kstars.h.

void KStars::zoomOut ( const double  factor  )  [slot]

Zoom out by a given factor.

Definition at line 811 of file kstarsactions.cpp.

Q_SCRIPTABLE Q_NOREPLY void KStars::zoomOut (  )  [inline, slot]

DBUS interface function.

Zoom out one step.

Definition at line 195 of file kstars.h.


The documentation for this class was generated from the following files:
  • kstars.h
  • kstars.cpp
  • kstarsactions.cpp
  • kstarsdcop.cpp
  • kstarsinit.cpp

kstars

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

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal