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

#include <string_plugin.h>

Inheritance diagram for mapviz_plugins::StringPlugin:
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)
 
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 ()
 
 StringPlugin ()
 
bool SupportsPainting ()
 
void Transform ()
 
virtual ~StringPlugin ()
 
- 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
 
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 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 stringCallback (const topic_tools::ShapeShifter::ConstPtr &msg)
 
std::string UnitsToString (Units units)
 

Private Attributes

Anchor anchor_
 
QColor color_
 
QWidget * config_widget_
 
QFont font_
 
bool has_message_
 
bool has_painted_
 
QStaticText message_
 
int offset_x_
 
int offset_y_
 
ros::Subscriber string_sub_
 
std::string topic_
 
Ui::string_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 * 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 visible_
 

Detailed Description

Definition at line 58 of file string_plugin.h.

Member Enumeration Documentation

◆ Anchor

Enumerator
TOP_LEFT 
TOP_CENTER 
TOP_RIGHT 
CENTER_LEFT 
CENTER 
CENTER_RIGHT 
BOTTOM_LEFT 
BOTTOM_CENTER 
BOTTOM_RIGHT 

Definition at line 63 of file string_plugin.h.

◆ Units

Enumerator
PIXELS 
PERCENT 

Definition at line 75 of file string_plugin.h.

Constructor & Destructor Documentation

◆ StringPlugin()

mapviz_plugins::StringPlugin::StringPlugin ( )

Definition at line 50 of file string_plugin.cpp.

◆ ~StringPlugin()

mapviz_plugins::StringPlugin::~StringPlugin ( )
virtual

Definition at line 87 of file string_plugin.cpp.

Member Function Documentation

◆ AnchorToString()

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

Definition at line 414 of file string_plugin.cpp.

◆ Draw()

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

Implements mapviz::MapvizPlugin.

Definition at line 97 of file string_plugin.cpp.

◆ GetConfigWidget()

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

Reimplemented from mapviz::MapvizPlugin.

Definition at line 256 of file string_plugin.cpp.

◆ Initialize()

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

Implements mapviz::MapvizPlugin.

Definition at line 91 of file string_plugin.cpp.

◆ LoadConfig()

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

Implements mapviz::MapvizPlugin.

Definition at line 197 of file string_plugin.cpp.

◆ Paint()

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

Reimplemented from mapviz::MapvizPlugin.

Definition at line 102 of file string_plugin.cpp.

◆ PaintText()

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

Definition at line 137 of file string_plugin.cpp.

◆ PrintError()

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

Implements mapviz::MapvizPlugin.

Definition at line 262 of file string_plugin.cpp.

◆ PrintInfo()

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

Implements mapviz::MapvizPlugin.

Definition at line 267 of file string_plugin.cpp.

◆ PrintWarning()

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

Implements mapviz::MapvizPlugin.

Definition at line 272 of file string_plugin.cpp.

◆ SaveConfig()

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

Implements mapviz::MapvizPlugin.

Definition at line 245 of file string_plugin.cpp.

◆ SelectColor

void mapviz_plugins::StringPlugin::SelectColor ( )
protectedslot

Definition at line 277 of file string_plugin.cpp.

◆ SelectFont

void mapviz_plugins::StringPlugin::SelectFont ( )
protectedslot

Definition at line 282 of file string_plugin.cpp.

◆ SelectTopic

void mapviz_plugins::StringPlugin::SelectTopic ( )
protectedslot

Definition at line 295 of file string_plugin.cpp.

◆ SetAnchor

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

Definition at line 328 of file string_plugin.cpp.

◆ SetOffsetX

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

Definition at line 380 of file string_plugin.cpp.

◆ SetOffsetY

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

Definition at line 385 of file string_plugin.cpp.

◆ SetUnits

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

Definition at line 368 of file string_plugin.cpp.

◆ Shutdown()

void mapviz_plugins::StringPlugin::Shutdown ( )
inlinevirtual

Implements mapviz::MapvizPlugin.

Definition at line 84 of file string_plugin.h.

◆ stringCallback()

void mapviz_plugins::StringPlugin::stringCallback ( const topic_tools::ShapeShifter::ConstPtr msg)
private

Definition at line 396 of file string_plugin.cpp.

◆ SupportsPainting()

bool mapviz_plugins::StringPlugin::SupportsPainting ( )
inlinevirtual

Reimplemented from mapviz::MapvizPlugin.

Definition at line 96 of file string_plugin.h.

◆ TopicEdited

void mapviz_plugins::StringPlugin::TopicEdited ( )
protectedslot

Definition at line 307 of file string_plugin.cpp.

◆ Transform()

void mapviz_plugins::StringPlugin::Transform ( )
inlinevirtual

Implements mapviz::MapvizPlugin.

Definition at line 89 of file string_plugin.h.

◆ UnitsToString()

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

Definition at line 458 of file string_plugin.cpp.

Member Data Documentation

◆ anchor_

Anchor mapviz_plugins::StringPlugin::anchor_
private

Definition at line 122 of file string_plugin.h.

◆ ANCHOR_KEY

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

Definition at line 140 of file string_plugin.h.

◆ color_

QColor mapviz_plugins::StringPlugin::color_
private

Definition at line 131 of file string_plugin.h.

◆ COLOR_KEY

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

Definition at line 141 of file string_plugin.h.

◆ config_widget_

QWidget* mapviz_plugins::StringPlugin::config_widget_
private

Definition at line 119 of file string_plugin.h.

◆ font_

QFont mapviz_plugins::StringPlugin::font_
private

Definition at line 132 of file string_plugin.h.

◆ FONT_KEY

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

Definition at line 142 of file string_plugin.h.

◆ has_message_

bool mapviz_plugins::StringPlugin::has_message_
private

Definition at line 128 of file string_plugin.h.

◆ has_painted_

bool mapviz_plugins::StringPlugin::has_painted_
private

Definition at line 129 of file string_plugin.h.

◆ message_

QStaticText mapviz_plugins::StringPlugin::message_
private

Definition at line 133 of file string_plugin.h.

◆ offset_x_

int mapviz_plugins::StringPlugin::offset_x_
private

Definition at line 124 of file string_plugin.h.

◆ OFFSET_X_KEY

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

Definition at line 143 of file string_plugin.h.

◆ offset_y_

int mapviz_plugins::StringPlugin::offset_y_
private

Definition at line 125 of file string_plugin.h.

◆ OFFSET_Y_KEY

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

Definition at line 144 of file string_plugin.h.

◆ string_sub_

ros::Subscriber mapviz_plugins::StringPlugin::string_sub_
private

Definition at line 127 of file string_plugin.h.

◆ topic_

std::string mapviz_plugins::StringPlugin::topic_
private

Definition at line 121 of file string_plugin.h.

◆ TOPIC_KEY

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

Definition at line 145 of file string_plugin.h.

◆ ui_

Ui::string_config mapviz_plugins::StringPlugin::ui_
private

Definition at line 118 of file string_plugin.h.

◆ units_

Units mapviz_plugins::StringPlugin::units_
private

Definition at line 123 of file string_plugin.h.

◆ UNITS_KEY

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

Definition at line 146 of file string_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:15