![]() |
MAK RTIspy API Documentation for HLA Evolved
|
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. | |
Public Slots | |
| void | processItemSelection (const QModelIndex &index) |
| Processes item selection by enabling/disabling buttons and menu actions for the newly selected item. | |
| void | processItemSelectionChange () |
| Process item selection change. | |
| void | processCurrentChanged (const QModelIndex &, const QModelIndex &) |
| Process current selection change. | |
| void | updateSortingEnable () |
| Checks whether the trees should have sorting enabled or disabled. | |
Signals | |
| void | treeItemSelected (const QModelIndex &index) |
Public Member Functions | |
| DtFomTreeAndTableWidget (QWidget *parent=0, Qt::WindowFlags f=0) | |
| Constructor. | |
| virtual | ~DtFomTreeAndTableWidget () |
| Destructor. | |
| virtual QSize | sizeHint () const |
| Returns the recommended size for the widget. | |
| 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. | |
| 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. | |
| void | saveGuiConfiguration (QFile &configFile) |
| Saves the GUI configuration to the given file. | |
| void | loadGuiConfiguration (QFile &configFile) |
| Loads the GUI configuration from the given file. | |
| void | setFederateId (const QString &federateId) |
| Sets the federate identification text. | |
| 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. | |
| void | connectSignals () |
| Connects our signals and slots. | |
| void | getRowAndColNames (DtTreeAndModelIndex modelIndex, QString &rowName, QString &colName) |
| Retrieves the names of the row and column for a given model index. | |
| void | writeTreeToStream (const QTreeView *tree, QTextStream &fileStrm, TableFileFormat format) |
| Writes the given tree's data as a table to the given file stream. | |
Protected Attributes | |
| QSplitter * | mySplitter |
| Main layout. | |
| std::vector< QVBoxLayout * > | myTreeLayouts |
| Layouts for each tree. | |
| std::vector< QLabel * > | myTreeLabels |
| Labels for each tree. | |
| std::vector< QHBoxLayout * > | myTreeLabelLayouts |
| Layouts for each tree label. | |
| std::vector< QTreeView * > | myTreeViews |
| The tree view for each tree. | |
| unsigned int | myTreeIndex |
| unsigned int | myTableIndex |
| std::vector< DtRowNameLoc > | myTreeRowNameLocs |
| The row name location for the tree. | |
| 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. | |
| 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. | |
| DtTreeAndModelIndex | myCurrentModelIndex |
| The model index for which to display the context menu. | |
| QString | myFederateId |
| Identifying text for the current federate. | |
Static Protected Attributes | |
| static const QString | theTreeBreakText = "------------\n" |
| Indicates the end of one tree's configuration data and the start of the next in a GUI config file. | |
Private Member Functions | |
| DtFomTreeAndTableWidget (const DtFomTreeAndTableWidget &) | |
| Copy Constructor not implemented. | |
| DtFomTreeAndTableWidget & | operator= (const DtFomTreeAndTableWidget &) |
| Assignment Operator not implemented. | |
Shows detailed statistics, presented as both trees and running graphs which can be populated from the tree data.
| 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.
|
protected |
| DtFomTreeAndTableWidget::DtFomTreeAndTableWidget | ( | QWidget * | parent = 0, |
| Qt::WindowFlags | f = 0 |
||
| ) |
Constructor.
References mySplitter.
|
virtual |
Destructor.
|
private |
Copy Constructor not implemented.
| 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.
References myTreeLabelLayouts, myTreeLabels, myTreeLayouts, myTreeRowNameLocs, and myTreeViews.
Referenced by addTreeAndTable().
| void DtFomTreeAndTableWidget::addTreeAndTable | ( | const QString & | treeName, |
| QAbstractItemModel * | treeModel, | ||
| DtRowNameLoc | treeRowNameLoc, | ||
| const QString & | TableName, | ||
| QAbstractItemModel * | tableModel, | ||
| DtRowNameLoc | tableRowNameLoc | ||
| ) |
References addTree(), myTableIndex, and myTreeIndex.
Referenced by DtFomStatisticsDialog::initInteractionStatsWidget(), and DtFomStatisticsDialog::initObjectStatsWidget().
| void DtFomTreeAndTableWidget::collapseItem | ( | QStandardItem * | item | ) |
References myTreeIndex, and myTreeViews.
|
protected |
Connects our signals and slots.
References connect(), myTableIndex, myTreeIndex, myTreeViews, processCurrentChanged(), processItemSelection(), and updateSortingEnable().
Referenced by initComplete().
| void DtFomTreeAndTableWidget::expandTree | ( | ) | const |
References myTreeIndex, and myTreeViews.
| const QModelIndex DtFomTreeAndTableWidget::getCurrentSelection | ( | ) | const |
References myTreeIndex, and myTreeViews.
Referenced by processItemSelectionChange().
|
protected |
Retrieves the names of the row and column for a given model index.
References DtRowNameIsFirstColumn, DtRowNameIsHeader, and myTreeRowNameLocs.
| 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.
References connectSignals(), and initTrees().
Referenced by DtFomStatisticsDialog::initInteractionStatsWidget(), and DtFomStatisticsDialog::initObjectStatsWidget().
|
protected |
Initializes all added trees.
References mySplitter, myTreeLabelLayouts, myTreeLayouts, and myTreeViews.
Referenced by initComplete().
| 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.
References myTreeViews, and theTreeBreakText.
|
private |
Assignment Operator not implemented.
|
slot |
Process current selection change.
References processItemSelection().
Referenced by connectSignals().
|
slot |
Processes item selection by enabling/disabling buttons and menu actions for the newly selected item.
References myCurrentModelIndex, myTreeIndex, myTreeViews, and treeItemSelected().
Referenced by connectSignals(), processCurrentChanged(), and processItemSelectionChange().
|
slot |
Process item selection change.
References getCurrentSelection(), and processItemSelection().
| 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.
References myTreeViews, and theTreeBreakText.
|
inline |
Sets the federate identification text.
Referenced by DtFomStatisticsDialog::updateFederateId().
| void DtFomTreeAndTableWidget::setSelectionBehaviorRow | ( | ) |
References myTableIndex, myTreeIndex, and myTreeViews.
Referenced by DtFomStatisticsDialog::initInteractionStatsWidget(), and DtFomStatisticsDialog::initObjectStatsWidget().
|
virtual |
Returns the recommended size for the widget.
|
signal |
Referenced by processItemSelection().
|
slot |
Checks whether the trees should have sorting enabled or disabled.
References myTableIndex, and myTreeViews.
Referenced by connectSignals().
| void DtFomTreeAndTableWidget::updateTreeLabel | ( | const QString & | name | ) |
References myTreeLabels.
|
protected |
Writes the given tree's data as a table to the given file stream.
Must specify the format that should be used.
|
protected |
The model index for which to display the context menu.
Referenced by processItemSelection().
|
protected |
Identifying text for the current federate.
|
protected |
Main layout.
Referenced by DtFomTreeAndTableWidget(), and initTrees().
|
protected |
Referenced by addTreeAndTable(), connectSignals(), setSelectionBehaviorRow(), and updateSortingEnable().
|
protected |
|
protected |
Layouts for each tree label.
Referenced by addTree(), and initTrees().
|
protected |
Labels for each tree.
Referenced by addTree(), and updateTreeLabel().
|
protected |
Layouts for each tree.
Referenced by addTree(), and initTrees().
|
protected |
The columns for which the rate can be graphed and the units to be displayed on the y axis.
|
protected |
The row name location for the tree.
Referenced by addTree(), and getRowAndColNames().
|
protected |
The columns for which the value can be graphed and the units to be displayed on the y axis.
|
protected |
The tree view for each tree.
Referenced by addTree(), collapseItem(), connectSignals(), expandTree(), getCurrentSelection(), initTrees(), loadGuiConfiguration(), processItemSelection(), saveGuiConfiguration(), setSelectionBehaviorRow(), and updateSortingEnable().
|
staticprotected |
Indicates the end of one tree's configuration data and the start of the next in a GUI config file.
Referenced by loadGuiConfiguration(), and saveGuiConfiguration().