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

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • skyobjects
trailobject.h
Go to the documentation of this file.
1 /***************************************************************************
2  trailobject.h - K Desktop Planetarium
3  -------------------
4  begin : Sat Oct 27 2007
5  copyright : (C) 2007 by Jason Harris
6  email : kstars@30doradus.org
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef TRAILOBJECT_H_
19 #define TRAILOBJECT_H_
20 
21 #include <QSet>
22 
23 #include "skyobject.h"
24 
25 class SkyPainter;
26 
33 class TrailObject : public SkyObject {
34 public:
36  explicit TrailObject( int t=TYPE_UNKNOWN, dms r=dms(0.0), dms d=dms(0.0), float m=0.0, const QString &n=QString() );
37 
39  TrailObject( int t, double r, double d, float m=0.0, const QString &n=QString() );
40 
41  virtual ~TrailObject();
42 
43  virtual TrailObject* clone() const;
44 
46  inline bool hasTrail() const { return ( Trail.count() > 0 ); }
47 
49  inline const QList<SkyPoint>& trail() const { return Trail; }
50 
52  void addToTrail();
53 
55  void clipTrail();
56 
58  void clearTrail();
59 
61  void updateTrail( dms *LST, const dms *lat );
62 
65  static void clearTrailsExcept(SkyObject* o);
66 
67  void drawTrail(SkyPainter *skyp) const;
68 
70  static const int MaxTrail = 400;
71 protected:
72  QList<SkyPoint> Trail;
74  static QSet<TrailObject*> trailObjects;
75 private:
76  virtual void initPopupMenu( KSPopupMenu *pmenu );
77 };
78 
79 #endif
TrailObject::hasTrail
bool hasTrail() const
Definition: trailobject.h:46
TrailObject::clone
virtual TrailObject * clone() const
Create copy of object.
Definition: trailobject.cpp:41
TrailObject::clearTrailsExcept
static void clearTrailsExcept(SkyObject *o)
Remove trail for all objects but one which is passed as parameter.
Definition: trailobject.cpp:71
KSPopupMenu
The KStars Popup Menu.
Definition: kspopupmenu.h:43
TrailObject::clipTrail
void clipTrail()
removes the oldest point from the trail
Definition: trailobject.cpp:59
SkyObject::TYPE_UNKNOWN
Definition: skyobject.h:112
TrailObject::trail
const QList< SkyPoint > & trail() const
Definition: trailobject.h:49
skyobject.h
TrailObject::trailObjects
static QSet< TrailObject * > trailObjects
Store list of objects with trails.
Definition: trailobject.h:74
TrailObject::updateTrail
void updateTrail(dms *LST, const dms *lat)
update Horizontal coords of the trail
Definition: trailobject.cpp:45
TrailObject::TrailObject
TrailObject(int t=TYPE_UNKNOWN, dms r=dms(0.0), dms d=dms(0.0), float m=0.0, const QString &n=QString())
Constructor.
Definition: trailobject.cpp:29
TrailObject::clearTrail
void clearTrail()
clear the Trail
Definition: trailobject.cpp:66
TrailObject::Trail
QList< SkyPoint > Trail
Definition: trailobject.h:72
TrailObject::addToTrail
void addToTrail()
adds a point to the planet's trail
Definition: trailobject.cpp:54
dms
An angle, stored as degrees, but expressible in many ways.
Definition: dms.h:42
NaN::d
const double d
Definition: nan.h:35
TrailObject
provides a SkyObject with an attachable Trail
Definition: trailobject.h:33
TrailObject::drawTrail
void drawTrail(SkyPainter *skyp) const
Definition: trailobject.cpp:85
TrailObject::~TrailObject
virtual ~TrailObject()
Definition: trailobject.cpp:37
TrailObject::MaxTrail
static const int MaxTrail
Maximum trail size.
Definition: trailobject.h:70
SkyObject
Provides all necessary information about an object in the sky: its coordinates, name(s), type, magnitude, and QStringLists of URLs for images and webpages regarding the object.
Definition: skyobject.h:46
SkyPainter
Draws things on the sky, without regard to backend.
Definition: skypainter.h:47
QList
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:21 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