kstars
#include <mapcanvas.h>

Public Slots | |
virtual void | setGeometry (int x, int y, int w, int h) |
virtual void | setGeometry (const QRect &r) |
Public Member Functions | |
MapCanvas (QWidget *parent) | |
~MapCanvas () | |
void | setLocationDialog (LocationDialog *loc) |
Protected Member Functions | |
virtual void | mousePressEvent (QMouseEvent *e) |
virtual void | paintEvent (QPaintEvent *e) |
Detailed Description
Used in LocationDialog for displaying a map of the Earth.
In addition, cities in the database are drawn as grey or white dots. Also, the widget processes mouse clicks, to trim the list of cities to those near the mouse click. Widget used in the LocationDialog for displaying the world map.
- Version
- 1.0
Definition at line 39 of file mapcanvas.h.
Constructor & Destructor Documentation
|
explicit |
Default constructor.
Initialize the widget: create pixmaps, load the world map image
- Parameters
-
parent pointer to the parent LocationDialog
Definition at line 32 of file mapcanvas.cpp.
MapCanvas::~MapCanvas | ( | ) |
Destructor (empty)
Definition at line 45 of file mapcanvas.cpp.
Member Function Documentation
|
protectedvirtual |
Trim the list of cities so that only those within 2 degrees of the mouse click are shown in the list.
- See also
- LocationDialog
Definition at line 61 of file mapcanvas.cpp.
|
protectedvirtual |
Draw the map.
Draw grey dots on the locations of all cities, and highlight the cities which match the current filters as white dits. Also draw a red crosshairs on the currently-selected city.
- See also
- LocationDialog
Definition at line 70 of file mapcanvas.cpp.
|
virtualslot |
Set the geometry of the map widget (overloaded from QWidget).
Resizes the size of the map pixmap to match the widget, and resets the Origin QPoint so it remains at the center of the widget.
- Note
- this is called automatically by resize events.
x
the x-position of the widgety
the y-position of the widgetw
the width of the widgeth
the height of the widget
Definition at line 49 of file mapcanvas.cpp.
|
virtualslot |
Set the geometry of the map widget (overloaded from QWidget).
Resizes the size of the map pixmap to match the widget, and resets the Origin QPoint so it remains at the center of the widget. This function behaves just like the above function. It differs only in the data type of its argument.
- Note
- this is called automatically by resize events.
r
QRect describing geometry
Definition at line 55 of file mapcanvas.cpp.
|
inline |
Set location dialog.
Definition at line 53 of file mapcanvas.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.