Public Slots | Signals | Public Member Functions | Private Attributes
stdr_gui::CMapConnector Class Reference

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

#include <stdr_map_connector.h>

List of all members.

Public Slots

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

Signals

void co2PlaceSet (QPoint p)
 Emmited when click is captured and state is SETCO2PLACE.
void itemClicked (QPoint p, Qt::MouseButton b)
 Emmited when click is captured and state is NORMAL.
void rfidPlaceSet (QPoint p)
 Emmited when click is captured and state is SETRFIDPLACE.
void robotPlaceSet (QPoint p)
 Emmited when click is captured and state is SETPLACE.
void robotReplaceSet (QPoint p, std::string robotName)
 Emmited when click is captured and state is SETREPLACE.
void signalUpdateImage (QImage *img)
 Emmited in updateImage function.
void soundPlaceSet (QPoint p)
 Emmited when click is captured and state is SETSOUNDPLACE.
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.
void zoomOutPressed (QPoint p)
 Emmited when click is captured and state is ZOOMOUT.

Public Member Functions

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

Private Attributes

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

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.

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.

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

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.

Sets map initial size to the loader.

Parameters:
s[QSize] Map size
Returns:
void

Definition at line 75 of file stdr_map_connector.cpp.

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

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.

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.

Changes the map state. Waits for an RFID tag to be placed.

Returns:
void

Definition at line 381 of file stdr_map_connector.cpp.

Changes the map state. Waits for a sound source to be placed.

Returns:
void

Definition at line 409 of file stdr_map_connector.cpp.

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

< Number of input arguments

Input arguments

Definition at line 64 of file stdr_map_connector.h.

Holds the currently clicked robot frame id.

Definition at line 67 of file stdr_map_connector.h.

Mouse cursor for zoom in.

Definition at line 70 of file stdr_map_connector.h.

True if map is initialized.

Definition at line 81 of file stdr_map_connector.h.

Definition at line 82 of file stdr_map_connector.h.

Object of CMapLoader.

Definition at line 78 of file stdr_map_connector.h.

Mouse cursor for zoom out.

Definition at line 72 of file stdr_map_connector.h.

Holds the map state.

Definition at line 75 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 Tue Feb 7 2017 03:46:43