• 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
skyqpainter.h
Go to the documentation of this file.
1 /*
2  (C) 2010 Henry de Valence <hdevalence@gmail.com>
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License along
15  with this program; if not, write to the Free Software Foundation, Inc.,
16  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 
18 */
19 
20 #ifndef SKYQPAINTER_H
21 #define SKYQPAINTER_H
22 
23 #include "skypainter.h"
24 
25 class Projector;
26 class QWidget;
27 class QSize;
28 
32 class SkyQPainter : public SkyPainter, public QPainter
33 {
34 public:
35 
41  SkyQPainter( QPaintDevice *pd, const QSize &canvasSize );
42 
47  SkyQPainter( QPaintDevice *pd );
48 
54  explicit SkyQPainter( QWidget *widget, QPaintDevice *pd = 0 );
55 
56  virtual ~SkyQPainter();
57  virtual void setPen(const QPen& pen);
58  virtual void setBrush(const QBrush& brush);
59 
64  inline void setVectorStars( bool vectorStars ) { m_vectorStars = vectorStars; }
65  inline bool getVectorStars() const { return m_vectorStars; }
66 
67  virtual void begin();
68  virtual void end();
69 
71  static void initStarImages();
72 
73  // Sky drawing functions
74  virtual void drawSkyBackground();
75  virtual void drawSkyLine(SkyPoint* a, SkyPoint* b);
76  virtual void drawSkyPolyline(LineList* list, SkipList *skipList = 0,
77  LineListLabel *label = 0);
78  virtual void drawSkyPolygon(LineList* list);
79  virtual bool drawPointSource(SkyPoint *loc, float mag, char sp = 'A');
80  virtual bool drawDeepSkyObject(DeepSkyObject *obj, bool drawImage = false);
81  virtual bool drawPlanet(KSPlanetBase *planet);
82  virtual void drawObservingList(const QList<SkyObject*>& obs);
83  virtual void drawFlags();
84  virtual void drawHorizon( bool filled, SkyPoint *labelPoint = 0, bool *drawLabel = 0);
85  virtual void drawSatellite( Satellite* sat );
86  virtual void drawDeepSkySymbol(const QPointF& pos, int type, float size, float e,
87  float positionAngle);
88  virtual bool drawSupernova(Supernova* sup);
90  virtual void drawPointSource(const QPointF& pos, float size, char sp = 'A');
91 
92 private:
93  virtual bool drawDeepSkyImage (const QPointF& pos, DeepSkyObject* obj,
94  float positionAngle);
95  QPaintDevice *m_pd;
96  const Projector* m_proj;
97  bool m_vectorStars;
98  QSize m_size;
99  static int starColorMode;
100 };
101 
102 #endif
SkyQPainter::initStarImages
static void initStarImages()
Recalculates the star pixmaps.
Definition: skyqpainter.cpp:140
SkyQPainter::drawSkyBackground
virtual void drawSkyBackground()
Draw the sky background.
Definition: skyqpainter.cpp:124
SkyQPainter::drawPointSource
virtual bool drawPointSource(SkyPoint *loc, float mag, char sp= 'A')
Draw a point source (e.g., a star).
Definition: skyqpainter.cpp:371
SkyQPainter::drawObservingList
virtual void drawObservingList(const QList< SkyObject * > &obs)
Draw the symbols for the observing list.
Definition: skyqpainter.cpp:703
LineListLabel
Definition: linelistlabel.h:36
QWidget
SkyQPainter::drawDeepSkyObject
virtual bool drawDeepSkyObject(DeepSkyObject *obj, bool drawImage=false)
Draw a deep sky object.
Definition: skyqpainter.cpp:424
skypainter.h
SkyQPainter::setBrush
virtual void setBrush(const QBrush &brush)
Set the brush of the painter.
Definition: skyqpainter.cpp:135
SkyQPainter::drawSkyLine
virtual void drawSkyLine(SkyPoint *a, SkyPoint *b)
Draw a line between points in the sky.
Definition: skyqpainter.cpp:231
SkyQPainter::drawSupernova
virtual bool drawSupernova(Supernova *sup)
Draw a Supernova.
Definition: skyqpainter.cpp:796
SkyQPainter::begin
virtual void begin()
Begin painting.
Definition: skyqpainter.cpp:110
LineList
Definition: linelist.h:35
SkyQPainter
The QPainter-based painting backend.
Definition: skyqpainter.h:32
SkyPoint
The sky coordinates of a point in the sky.
Definition: skypoint.h:50
Projector
This class serves as an interface to handle projections.
Definition: projector.h:49
SkyQPainter::drawFlags
virtual void drawFlags()
Draw flags.
Definition: skyqpainter.cpp:718
Supernova
Represents the supernova object.
Definition: supernova.h:44
SkyQPainter::drawHorizon
virtual void drawHorizon(bool filled, SkyPoint *labelPoint=0, bool *drawLabel=0)
Definition: skyqpainter.cpp:750
SkyQPainter::~SkyQPainter
virtual ~SkyQPainter()
Definition: skyqpainter.cpp:106
SkyQPainter::drawSatellite
virtual void drawSatellite(Satellite *sat)
Draw a satellite.
Definition: skyqpainter.cpp:766
SkyQPainter::setVectorStars
void setVectorStars(bool vectorStars)
Definition: skyqpainter.h:64
SkyQPainter::drawSkyPolygon
virtual void drawSkyPolygon(LineList *list)
Draw a polygon in the sky.
Definition: skyqpainter.cpp:282
SkyQPainter::drawSkyPolyline
virtual void drawSkyPolyline(LineList *list, SkipList *skipList=0, LineListLabel *label=0)
Draw a polyline in the sky.
Definition: skyqpainter.cpp:249
DeepSkyObject
Provides all necessary information about a deep-sky object: data inherited from SkyObject (coordinate...
Definition: deepskyobject.h:43
SkyQPainter::setPen
virtual void setPen(const QPen &pen)
Set the pen of the painter.
Definition: skyqpainter.cpp:130
SkyQPainter::SkyQPainter
SkyQPainter(QPaintDevice *pd, const QSize &canvasSize)
Creates a SkyQPainter with the given QPaintDevice and uses the dimensions of the paint device as canv...
Definition: skyqpainter.cpp:87
SkyQPainter::drawDeepSkySymbol
virtual void drawDeepSkySymbol(const QPointF &pos, int type, float size, float e, float positionAngle)
Definition: skyqpainter.cpp:468
Satellite
Represents an artificial satellites.
Definition: satellite.h:35
KSPlanetBase
A subclass of TrailObject that provides additional information needed for most solar system objects...
Definition: ksplanetbase.h:63
SkyQPainter::drawPlanet
virtual bool drawPlanet(KSPlanetBase *planet)
Draw a planet.
Definition: skyqpainter.cpp:320
SkyPainter
Draws things on the sky, without regard to backend.
Definition: skypainter.h:47
SkyQPainter::getVectorStars
bool getVectorStars() const
Definition: skyqpainter.h:65
SkyQPainter::end
virtual void end()
End and finalize painting.
Definition: skyqpainter.cpp:119
SkipList
Definition: SkipList.h:17
QList
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