• 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
  • widgets
mapcanvas.h
Go to the documentation of this file.
1 /***************************************************************************
2  mapcanvas.h - K Desktop Planetarium
3  -------------------
4  begin : Tue Apr 10 2001
5  copyright : (C) 2001 by Jason Harris
6  email : jharris@30doradus.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 MAPCANVAS_H
19 #define MAPCANVAS_H
20 
21 #include <QFrame>
22 #include <QPixmap>
23 #include <QMouseEvent>
24 #include <QPaintEvent>
25 
36 class LocationDialog;
37 class QPixmap;
38 
39 class MapCanvas : public QFrame {
40  Q_OBJECT
41 public:
46  explicit MapCanvas( QWidget *parent );
47 
49  ~MapCanvas();
50 
52  // FIXME: This is temporary plug
53  void setLocationDialog(LocationDialog* loc) { ld = loc; }
54 public slots:
64  virtual void setGeometry( int x, int y, int w, int h );
65 
74  virtual void setGeometry( const QRect &r );
75 
76 protected:
83  virtual void paintEvent( QPaintEvent *e );
84 
89  virtual void mousePressEvent( QMouseEvent *e );
90 
91 private:
92  LocationDialog *ld;
93  QPixmap *bgImage;
94  QString BGColor;
95  QPoint origin;
96 };
97 
98 #endif
LocationDialog
Dialog for changing the geographic location of the observer.
Definition: locationdialog.h:57
MapCanvas::paintEvent
virtual void paintEvent(QPaintEvent *e)
Draw the map.
Definition: mapcanvas.cpp:70
MapCanvas
Used in LocationDialog for displaying a map of the Earth.
Definition: mapcanvas.h:39
QWidget
MapCanvas::~MapCanvas
~MapCanvas()
Destructor (empty)
Definition: mapcanvas.cpp:45
MapCanvas::mousePressEvent
virtual void mousePressEvent(QMouseEvent *e)
Trim the list of cities so that only those within 2 degrees of the mouse click are shown in the list...
Definition: mapcanvas.cpp:61
MapCanvas::setLocationDialog
void setLocationDialog(LocationDialog *loc)
Set location dialog.
Definition: mapcanvas.h:53
MapCanvas::setGeometry
virtual void setGeometry(int x, int y, int w, int h)
Set the geometry of the map widget (overloaded from QWidget).
Definition: mapcanvas.cpp:49
MapCanvas::MapCanvas
MapCanvas(QWidget *parent)
Default constructor.
Definition: mapcanvas.cpp:32
QFrame
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