kstars
#include <flagcomponent.h>

Public Member Functions | |
FlagComponent (SkyComposite *) | |
virtual | ~FlagComponent () |
void | add (SkyPoint *flagPoint, QString epoch, QString image, QString label, QColor labelColor) |
virtual void | draw (SkyPainter *skyp) |
QString | epoch (int index) |
QList< int > | getFlagsNearPix (SkyPoint *point, int pixelRadius) |
QStringList | getNames () |
QImage | image (int index) |
QList< QImage > | imageList () |
QImage | imageList (int index) |
QString | imageName (int index) |
QString | label (int index) |
QColor | labelColor (int index) |
void | loadFromFile () |
void | remove (int index) |
void | saveToFile () |
virtual bool | selected () |
int | size () |
void | updateFlag (int index, SkyPoint *flagPoint, QString epoch, QString image, QString label, QColor labelColor) |
![]() | |
PointListComponent (SkyComposite *parent) | |
virtual | ~PointListComponent () |
QList< SkyPoint * > & | pointList () |
virtual void | update (KSNumbers *num=0) |
![]() | |
SkyComponent (SkyComposite *parent) | |
virtual | ~SkyComponent () |
virtual void | drawTrails (SkyPainter *skyp) |
virtual void | emitProgressText (const QString &message) |
virtual SkyObject * | findByName (const QString &name) |
QHash< int, QStringList > & | objectNames () |
QStringList & | objectNames (int type) |
virtual SkyObject * | objectNearest (SkyPoint *p, double &maxrad) |
virtual void | objectsInArea (QList< SkyObject * > &list, const SkyRegion ®ion) |
SkyComposite * | parent () |
virtual void | updateMoons (KSNumbers *) |
virtual void | updatePlanets (KSNumbers *) |
Additional Inherited Members | |
![]() | |
void | removeFromNames (const SkyObject *obj) |
Detailed Description
Represents a flag on the sky map.
Each flag is composed by a SkyPoint where coordinates are stored, an epoch and a label. This class also stores flag images and associates each flag with an image. When FlagComponent is created, it seeks all file names beginning with "_flag" in the user directory and *considere them as flag images.
The file flags.dat stores coordinates, epoch, image name and label of each flags and is read to init FlagComponent
- Version
- 1.1
Definition at line 44 of file flagcomponent.h.
Constructor & Destructor Documentation
|
explicit |
Constructor.
Definition at line 35 of file flagcomponent.cpp.
|
virtual |
Destructor.
Definition at line 46 of file flagcomponent.cpp.
Member Function Documentation
void FlagComponent::add | ( | SkyPoint * | flagPoint, |
QString | epoch, | ||
QString | image, | ||
QString | label, | ||
QColor | labelColor | ||
) |
Add a flag.
- Parameters
-
SkyPoint Reference to the SkyPoint used to store coordinates epoch Moment for which celestial coordinates are specified image Image name label Label of the flag
Definition at line 131 of file flagcomponent.cpp.
|
virtual |
Draw the object on the SkyMap skyp
a pointer to the SkyPainter to use.
Implements SkyComponent.
Definition at line 49 of file flagcomponent.cpp.
QString FlagComponent::epoch | ( | int | index | ) |
Get epoch.
- Returns
- the epoch as a string
- Parameters
-
index Index of the flag
Definition at line 217 of file flagcomponent.cpp.
Get list of flag indexes near specified SkyPoint with radius specified in pixels.
- Parameters
-
point central SkyPoint. pixelRadius radius in pixels.
Definition at line 269 of file flagcomponent.cpp.
QStringList FlagComponent::getNames | ( | ) |
Return image names.
- Returns
- the list of all image names
Definition at line 209 of file flagcomponent.cpp.
QImage FlagComponent::image | ( | int | index | ) |
Get image.
- Returns
- the image associated with the flag
- Parameters
-
index Index of the flag
Definition at line 241 of file flagcomponent.cpp.
QList< QImage > FlagComponent::imageList | ( | ) |
QImage FlagComponent::imageList | ( | int | index | ) |
Get image.
- Parameters
-
index Index of the image in m_Images
- Returns
- an image from m_Images
Definition at line 292 of file flagcomponent.cpp.
QString FlagComponent::imageName | ( | int | index | ) |
Get image name.
- Returns
- the name of the image associated with the flag
- Parameters
-
index Index of the flag
Definition at line 253 of file flagcomponent.cpp.
QString FlagComponent::label | ( | int | index | ) |
Get label.
- Returns
- the label as a string
- Parameters
-
index Index of the flag
Definition at line 225 of file flagcomponent.cpp.
QColor FlagComponent::labelColor | ( | int | index | ) |
Get label color.
- Returns
- the label color
- Parameters
-
index Index of the flag
Definition at line 233 of file flagcomponent.cpp.
void FlagComponent::loadFromFile | ( | ) |
Load flags from flags.dat file.
Definition at line 66 of file flagcomponent.cpp.
void FlagComponent::remove | ( | int | index | ) |
Remove a flag.
- Parameters
-
index Index of the flag to be remove.
Definition at line 144 of file flagcomponent.cpp.
void FlagComponent::saveToFile | ( | ) |
Save flags to flags.dat file.
Definition at line 114 of file flagcomponent.cpp.
|
virtual |
- Returns
- true if component is to be drawn on the map.
Reimplemented from SkyComponent.
Definition at line 62 of file flagcomponent.cpp.
int FlagComponent::size | ( | ) |
Return the numbers of flags.
- Returns
- the size of m_PointList
Definition at line 213 of file flagcomponent.cpp.
void FlagComponent::updateFlag | ( | int | index, |
SkyPoint * | flagPoint, | ||
QString | epoch, | ||
QString | image, | ||
QString | label, | ||
QColor | labelColor | ||
) |
Update a flag.
- Parameters
-
index index of the flag to be updated. flagPoint new flag point. epoch new flag epoch. image new flag image. label new flag label. labelColor new flag label color.
Definition at line 160 of file flagcomponent.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.