VR-Exchange 2.4 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
MAKVrExchange::DtInteractionViewComponent Class Reference

Responsible for the display of Interactions received from the Portal on the VR-Exchange GUI. More...

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

Public Types

enum  { TranslatorField = 0, PublisherField = 1, TimeReceivedField = 2, DescriptionField = 3 }
 These are the columns used to display portal Interactions. More...

Public Member Functions

 DtInteractionViewComponent (DtPortalConnection *pConn, QWidget *parent)
 CTOR.
virtual ~DtInteractionViewComponent ()
 Virtual DTOR.
virtual void clearInteractionList ()
 Removes all interactions from the interactions list.
virtual void resetStatistics ()
 resets statistical information
virtual void setMaxInteractionsToDisplay (int val)
 This will truncate the interaction list to val interactions for each interaction type.
virtual void processInteraction (const DtPortalInteraction &inter, const DtString &description)
 Update the display with this interaction and the description.
virtual void toggleShowInteractions (bool show)
 Turns on and off the display of interactions.
virtual const QTreeWidgettreeWidget () const
 Const accessor for the tree widget.
virtual QTreeWidgettreeWidget ()
 Accessor for the tree widget.

Static Public Member Functions

static DtInteractionViewComponentcreate (DtPortalConnection *pConn, QWidget *parent)
 Static creation method.

Protected Types

enum  { ClearInteractions = 1 }
typedef std::list
< QTreeWidgetItem * > 
QTreeWidgetItemList
typedef std::map
< DtPortalMessageKind, DtU32 > 
MessageKindToIntegerMap
typedef std::map
< DtPortalMessageKind,
QTreeWidgetItem * > 
MessageKindToListViewItemMap
typedef std::map
< DtPortalMessageKind,
QTreeWidgetItemList * > 
MessageKindToListViewItemListMap

Protected Slots

virtual void displayStatistics ()
 Updates the statistics display for each interaction type.

Protected Member Functions

virtual void resizeEvent (QResizeEvent *event)
 Processes resize events.
bool eventFilter (QObject *target, QEvent *event)
 Handles events registered with installEventFilter().
virtual void interactionHeaderRightButtonPressedCallback (const QPoint &point)
 Shows the interation view header's popup menu.
virtual void interactionRightButtonPressedCallback (const QPoint &point)
 Shows the interation view's popup menu.
virtual void truncateList (QTreeWidgetItemList *lst)
 cuts the interactions found in list to the maxInteraction count, lst is modified by the function and must be valid.
virtual QTreeWidgetItemfindQtGroupItem (const DtPortalInteraction &inter)
 Returns the QListViewGroup parent for this portalInteraction.
virtual QTreeWidgetItemListfindQtGroupList (const DtPortalInteraction &inter)
virtual QString headerLabel (const QHeaderView *header, int section)
 Qt Helper function to get the labels off a header.

Static Protected Member Functions

static void fireCb (const DtPortalFireInteraction &inter, void *userData)
static void genericCb (const DtPortalGenericInteraction &inter, void *userData)
static void detonationCb (const DtPortalDetonationInteraction &inter, void *userData)
static void acknowledgeCallback (const DtPortalAcknowledgeInteraction &interaction, void *userData)
static void collisionCallback (const DtPortalCollisionInteraction &interaction, void *userData)
static void commentCallback (const DtPortalCommentInteraction &interaction, void *userData)
static void eventReportCallback (const DtPortalEventReportInteraction &interaction, void *userData)
static void startCallback (const DtPortalStartInteraction &interaction, void *userData)
static void stopCallback (const DtPortalStopInteraction &interaction, void *userData)
static void radioSignalCallback (const DtPortalRadioSignalInteraction &interaction, void *userData)
static void dataCallback (const DtPortalDataInteraction &interaction, void *userData)
static void dataQueryCallback (const DtPortalDataQueryInteraction &interaction, void *userData)
static void setDataCallback (const DtPortalSetDataInteraction &interaction, void *userData)
static void createEntityCallback (const DtPortalCreateEntityInteraction &interaction, void *userData)
static void removeEntityCallback (const DtPortalRemoveEntityInteraction &interaction, void *userData)
static void actionRequestCallback (const DtPortalActionRequestInteraction &interaction, void *userData)
static void actionResponseCallback (const DtPortalActionResponseInteraction &interaction, void *userData)
static void viewControlCallback (const DtPortalViewControlInteraction &interaction, void *userData)
static void damageAssessmentCb (const DtPortalDamageAssessmentInteraction &inter, void *userData)

Protected Attributes

enum
MAKVrExchange::DtInteractionViewComponent:: { ... }  
InteractionPopupMenuPosition
MessageKindToListViewItemMap myListViewGroupMap
MessageKindToIntegerMap myInteractionCountMap
MessageKindToListViewItemListMap myListViewItemListMap
QTimer * myStatisticsTimer
int myMaxInteractionCount
bool myShowInteractionsFlag
DtTime myInitialTime
DtPortalConnectionmyPConn
QTreeWidgetmyTreeWidget
DtColumnSelectionContextMenumyHeaderPopupMenu
QMenumyInteractionPopupMenu
QAction * myExpandAllAction
QAction * myCollapseAllAction
std::vector< int > myListViewColumnSize

Private Member Functions

 DtInteractionViewComponent (const DtInteractionViewComponent &orig)
 Copy Ctor Not Implemented.
DtInteractionViewComponentoperator= (const DtInteractionViewComponent &orig)
 Assignment Operator Not Implemented.

Detailed Description

Responsible for the display of Interactions received from the Portal on the VR-Exchange GUI.

To display new interaction types this class needs to be subclassed.

Member Typedef Documentation

Member Enumeration Documentation

anonymous enum

These are the columns used to display portal Interactions.

Enumerator:
TranslatorField 
PublisherField 
TimeReceivedField 
DescriptionField 
anonymous enum
protected
Enumerator:
ClearInteractions 

Constructor & Destructor Documentation

MAKVrExchange::DtInteractionViewComponent::DtInteractionViewComponent ( DtPortalConnection pConn,
QWidget parent 
)

CTOR.

virtual MAKVrExchange::DtInteractionViewComponent::~DtInteractionViewComponent ( )
virtual

Virtual DTOR.

MAKVrExchange::DtInteractionViewComponent::DtInteractionViewComponent ( const DtInteractionViewComponent orig)
private

Copy Ctor Not Implemented.

Member Function Documentation

static void MAKVrExchange::DtInteractionViewComponent::acknowledgeCallback ( const DtPortalAcknowledgeInteraction interaction,
void *  userData 
)
staticprotected
static void MAKVrExchange::DtInteractionViewComponent::actionRequestCallback ( const DtPortalActionRequestInteraction interaction,
void *  userData 
)
staticprotected
static void MAKVrExchange::DtInteractionViewComponent::actionResponseCallback ( const DtPortalActionResponseInteraction interaction,
void *  userData 
)
staticprotected
virtual void MAKVrExchange::DtInteractionViewComponent::clearInteractionList ( )
virtual

Removes all interactions from the interactions list.

static void MAKVrExchange::DtInteractionViewComponent::collisionCallback ( const DtPortalCollisionInteraction interaction,
void *  userData 
)
staticprotected
static void MAKVrExchange::DtInteractionViewComponent::commentCallback ( const DtPortalCommentInteraction interaction,
void *  userData 
)
staticprotected
static DtInteractionViewComponent* MAKVrExchange::DtInteractionViewComponent::create ( DtPortalConnection pConn,
QWidget parent 
)
static

Static creation method.

Reimplemented in DtModInteractionViewComponent.

static void MAKVrExchange::DtInteractionViewComponent::createEntityCallback ( const DtPortalCreateEntityInteraction interaction,
void *  userData 
)
staticprotected
static void MAKVrExchange::DtInteractionViewComponent::damageAssessmentCb ( const DtPortalDamageAssessmentInteraction inter,
void *  userData 
)
staticprotected
static void MAKVrExchange::DtInteractionViewComponent::dataCallback ( const DtPortalDataInteraction interaction,
void *  userData 
)
staticprotected
static void MAKVrExchange::DtInteractionViewComponent::dataQueryCallback ( const DtPortalDataQueryInteraction interaction,
void *  userData 
)
staticprotected
static void MAKVrExchange::DtInteractionViewComponent::detonationCb ( const DtPortalDetonationInteraction inter,
void *  userData 
)
staticprotected
virtual void MAKVrExchange::DtInteractionViewComponent::displayStatistics ( )
protectedvirtualslot

Updates the statistics display for each interaction type.

This is called periodically by the statistics timer.

bool MAKVrExchange::DtInteractionViewComponent::eventFilter ( QObject target,
QEvent *  event 
)
protected

Handles events registered with installEventFilter().

If a QObject registers itself with installEventFilter() using an instantiation of this class; then this function will handle that event.

Parameters
[in]target
[in]event
Returns
true if the target's event was handled.
false otherwise
static void MAKVrExchange::DtInteractionViewComponent::eventReportCallback ( const DtPortalEventReportInteraction interaction,
void *  userData 
)
staticprotected
virtual QTreeWidgetItem* MAKVrExchange::DtInteractionViewComponent::findQtGroupItem ( const DtPortalInteraction inter)
protectedvirtual

Returns the QListViewGroup parent for this portalInteraction.

virtual QTreeWidgetItemList* MAKVrExchange::DtInteractionViewComponent::findQtGroupList ( const DtPortalInteraction inter)
protectedvirtual
static void MAKVrExchange::DtInteractionViewComponent::fireCb ( const DtPortalFireInteraction inter,
void *  userData 
)
staticprotected
static void MAKVrExchange::DtInteractionViewComponent::genericCb ( const DtPortalGenericInteraction inter,
void *  userData 
)
staticprotected
virtual QString MAKVrExchange::DtInteractionViewComponent::headerLabel ( const QHeaderView *  header,
int  section 
)
protectedvirtual

Qt Helper function to get the labels off a header.

virtual void MAKVrExchange::DtInteractionViewComponent::interactionHeaderRightButtonPressedCallback ( const QPoint &  point)
protectedvirtual

Shows the interation view header's popup menu.

virtual void MAKVrExchange::DtInteractionViewComponent::interactionRightButtonPressedCallback ( const QPoint &  point)
protectedvirtual

Shows the interation view's popup menu.

DtInteractionViewComponent& MAKVrExchange::DtInteractionViewComponent::operator= ( const DtInteractionViewComponent orig)
private

Assignment Operator Not Implemented.

virtual void MAKVrExchange::DtInteractionViewComponent::processInteraction ( const DtPortalInteraction inter,
const DtString description 
)
virtual

Update the display with this interaction and the description.

static void MAKVrExchange::DtInteractionViewComponent::radioSignalCallback ( const DtPortalRadioSignalInteraction interaction,
void *  userData 
)
staticprotected
static void MAKVrExchange::DtInteractionViewComponent::removeEntityCallback ( const DtPortalRemoveEntityInteraction interaction,
void *  userData 
)
staticprotected
virtual void MAKVrExchange::DtInteractionViewComponent::resetStatistics ( )
virtual

resets statistical information

virtual void MAKVrExchange::DtInteractionViewComponent::resizeEvent ( QResizeEvent *  event)
protectedvirtual

Processes resize events.

Overridden to restore resize capability. A fixed height is set when the widget is created (to set default size), this unsets it.

static void MAKVrExchange::DtInteractionViewComponent::setDataCallback ( const DtPortalSetDataInteraction interaction,
void *  userData 
)
staticprotected
virtual void MAKVrExchange::DtInteractionViewComponent::setMaxInteractionsToDisplay ( int  val)
virtual

This will truncate the interaction list to val interactions for each interaction type.

A Value of -1 means no truncation.

static void MAKVrExchange::DtInteractionViewComponent::startCallback ( const DtPortalStartInteraction interaction,
void *  userData 
)
staticprotected
static void MAKVrExchange::DtInteractionViewComponent::stopCallback ( const DtPortalStopInteraction interaction,
void *  userData 
)
staticprotected
virtual void MAKVrExchange::DtInteractionViewComponent::toggleShowInteractions ( bool  show)
virtual

Turns on and off the display of interactions.

virtual const QTreeWidget* MAKVrExchange::DtInteractionViewComponent::treeWidget ( ) const
virtual

Const accessor for the tree widget.

Used to back up column spacing.

virtual QTreeWidget* MAKVrExchange::DtInteractionViewComponent::treeWidget ( )
virtual

Accessor for the tree widget.

Used to restore column spacing.

virtual void MAKVrExchange::DtInteractionViewComponent::truncateList ( QTreeWidgetItemList lst)
protectedvirtual

cuts the interactions found in list to the maxInteraction count, lst is modified by the function and must be valid.

static void MAKVrExchange::DtInteractionViewComponent::viewControlCallback ( const DtPortalViewControlInteraction interaction,
void *  userData 
)
staticprotected

Member Data Documentation

enum { ... } MAKVrExchange::DtInteractionViewComponent::InteractionPopupMenuPosition
QAction* MAKVrExchange::DtInteractionViewComponent::myCollapseAllAction
protected
QAction* MAKVrExchange::DtInteractionViewComponent::myExpandAllAction
protected
DtColumnSelectionContextMenu* MAKVrExchange::DtInteractionViewComponent::myHeaderPopupMenu
protected
DtTime MAKVrExchange::DtInteractionViewComponent::myInitialTime
protected
MessageKindToIntegerMap MAKVrExchange::DtInteractionViewComponent::myInteractionCountMap
protected
QMenu* MAKVrExchange::DtInteractionViewComponent::myInteractionPopupMenu
protected
std::vector<int> MAKVrExchange::DtInteractionViewComponent::myListViewColumnSize
protected
MessageKindToListViewItemMap MAKVrExchange::DtInteractionViewComponent::myListViewGroupMap
protected
MessageKindToListViewItemListMap MAKVrExchange::DtInteractionViewComponent::myListViewItemListMap
protected
int MAKVrExchange::DtInteractionViewComponent::myMaxInteractionCount
protected
DtPortalConnection* MAKVrExchange::DtInteractionViewComponent::myPConn
protected
bool MAKVrExchange::DtInteractionViewComponent::myShowInteractionsFlag
protected
QTimer* MAKVrExchange::DtInteractionViewComponent::myStatisticsTimer
protected
QTreeWidget* MAKVrExchange::DtInteractionViewComponent::myTreeWidget
protected

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

Document ID: Generated on Thu Jul 23 10:25:22 EDT 2015 from SVN revision 155065
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)