TopicView Class Reference

Base class for widgets that display topic data. More...

#include <TopicView.hh>

Inherits QDialog.

Inherited by ImagesView, ImageView, LaserView, and TextView.

Public Member Functions

 TopicView (QWidget *_parent, const std::string &_msgType, const std::string &_viewType, unsigned int _displayPeriod=500)
 Constructor. More...
 
virtual ~TopicView ()
 Destructor. More...
 
virtual void SetTopic (const std::string &_topicName)
 Set the name of the topic to get data from. More...
 

Protected Member Functions

virtual void closeEvent (QCloseEvent *_event)
 Qt close event callback. More...
 
void OnMsg (const common::Time &_dataTime, int _size)
 Used by child class to indicate when a message has been received. More...
 

Protected Attributes

QFrame * frame
 This is the frame that each child class should populate. More...
 
std::string msgTypeName
 Typename of the messages that can be displayed. More...
 
transport::NodePtr node
 Pointer to the node for communication. More...
 
transport::SubscriberPtr sub
 Pointer to the topic subscriber that receives display data. More...
 

Detailed Description

Base class for widgets that display topic data.

Constructor & Destructor Documentation

§ TopicView()

TopicView ( QWidget *  _parent,
const std::string &  _msgType,
const std::string &  _viewType,
unsigned int  _displayPeriod = 500 
)

Constructor.

Parameters
[in]_parentParent QWidget.
[in]_msgTypeType of message that the viewer can display.
[in]_parentPointer to the parent widget.
[in]_viewTypeThe type of the viewer.
[in]_displayPeriodMilliseconds between display updates.

§ ~TopicView()

virtual ~TopicView ( )
virtual

Destructor.

Member Function Documentation

§ closeEvent()

virtual void closeEvent ( QCloseEvent *  _event)
protectedvirtual

Qt close event callback.

Parameters
[in]_eventThe close event info.

§ OnMsg()

void OnMsg ( const common::Time _dataTime,
int  _size 
)
protected

Used by child class to indicate when a message has been received.

Parameters
[in]_dataTimeTime the data was created. This time should be the timestamp when data was generated on the server.
[in]_sizeSize of the message in bytes.

§ SetTopic()

virtual void SetTopic ( const std::string &  _topicName)
virtual

Set the name of the topic to get data from.

Parameters
[in]_topicNameName of the topic to use.

Reimplemented in ImageView, LaserView, TextView, and ImagesView.

Member Data Documentation

§ frame

QFrame* frame
protected

This is the frame that each child class should populate.

§ msgTypeName

std::string msgTypeName
protected

Typename of the messages that can be displayed.

§ node

transport::NodePtr node
protected

Pointer to the node for communication.

§ sub

transport::SubscriberPtr sub
protected

Pointer to the topic subscriber that receives display data.


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