kstars
KStars Class Reference
This is the main window for KStars. More...
#include <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 | slotClearAllTrails () |
| void | slotGeoLocator () |
| void | slotSetZoom () |
| void | slotTrack () |
| void | slotZoomChanged () |
| 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) |
| Q_SCRIPTABLE Q_NOREPLY void | zoomIn () |
| Q_SCRIPTABLE Q_NOREPLY void | zoomOut () |
Public Member Functions | |
| virtual | ~KStars () |
| void | addColorMenuItem (const QString &name, const QString &actionName) |
| void | applyConfig (bool doApplyFocus=true) |
| KStarsData * | data () |
| void | establishINDI () |
| Execute * | getExecute () |
| INDIDriver * | indiDriver () |
| INDIMenu * | indiMenu () |
| SkyMap * | map () |
| ObservingList * | observingList () |
| void | removeColorMenuItem (const QString &actionName) |
Static Public Member Functions | |
| static KStars * | createInstance (bool doSplash, bool clockrunning=true, const QString &startDateString=QString()) |
| static KStars * | Instance () |
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 D-Bus interface.
- Version:
- 1.0
Definition at line 81 of file kstars.h.
Constructor & Destructor Documentation
| KStars::~KStars | ( | ) | [virtual] |
Member Function Documentation
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 973 of file kstarsactions.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 111 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 129 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 150 of file kstars.cpp.
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 276 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 137 of file kstars.cpp.
| KStars * KStars::createInstance | ( | bool | doSplash, | |
| bool | clockrunning = true, |
|||
| const QString & | startDateString = QString() | |||
| ) | [static] |
Create an instance of this class.
Destroy any previous instance
- Parameters:
-
doSplash clockrunning startDateString
- Note:
- See KStars::KStars for details on parameters
- Returns:
- a pointer to the instance
Definition at line 121 of file kstars.cpp.
| KStarsData* KStars::data | ( | ) | [inline] |
- Returns:
- pointer to KStarsData object which contains application data.
| void KStars::defaultZoom | ( | ) | [slot] |
DBUS interface function.
reset to the default zoom level.
Definition at line 157 of file kstarsdcop.cpp.
| 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 190 of file kstarsdcop.cpp.
| void KStars::establishINDI | ( | ) |
| 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 428 of file kstarsdcop.cpp.
| Execute * KStars::getExecute | ( | ) |
Definition at line 237 of file kstars.cpp.
DBUS interface function.
- Parameters:
-
name the name of the option to query
- Returns:
- the current value of the named option
Definition at line 265 of file kstarsdcop.cpp.
| INDIDriver* KStars::indiDriver | ( | ) | [inline] |
| INDIMenu* KStars::indiMenu | ( | ) | [inline] |
| static KStars* KStars::Instance | ( | ) | [inline, static] |
| 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 407 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 69 of file kstarsdcop.cpp.
| SkyMap* KStars::map | ( | ) | [inline] |
| ObservingList* KStars::observingList | ( | ) | [inline] |
| 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 186 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 503 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 243 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 982 of file kstarsactions.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 120 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 137 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 65 of file kstarsdcop.cpp.
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 399 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 194 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 161 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 61 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 182 of file kstarsdcop.cpp.
| void KStars::slotApplyConfigChanges | ( | ) | [slot] |
Apply new settings and redraw skymap.
Definition at line 416 of file kstarsactions.cpp.
| void KStars::slotClearAllTrails | ( | ) | [slot] |
Remove all trails which may have been added to solar system bodies.
Definition at line 932 of file kstarsactions.cpp.
| void KStars::slotGeoLocator | ( | ) | [slot] |
action slot: open dialog for selecting a new geographic location
Definition at line 339 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 803 of file kstarsactions.cpp.
| void KStars::slotTrack | ( | ) | [slot] |
action slot: Toggle whether kstars is tracking current position
Definition at line 706 of file kstarsactions.cpp.
| void KStars::slotZoomChanged | ( | ) | [slot] |
Called when zoom level is changed.
Enables/disables zoom actions and updates status bar.
Definition at line 784 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 208 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 165 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 171 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 258 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 145 of file kstarsdcop.cpp.
| void KStars::zoomIn | ( | ) | [slot] |
| void KStars::zoomOut | ( | ) | [slot] |
The documentation for this class was generated from the following files:
KDE 4.4 API Reference