Implements the low level Qt functionalities of the map widget. Inherits from Ui_mapWidget (generated from an ui file) and QWidget.
More...
#include <stdr_map_loader.h>
Implements the low level Qt functionalities of the map widget. Inherits from Ui_mapWidget (generated from an ui file) and QWidget.
Definition at line 40 of file stdr_map_loader.h.
stdr_gui::CMapLoader::CMapLoader |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Default contructor.
- Parameters
-
argc | [int] Number of input arguments |
argv | [char **] Input arguments |
- Returns
- void
Definition at line 32 of file stdr_map_loader.cpp.
std::pair< int, int > stdr_gui::CMapLoader::checkDimensions |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
|
private |
Return the dimensions according to the container size.
- Parameters
-
w | [int] Image width |
h | [int] Image height |
- Returns
- std::pair<int,int> : The size the map must be resized to
Definition at line 59 of file stdr_map_loader.cpp.
void stdr_gui::CMapLoader::drawGrid |
( |
QImage * |
img, |
|
|
float |
resolution |
|
) |
| |
Draws a grid in an image.
- Parameters
-
img | [QImage*] The image for the grid to be drawn on |
resolution | [float] The map resolution |
- Returns
- void
Definition at line 108 of file stdr_map_loader.cpp.
QPoint stdr_gui::CMapLoader::getGlobalPoint |
( |
QPoint |
p | ) |
|
Calculates the "real" point in the image.
- Parameters
-
p | [QPoint] The point to be translated |
- Returns
- QPoint : The new point
Definition at line 304 of file stdr_map_loader.cpp.
void stdr_gui::CMapLoader::moveDirectionally |
( |
int |
key | ) |
|
Updates the image center by moving directionally.
- Parameters
-
- Returns
- void
Definition at line 196 of file stdr_map_loader.cpp.
QPoint stdr_gui::CMapLoader::pointUnscaled |
( |
QPoint |
p | ) |
|
|
private |
Unscales the input point.
- Parameters
-
p | [QPoint] Point of an event in the adjusted map |
- Returns
- QPoint : The same point in the original map
Definition at line 274 of file stdr_map_loader.cpp.
void stdr_gui::CMapLoader::resetZoom |
( |
void |
| ) |
|
void stdr_gui::CMapLoader::resizeEvent |
( |
QResizeEvent * |
e | ) |
|
Captures the resize event.
- Parameters
-
e | [QResizeEvent*] The resize event |
- Returns
- void
Definition at line 48 of file stdr_map_loader.cpp.
void stdr_gui::CMapLoader::setInitialImageSize |
( |
QSize |
s | ) |
|
Sets the initial image size.
- Parameters
-
s | [QSize] The initial image size |
- Returns
- void
Definition at line 319 of file stdr_map_loader.cpp.
void stdr_gui::CMapLoader::updateCenter |
( |
QPoint |
p | ) |
|
void stdr_gui::CMapLoader::updateImage |
( |
QImage * |
img | ) |
|
Updates the image.
- Parameters
-
img | [QImage*] The image to be updated |
- Returns
- void
Definition at line 83 of file stdr_map_loader.cpp.
void stdr_gui::CMapLoader::updateZoom |
( |
QPoint |
p, |
|
|
bool |
zoomIn |
|
) |
| |
Updates the zoom of the image.
- Parameters
-
p | [QPoint] The point of the zoom event |
zoomIn | [bool] True if zoom in, false if zoom out |
- Returns
- void
Definition at line 129 of file stdr_map_loader.cpp.
int stdr_gui::CMapLoader::argc_ |
|
private |
char** stdr_gui::CMapLoader::argv_ |
|
private |
Current zoom. Calculated as pow(2,zoom_) * initial image size.
Definition at line 49 of file stdr_map_loader.h.
QSize stdr_gui::CMapLoader::initial_image_size_ |
|
private |
QImage* stdr_gui::CMapLoader::internal_img_ |
|
private |
QPoint stdr_gui::CMapLoader::map_max_ |
|
private |
QPoint stdr_gui::CMapLoader::map_min_ |
|
private |
int stdr_gui::CMapLoader::zoom_ |
|
private |
The documentation for this class was generated from the following files: