#include <string_plugin.h>
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 () |
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) |
Private Member Functions | |
std::string | AnchorToString (Anchor anchor) |
void | stringCallback (const std_msgs::StringConstPtr &str) |
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 |
static const char * | COLOR_KEY |
static const char * | FONT_KEY |
static const char * | OFFSET_X_KEY |
static const char * | OFFSET_Y_KEY |
static const char * | TOPIC_KEY |
static const char * | UNITS_KEY |
Definition at line 56 of file string_plugin.h.
TOP_LEFT | |
TOP_CENTER | |
TOP_RIGHT | |
CENTER_LEFT | |
CENTER | |
CENTER_RIGHT | |
BOTTOM_LEFT | |
BOTTOM_CENTER | |
BOTTOM_RIGHT |
Definition at line 61 of file string_plugin.h.
Definition at line 73 of file string_plugin.h.
virtual mapviz_plugins::StringPlugin::~StringPlugin | ( | ) | [virtual] |
std::string mapviz_plugins::StringPlugin::AnchorToString | ( | Anchor | anchor | ) | [private] |
void mapviz_plugins::StringPlugin::Draw | ( | double | x, |
double | y, | ||
double | scale | ||
) | [virtual] |
Implements mapviz::MapvizPlugin.
QWidget* mapviz_plugins::StringPlugin::GetConfigWidget | ( | QWidget * | parent | ) | [virtual] |
Reimplemented from mapviz::MapvizPlugin.
bool mapviz_plugins::StringPlugin::Initialize | ( | QGLWidget * | canvas | ) | [virtual] |
Implements mapviz::MapvizPlugin.
void mapviz_plugins::StringPlugin::LoadConfig | ( | const YAML::Node & | node, |
const std::string & | path | ||
) | [virtual] |
Implements mapviz::MapvizPlugin.
void mapviz_plugins::StringPlugin::Paint | ( | QPainter * | painter, |
double | x, | ||
double | y, | ||
double | scale | ||
) | [virtual] |
Reimplemented from mapviz::MapvizPlugin.
void mapviz_plugins::StringPlugin::PaintText | ( | QPainter * | painter | ) | [protected] |
void mapviz_plugins::StringPlugin::PrintError | ( | const std::string & | message | ) | [protected, virtual] |
Implements mapviz::MapvizPlugin.
void mapviz_plugins::StringPlugin::PrintInfo | ( | const std::string & | message | ) | [protected, virtual] |
Implements mapviz::MapvizPlugin.
void mapviz_plugins::StringPlugin::PrintWarning | ( | const std::string & | message | ) | [protected, virtual] |
Implements mapviz::MapvizPlugin.
void mapviz_plugins::StringPlugin::SaveConfig | ( | YAML::Emitter & | emitter, |
const std::string & | path | ||
) | [virtual] |
Implements mapviz::MapvizPlugin.
void mapviz_plugins::StringPlugin::SelectColor | ( | ) | [protected, slot] |
void mapviz_plugins::StringPlugin::SelectFont | ( | ) | [protected, slot] |
void mapviz_plugins::StringPlugin::SelectTopic | ( | ) | [protected, slot] |
void mapviz_plugins::StringPlugin::SetAnchor | ( | QString | anchor | ) | [protected, slot] |
void mapviz_plugins::StringPlugin::SetOffsetX | ( | int | offset | ) | [protected, slot] |
void mapviz_plugins::StringPlugin::SetOffsetY | ( | int | offset | ) | [protected, slot] |
void mapviz_plugins::StringPlugin::SetUnits | ( | QString | units | ) | [protected, slot] |
void mapviz_plugins::StringPlugin::Shutdown | ( | ) | [inline, virtual] |
Implements mapviz::MapvizPlugin.
Definition at line 82 of file string_plugin.h.
void mapviz_plugins::StringPlugin::stringCallback | ( | const std_msgs::StringConstPtr & | str | ) | [private] |
bool mapviz_plugins::StringPlugin::SupportsPainting | ( | ) | [inline, virtual] |
Reimplemented from mapviz::MapvizPlugin.
Definition at line 94 of file string_plugin.h.
void mapviz_plugins::StringPlugin::TopicEdited | ( | ) | [protected, slot] |
void mapviz_plugins::StringPlugin::Transform | ( | ) | [inline, virtual] |
Implements mapviz::MapvizPlugin.
Definition at line 87 of file string_plugin.h.
std::string mapviz_plugins::StringPlugin::UnitsToString | ( | Units | units | ) | [private] |
Anchor mapviz_plugins::StringPlugin::anchor_ [private] |
Definition at line 120 of file string_plugin.h.
const char* mapviz_plugins::StringPlugin::ANCHOR_KEY [static, private] |
Definition at line 138 of file string_plugin.h.
QColor mapviz_plugins::StringPlugin::color_ [private] |
Definition at line 129 of file string_plugin.h.
const char* mapviz_plugins::StringPlugin::COLOR_KEY [static, private] |
Definition at line 139 of file string_plugin.h.
QWidget* mapviz_plugins::StringPlugin::config_widget_ [private] |
Definition at line 117 of file string_plugin.h.
QFont mapviz_plugins::StringPlugin::font_ [private] |
Definition at line 130 of file string_plugin.h.
const char* mapviz_plugins::StringPlugin::FONT_KEY [static, private] |
Definition at line 140 of file string_plugin.h.
bool mapviz_plugins::StringPlugin::has_message_ [private] |
Definition at line 126 of file string_plugin.h.
bool mapviz_plugins::StringPlugin::has_painted_ [private] |
Definition at line 127 of file string_plugin.h.
QStaticText mapviz_plugins::StringPlugin::message_ [private] |
Definition at line 131 of file string_plugin.h.
int mapviz_plugins::StringPlugin::offset_x_ [private] |
Definition at line 122 of file string_plugin.h.
const char* mapviz_plugins::StringPlugin::OFFSET_X_KEY [static, private] |
Definition at line 141 of file string_plugin.h.
int mapviz_plugins::StringPlugin::offset_y_ [private] |
Definition at line 123 of file string_plugin.h.
const char* mapviz_plugins::StringPlugin::OFFSET_Y_KEY [static, private] |
Definition at line 142 of file string_plugin.h.
Definition at line 125 of file string_plugin.h.
std::string mapviz_plugins::StringPlugin::topic_ [private] |
Definition at line 119 of file string_plugin.h.
const char* mapviz_plugins::StringPlugin::TOPIC_KEY [static, private] |
Definition at line 143 of file string_plugin.h.
Ui::string_config mapviz_plugins::StringPlugin::ui_ [private] |
Definition at line 116 of file string_plugin.h.
Units mapviz_plugins::StringPlugin::units_ [private] |
Definition at line 121 of file string_plugin.h.
const char* mapviz_plugins::StringPlugin::UNITS_KEY [static, private] |
Definition at line 144 of file string_plugin.h.