|
FFSM++
1.1.0
French Forest Sector Model ++
|
Widget to display the maps of various spacial aspects of the model. More...
#include <MapBox.h>


Public Slots | |
| void | updatePixel (QString layerName_h, int x_h, int y_h, QColor color_h) |
| void | updateImage (QString layerName_h, const QImage &image_h) |
| void | switchToLayer (QString layerName_h) |
| Change the layer that currentLayer and currentLayerName points. More... | |
| void | addLayer (QString layerName_h) |
| void | fitInWindow () |
| void | zoom (double zoomFactor) |
| void | scroll (int deltaX, int deltaY) |
Signals | |
| void | queryRequestOnPx (int px_ID, int currentLayerIndex, bool newRequest) |
Public Member Functions | |
| MapBox (QWidget *parent=0) | |
| int | getLayerIndex (QString layerName_h="") |
| Return the index of the specified layer (null to ask for the current one) More... | |
Private Member Functions | |
| void | updatePixmap (const QImage &image, bool reFit=false) |
| void | paintEvent (QPaintEvent *event) |
| Reimplementation of the standard paintEvent method. More... | |
| void | prepareQueryEvent (QPoint click) |
| void | keyPressEvent (QKeyEvent *event) |
| void | wheelEvent (QWheelEvent *event) |
| void | mousePressEvent (QMouseEvent *event) |
| void | mouseMoveEvent (QMouseEvent *event) |
Private Attributes | |
| vector< QImage > | layersVector |
| Vector of QImages. More... | |
| vector< QString > | layersNameVector |
| Vector of layer names. More... | |
| QImage | currentLayer |
| QString | currentLayerName |
| QPoint | lastDragPos |
| double | sx1 |
| double | sy1 |
| double | sx2 |
| double | sy2 |
| coordinates of corner pixels of source - pixmap - rectangle More... | |
| double | dx1 |
| double | dy1 |
| double | dx2 |
| double | dy2 |
| coordinates of corner pixels of destination - widget - rectangle More... | |
Widget to display the maps of various spacial aspects of the model.
This class is based on QImage. It pick-ups from layersVector the choosed layer and display it.
It has methods to change the individual pixels or the whole image of a layer.
| MapBox | ( | QWidget * | parent = 0 | ) |
Definition at line 35 of file MapBox.cpp.
|
slot |
Definition at line 135 of file MapBox.cpp.
|
slot |
Definition at line 217 of file MapBox.cpp.
Referenced by updateImage().

| int getLayerIndex | ( | QString | layerName_h = "" | ) |
Return the index of the specified layer (null to ask for the current one)
Definition at line 123 of file MapBox.cpp.
Referenced by prepareQueryEvent().

|
private |
|
private |
|
private |
|
private |
Reimplementation of the standard paintEvent method.
We paint the image pixel by pixel picking up the colors from the map pointed by currentLayer.
Definition at line 55 of file MapBox.cpp.
|
private |
Definition at line 192 of file MapBox.cpp.
Referenced by mousePressEvent().


|
signal |
|
slot |
Definition at line 255 of file MapBox.cpp.
Referenced by keyPressEvent(), and mouseMoveEvent().

|
slot |
Change the layer that currentLayer and currentLayerName points.
Definition at line 108 of file MapBox.cpp.
|
slot |
Definition at line 87 of file MapBox.cpp.

|
slot |
Definition at line 73 of file MapBox.cpp.
|
private |
|
private |
|
slot |
Definition at line 241 of file MapBox.cpp.
Referenced by keyPressEvent(), and wheelEvent().

|
private |
Definition at line 70 of file MapBox.h.
Referenced by addLayer(), fitInWindow(), paintEvent(), switchToLayer(), updateImage(), and updatePixel().
|
private |
Definition at line 71 of file MapBox.h.
Referenced by addLayer(), getLayerIndex(), MapBox(), switchToLayer(), updateImage(), and updatePixel().
|
private |
Definition at line 74 of file MapBox.h.
Referenced by fitInWindow(), MapBox(), paintEvent(), prepareQueryEvent(), scroll(), and zoom().
|
private |
Definition at line 74 of file MapBox.h.
Referenced by fitInWindow(), MapBox(), paintEvent(), prepareQueryEvent(), scroll(), and zoom().
|
private |
Definition at line 74 of file MapBox.h.
Referenced by fitInWindow(), MapBox(), paintEvent(), prepareQueryEvent(), scroll(), and zoom().
|
private |
coordinates of corner pixels of destination - widget - rectangle
Definition at line 74 of file MapBox.h.
Referenced by fitInWindow(), MapBox(), paintEvent(), prepareQueryEvent(), scroll(), and zoom().
|
private |
Definition at line 72 of file MapBox.h.
Referenced by mouseMoveEvent(), and mousePressEvent().
|
private |
Vector of layer names.
Definition at line 69 of file MapBox.h.
Referenced by addLayer(), getLayerIndex(), switchToLayer(), updateImage(), and updatePixel().
|
private |
Vector of QImages.
Definition at line 68 of file MapBox.h.
Referenced by addLayer(), getLayerIndex(), paintEvent(), switchToLayer(), updateImage(), and updatePixel().
|
private |
Definition at line 73 of file MapBox.h.
Referenced by fitInWindow(), MapBox(), paintEvent(), and prepareQueryEvent().
|
private |
Definition at line 73 of file MapBox.h.
Referenced by fitInWindow(), MapBox(), paintEvent(), and prepareQueryEvent().
|
private |
Definition at line 73 of file MapBox.h.
Referenced by fitInWindow(), MapBox(), paintEvent(), and prepareQueryEvent().
|
private |
coordinates of corner pixels of source - pixmap - rectangle
Definition at line 73 of file MapBox.h.
Referenced by fitInWindow(), MapBox(), paintEvent(), and prepareQueryEvent().