• 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
skycomponent.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  skycomponent.cpp - K Desktop Planetarium
3  -------------------
4  begin : 2005/07/08
5  copyright : (C) 2005 by Thomas Kabelmann
6  email : thomas.kabelmann@gmx.de
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 #include "skycomponent.h"
19 #include "skycomposite.h"
20 
21 #include <QList>
22 
23 #include "Options.h"
24 #include "ksnumbers.h"
25 #include "skyobjects/skyobject.h"
26 
27 SkyComponent::SkyComponent( SkyComposite *parent ) :
28  m_parent( parent )
29 {}
30 
31 SkyComponent::~SkyComponent()
32 {}
33 
34 //Hand the message up to SkyMapComposite
35 void SkyComponent::emitProgressText( const QString &message ) {
36  parent()->emitProgressText( message );
37 }
38 
39 SkyObject* SkyComponent::findByName( const QString & ) {
40  return 0;
41 }
42 
43 SkyObject* SkyComponent::objectNearest( SkyPoint *, double & ) {
44  return 0;
45 }
46 
47 void SkyComponent::drawTrails( SkyPainter* )
48 {}
49 
50 void SkyComponent::objectsInArea( QList<SkyObject*>&, const SkyRegion& )
51 {}
52 
53 
54 QHash<int, QStringList>& SkyComponent::getObjectNames() {
55  return parent()->objectNames();
56 }
57 
58 void SkyComponent::removeFromNames(const SkyObject* obj) {
59  QStringList& names = getObjectNames()[obj->type()];
60  int i;
61  i = names.indexOf( obj->name() );
62  if ( i >= 0 )
63  names.removeAt( i );
64 
65  i = names.indexOf( obj->longname() );
66  if ( i >= 0 )
67  names.removeAt( i );
68 }
SkyComponent::~SkyComponent
virtual ~SkyComponent()
Destructor.
Definition: skycomponent.cpp:31
SkyComponent::parent
SkyComposite * parent()
Definition: skycomponent.h:82
SkyRegion
QHash< Trixel, bool > SkyRegion
Definition: skycomponents/typedef.h:47
skyobject.h
SkyObject::longname
virtual QString longname(void) const
Definition: skyobject.h:140
SkyComponent::SkyComponent
SkyComponent(SkyComposite *parent)
Constructor parent pointer to the parent SkyComposite.
Definition: skycomponent.cpp:27
SkyComponent::findByName
virtual SkyObject * findByName(const QString &name)
Search the children of this SkyComponent for a SkyObject whose name matches the argument name the nam...
Definition: skycomponent.cpp:39
SkyComponent::objectNearest
virtual SkyObject * objectNearest(SkyPoint *p, double &maxrad)
Find the SkyObject nearest the given SkyPoint.
Definition: skycomponent.cpp:43
SkyPoint
The sky coordinates of a point in the sky.
Definition: skypoint.h:50
SkyComponent::removeFromNames
void removeFromNames(const SkyObject *obj)
Definition: skycomponent.cpp:58
ksnumbers.h
skycomponent.h
skycomposite.h
SkyComposite
SkyComposite is a kind of container class for SkyComponent objects.
Definition: skycomposite.h:43
Options.h
SkyObject::type
int type(void) const
Definition: skyobject.h:164
SkyComponent::emitProgressText
virtual void emitProgressText(const QString &message)
Emit signal about progress.
Definition: skycomponent.cpp:35
SkyObject::name
virtual QString name(void) const
Definition: skyobject.h:124
SkyComponent::objectNames
QHash< int, QStringList > & objectNames()
Definition: skycomponent.h:127
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
SkyComponent::objectsInArea
virtual void objectsInArea(QList< SkyObject * > &list, const SkyRegion &region)
Searches the region(s) and appends the SkyObjects found to the list of sky objects.
Definition: skycomponent.cpp:50
QList
SkyComponent::drawTrails
virtual void drawTrails(SkyPainter *skyp)
Draw trails for objects.
Definition: skycomponent.cpp:47
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:20 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