Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mapviz::MapCanvas Class Reference

#include <map_canvas.h>

Inheritance diagram for mapviz::MapCanvas:
Inheritance graph
[legend]

Public Slots

void setFrameRate (const double fps)
 

Signals

void Hover (double x, double y, double scale)
 

Public Member Functions

void AddPlugin (MapvizPluginPtr plugin, int order)
 
void CaptureFrame (bool force=false)
 
void CaptureFrames (bool enabled)
 
bool CopyCaptureBuffer (uchar *buffer)
 
bool CopyCaptureBuffer (std::vector< uint8_t > &buffer)
 
QPointF FixedFrameToMapGlCoord (const QPointF &point)
 
double frameRate () const
 
void InitializeTf (boost::shared_ptr< tf::TransformListener > tf)
 
void leaveEvent (QEvent *e)
 
 MapCanvas (QWidget *parent=0)
 
QPointF MapGlCoordToFixedFrame (const QPointF &point)
 
float OffsetX () const
 
float OffsetY () const
 
void RemovePlugin (MapvizPluginPtr plugin)
 
void ReorderDisplays ()
 
void ResetLocation ()
 
void SetBackground (const QColor &color)
 
void setCanvasAbleToMove (bool assigning)
 
void SetFixedFrame (const std::string &frame)
 
void SetOffsetX (float x)
 
void SetOffsetY (float y)
 
void SetTargetFrame (const std::string &frame)
 
void SetViewScale (float scale)
 
void ToggleEnableAntialiasing (bool on)
 
void ToggleFixOrientation (bool on)
 
void ToggleRotate90 (bool on)
 
void ToggleUseLatestTransforms (bool on)
 
void UpdateView ()
 
float ViewScale () const
 
 ~MapCanvas ()
 

Protected Member Functions

void initGlBlending ()
 
void initializeGL ()
 
void InitializePixelBuffers ()
 
void keyPressEvent (QKeyEvent *e)
 
void mouseMoveEvent (QMouseEvent *e)
 
void mousePressEvent (QMouseEvent *e)
 
void mouseReleaseEvent (QMouseEvent *e)
 
void paintEvent (QPaintEvent *event)
 
void popGlMatrices ()
 
void pushGlMatrices ()
 
void Recenter ()
 
void resizeGL (int w, int h)
 
void TransformTarget (QPainter *painter)
 
void wheelEvent (QWheelEvent *e)
 
void Zoom (float factor)
 

Protected Attributes

QColor bg_color_
 
bool canvas_able_to_move_ = true
 
std::vector< uint8_t > capture_buffer_
 
bool capture_frames_
 
double drag_x_
 
double drag_y_
 
bool enable_antialiasing_
 
bool fix_orientation_
 
std::string fixed_frame_
 
QTimer frame_rate_timer_
 
bool has_pixel_buffers_
 
bool initialized_
 
Qt::MouseButton mouse_button_
 
int mouse_hover_x_
 
int mouse_hover_y_
 
bool mouse_hovering_
 
bool mouse_pressed_
 
int mouse_previous_y_
 
int mouse_x_
 
int mouse_y_
 
double offset_x_
 
double offset_y_
 
GLuint pixel_buffer_ids_ [2]
 
int32_t pixel_buffer_index_
 
int32_t pixel_buffer_size_
 
std::list< MapvizPluginPtrplugins_
 
QTransform qtransform_
 
bool rotate_90_
 
float scene_bottom_
 
float scene_left_
 
float scene_right_
 
float scene_top_
 
std::string target_frame_
 
boost::shared_ptr< tf::TransformListenertf_
 
tf::StampedTransform transform_
 
float view_bottom_
 
float view_center_x_
 
float view_center_y_
 
float view_left_
 
float view_right_
 
float view_scale_
 
float view_top_
 

Detailed Description

Definition at line 57 of file map_canvas.h.

Constructor & Destructor Documentation

◆ MapCanvas()

mapviz::MapCanvas::MapCanvas ( QWidget *  parent = 0)
explicit

Definition at line 50 of file map_canvas.cpp.

◆ ~MapCanvas()

mapviz::MapCanvas::~MapCanvas ( )

Definition at line 95 of file map_canvas.cpp.

Member Function Documentation

◆ AddPlugin()

void mapviz::MapCanvas::AddPlugin ( MapvizPluginPtr  plugin,
int  order 
)

Definition at line 460 of file map_canvas.cpp.

◆ CaptureFrame()

void mapviz::MapCanvas::CaptureFrame ( bool  force = false)

Definition at line 183 of file map_canvas.cpp.

◆ CaptureFrames()

void mapviz::MapCanvas::CaptureFrames ( bool  enabled)
inline

Definition at line 119 of file map_canvas.h.

◆ CopyCaptureBuffer() [1/2]

bool mapviz::MapCanvas::CopyCaptureBuffer ( uchar *  buffer)
inline

Copies the current capture buffer into the target buffer. The target buffer must already be initialized to a size of: height * width * 4

Parameters
bufferAn initialize buffer to copy data into
Returns
false if the current capture buffer is empty

Definition at line 132 of file map_canvas.h.

◆ CopyCaptureBuffer() [2/2]

bool mapviz::MapCanvas::CopyCaptureBuffer ( std::vector< uint8_t > &  buffer)
inline

Resizes a vector to be large enough to hold the current capture buffer and then copies the capture buffer into it.

Parameters
bufferA vector to copy the capture buffer into.
Returns
false if the current capture buffer is empty

Definition at line 149 of file map_canvas.h.

◆ FixedFrameToMapGlCoord()

QPointF mapviz::MapCanvas::FixedFrameToMapGlCoord ( const QPointF &  point)

Definition at line 346 of file map_canvas.cpp.

◆ frameRate()

double mapviz::MapCanvas::frameRate ( ) const

Definition at line 615 of file map_canvas.cpp.

◆ Hover

void mapviz::MapCanvas::Hover ( double  x,
double  y,
double  scale 
)
signal

◆ initGlBlending()

void mapviz::MapCanvas::initGlBlending ( )
protected

Definition at line 170 of file map_canvas.cpp.

◆ initializeGL()

void mapviz::MapCanvas::initializeGL ( )
protected

Definition at line 133 of file map_canvas.cpp.

◆ InitializePixelBuffers()

void mapviz::MapCanvas::InitializePixelBuffers ( )
protected

Definition at line 108 of file map_canvas.cpp.

◆ InitializeTf()

void mapviz::MapCanvas::InitializeTf ( boost::shared_ptr< tf::TransformListener tf)

Definition at line 103 of file map_canvas.cpp.

◆ keyPressEvent()

void mapviz::MapCanvas::keyPressEvent ( QKeyEvent *  e)
protected

Definition at line 331 of file map_canvas.cpp.

◆ leaveEvent()

void mapviz::MapCanvas::leaveEvent ( QEvent *  e)

Definition at line 405 of file map_canvas.cpp.

◆ MapGlCoordToFixedFrame()

QPointF mapviz::MapCanvas::MapGlCoordToFixedFrame ( const QPointF &  point)

Definition at line 340 of file map_canvas.cpp.

◆ mouseMoveEvent()

void mapviz::MapCanvas::mouseMoveEvent ( QMouseEvent *  e)
protected

Definition at line 361 of file map_canvas.cpp.

◆ mousePressEvent()

void mapviz::MapCanvas::mousePressEvent ( QMouseEvent *  e)
protected

Definition at line 320 of file map_canvas.cpp.

◆ mouseReleaseEvent()

void mapviz::MapCanvas::mouseReleaseEvent ( QMouseEvent *  e)
protected

Definition at line 351 of file map_canvas.cpp.

◆ OffsetX()

float mapviz::MapCanvas::OffsetX ( ) const
inline

Definition at line 84 of file map_canvas.h.

◆ OffsetY()

float mapviz::MapCanvas::OffsetY ( ) const
inline

Definition at line 85 of file map_canvas.h.

◆ paintEvent()

void mapviz::MapCanvas::paintEvent ( QPaintEvent *  event)
protected

Definition at line 219 of file map_canvas.cpp.

◆ popGlMatrices()

void mapviz::MapCanvas::popGlMatrices ( )
protected

Definition at line 296 of file map_canvas.cpp.

◆ pushGlMatrices()

void mapviz::MapCanvas::pushGlMatrices ( )
protected

Definition at line 285 of file map_canvas.cpp.

◆ Recenter()

void mapviz::MapCanvas::Recenter ( )
protected

Definition at line 596 of file map_canvas.cpp.

◆ RemovePlugin()

void mapviz::MapCanvas::RemovePlugin ( MapvizPluginPtr  plugin)

Definition at line 465 of file map_canvas.cpp.

◆ ReorderDisplays()

void mapviz::MapCanvas::ReorderDisplays ( )

Definition at line 591 of file map_canvas.cpp.

◆ ResetLocation()

void mapviz::MapCanvas::ResetLocation ( )

Definition at line 585 of file map_canvas.cpp.

◆ resizeGL()

void mapviz::MapCanvas::resizeGL ( int  w,
int  h 
)
protected

Definition at line 178 of file map_canvas.cpp.

◆ SetBackground()

void mapviz::MapCanvas::SetBackground ( const QColor &  color)
inline

Definition at line 113 of file map_canvas.h.

◆ setCanvasAbleToMove()

void mapviz::MapCanvas::setCanvasAbleToMove ( bool  assigning)
inline

Definition at line 88 of file map_canvas.h.

◆ SetFixedFrame()

void mapviz::MapCanvas::SetFixedFrame ( const std::string &  frame)

Definition at line 411 of file map_canvas.cpp.

◆ setFrameRate

void mapviz::MapCanvas::setFrameRate ( const double  fps)
slot

Definition at line 605 of file map_canvas.cpp.

◆ SetOffsetX()

void mapviz::MapCanvas::SetOffsetX ( float  x)
inline

Definition at line 101 of file map_canvas.h.

◆ SetOffsetY()

void mapviz::MapCanvas::SetOffsetY ( float  y)
inline

Definition at line 107 of file map_canvas.h.

◆ SetTargetFrame()

void mapviz::MapCanvas::SetTargetFrame ( const std::string &  frame)

Definition at line 421 of file map_canvas.cpp.

◆ SetViewScale()

void mapviz::MapCanvas::SetViewScale ( float  scale)
inline

Definition at line 95 of file map_canvas.h.

◆ ToggleEnableAntialiasing()

void mapviz::MapCanvas::ToggleEnableAntialiasing ( bool  on)

Definition at line 441 of file map_canvas.cpp.

◆ ToggleFixOrientation()

void mapviz::MapCanvas::ToggleFixOrientation ( bool  on)

Definition at line 431 of file map_canvas.cpp.

◆ ToggleRotate90()

void mapviz::MapCanvas::ToggleRotate90 ( bool  on)

Definition at line 436 of file map_canvas.cpp.

◆ ToggleUseLatestTransforms()

void mapviz::MapCanvas::ToggleUseLatestTransforms ( bool  on)

Definition at line 451 of file map_canvas.cpp.

◆ TransformTarget()

void mapviz::MapCanvas::TransformTarget ( QPainter *  painter)
protected

Definition at line 473 of file map_canvas.cpp.

◆ UpdateView()

void mapviz::MapCanvas::UpdateView ( )

Definition at line 569 of file map_canvas.cpp.

◆ ViewScale()

float mapviz::MapCanvas::ViewScale ( ) const
inline

Definition at line 83 of file map_canvas.h.

◆ wheelEvent()

void mapviz::MapCanvas::wheelEvent ( QWheelEvent *  e)
protected

Definition at line 307 of file map_canvas.cpp.

◆ Zoom()

void mapviz::MapCanvas::Zoom ( float  factor)
protected

Definition at line 314 of file map_canvas.cpp.

Member Data Documentation

◆ bg_color_

QColor mapviz::MapCanvas::bg_color_
protected

Definition at line 204 of file map_canvas.h.

◆ canvas_able_to_move_

bool mapviz::MapCanvas::canvas_able_to_move_ = true
protected

Definition at line 190 of file map_canvas.h.

◆ capture_buffer_

std::vector<uint8_t> mapviz::MapCanvas::capture_buffer_
protected

Definition at line 252 of file map_canvas.h.

◆ capture_frames_

bool mapviz::MapCanvas::capture_frames_
protected

Definition at line 195 of file map_canvas.h.

◆ drag_x_

double mapviz::MapCanvas::drag_x_
protected

Definition at line 222 of file map_canvas.h.

◆ drag_y_

double mapviz::MapCanvas::drag_y_
protected

Definition at line 223 of file map_canvas.h.

◆ enable_antialiasing_

bool mapviz::MapCanvas::enable_antialiasing_
protected

Definition at line 200 of file map_canvas.h.

◆ fix_orientation_

bool mapviz::MapCanvas::fix_orientation_
protected

Definition at line 198 of file map_canvas.h.

◆ fixed_frame_

std::string mapviz::MapCanvas::fixed_frame_
protected

Definition at line 244 of file map_canvas.h.

◆ frame_rate_timer_

QTimer mapviz::MapCanvas::frame_rate_timer_
protected

Definition at line 202 of file map_canvas.h.

◆ has_pixel_buffers_

bool mapviz::MapCanvas::has_pixel_buffers_
protected

Definition at line 191 of file map_canvas.h.

◆ initialized_

bool mapviz::MapCanvas::initialized_
protected

Definition at line 197 of file map_canvas.h.

◆ mouse_button_

Qt::MouseButton mapviz::MapCanvas::mouse_button_
protected

Definition at line 206 of file map_canvas.h.

◆ mouse_hover_x_

int mapviz::MapCanvas::mouse_hover_x_
protected

Definition at line 214 of file map_canvas.h.

◆ mouse_hover_y_

int mapviz::MapCanvas::mouse_hover_y_
protected

Definition at line 215 of file map_canvas.h.

◆ mouse_hovering_

bool mapviz::MapCanvas::mouse_hovering_
protected

Definition at line 213 of file map_canvas.h.

◆ mouse_pressed_

bool mapviz::MapCanvas::mouse_pressed_
protected

Definition at line 207 of file map_canvas.h.

◆ mouse_previous_y_

int mapviz::MapCanvas::mouse_previous_y_
protected

Definition at line 211 of file map_canvas.h.

◆ mouse_x_

int mapviz::MapCanvas::mouse_x_
protected

Definition at line 208 of file map_canvas.h.

◆ mouse_y_

int mapviz::MapCanvas::mouse_y_
protected

Definition at line 209 of file map_canvas.h.

◆ offset_x_

double mapviz::MapCanvas::offset_x_
protected

Definition at line 218 of file map_canvas.h.

◆ offset_y_

double mapviz::MapCanvas::offset_y_
protected

Definition at line 219 of file map_canvas.h.

◆ pixel_buffer_ids_

GLuint mapviz::MapCanvas::pixel_buffer_ids_[2]
protected

Definition at line 193 of file map_canvas.h.

◆ pixel_buffer_index_

int32_t mapviz::MapCanvas::pixel_buffer_index_
protected

Definition at line 194 of file map_canvas.h.

◆ pixel_buffer_size_

int32_t mapviz::MapCanvas::pixel_buffer_size_
protected

Definition at line 192 of file map_canvas.h.

◆ plugins_

std::list<MapvizPluginPtr> mapviz::MapCanvas::plugins_
protected

Definition at line 250 of file map_canvas.h.

◆ qtransform_

QTransform mapviz::MapCanvas::qtransform_
protected

Definition at line 249 of file map_canvas.h.

◆ rotate_90_

bool mapviz::MapCanvas::rotate_90_
protected

Definition at line 199 of file map_canvas.h.

◆ scene_bottom_

float mapviz::MapCanvas::scene_bottom_
protected

Definition at line 242 of file map_canvas.h.

◆ scene_left_

float mapviz::MapCanvas::scene_left_
protected

Definition at line 239 of file map_canvas.h.

◆ scene_right_

float mapviz::MapCanvas::scene_right_
protected

Definition at line 240 of file map_canvas.h.

◆ scene_top_

float mapviz::MapCanvas::scene_top_
protected

Definition at line 241 of file map_canvas.h.

◆ target_frame_

std::string mapviz::MapCanvas::target_frame_
protected

Definition at line 245 of file map_canvas.h.

◆ tf_

boost::shared_ptr<tf::TransformListener> mapviz::MapCanvas::tf_
protected

Definition at line 247 of file map_canvas.h.

◆ transform_

tf::StampedTransform mapviz::MapCanvas::transform_
protected

Definition at line 248 of file map_canvas.h.

◆ view_bottom_

float mapviz::MapCanvas::view_bottom_
protected

Definition at line 236 of file map_canvas.h.

◆ view_center_x_

float mapviz::MapCanvas::view_center_x_
protected

Definition at line 226 of file map_canvas.h.

◆ view_center_y_

float mapviz::MapCanvas::view_center_y_
protected

Definition at line 227 of file map_canvas.h.

◆ view_left_

float mapviz::MapCanvas::view_left_
protected

Definition at line 233 of file map_canvas.h.

◆ view_right_

float mapviz::MapCanvas::view_right_
protected

Definition at line 234 of file map_canvas.h.

◆ view_scale_

float mapviz::MapCanvas::view_scale_
protected

Definition at line 230 of file map_canvas.h.

◆ view_top_

float mapviz::MapCanvas::view_top_
protected

Definition at line 235 of file map_canvas.h.


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


mapviz
Author(s): Marc Alban
autogenerated on Fri Dec 16 2022 03:59:30