Public Member Functions | Protected Slots | Protected Member Functions | Private Attributes | List of all members
mapviz_plugins::DrawPolygonPlugin Class Reference

#include <draw_polygon_plugin.h>

Inheritance diagram for mapviz_plugins::DrawPolygonPlugin:
Inheritance graph
[legend]

Public Member Functions

void Draw (double x, double y, double scale)
 
 DrawPolygonPlugin ()
 
QWidget * GetConfigWidget (QWidget *parent)
 
bool Initialize (QGLWidget *canvas)
 
void LoadConfig (const YAML::Node &node, const std::string &path)
 
void SaveConfig (YAML::Emitter &emitter, const std::string &path)
 
void Shutdown ()
 
void Transform ()
 
virtual ~DrawPolygonPlugin ()
 
- Public Member Functions inherited from mapviz::MapvizPlugin
virtual void ClearHistory ()
 
int DrawOrder () const
 
void DrawPlugin (double x, double y, double scale)
 
bool GetTransform (const ros::Time &stamp, swri_transform_util::Transform &transform)
 
bool GetTransform (const std::string &source, const ros::Time &stamp, swri_transform_util::Transform &transform)
 
virtual bool Initialize (boost::shared_ptr< tf::TransformListener > tf_listener, swri_transform_util::TransformManagerPtr tf_manager, QGLWidget *canvas)
 
std::string Name () const
 
virtual void Paint (QPainter *painter, double x, double y, double scale)
 
void PaintPlugin (QPainter *painter, double x, double y, double scale)
 
void PrintMeasurements ()
 
void SetDrawOrder (int order)
 
void SetIcon (IconWidget *icon)
 
void SetName (const std::string &name)
 
virtual void SetNode (const ros::NodeHandle &node)
 
void SetTargetFrame (std::string frame_id)
 
void SetType (const std::string &type)
 
void SetVisible (bool visible)
 
std::string Type () const
 
bool Visible () const
 
virtual ~MapvizPlugin ()
 

Protected Slots

void Clear ()
 
void FrameEdited ()
 
void PublishPolygon ()
 
void SelectFrame ()
 

Protected Member Functions

bool eventFilter (QObject *object, QEvent *event)
 
bool handleMouseMove (QMouseEvent *)
 
bool handleMousePress (QMouseEvent *)
 
bool handleMouseRelease (QMouseEvent *)
 
void PrintError (const std::string &message)
 
void PrintInfo (const std::string &message)
 
void PrintWarning (const std::string &message)
 
- Protected Member Functions inherited from mapviz::MapvizPlugin
 MapvizPlugin ()
 

Private Attributes

QWidget * config_widget_
 
bool is_mouse_down_
 
mapviz::MapCanvasmap_canvas_
 
qreal max_distance_
 
qint64 max_ms_
 
QPointF mouse_down_pos_
 
qint64 mouse_down_time_
 
ros::Publisher polygon_pub_
 
std::string polygon_topic_
 
int selected_point_
 
std::vector< tf::Vector3 > transformed_vertices_
 
Ui::draw_polygon_config ui_
 
std::vector< tf::Vector3 > vertices_
 

Additional Inherited Members

- Public Slots inherited from mapviz::MapvizPlugin
virtual void DrawIcon ()
 
virtual bool SupportsPainting ()
 
- Signals inherited from mapviz::MapvizPlugin
void DrawOrderChanged (int draw_order)
 
void SizeChanged ()
 
void TargetFrameChanged (const std::string &target_frame)
 
void UseLatestTransformsChanged (bool use_latest_transforms)
 
void VisibleChanged (bool visible)
 
- Static Public Member Functions inherited from mapviz::MapvizPlugin
static void PrintErrorHelper (QLabel *status_label, const std::string &message, double throttle=0.0)
 
static void PrintInfoHelper (QLabel *status_label, const std::string &message, double throttle=0.0)
 
static void PrintWarningHelper (QLabel *status_label, const std::string &message, double throttle=0.0)
 
- Protected Attributes inherited from mapviz::MapvizPlugin
QGLWidget * canvas_
 
int draw_order_
 
IconWidgeticon_
 
bool initialized_
 
std::string name_
 
ros::NodeHandle node_
 
std::string source_frame_
 
std::string target_frame_
 
boost::shared_ptr< tf::TransformListenertf_
 
swri_transform_util::TransformManagerPtr tf_manager_
 
std::string type_
 
bool visible_
 

Detailed Description

Definition at line 59 of file draw_polygon_plugin.h.

Constructor & Destructor Documentation

◆ DrawPolygonPlugin()

mapviz_plugins::DrawPolygonPlugin::DrawPolygonPlugin ( )

Definition at line 60 of file draw_polygon_plugin.cpp.

◆ ~DrawPolygonPlugin()

mapviz_plugins::DrawPolygonPlugin::~DrawPolygonPlugin ( )
virtual

Definition at line 90 of file draw_polygon_plugin.cpp.

Member Function Documentation

◆ Clear

void mapviz_plugins::DrawPolygonPlugin::Clear ( )
protectedslot

Definition at line 143 of file draw_polygon_plugin.cpp.

◆ Draw()

void mapviz_plugins::DrawPolygonPlugin::Draw ( double  x,
double  y,
double  scale 
)
virtual

Implements mapviz::MapvizPlugin.

Definition at line 354 of file draw_polygon_plugin.cpp.

◆ eventFilter()

bool mapviz_plugins::DrawPolygonPlugin::eventFilter ( QObject *  object,
QEvent *  event 
)
protected

Definition at line 180 of file draw_polygon_plugin.cpp.

◆ FrameEdited

void mapviz_plugins::DrawPolygonPlugin::FrameEdited ( )
protectedslot

Definition at line 108 of file draw_polygon_plugin.cpp.

◆ GetConfigWidget()

QWidget * mapviz_plugins::DrawPolygonPlugin::GetConfigWidget ( QWidget *  parent)
virtual

Reimplemented from mapviz::MapvizPlugin.

Definition at line 164 of file draw_polygon_plugin.cpp.

◆ handleMouseMove()

bool mapviz_plugins::DrawPolygonPlugin::handleMouseMove ( QMouseEvent *  event)
protected

Definition at line 329 of file draw_polygon_plugin.cpp.

◆ handleMousePress()

bool mapviz_plugins::DrawPolygonPlugin::handleMousePress ( QMouseEvent *  event)
protected

Definition at line 195 of file draw_polygon_plugin.cpp.

◆ handleMouseRelease()

bool mapviz_plugins::DrawPolygonPlugin::handleMouseRelease ( QMouseEvent *  event)
protected

Definition at line 265 of file draw_polygon_plugin.cpp.

◆ Initialize()

bool mapviz_plugins::DrawPolygonPlugin::Initialize ( QGLWidget *  canvas)
virtual

Implements mapviz::MapvizPlugin.

Definition at line 171 of file draw_polygon_plugin.cpp.

◆ LoadConfig()

void mapviz_plugins::DrawPolygonPlugin::LoadConfig ( const YAML::Node &  node,
const std::string &  path 
)
virtual

Implements mapviz::MapvizPlugin.

Definition at line 408 of file draw_polygon_plugin.cpp.

◆ PrintError()

void mapviz_plugins::DrawPolygonPlugin::PrintError ( const std::string &  message)
protectedvirtual

Implements mapviz::MapvizPlugin.

Definition at line 149 of file draw_polygon_plugin.cpp.

◆ PrintInfo()

void mapviz_plugins::DrawPolygonPlugin::PrintInfo ( const std::string &  message)
protectedvirtual

Implements mapviz::MapvizPlugin.

Definition at line 154 of file draw_polygon_plugin.cpp.

◆ PrintWarning()

void mapviz_plugins::DrawPolygonPlugin::PrintWarning ( const std::string &  message)
protectedvirtual

Implements mapviz::MapvizPlugin.

Definition at line 159 of file draw_polygon_plugin.cpp.

◆ PublishPolygon

void mapviz_plugins::DrawPolygonPlugin::PublishPolygon ( )
protectedslot

Definition at line 118 of file draw_polygon_plugin.cpp.

◆ SaveConfig()

void mapviz_plugins::DrawPolygonPlugin::SaveConfig ( YAML::Emitter &  emitter,
const std::string &  path 
)
virtual

Implements mapviz::MapvizPlugin.

Definition at line 430 of file draw_polygon_plugin.cpp.

◆ SelectFrame

void mapviz_plugins::DrawPolygonPlugin::SelectFrame ( )
protectedslot

Definition at line 98 of file draw_polygon_plugin.cpp.

◆ Shutdown()

void mapviz_plugins::DrawPolygonPlugin::Shutdown ( )
inlinevirtual

Implements mapviz::MapvizPlugin.

Definition at line 69 of file draw_polygon_plugin.h.

◆ Transform()

void mapviz_plugins::DrawPolygonPlugin::Transform ( )
inlinevirtual

Implements mapviz::MapvizPlugin.

Definition at line 75 of file draw_polygon_plugin.h.

Member Data Documentation

◆ config_widget_

QWidget* mapviz_plugins::DrawPolygonPlugin::config_widget_
private

Definition at line 99 of file draw_polygon_plugin.h.

◆ is_mouse_down_

bool mapviz_plugins::DrawPolygonPlugin::is_mouse_down_
private

Definition at line 109 of file draw_polygon_plugin.h.

◆ map_canvas_

mapviz::MapCanvas* mapviz_plugins::DrawPolygonPlugin::map_canvas_
private

Definition at line 100 of file draw_polygon_plugin.h.

◆ max_distance_

qreal mapviz_plugins::DrawPolygonPlugin::max_distance_
private

Definition at line 114 of file draw_polygon_plugin.h.

◆ max_ms_

qint64 mapviz_plugins::DrawPolygonPlugin::max_ms_
private

Definition at line 113 of file draw_polygon_plugin.h.

◆ mouse_down_pos_

QPointF mapviz_plugins::DrawPolygonPlugin::mouse_down_pos_
private

Definition at line 110 of file draw_polygon_plugin.h.

◆ mouse_down_time_

qint64 mapviz_plugins::DrawPolygonPlugin::mouse_down_time_
private

Definition at line 111 of file draw_polygon_plugin.h.

◆ polygon_pub_

ros::Publisher mapviz_plugins::DrawPolygonPlugin::polygon_pub_
private

Definition at line 103 of file draw_polygon_plugin.h.

◆ polygon_topic_

std::string mapviz_plugins::DrawPolygonPlugin::polygon_topic_
private

Definition at line 102 of file draw_polygon_plugin.h.

◆ selected_point_

int mapviz_plugins::DrawPolygonPlugin::selected_point_
private

Definition at line 108 of file draw_polygon_plugin.h.

◆ transformed_vertices_

std::vector<tf::Vector3> mapviz_plugins::DrawPolygonPlugin::transformed_vertices_
private

Definition at line 106 of file draw_polygon_plugin.h.

◆ ui_

Ui::draw_polygon_config mapviz_plugins::DrawPolygonPlugin::ui_
private

Definition at line 98 of file draw_polygon_plugin.h.

◆ vertices_

std::vector<tf::Vector3> mapviz_plugins::DrawPolygonPlugin::vertices_
private

Definition at line 105 of file draw_polygon_plugin.h.


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


mapviz_plugins
Author(s): Marc Alban
autogenerated on Sun Sep 8 2024 02:27:14