Monitor events in the visualization window.
Definition at line 32 of file CWindowObserver.h.
#include <mrpt/graphslam/misc/CWindowObserver.h>
Public Member Functions | |
CWindowObserver () | |
void | returnEventsStruct (std::map< std::string, bool > *codes_to_pressed, bool reset_keypresses=true) |
Return a map of key code to a boolean indicating whether it was pressed since the previous time the class was quarried. More... | |
void | registerKeystroke (const std::string key_str, const std::string key_desc) |
Make new keystrokes available in the help message box. More... | |
void | observeBegin (CObservable &obj) |
Starts the subscription of this observer to the given object. More... | |
void | observeEnd (CObservable &obj) |
Ends the subscription of this observer to the given object (note that there is no need to call this method, since the destruction of the first of observer/observed will put an end to the process. More... | |
Protected Member Functions | |
void | OnEvent (const mrpt::utils::mrptEvent &e) |
This virtual function will be called upon receive of any event after starting listening at any CObservable object. More... | |
Private Attributes | |
bool | m_showing_help |
bool | m_hiding_help |
std::string | m_help_msg |
std::map< std::string, bool > | m_key_codes_to_pressed |
Map from registered char_code (std::string to support <C-c>) to boolean true/false indicating whether it has been pressed since previous time checked. More... | |
mrpt::utils::CTicTac | m_tim_show_start |
mrpt::utils::CTicTac | m_tim_show_end |
mrpt::graphslam::CWindowObserver::CWindowObserver | ( | ) |
|
inherited |
Starts the subscription of this observer to the given object.
Referenced by CGraphSlamHandler< GRAPH_T >::initVisualization().
|
inherited |
Ends the subscription of this observer to the given object (note that there is no need to call this method, since the destruction of the first of observer/observed will put an end to the process.
|
protectedvirtual |
This virtual function will be called upon receive of any event after starting listening at any CObservable object.
Implements mrpt::utils::CObserver.
void mrpt::graphslam::CWindowObserver::registerKeystroke | ( | const std::string | key_str, |
const std::string | key_desc | ||
) |
Make new keystrokes available in the help message box.
Classes with access to the CWindowObserver can use this method to add keystrokes according to their needs
Referenced by mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::initClass(), mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::initGraphVisualization(), mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::initializeVisuals(), mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::initOptDistanceVisualization(), and mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::setWindowManagerPtr().
void mrpt::graphslam::CWindowObserver::returnEventsStruct | ( | std::map< std::string, bool > * | codes_to_pressed, |
bool | reset_keypresses = true |
||
) |
Return a map of key code to a boolean indicating whether it was pressed since the previous time the class was quarried.
Referenced by CGraphSlamHandler< GRAPH_T >::queryObserverForEvents(), and mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::queryObserverForEvents().
|
private |
Definition at line 58 of file CWindowObserver.h.
|
private |
Definition at line 56 of file CWindowObserver.h.
|
private |
Map from registered char_code (std::string to support <C-c>) to boolean true/false indicating whether it has been pressed since previous time checked.
Definition at line 64 of file CWindowObserver.h.
|
private |
Definition at line 56 of file CWindowObserver.h.
|
private |
Definition at line 65 of file CWindowObserver.h.
|
private |
Definition at line 65 of file CWindowObserver.h.
Page generated by Doxygen 1.8.13 for MRPT 1.5.3 at Tue Aug 22 01:03:35 UTC 2017 |