MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Slots | Signals | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
DtFomTreeAndTableWidget Class Reference

Shows detailed statistics, presented as both trees and running graphs which can be populated from the tree data. More...

+ Inheritance diagram for DtFomTreeAndTableWidget:
+ Collaboration diagram for DtFomTreeAndTableWidget:

Public Types

enum  DtRowNameLoc { DtRowNameIsHeader, DtRowNameIsFirstColumn, DtNoRowNames }
 
typedef std::pair< unsigned,
QModelIndex > 
DtTreeAndModelIndex
 Type which pairs the tree index and QModelIndex to uniquely identify an index across all trees in the widget. More...
 

Public Slots

void processItemSelection (const QModelIndex &index)
 Processes item selection by enabling/disabling buttons and menu actions for the newly selected item. More...
 
void processItemSelectionChange ()
 Process item selection change. More...
 
void processCurrentChanged (const QModelIndex &, const QModelIndex &)
 Process current selection change. More...
 
void updateSortingEnable ()
 Checks whether the trees should have sorting enabled or disabled. More...
 

Signals

void treeItemSelected (const QModelIndex &index)
 

Public Member Functions

 DtFomTreeAndTableWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 Constructor. More...
 
virtual ~DtFomTreeAndTableWidget ()
 Destructor. More...
 
virtual QSize sizeHint () const
 Returns the recommended size for the widget. More...
 
unsigned addTree (const QString &name, QAbstractItemModel *model, DtRowNameLoc rowNameLoc, bool decorateRoot, bool hideHeader, bool alternateRowColor)
 Adds a new tree, must be called prior to initComplete. More...
 
void addTreeAndTable (const QString &treeName, QAbstractItemModel *treeModel, DtRowNameLoc treeRowNameLoc, const QString &TableName, QAbstractItemModel *tableModel, DtRowNameLoc tableRowNameLoc)
 
void initComplete ()
 Initializes the widget, adding trees with each of the given names. More...
 
void saveGuiConfiguration (QFile &configFile)
 Saves the GUI configuration to the given file. More...
 
void loadGuiConfiguration (QFile &configFile)
 Loads the GUI configuration from the given file. More...
 
void setFederateId (const QString &federateId)
 Sets the federate identification text. More...
 
void updateTreeLabel (const QString &name)
 
const QModelIndex getCurrentSelection () const
 
void expandTree () const
 
void collapseItem (QStandardItem *item)
 
void setSelectionBehaviorRow ()
 
void refresh () const
 

Protected Types

enum  TableFileFormat { TextTableFormat, CsvTableFormat }
 

Protected Member Functions

void initTrees ()
 Initializes all added trees. More...
 
void connectSignals ()
 Connects our signals and slots. More...
 
void getRowAndColNames (DtTreeAndModelIndex modelIndex, QString &rowName, QString &colName)
 Retrieves the names of the row and column for a given model index. More...
 
void writeTreeToStream (const QTreeView *tree, QTextStream &fileStrm, TableFileFormat format)
 Writes the given tree's data as a table to the given file stream. More...
 

Protected Attributes

QSplitter * mySplitter
 Main layout. More...
 
std::vector< QVBoxLayout * > myTreeLayouts
 Layouts for each tree. More...
 
std::vector< QLabel * > myTreeLabels
 Labels for each tree. More...
 
std::vector< QHBoxLayout * > myTreeLabelLayouts
 Layouts for each tree label. More...
 
std::vector< QTreeView * > myTreeViews
 The tree view for each tree. More...
 
unsigned int myTreeIndex
 
unsigned int myTableIndex
 
std::vector< DtRowNameLocmyTreeRowNameLocs
 The row name location for the tree. More...
 
std::vector< std::map
< unsigned, QString > > 
myTreeValGraphableCols
 The columns for which the value can be graphed and the units to be displayed on the y axis. More...
 
std::vector< std::map
< unsigned, QString > > 
myTreeRateGraphableCols
 The columns for which the rate can be graphed and the units to be displayed on the y axis. More...
 
DtTreeAndModelIndex myCurrentModelIndex
 The model index for which to display the context menu. More...
 
QString myFederateId
 Identifying text for the current federate. More...
 

Static Protected Attributes

static const QString theTreeBreakText
 Indicates the end of one tree's configuration data and the start of the next in a GUI config file. More...
 

Private Member Functions

 DtFomTreeAndTableWidget (const DtFomTreeAndTableWidget &)
 Copy Constructor not implemented. More...
 
DtFomTreeAndTableWidgetoperator= (const DtFomTreeAndTableWidget &)
 Assignment Operator not implemented. More...
 

Detailed Description

Shows detailed statistics, presented as both trees and running graphs which can be populated from the tree data.

Member Typedef Documentation

typedef std::pair<unsigned, QModelIndex> DtFomTreeAndTableWidget::DtTreeAndModelIndex

Type which pairs the tree index and QModelIndex to uniquely identify an index across all trees in the widget.

Member Enumeration Documentation

Enumerator
DtRowNameIsHeader 
DtRowNameIsFirstColumn 
DtNoRowNames 
Enumerator
TextTableFormat 
CsvTableFormat 

Constructor & Destructor Documentation

DtFomTreeAndTableWidget::DtFomTreeAndTableWidget ( QWidget parent = 0,
Qt::WindowFlags  f = 0 
)

Constructor.

virtual DtFomTreeAndTableWidget::~DtFomTreeAndTableWidget ( )
virtual

Destructor.

DtFomTreeAndTableWidget::DtFomTreeAndTableWidget ( const DtFomTreeAndTableWidget )
private

Copy Constructor not implemented.

Member Function Documentation

unsigned DtFomTreeAndTableWidget::addTree ( const QString &  name,
QAbstractItemModel *  model,
DtRowNameLoc  rowNameLoc,
bool  decorateRoot,
bool  hideHeader,
bool  alternateRowColor 
)

Adds a new tree, must be called prior to initComplete.

Specifies the tree name, column headers, and row headers. Returns the index of the tree.

void DtFomTreeAndTableWidget::addTreeAndTable ( const QString &  treeName,
QAbstractItemModel *  treeModel,
DtRowNameLoc  treeRowNameLoc,
const QString &  TableName,
QAbstractItemModel *  tableModel,
DtRowNameLoc  tableRowNameLoc 
)
void DtFomTreeAndTableWidget::collapseItem ( QStandardItem *  item)
void DtFomTreeAndTableWidget::connectSignals ( )
protected

Connects our signals and slots.

void DtFomTreeAndTableWidget::expandTree ( ) const
const QModelIndex DtFomTreeAndTableWidget::getCurrentSelection ( ) const
void DtFomTreeAndTableWidget::getRowAndColNames ( DtTreeAndModelIndex  modelIndex,
QString &  rowName,
QString &  colName 
)
protected

Retrieves the names of the row and column for a given model index.

void DtFomTreeAndTableWidget::initComplete ( )

Initializes the widget, adding trees with each of the given names.

Trees are added in order and assigned indices, starting at 0, in order.

void DtFomTreeAndTableWidget::initTrees ( )
protected

Initializes all added trees.

void DtFomTreeAndTableWidget::loadGuiConfiguration ( QFile &  configFile)

Loads the GUI configuration from the given file.

It's expected that the file will be open and ready to read the configuration.

DtFomTreeAndTableWidget& DtFomTreeAndTableWidget::operator= ( const DtFomTreeAndTableWidget )
private

Assignment Operator not implemented.

void DtFomTreeAndTableWidget::processCurrentChanged ( const QModelIndex &  ,
const QModelIndex &   
)
slot

Process current selection change.

void DtFomTreeAndTableWidget::processItemSelection ( const QModelIndex &  index)
slot

Processes item selection by enabling/disabling buttons and menu actions for the newly selected item.

void DtFomTreeAndTableWidget::processItemSelectionChange ( )
slot

Process item selection change.

void DtFomTreeAndTableWidget::refresh ( ) const
void DtFomTreeAndTableWidget::saveGuiConfiguration ( QFile &  configFile)

Saves the GUI configuration to the given file.

It's expected that the file will be open and ready to write to.

void DtFomTreeAndTableWidget::setFederateId ( const QString &  federateId)
inline

Sets the federate identification text.

void DtFomTreeAndTableWidget::setSelectionBehaviorRow ( )
virtual QSize DtFomTreeAndTableWidget::sizeHint ( ) const
virtual

Returns the recommended size for the widget.

void DtFomTreeAndTableWidget::treeItemSelected ( const QModelIndex &  index)
signal
void DtFomTreeAndTableWidget::updateSortingEnable ( )
slot

Checks whether the trees should have sorting enabled or disabled.

void DtFomTreeAndTableWidget::updateTreeLabel ( const QString &  name)
void DtFomTreeAndTableWidget::writeTreeToStream ( const QTreeView *  tree,
QTextStream &  fileStrm,
TableFileFormat  format 
)
protected

Writes the given tree's data as a table to the given file stream.

Must specify the format that should be used.

Member Data Documentation

DtTreeAndModelIndex DtFomTreeAndTableWidget::myCurrentModelIndex
protected

The model index for which to display the context menu.

QString DtFomTreeAndTableWidget::myFederateId
protected

Identifying text for the current federate.

QSplitter* DtFomTreeAndTableWidget::mySplitter
protected

Main layout.

unsigned int DtFomTreeAndTableWidget::myTableIndex
protected
unsigned int DtFomTreeAndTableWidget::myTreeIndex
protected
std::vector<QHBoxLayout*> DtFomTreeAndTableWidget::myTreeLabelLayouts
protected

Layouts for each tree label.

std::vector<QLabel*> DtFomTreeAndTableWidget::myTreeLabels
protected

Labels for each tree.

std::vector<QVBoxLayout*> DtFomTreeAndTableWidget::myTreeLayouts
protected

Layouts for each tree.

std::vector<std::map<unsigned, QString> > DtFomTreeAndTableWidget::myTreeRateGraphableCols
protected

The columns for which the rate can be graphed and the units to be displayed on the y axis.

std::vector<DtRowNameLoc> DtFomTreeAndTableWidget::myTreeRowNameLocs
protected

The row name location for the tree.

std::vector<std::map<unsigned, QString> > DtFomTreeAndTableWidget::myTreeValGraphableCols
protected

The columns for which the value can be graphed and the units to be displayed on the y axis.

std::vector<QTreeView*> DtFomTreeAndTableWidget::myTreeViews
protected

The tree view for each tree.

const QString DtFomTreeAndTableWidget::theTreeBreakText
staticprotected

Indicates the end of one tree's configuration data and the start of the next in a GUI config file.


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

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)