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

kstars

Public Member Functions | List of all members
FlagComponent Class Reference

#include <flagcomponent.h>

Inheritance diagram for FlagComponent:
Inheritance graph
[legend]

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)
 
- Public Member Functions inherited from PointListComponent
 PointListComponent (SkyComposite *parent)
 
virtual ~PointListComponent ()
 
QList< SkyPoint * > & pointList ()
 
virtual void update (KSNumbers *num=0)
 
- Public Member Functions inherited from SkyComponent
 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 &region)
 
SkyComposite * parent ()
 
virtual void updateMoons (KSNumbers *)
 
virtual void updatePlanets (KSNumbers *)
 

Additional Inherited Members

- Protected Member Functions inherited from SkyComponent
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

Author
Jerome SONRIER
Version
1.1

Definition at line 44 of file flagcomponent.h.

Constructor & Destructor Documentation

FlagComponent::FlagComponent ( SkyComposite *  parent)
explicit

Constructor.

Definition at line 35 of file flagcomponent.cpp.

FlagComponent::~FlagComponent ( )
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
SkyPointReference to the SkyPoint used to store coordinates
epochMoment for which celestial coordinates are specified
imageImage name
labelLabel of the flag

Definition at line 131 of file flagcomponent.cpp.

void FlagComponent::draw ( SkyPainter *  skyp)
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
indexIndex of the flag

Definition at line 217 of file flagcomponent.cpp.

QList< int > FlagComponent::getFlagsNearPix ( SkyPoint *  point,
int  pixelRadius 
)

Get list of flag indexes near specified SkyPoint with radius specified in pixels.

Parameters
pointcentral SkyPoint.
pixelRadiusradius 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
indexIndex of the flag

Definition at line 241 of file flagcomponent.cpp.

QList< QImage > FlagComponent::imageList ( )

Get images.

Returns
all images that can be use

Definition at line 265 of file flagcomponent.cpp.

QImage FlagComponent::imageList ( int  index)

Get image.

Parameters
indexIndex 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
indexIndex 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
indexIndex of the flag

Definition at line 225 of file flagcomponent.cpp.

QColor FlagComponent::labelColor ( int  index)

Get label color.

Returns
the label color
Parameters
indexIndex 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
indexIndex 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.

bool FlagComponent::selected ( )
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
indexindex of the flag to be updated.
flagPointnew flag point.
epochnew flag epoch.
imagenew flag image.
labelnew flag label.
labelColornew flag label color.

Definition at line 160 of file flagcomponent.cpp.


The documentation for this class was generated from the following files:
  • flagcomponent.h
  • flagcomponent.cpp
This file is part of the KDE documentation.
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.

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