Public Slots | Signals | Public Member Functions | Private Attributes | List of all members
stdr_gui::CMapConnector Class Reference

Serves the Qt events of the map-holding widget. Inherits from QObject. More...

#include <stdr_map_connector.h>

Inheritance diagram for stdr_gui::CMapConnector:
Inheritance graph
[legend]

Public Slots

bool eventFilter (QObject *watched, QEvent *event)
 General event filter. Captures all events. More...
 
void serveImage (QImage *img)
 Called from signalUpdateImage signal. Calls the updateImage of CMapLoader. More...
 
void setCursorAdjusted (bool state)
 Called when zoom adjusted event happens. More...
 
void setCursorZoomIn (bool state)
 Called when zoom in event happens. More...
 
void setCursorZoomOut (bool state)
 Called when zoom out event happens. More...
 
void waitForCo2Place (void)
 Changes the map state. Waits for a CO2 source to be placed. More...
 
void waitForPlace (void)
 Changes the map state. Waits for a robot to be placed. More...
 
void waitForReplace (std::string robotFrameId)
 Changes the map state. Waits for a robot to be re-placed. More...
 
void waitForRfidPlace (void)
 Changes the map state. Waits for an RFID tag to be placed. More...
 
void waitForSoundPlace (void)
 Changes the map state. Waits for a sound source to be placed. More...
 
void waitForThermalPlace (void)
 Changes the map state. Waits for a thermal source to be placed. More...
 

Signals

void co2PlaceSet (QPoint p)
 Emmited when click is captured and state is SETCO2PLACE. More...
 
void itemClicked (QPoint p, Qt::MouseButton b)
 Emmited when click is captured and state is NORMAL. More...
 
void rfidPlaceSet (QPoint p)
 Emmited when click is captured and state is SETRFIDPLACE. More...
 
void robotPlaceSet (QPoint p)
 Emmited when click is captured and state is SETPLACE. More...
 
void robotReplaceSet (QPoint p, std::string robotName)
 Emmited when click is captured and state is SETREPLACE. More...
 
void signalUpdateImage (QImage *img)
 Emmited in updateImage function. More...
 
void soundPlaceSet (QPoint p)
 Emmited when click is captured and state is SETSOUNDPLACE. More...
 
void thermalPlaceSet (QPoint p)
 Emmited when click is captured and state is SETTHERMALPLACE. More...
 
void zoomInPressed (QPoint p)
 Emmited when click is captured and state is ZOOMIN. More...
 
void zoomOutPressed (QPoint p)
 Emmited when click is captured and state is ZOOMOUT. More...
 

Public Member Functions

 CMapConnector (int argc, char **argv)
 Default contructor. More...
 
void drawGrid (QImage *img, float resolution)
 Wrapper for the draw grid function of loader. More...
 
QPoint getGlobalPoint (QPoint p)
 Returns the point in the real map image. Wrapper for a loader function. More...
 
QWidget * getLoader (void)
 Returns the CMapLoader object. More...
 
QPoint mapToGlobal (QPoint p)
 Calls the Qt function that gets the real point that the event happened. More...
 
void setInitialImageSize (QSize s)
 Sets map initial size to the loader. More...
 
void setMapInitialized (bool mi)
 Sets the map initialization status. More...
 
void updateCenter (QPoint p)
 Updates the map center when a robot is followed. More...
 
void updateImage (QImage *img)
 Emits the signalUpdateImage signal. More...
 
void updateZoom (QPoint p, bool z)
 Updates the map zoom. Wrapper for a loader function. More...
 
 ~CMapConnector (void)
 Default destructor. More...
 

Private Attributes

int argc_
 < Number of input arguments More...
 
char ** argv_
 Holds the currently clicked robot frame id. More...
 
std::string current_robot_frame_id_
 Mouse cursor for zoom in. More...
 
CMapLoader loader_
 True if map is initialized. More...
 
bool map_initialized_
 
EStdrMapState map_state_
 Object of CMapLoader. More...
 
QCursor zoom_in_cursor_
 Mouse cursor for zoom out. More...
 
QCursor zoom_out_cursor_
 Holds the map state. More...
 

Detailed Description

Serves the Qt events of the map-holding widget. Inherits from QObject.

Definition at line 55 of file stdr_map_connector.h.

Constructor & Destructor Documentation

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  )

Default destructor.

Returns
void

Definition at line 65 of file stdr_map_connector.cpp.

Member Function Documentation

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
p[QPoint] A point
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  )

Returns the CMapLoader object.

Returns
QWidget* : The object

Definition at line 423 of file stdr_map_connector.cpp.

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)

Sets map initial size to the loader.

Parameters
s[QSize] Map size
Returns
void

Definition at line 75 of file stdr_map_connector.cpp.

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
p[QPoint] The new center
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

Changes the map state. Waits for a robot to be placed.

Returns
void

Definition at line 353 of file stdr_map_connector.cpp.

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

Member Data Documentation

int stdr_gui::CMapConnector::argc_
private

< Number of input arguments

Input arguments

Definition at line 63 of file stdr_map_connector.h.

char** stdr_gui::CMapConnector::argv_
private

Holds the currently clicked robot frame id.

Definition at line 65 of file stdr_map_connector.h.

std::string stdr_gui::CMapConnector::current_robot_frame_id_
private

Mouse cursor for zoom in.

Definition at line 68 of file stdr_map_connector.h.

CMapLoader stdr_gui::CMapConnector::loader_
private

True if map is initialized.

Definition at line 79 of file stdr_map_connector.h.

bool stdr_gui::CMapConnector::map_initialized_
private

Definition at line 82 of file stdr_map_connector.h.

EStdrMapState stdr_gui::CMapConnector::map_state_
private

Object of CMapLoader.

Definition at line 76 of file stdr_map_connector.h.

QCursor stdr_gui::CMapConnector::zoom_in_cursor_
private

Mouse cursor for zoom out.

Definition at line 71 of file stdr_map_connector.h.

QCursor stdr_gui::CMapConnector::zoom_out_cursor_
private

Holds the map state.

Definition at line 73 of file stdr_map_connector.h.


The documentation for this class was generated from the following files:


stdr_gui
Author(s): Manos Tsardoulias
autogenerated on Mon Jun 10 2019 15:15:17