Serves the Qt events of the map-holding widget. Inherits from QObject.
More...
#include <stdr_map_connector.h>
Serves the Qt events of the map-holding widget. Inherits from QObject.
Definition at line 55 of file stdr_map_connector.h.
stdr_gui::CMapConnector::CMapConnector |
( |
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_connector.cpp.
stdr_gui::CMapConnector::~CMapConnector |
( |
void |
| ) |
|
void stdr_gui::CMapConnector::co2PlaceSet |
( |
QPoint |
p | ) |
|
|
signal |
Emmited when click is captured and state is SETCO2PLACE.
- Parameters
-
p | [QPoint] The event point |
- Returns
- void
void stdr_gui::CMapConnector::drawGrid |
( |
QImage * |
img, |
|
|
float |
resolution |
|
) |
| |
Wrapper for the draw grid function of loader.
- Parameters
-
img | [QImage*] The image on which the grid will be painted |
resolution | [float] The map resolution |
- Returns
- void
Definition at line 124 of file stdr_map_connector.cpp.
bool stdr_gui::CMapConnector::eventFilter |
( |
QObject * |
watched, |
|
|
QEvent * |
event |
|
) |
| |
|
slot |
General event filter. Captures all events.
- Parameters
-
watched | [QObject*] The object in which the event was triggered |
event | [QEvent*] The type of event |
- Returns
- bool : True is event served
Definition at line 139 of file stdr_map_connector.cpp.
QPoint stdr_gui::CMapConnector::getGlobalPoint |
( |
QPoint |
p | ) |
|
Returns the point in the real map image. Wrapper for a loader function.
- Parameters
-
- Returns
- QPoint : The "real" point in the original map
Definition at line 113 of file stdr_map_connector.cpp.
QWidget * stdr_gui::CMapConnector::getLoader |
( |
void |
| ) |
|
void stdr_gui::CMapConnector::itemClicked |
( |
QPoint |
p, |
|
|
Qt::MouseButton |
b |
|
) |
| |
|
signal |
Emmited when click is captured and state is NORMAL.
- Parameters
-
p | [QPoint] The event point |
b | [Qt::MouseButton] The mouse button clicked |
- Returns
- void
QPoint stdr_gui::CMapConnector::mapToGlobal |
( |
QPoint |
p | ) |
|
Calls the Qt function that gets the real point that the event happened.
- Parameters
-
p | [QPoint] The point of the event |
- Returns
- QPoint : The "real" point
Definition at line 282 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::rfidPlaceSet |
( |
QPoint |
p | ) |
|
|
signal |
Emmited when click is captured and state is SETRFIDPLACE.
- Parameters
-
p | [QPoint] The event point |
- Returns
- void
void stdr_gui::CMapConnector::robotPlaceSet |
( |
QPoint |
p | ) |
|
|
signal |
Emmited when click is captured and state is SETPLACE.
- Parameters
-
p | [QPoint] The event point |
- Returns
- void
void stdr_gui::CMapConnector::robotReplaceSet |
( |
QPoint |
p, |
|
|
std::string |
robotName |
|
) |
| |
|
signal |
Emmited when click is captured and state is SETREPLACE.
- Parameters
-
p | [QPoint] The event point |
robotName | [std::string] Frame id of the robot re-placed |
- Returns
- void
void stdr_gui::CMapConnector::serveImage |
( |
QImage * |
img | ) |
|
|
slot |
Called from signalUpdateImage signal. Calls the updateImage of CMapLoader.
- Parameters
-
img | [QImage*] The image to be painted |
- Returns
- void
Definition at line 272 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::setCursorAdjusted |
( |
bool |
state | ) |
|
|
slot |
Called when zoom adjusted event happens.
- Parameters
-
state | [bool] True when zoom adjusted active |
- Returns
- void
Definition at line 338 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::setCursorZoomIn |
( |
bool |
state | ) |
|
|
slot |
Called when zoom in event happens.
- Parameters
-
state | [bool] True when zoom in active |
- Returns
- void
Definition at line 292 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::setCursorZoomOut |
( |
bool |
state | ) |
|
|
slot |
Called when zoom out event happens.
- Parameters
-
state | [bool] True when zoom out active |
- Returns
- void
Definition at line 315 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::setInitialImageSize |
( |
QSize |
s | ) |
|
void stdr_gui::CMapConnector::setMapInitialized |
( |
bool |
mi | ) |
|
Sets the map initialization status.
- Parameters
-
mi | [bool] The initialization status |
- Returns
- void
Definition at line 448 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::signalUpdateImage |
( |
QImage * |
img | ) |
|
|
signal |
Emmited in updateImage function.
- Parameters
-
img | [QImage*] The image to be updated |
- Returns
- void
void stdr_gui::CMapConnector::soundPlaceSet |
( |
QPoint |
p | ) |
|
|
signal |
Emmited when click is captured and state is SETSOUNDPLACE.
- Parameters
-
p | [QPoint] The event point |
- Returns
- void
void stdr_gui::CMapConnector::thermalPlaceSet |
( |
QPoint |
p | ) |
|
|
signal |
Emmited when click is captured and state is SETTHERMALPLACE.
- Parameters
-
p | [QPoint] The event point |
- Returns
- void
void stdr_gui::CMapConnector::updateCenter |
( |
QPoint |
p | ) |
|
Updates the map center when a robot is followed.
- Parameters
-
- Returns
- void
Definition at line 100 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::updateImage |
( |
QImage * |
img | ) |
|
Emits the signalUpdateImage signal.
- Parameters
-
img | [QImage*] The image to be updated |
- Returns
- void
Definition at line 262 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::updateZoom |
( |
QPoint |
p, |
|
|
bool |
z |
|
) |
| |
Updates the map zoom. Wrapper for a loader function.
- Parameters
-
p | [QPoint] The point of the zoom event |
z | [bool] True if zoom in, false if zoom out |
- Returns
- void
Definition at line 86 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::waitForCo2Place |
( |
void |
| ) |
|
|
slot |
Changes the map state. Waits for a CO2 source to be placed.
- Returns
- void
Definition at line 395 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::waitForPlace |
( |
void |
| ) |
|
|
slot |
void stdr_gui::CMapConnector::waitForReplace |
( |
std::string |
robotFrameId | ) |
|
|
slot |
Changes the map state. Waits for a robot to be re-placed.
- Parameters
-
robotFrameId | [std::string] The robot frame id of robot to be re-placed |
- Returns
- void
Definition at line 433 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::waitForRfidPlace |
( |
void |
| ) |
|
|
slot |
Changes the map state. Waits for an RFID tag to be placed.
- Returns
- void
Definition at line 381 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::waitForSoundPlace |
( |
void |
| ) |
|
|
slot |
Changes the map state. Waits for a sound source to be placed.
- Returns
- void
Definition at line 409 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::waitForThermalPlace |
( |
void |
| ) |
|
|
slot |
Changes the map state. Waits for a thermal source to be placed.
- Returns
- void
Definition at line 367 of file stdr_map_connector.cpp.
void stdr_gui::CMapConnector::zoomInPressed |
( |
QPoint |
p | ) |
|
|
signal |
Emmited when click is captured and state is ZOOMIN.
- Parameters
-
p | [QPoint] The event point |
- Returns
- void
void stdr_gui::CMapConnector::zoomOutPressed |
( |
QPoint |
p | ) |
|
|
signal |
Emmited when click is captured and state is ZOOMOUT.
- Parameters
-
p | [QPoint] The event point |
- Returns
- void
int stdr_gui::CMapConnector::argc_ |
|
private |
char** stdr_gui::CMapConnector::argv_ |
|
private |
std::string stdr_gui::CMapConnector::current_robot_frame_id_ |
|
private |
bool stdr_gui::CMapConnector::map_initialized_ |
|
private |
QCursor stdr_gui::CMapConnector::zoom_in_cursor_ |
|
private |
QCursor stdr_gui::CMapConnector::zoom_out_cursor_ |
|
private |
The documentation for this class was generated from the following files: