• 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
  • skycomponents
flagcomponent.h
Go to the documentation of this file.
1 /***************************************************************************
2  flagcomponent.h - K Desktop Planetarium
3  -------------------
4  begin : Fri 16 Jan 2009
5  copyright : (C) 2009 by Jerome SONRIER
6  email : jsid@emor3j.fr.eu.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 FLAGCOMPONENT_H
19 #define FLAGCOMPONENT_H
20 
21 
22 #include <kio/jobclasses.h>
23 
24 #include "pointlistcomponent.h"
25 #include "typedef.h"
26 #include "starblockfactory.h"
27 #include "skymesh.h"
28 
29 
44 class FlagComponent: public QObject, public PointListComponent
45 {
46  Q_OBJECT
47 public:
49  explicit FlagComponent( SkyComposite* );
50 
52  virtual ~FlagComponent();
53 
54  virtual void draw( SkyPainter *skyp );
55 
56  virtual bool selected();
57 
64  void add( SkyPoint* flagPoint, QString epoch, QString image, QString label, QColor labelColor );
65 
69  void remove( int index );
70 
79  void updateFlag ( int index, SkyPoint* flagPoint, QString epoch, QString image, QString label, QColor labelColor );
80 
84  QStringList getNames();
85 
89  int size();
90 
95  QString epoch( int index );
96 
101  QString label( int index );
102 
107  QColor labelColor( int index );
108 
113  QImage image( int index );
114 
119  QString imageName( int index );
120 
124  QList<QImage> imageList();
125 
130  QImage imageList( int index );
131 
136  QList<int> getFlagsNearPix( SkyPoint *point, int pixelRadius );
137 
139  void loadFromFile();
140 
142  void saveToFile();
143 
144 private:
145  QStringList m_Epoch;
146  QList<int> m_FlagImages;
147  QStringList m_Labels;
148  QList<QColor> m_LabelColors;
149  QStringList m_Names;
150  QList<QImage> m_Images;
151  KIO::ListJob* m_Job;
153 private slots:
154  void slotLoadImages( KIO::Job* job, const KIO::UDSEntryList& list );
155  void slotInit( KJob *job );
156 };
157 
158 #endif
FlagComponent::size
int size()
Return the numbers of flags.
Definition: flagcomponent.cpp:213
FlagComponent::selected
virtual bool selected()
Definition: flagcomponent.cpp:62
FlagComponent::imageName
QString imageName(int index)
Get image name.
Definition: flagcomponent.cpp:253
FlagComponent::getNames
QStringList getNames()
Return image names.
Definition: flagcomponent.cpp:209
FlagComponent
Represents a flag on the sky map.
Definition: flagcomponent.h:44
typedef.h
FlagComponent::updateFlag
void updateFlag(int index, SkyPoint *flagPoint, QString epoch, QString image, QString label, QColor labelColor)
Update a flag.
Definition: flagcomponent.cpp:160
QObject
FlagComponent::draw
virtual void draw(SkyPainter *skyp)
Draw the object on the SkyMap skyp a pointer to the SkyPainter to use.
Definition: flagcomponent.cpp:49
FlagComponent::image
QImage image(int index)
Get image.
Definition: flagcomponent.cpp:241
SkyPoint
The sky coordinates of a point in the sky.
Definition: skypoint.h:50
FlagComponent::loadFromFile
void loadFromFile()
Load flags from flags.dat file.
Definition: flagcomponent.cpp:66
FlagComponent::label
QString label(int index)
Get label.
Definition: flagcomponent.cpp:225
FlagComponent::add
void add(SkyPoint *flagPoint, QString epoch, QString image, QString label, QColor labelColor)
Add a flag.
Definition: flagcomponent.cpp:131
starblockfactory.h
FlagComponent::~FlagComponent
virtual ~FlagComponent()
Destructor.
Definition: flagcomponent.cpp:46
SkyComposite
SkyComposite is a kind of container class for SkyComponent objects.
Definition: skycomposite.h:43
FlagComponent::saveToFile
void saveToFile()
Save flags to flags.dat file.
Definition: flagcomponent.cpp:114
pointlistcomponent.h
PointListComponent
An abstract parent class, to be inherited by SkyComponents that store a QList of SkyPoints.
Definition: pointlistcomponent.h:37
FlagComponent::labelColor
QColor labelColor(int index)
Get label color.
Definition: flagcomponent.cpp:233
skymesh.h
SkyPainter
Draws things on the sky, without regard to backend.
Definition: skypainter.h:47
FlagComponent::imageList
QList< QImage > imageList()
Get images.
Definition: flagcomponent.cpp:265
FlagComponent::epoch
QString epoch(int index)
Get epoch.
Definition: flagcomponent.cpp:217
QList
FlagComponent::FlagComponent
FlagComponent(SkyComposite *)
Constructor.
Definition: flagcomponent.cpp:35
FlagComponent::getFlagsNearPix
QList< int > getFlagsNearPix(SkyPoint *point, int pixelRadius)
Get list of flag indexes near specified SkyPoint with radius specified in pixels. ...
Definition: flagcomponent.cpp:269
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:19 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