• 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
targetlistcomponent.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  targetlistcomponent.cpp - K Desktop Planetarium
3  -------------------
4  begin : Oct 14 2010 9:59 PM CDT
5  copyright : (C) 2010 Akarsh Simha
6  email : akarsh.simha@kdemail.net
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 "targetlistcomponent.h"
19 #include "skymap.h"
20 #include "Options.h"
21 
22 TargetListComponent::TargetListComponent( SkyComposite *parent ) : SkyComponent( parent ) {
23  list = 0;
24  drawSymbols = 0;
25  drawLabels = 0;
26 }
27 
28 TargetListComponent::TargetListComponent( SkyComposite *parent, SkyObjectList *objectList, QPen _pen,
29  bool (*optionDrawSymbols)(void), bool (*optionDrawLabels)(void) )
30  : SkyComponent( parent ), pen( _pen ) {
31 
32  list = objectList;
33  drawSymbols = optionDrawSymbols;
34  drawLabels = optionDrawLabels;
35 }
36 
70 void TargetListComponent::draw( SkyPainter *skyp ) {
71  if( drawSymbols && !(*drawSymbols)() )
72  return;
73  if( !list || list->count() <= 0 )
74  return;
75  /*
76  // Superceded by SkyPainter::drawObservingList()
77  foreach( SkyObject *obj, *list ) {
78  drawTargetSymbol( psky, obj );
79  }
80  */
81  skyp->setPen( pen );
82  skyp->drawObservingList( *list );
83 }
SkyComponent
SkyComponent represents an object on the sky map.
Definition: skycomponent.h:44
SkyPainter::drawObservingList
virtual void drawObservingList(const QList< SkyObject * > &obs)=0
Draw the symbols for the observing list.
TargetListComponent::draw
virtual void draw(SkyPainter *skyp)
Draw this component by iterating over the list.
Definition: skycomponents/targetlistcomponent.cpp:70
skymap.h
SkyComposite
SkyComposite is a kind of container class for SkyComponent objects.
Definition: skycomposite.h:43
SkyPainter::setPen
virtual void setPen(const QPen &pen)=0
Set the pen of the painter.
Options.h
TargetListComponent::drawSymbols
bool(* drawSymbols)(void)
Pointer to static method that tells us whether to draw this list or not.
Definition: skycomponents/targetlistcomponent.h:82
TargetListComponent::list
SkyObjectList * list
Definition: skycomponents/targetlistcomponent.h:75
TargetListComponent::drawLabels
bool(* drawLabels)(void)
Pointer to static method that tells us whether to draw labels for this list or not.
Definition: skycomponents/targetlistcomponent.h:88
TargetListComponent::TargetListComponent
TargetListComponent(SkyComposite *parent)
Default constructor.
Definition: skycomponents/targetlistcomponent.cpp:22
TargetListComponent::pen
QPen pen
Definition: skycomponents/targetlistcomponent.h:76
SkyPainter
Draws things on the sky, without regard to backend.
Definition: skypainter.h:47
SkyObjectList
QList< SkyObject * > SkyObjectList
Definition: skycomponents/typedef.h:52
targetlistcomponent.h
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