• 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
  • tools
planetviewer.h
Go to the documentation of this file.
1 /***************************************************************************
2  planetviewer.h - Display overhead view of the solar system
3  -------------------
4  begin : Sun May 25 2003
5  copyright : (C) 2003 by Jason Harris
6  email : jharris@30doradus.org
7  ***************************************************************************/
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #ifndef PLANETVIEWER_H_
18 #define PLANETVIEWER_H_
19 
20 #include <QTimer>
21 #include <QMouseEvent>
22 #include <QWheelEvent>
23 #include <QKeyEvent>
24 #include <QPaintEvent>
25 
26 #include <kdialog.h>
27 #include <kpushbutton.h>
28 
29 #include "pvplotwidget.h"
30 #include "ui_planetviewer.h"
31 #include "kstarsdatetime.h"
32 
33 #define AUMAX 48
34 
35 class KSPlanetBase;
36 
37 class PlanetViewerUI : public QFrame, public Ui::PlanetViewer {
38  Q_OBJECT
39 public:
40  PlanetViewerUI(QWidget *parent = 0 );
41 };
42 
48 class PlanetViewer : public KDialog
49 {
50  Q_OBJECT
51 public:
52  PlanetViewer(QWidget *parent = 0);
53  ~PlanetViewer();
54 
55  inline QString centerPlanet() const { return CenterPlanet; }
56  inline void setCenterPlanet( const QString &cp ) { CenterPlanet = cp; }
57 
58  inline KPlotObject* planetObject(uint i) const { return planet[i]; }
59  QString planetName(uint i) const;
60 
61 protected:
62  virtual void keyPressEvent( QKeyEvent *e );
63  virtual void paintEvent( QPaintEvent* );
64 
65 private slots:
66  void initPlotObjects();
67  void tick();
68  void setTimeScale(float);
69  void slotChangeDate();
70  void slotRunClock();
71  void slotToday();
72  void slotCloseWindow();
73 
74 private:
75  void updatePlanets();
76 
77  PlanetViewerUI *pw;
78  KStarsDateTime ut;
79  double scale;
80  bool isClockRunning;
81  QTimer tmr;
82  int UpdateInterval[9], LastUpdate[9];
83  QString CenterPlanet;
84 
85  QList<KSPlanetBase*> PlanetList;
86 
87  KPlotObject *ksun;
88  KPlotObject *planet[9];
89 };
90 
91 #endif
PlanetViewerUI
Definition: planetviewer.h:37
PlanetViewer::centerPlanet
QString centerPlanet() const
Definition: planetviewer.h:55
QWidget
KDialog
PlanetViewer::planetName
QString planetName(uint i) const
Definition: planetviewer.cpp:123
PlanetViewer::setCenterPlanet
void setCenterPlanet(const QString &cp)
Definition: planetviewer.h:56
PlanetViewer::planetObject
KPlotObject * planetObject(uint i) const
Definition: planetviewer.h:58
KStarsDateTime
Extension of KDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day...
Definition: kstarsdatetime.h:45
PlanetViewer::~PlanetViewer
~PlanetViewer()
Definition: planetviewer.cpp:119
PlanetViewer::PlanetViewer
PlanetViewer(QWidget *parent=0)
Definition: planetviewer.cpp:51
PlanetViewer
Display an overhead view of the solar system.
Definition: planetviewer.h:48
PlanetViewer::paintEvent
virtual void paintEvent(QPaintEvent *)
Definition: planetviewer.cpp:205
PlanetViewerUI::PlanetViewerUI
PlanetViewerUI(QWidget *parent=0)
Definition: planetviewer.cpp:47
pvplotwidget.h
KSPlanetBase
A subclass of TrailObject that provides additional information needed for most solar system objects...
Definition: ksplanetbase.h:63
kstarsdatetime.h
QFrame
PlanetViewer::keyPressEvent
virtual void keyPressEvent(QKeyEvent *e)
Definition: planetviewer.cpp:254
QList
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