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

#include <float_plugin.h>

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

Public Types

enum  Anchor {
  TOP_LEFT, TOP_CENTER, TOP_RIGHT, CENTER_LEFT,
  CENTER, CENTER_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER,
  BOTTOM_RIGHT
}
 
enum  Units { PIXELS, PERCENT }
 

Public Member Functions

void Draw (double x, double y, double scale)
 
 FloatPlugin ()
 
QWidget * GetConfigWidget (QWidget *parent)
 
bool Initialize (QGLWidget *canvas)
 
void LoadConfig (const YAML::Node &node, const std::string &path)
 
void Paint (QPainter *painter, double x, double y, double scale)
 
void SaveConfig (YAML::Emitter &emitter, const std::string &path)
 
void Shutdown ()
 
bool SupportsPainting ()
 
void Transform ()
 
virtual ~FloatPlugin ()
 
- 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 use_latest_transforms=true)
 
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
 
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 SetUseLatestTransforms (bool value)
 
void SetVisible (bool visible)
 
std::string Type () const
 
bool Visible () const
 
virtual ~MapvizPlugin ()
 

Protected Slots

void PostfixEdited ()
 
void SelectColor ()
 
void SelectFont ()
 
void SelectTopic ()
 
void SetAnchor (QString anchor)
 
void SetOffsetX (int offset)
 
void SetOffsetY (int offset)
 
void SetUnits (QString units)
 
void TopicEdited ()
 

Protected Member Functions

void PaintText (QPainter *painter)
 
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 Member Functions

std::string AnchorToString (Anchor anchor)
 
void floatCallback (const topic_tools::ShapeShifter::ConstPtr &msg)
 
std::string UnitsToString (Units units)
 

Private Attributes

Anchor anchor_
 
QColor color_
 
QWidget * config_widget_
 
ros::Subscriber float_sub_
 
QFont font_
 
bool has_message_
 
bool has_painted_
 
QStaticText message_
 
int offset_x_
 
int offset_y_
 
std::string postfix_
 
std::string topic_
 
Ui::float_config ui_
 
Units units_
 

Static Private Attributes

static const char * ANCHOR_KEY = "anchor"
 
static const char * COLOR_KEY = "color"
 
static const char * FONT_KEY = "font"
 
static const char * OFFSET_X_KEY = "offset_x"
 
static const char * OFFSET_Y_KEY = "offset_y"
 
static const char * POSTFIX_KEY = "postfix_text"
 
static const char * TOPIC_KEY = "topic"
 
static const char * UNITS_KEY = "units"
 

Additional Inherited Members

- Public Slots inherited from mapviz::MapvizPlugin
virtual void DrawIcon ()
 
- 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 use_latest_transforms_
 
bool visible_
 

Detailed Description

Definition at line 56 of file float_plugin.h.

Member Enumeration Documentation

Enumerator
TOP_LEFT 
TOP_CENTER 
TOP_RIGHT 
CENTER_LEFT 
CENTER 
CENTER_RIGHT 
BOTTOM_LEFT 
BOTTOM_CENTER 
BOTTOM_RIGHT 

Definition at line 61 of file float_plugin.h.

Enumerator
PIXELS 
PERCENT 

Definition at line 73 of file float_plugin.h.

Constructor & Destructor Documentation

mapviz_plugins::FloatPlugin::FloatPlugin ( )

Definition at line 57 of file float_plugin.cpp.

mapviz_plugins::FloatPlugin::~FloatPlugin ( )
virtual

Definition at line 95 of file float_plugin.cpp.

Member Function Documentation

std::string mapviz_plugins::FloatPlugin::AnchorToString ( FloatPlugin::Anchor  anchor)
private

Definition at line 456 of file float_plugin.cpp.

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

Implements mapviz::MapvizPlugin.

Definition at line 105 of file float_plugin.cpp.

void mapviz_plugins::FloatPlugin::floatCallback ( const topic_tools::ShapeShifter::ConstPtr msg)
private

Definition at line 421 of file float_plugin.cpp.

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

Reimplemented from mapviz::MapvizPlugin.

Definition at line 271 of file float_plugin.cpp.

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

Implements mapviz::MapvizPlugin.

Definition at line 99 of file float_plugin.cpp.

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

Implements mapviz::MapvizPlugin.

Definition at line 205 of file float_plugin.cpp.

void mapviz_plugins::FloatPlugin::Paint ( QPainter *  painter,
double  x,
double  y,
double  scale 
)
virtual

Reimplemented from mapviz::MapvizPlugin.

Definition at line 110 of file float_plugin.cpp.

void mapviz_plugins::FloatPlugin::PaintText ( QPainter *  painter)
protected

Definition at line 145 of file float_plugin.cpp.

void mapviz_plugins::FloatPlugin::PostfixEdited ( )
protectedslot

Definition at line 297 of file float_plugin.cpp.

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

Implements mapviz::MapvizPlugin.

Definition at line 277 of file float_plugin.cpp.

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

Implements mapviz::MapvizPlugin.

Definition at line 282 of file float_plugin.cpp.

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

Implements mapviz::MapvizPlugin.

Definition at line 287 of file float_plugin.cpp.

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

Implements mapviz::MapvizPlugin.

Definition at line 259 of file float_plugin.cpp.

void mapviz_plugins::FloatPlugin::SelectColor ( )
protectedslot

Definition at line 292 of file float_plugin.cpp.

void mapviz_plugins::FloatPlugin::SelectFont ( )
protectedslot

Definition at line 302 of file float_plugin.cpp.

void mapviz_plugins::FloatPlugin::SelectTopic ( )
protectedslot

Definition at line 315 of file float_plugin.cpp.

void mapviz_plugins::FloatPlugin::SetAnchor ( QString  anchor)
protectedslot

Definition at line 353 of file float_plugin.cpp.

void mapviz_plugins::FloatPlugin::SetOffsetX ( int  offset)
protectedslot

Definition at line 405 of file float_plugin.cpp.

void mapviz_plugins::FloatPlugin::SetOffsetY ( int  offset)
protectedslot

Definition at line 410 of file float_plugin.cpp.

void mapviz_plugins::FloatPlugin::SetUnits ( QString  units)
protectedslot

Definition at line 393 of file float_plugin.cpp.

void mapviz_plugins::FloatPlugin::Shutdown ( )
inlinevirtual

Implements mapviz::MapvizPlugin.

Definition at line 82 of file float_plugin.h.

bool mapviz_plugins::FloatPlugin::SupportsPainting ( )
inlinevirtual

Reimplemented from mapviz::MapvizPlugin.

Definition at line 94 of file float_plugin.h.

void mapviz_plugins::FloatPlugin::TopicEdited ( )
protectedslot

Definition at line 332 of file float_plugin.cpp.

void mapviz_plugins::FloatPlugin::Transform ( )
inlinevirtual

Implements mapviz::MapvizPlugin.

Definition at line 87 of file float_plugin.h.

std::string mapviz_plugins::FloatPlugin::UnitsToString ( FloatPlugin::Units  units)
private

Definition at line 500 of file float_plugin.cpp.

Member Data Documentation

Anchor mapviz_plugins::FloatPlugin::anchor_
private

Definition at line 122 of file float_plugin.h.

const char * mapviz_plugins::FloatPlugin::ANCHOR_KEY = "anchor"
staticprivate

Definition at line 140 of file float_plugin.h.

QColor mapviz_plugins::FloatPlugin::color_
private

Definition at line 131 of file float_plugin.h.

const char * mapviz_plugins::FloatPlugin::COLOR_KEY = "color"
staticprivate

Definition at line 141 of file float_plugin.h.

QWidget* mapviz_plugins::FloatPlugin::config_widget_
private

Definition at line 118 of file float_plugin.h.

ros::Subscriber mapviz_plugins::FloatPlugin::float_sub_
private

Definition at line 127 of file float_plugin.h.

QFont mapviz_plugins::FloatPlugin::font_
private

Definition at line 132 of file float_plugin.h.

const char * mapviz_plugins::FloatPlugin::FONT_KEY = "font"
staticprivate

Definition at line 142 of file float_plugin.h.

bool mapviz_plugins::FloatPlugin::has_message_
private

Definition at line 128 of file float_plugin.h.

bool mapviz_plugins::FloatPlugin::has_painted_
private

Definition at line 129 of file float_plugin.h.

QStaticText mapviz_plugins::FloatPlugin::message_
private

Definition at line 133 of file float_plugin.h.

int mapviz_plugins::FloatPlugin::offset_x_
private

Definition at line 124 of file float_plugin.h.

const char * mapviz_plugins::FloatPlugin::OFFSET_X_KEY = "offset_x"
staticprivate

Definition at line 143 of file float_plugin.h.

int mapviz_plugins::FloatPlugin::offset_y_
private

Definition at line 125 of file float_plugin.h.

const char * mapviz_plugins::FloatPlugin::OFFSET_Y_KEY = "offset_y"
staticprivate

Definition at line 144 of file float_plugin.h.

std::string mapviz_plugins::FloatPlugin::postfix_
private

Definition at line 121 of file float_plugin.h.

const char * mapviz_plugins::FloatPlugin::POSTFIX_KEY = "postfix_text"
staticprivate

Definition at line 147 of file float_plugin.h.

std::string mapviz_plugins::FloatPlugin::topic_
private

Definition at line 120 of file float_plugin.h.

const char * mapviz_plugins::FloatPlugin::TOPIC_KEY = "topic"
staticprivate

Definition at line 145 of file float_plugin.h.

Ui::float_config mapviz_plugins::FloatPlugin::ui_
private

Definition at line 117 of file float_plugin.h.

Units mapviz_plugins::FloatPlugin::units_
private

Definition at line 123 of file float_plugin.h.

const char * mapviz_plugins::FloatPlugin::UNITS_KEY = "units"
staticprivate

Definition at line 146 of file float_plugin.h.


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


mapviz_plugins
Author(s): Marc Alban
autogenerated on Fri Mar 19 2021 02:44:32