VR-Exchange 2.2 API Documentation
List of all members | Classes | Signals | Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
MAKVrExchange::DtStatisticsViewComponent Class Reference

A view component which plots broker statistics. More...

Inheritance diagram for MAKVrExchange::DtStatisticsViewComponent:
Inheritance graph
[legend]

Classes

struct  BrokerInfoStruct
 Stores general information about a broker's plotted series. More...

Signals

void legendVisibilityChanged (bool show)

Public Member Functions

 DtStatisticsViewComponent (DtPortalConnection *pconn, QWidget *parent)
 The CTOR.
virtual ~DtStatisticsViewComponent ()
 The DTOR.
virtual void setInitializer (DtPortalAppInitializer *originalInit)
 Sets the initializers used to store portal settings.
virtual void toggleShowStatistics (bool show)
 Turns on and off the display of interactions.
virtual void toggleLegend (bool show)
 Shows or hides the plot's legend.

Protected Types

typedef std::map< DtString,
unsigned int > 
FieldIdMap
 Maps a field name to its series id.
typedef std::map< DtU32,
FieldIdMap
BrokerFieldIdMap
typedef std::map< unsigned int,
DtU32 > 
FieldBrokerMap
typedef std::map< DtU32,
BrokerInfoStruct
BrokerInfoMap

Protected Slots

virtual void tick ()
 Scrolls the plot and times out expired series.
virtual void toggleLegend ()
 Toggles the visibility of the plot's legend.
virtual void onContextMenuRequested (const QPoint &where)
 Receives notification that the user right-clicked on the plot.
virtual void onSeriesToggled (const DtString &brokerName, const DtString &fieldName, bool enabled)
 Turns the series on and scrolls the plot to avoid jumping.
virtual void onSeriesStyleChanged (const DtString &brokerName, const DtString &fieldName, unsigned int style)
 Updates the series to use the given style.
virtual void onSeriesColorChanged (const DtString &brokerName, const DtString &fieldName, int r, int g, int b)
 Updates the series to use the given color.
virtual void onLegendDialogClosed ()
 Receives notification that the legend dialog was closed manually.

Protected Member Functions

void initView ()
 Create the view.
void connectToSignals ()
 Connect to event signals from widgets.
void initializeColors ()
 Initializes the colors from the initializers.
virtual void receivePortalMessage (const DtPortalMessage &msg)
 Process an incoming generic portal message (update the plot).
virtual void initPortalMessageFields ()
 Initializes the units and tooltips for the portal message fields.
virtual void plotPortalMessageCounts ()
 Constructs a report on the portal messages and processes it.
virtual void processBrokerRemoval (const DtString &broker)
 Removes the broker section for the given broker from the legend.
virtual void receiveStatisticsReport (const DtStatisticsReportMessage &message)
 Process an incoming statistics report message (update the plot).
virtual DtU32 getSeriesId (DtU32 brokerId, const DtString &fieldName)
 Look up the series ID for the given broker field.
virtual bool lookupSeriesBrokerField (unsigned int seriesId, DtString &brokerName, DtString &fieldName)
 Look up the broker and field names for the given series.
virtual void saveSeriesRecord (const DtSeriesColorRecord &rec)
 Saves the record to the portal's initializers and saves to file.
virtual void getSeriesRecord (const DtString &brokername, const DtString &fieldname, DtSeriesColorRecord &rec)
 Get the pen for the series or create a new one.

Static Protected Member Functions

static void portalMessageCb (const DtPortalMessage &msg, void *usr)
 Static callback for incoming generic portal messages.
static void abnormalRemovalCb (const DtAbnormalBrokerExitMessage &msg, void *usr)
 Receives notification that a broker is dying abnormally.
static void removeBrokerCb (const DtBrokerExitingMessage &msg, void *usr)
 Receives notification that a broker is shutting down.
static void statisticsReportCb (const DtStatisticsReportMessage &msg, void *usr)
 Static callback for incoming statistics report messages.

Protected Attributes

BrokerFieldIdMap myBrokerFieldIdMap
FieldBrokerMap myFieldBrokerMap
BrokerInfoMap myBrokerInfoMap
DtPlotColorSettingsmyPlotColorSettings
DtPortalAppInitializermyInitializer
QWidgetmyParent
float myNextHue
int myNextStyle
float myHueInterval
DtU32 myNextSeriesId
unsigned int myPortalObjectCount
unsigned int myPortalInteractionCount
unsigned int myPortalControlMessageCount
unsigned int myPortalOtherMessageCount
DtTime myLastMessageReportTime
DtTime myVisibleTimeRange
DtPortalConnectionmyPConn
DtPlotterLegendDialogmyLegendDialog
DtFrameratePlotmyFpsPlot
QPushButton * myLegendButton
QMenumyLegendContextMenu
QTimer * myTimer

Private Member Functions

 DtStatisticsViewComponent (DtStatisticsViewComponent &other)
 Copy CTOR not Implemented – do not copy.
DtStatisticsViewComponentoperator= (DtStatisticsViewComponent &other)
 Assignment Operator not Implemented – do not copy.

Detailed Description

A view component which plots broker statistics.

Member Typedef Documentation

Maps a field name to its series id.

Note: Field names are shared among brokers, this map is only valid for use with one broker id.

typedef std::map<unsigned int,DtU32> MAKVrExchange::DtStatisticsViewComponent::FieldBrokerMap
protected

Constructor & Destructor Documentation

MAKVrExchange::DtStatisticsViewComponent::DtStatisticsViewComponent ( DtPortalConnection pconn,
QWidget parent 
)

The CTOR.

virtual MAKVrExchange::DtStatisticsViewComponent::~DtStatisticsViewComponent ( )
virtual

The DTOR.

MAKVrExchange::DtStatisticsViewComponent::DtStatisticsViewComponent ( DtStatisticsViewComponent other)
private

Copy CTOR not Implemented – do not copy.

Member Function Documentation

virtual void MAKVrExchange::DtStatisticsViewComponent::setInitializer ( DtPortalAppInitializer originalInit)
virtual

Sets the initializers used to store portal settings.

Calls DtStatisticsViewComponent::initPortalMessageFields()

virtual void MAKVrExchange::DtStatisticsViewComponent::toggleShowStatistics ( bool  show)
virtual

Turns on and off the display of interactions.

virtual void MAKVrExchange::DtStatisticsViewComponent::toggleLegend ( bool  show)
virtual

Shows or hides the plot's legend.

Does not destroy and recreate the legend dialog every time.

void MAKVrExchange::DtStatisticsViewComponent::legendVisibilityChanged ( bool  show)
signal
void MAKVrExchange::DtStatisticsViewComponent::initView ( )
protected

Create the view.

Non-virtual - Called from CTOR.

void MAKVrExchange::DtStatisticsViewComponent::connectToSignals ( )
protected

Connect to event signals from widgets.

Non-virtual - Called from CTOR.

void MAKVrExchange::DtStatisticsViewComponent::initializeColors ( )
protected

Initializes the colors from the initializers.

Non-virtual - Called from CTOR.

static void MAKVrExchange::DtStatisticsViewComponent::portalMessageCb ( const DtPortalMessage msg,
void *  usr 
)
staticprotected

Static callback for incoming generic portal messages.

Calls DtStatisticsViewComponent::receivePortalMessage( const DtPortalMessage& ).

virtual void MAKVrExchange::DtStatisticsViewComponent::receivePortalMessage ( const DtPortalMessage msg)
protectedvirtual

Process an incoming generic portal message (update the plot).

virtual void MAKVrExchange::DtStatisticsViewComponent::initPortalMessageFields ( )
protectedvirtual

Initializes the units and tooltips for the portal message fields.

Called upon initializer initialization.

virtual void MAKVrExchange::DtStatisticsViewComponent::plotPortalMessageCounts ( )
protectedvirtual

Constructs a report on the portal messages and processes it.

Calls DtStatisticsViewComponent::receiveStatisticsReport( const DtStatisticsReportMessage& ).

static void MAKVrExchange::DtStatisticsViewComponent::abnormalRemovalCb ( const DtAbnormalBrokerExitMessage msg,
void *  usr 
)
staticprotected

Receives notification that a broker is dying abnormally.

Removes the broker section from the legend dialog.

static void MAKVrExchange::DtStatisticsViewComponent::removeBrokerCb ( const DtBrokerExitingMessage msg,
void *  usr 
)
staticprotected

Receives notification that a broker is shutting down.

Removes the broker section from the legend dialog.

virtual void MAKVrExchange::DtStatisticsViewComponent::processBrokerRemoval ( const DtString broker)
protectedvirtual

Removes the broker section for the given broker from the legend.

static void MAKVrExchange::DtStatisticsViewComponent::statisticsReportCb ( const DtStatisticsReportMessage msg,
void *  usr 
)
staticprotected

Static callback for incoming statistics report messages.

Calls DtStatisticsViewComponent::receiveStatisticsReport( const DtStatisticsReportMessage& ).

virtual void MAKVrExchange::DtStatisticsViewComponent::receiveStatisticsReport ( const DtStatisticsReportMessage message)
protectedvirtual

Process an incoming statistics report message (update the plot).

virtual DtU32 MAKVrExchange::DtStatisticsViewComponent::getSeriesId ( DtU32  brokerId,
const DtString fieldName 
)
protectedvirtual

Look up the series ID for the given broker field.

virtual bool MAKVrExchange::DtStatisticsViewComponent::lookupSeriesBrokerField ( unsigned int  seriesId,
DtString brokerName,
DtString fieldName 
)
protectedvirtual

Look up the broker and field names for the given series.

virtual void MAKVrExchange::DtStatisticsViewComponent::saveSeriesRecord ( const DtSeriesColorRecord rec)
protectedvirtual

Saves the record to the portal's initializers and saves to file.

If initializers weren't set using setIntializers(..), do nothing.

virtual void MAKVrExchange::DtStatisticsViewComponent::getSeriesRecord ( const DtString brokername,
const DtString fieldname,
DtSeriesColorRecord rec 
)
protectedvirtual

Get the pen for the series or create a new one.

virtual void MAKVrExchange::DtStatisticsViewComponent::tick ( )
protectedvirtualslot

Scrolls the plot and times out expired series.

virtual void MAKVrExchange::DtStatisticsViewComponent::toggleLegend ( )
protectedvirtualslot

Toggles the visibility of the plot's legend.

Does not destroy and recreate the legend dialog every time.

virtual void MAKVrExchange::DtStatisticsViewComponent::onContextMenuRequested ( const QPoint &  where)
protectedvirtualslot

Receives notification that the user right-clicked on the plot.

virtual void MAKVrExchange::DtStatisticsViewComponent::onSeriesToggled ( const DtString brokerName,
const DtString fieldName,
bool  enabled 
)
protectedvirtualslot

Turns the series on and scrolls the plot to avoid jumping.

virtual void MAKVrExchange::DtStatisticsViewComponent::onSeriesStyleChanged ( const DtString brokerName,
const DtString fieldName,
unsigned int  style 
)
protectedvirtualslot

Updates the series to use the given style.

virtual void MAKVrExchange::DtStatisticsViewComponent::onSeriesColorChanged ( const DtString brokerName,
const DtString fieldName,
int  r,
int  g,
int  b 
)
protectedvirtualslot

Updates the series to use the given color.

virtual void MAKVrExchange::DtStatisticsViewComponent::onLegendDialogClosed ( )
protectedvirtualslot

Receives notification that the legend dialog was closed manually.

Signals to listening widgets that the legend state changed.

DtStatisticsViewComponent& MAKVrExchange::DtStatisticsViewComponent::operator= ( DtStatisticsViewComponent other)
private

Assignment Operator not Implemented – do not copy.

Member Data Documentation

BrokerFieldIdMap MAKVrExchange::DtStatisticsViewComponent::myBrokerFieldIdMap
protected
FieldBrokerMap MAKVrExchange::DtStatisticsViewComponent::myFieldBrokerMap
protected
BrokerInfoMap MAKVrExchange::DtStatisticsViewComponent::myBrokerInfoMap
protected
DtPlotColorSettings* MAKVrExchange::DtStatisticsViewComponent::myPlotColorSettings
protected
DtPortalAppInitializer* MAKVrExchange::DtStatisticsViewComponent::myInitializer
protected
QWidget* MAKVrExchange::DtStatisticsViewComponent::myParent
protected
float MAKVrExchange::DtStatisticsViewComponent::myNextHue
protected
int MAKVrExchange::DtStatisticsViewComponent::myNextStyle
protected
float MAKVrExchange::DtStatisticsViewComponent::myHueInterval
protected
DtU32 MAKVrExchange::DtStatisticsViewComponent::myNextSeriesId
protected
unsigned int MAKVrExchange::DtStatisticsViewComponent::myPortalObjectCount
protected
unsigned int MAKVrExchange::DtStatisticsViewComponent::myPortalInteractionCount
protected
unsigned int MAKVrExchange::DtStatisticsViewComponent::myPortalControlMessageCount
protected
unsigned int MAKVrExchange::DtStatisticsViewComponent::myPortalOtherMessageCount
protected
DtTime MAKVrExchange::DtStatisticsViewComponent::myLastMessageReportTime
protected
DtTime MAKVrExchange::DtStatisticsViewComponent::myVisibleTimeRange
protected
DtPortalConnection* MAKVrExchange::DtStatisticsViewComponent::myPConn
protected
DtPlotterLegendDialog* MAKVrExchange::DtStatisticsViewComponent::myLegendDialog
protected
DtFrameratePlot* MAKVrExchange::DtStatisticsViewComponent::myFpsPlot
protected
QPushButton* MAKVrExchange::DtStatisticsViewComponent::myLegendButton
protected
QMenu* MAKVrExchange::DtStatisticsViewComponent::myLegendContextMenu
protected
QTimer* MAKVrExchange::DtStatisticsViewComponent::myTimer
protected

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

Document ID: Generated on Mon Apr 15 17:15:50 EDT 2013 from SVN revision 126154
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)