22 #ifndef STDR_MAP_CONNECTOR 23 #define STDR_MAP_CONNECTOR 143 void drawGrid(QImage *img,
float resolution);
174 bool eventFilter( QObject* watched, QEvent* event);
void updateZoom(QPoint p, bool z)
Updates the map zoom. Wrapper for a loader function.
bool eventFilter(QObject *watched, QEvent *event)
General event filter. Captures all events.
void waitForSoundPlace(void)
Changes the map state. Waits for a sound source to be placed.
void waitForCo2Place(void)
Changes the map state. Waits for a CO2 source to be placed.
std::string current_robot_frame_id_
Mouse cursor for zoom in.
void rfidPlaceSet(QPoint p)
Emmited when click is captured and state is SETRFIDPLACE.
QWidget * getLoader(void)
Returns the CMapLoader object.
Implements the low level Qt functionalities of the map widget. Inherits from Ui_mapWidget (generated ...
void waitForRfidPlace(void)
Changes the map state. Waits for an RFID tag to be placed.
int argc_
< Number of input arguments
QCursor zoom_out_cursor_
Holds the map state.
void soundPlaceSet(QPoint p)
Emmited when click is captured and state is SETSOUNDPLACE.
void zoomOutPressed(QPoint p)
Emmited when click is captured and state is ZOOMOUT.
void waitForPlace(void)
Changes the map state. Waits for a robot to be placed.
void updateCenter(QPoint p)
Updates the map center when a robot is followed.
QCursor zoom_in_cursor_
Mouse cursor for zoom out.
char ** argv_
Holds the currently clicked robot frame id.
void setInitialImageSize(QSize s)
Sets map initial size to the loader.
void robotPlaceSet(QPoint p)
Emmited when click is captured and state is SETPLACE.
void setMapInitialized(bool mi)
Sets the map initialization status.
~CMapConnector(void)
Default destructor.
void drawGrid(QImage *img, float resolution)
Wrapper for the draw grid function of loader.
void co2PlaceSet(QPoint p)
Emmited when click is captured and state is SETCO2PLACE.
void robotReplaceSet(QPoint p, std::string robotName)
Emmited when click is captured and state is SETREPLACE.
QPoint getGlobalPoint(QPoint p)
Returns the point in the real map image. Wrapper for a loader function.
void updateImage(QImage *img)
Emits the signalUpdateImage signal.
void waitForReplace(std::string robotFrameId)
Changes the map state. Waits for a robot to be re-placed.
EStdrMapState
Holds the possible map states.
The main namespace for STDR GUI.
Serves the Qt events of the map-holding widget. Inherits from QObject.
EStdrMapState map_state_
Object of CMapLoader.
void waitForThermalPlace(void)
Changes the map state. Waits for a thermal source to be placed.
void itemClicked(QPoint p, Qt::MouseButton b)
Emmited when click is captured and state is NORMAL.
void serveImage(QImage *img)
Called from signalUpdateImage signal. Calls the updateImage of CMapLoader.
void signalUpdateImage(QImage *img)
Emmited in updateImage function.
void setCursorAdjusted(bool state)
Called when zoom adjusted event happens.
QPoint mapToGlobal(QPoint p)
Calls the Qt function that gets the real point that the event happened.
void setCursorZoomIn(bool state)
Called when zoom in event happens.
CMapConnector(int argc, char **argv)
Default contructor.
void thermalPlaceSet(QPoint p)
Emmited when click is captured and state is SETTHERMALPLACE.
void zoomInPressed(QPoint p)
Emmited when click is captured and state is ZOOMIN.
CMapLoader loader_
True if map is initialized.
void setCursorZoomOut(bool state)
Called when zoom out event happens.