13 #include <vlutil/vlMachineTypes.h>
14 #include <vlutil/vlFilename.h>
16 #include <QMainWindow>
19 #include "vlutil/vlFedTarget.h"
20 #include <QtGui/QStandardItemModel>
29 class QStandardItemModel;
30 class QSortFilterProxyModel;
31 class QDialogButtonBox;
48 DtObjectModelNumberOfColumns
56 DtInteractionModelNumberOfColumns
67 DtAttributeModelNumberOfColumns
78 DtParameterNumberOfColumns
83 QWidget* parent = 0, Qt::WindowFlags f = 0);
89 virtual QSize sizeHint()
const;
92 void setFederateIcon(
const QPixmap& icon);
95 void setFederateType(
const QString& t);
98 void setFederateName(
const QString& n);
101 void setFederateProcess(
const QString& p);
104 void setFederateHost(
const QString& h);
107 void setFederationName(
const QString& n);
109 virtual void closeEvent(QCloseEvent * event);
111 void saveGuiConfiguration();
113 void updateObjectFomTreeData(
const std::vector<MAKRti::DtU32>& classHandles,
114 const std::vector<MAKRti::DtU32>& parentClassHandles,
const std::vector<MAKRti::DtString>& classNames);
115 void updateInteractionFomTreeData(
const std::vector<MAKRti::DtU32>& classHandles,
116 const std::vector<MAKRti::DtU32>& parentClassHandles,
const std::vector<MAKRti::DtString>& classNames);
119 virtual void updateAttributesTable(
const MAKRti::DtString& name, MAKRti::DtU32 handle);
121 virtual void updateParametersTable(
const MAKRti::DtString& name, MAKRti::DtU32 handle);
123 void clearAttributesNames();
125 void updateAttributeNames(
const std::vector<MAKRti::DtU32>& objectClassHandles,
126 const std::vector<MAKRti::DtU32>& attributeHandles,
127 const std::vector<MAKRti::DtString>& attributeNames,
128 const std::vector<MAKRti::DtU32>& parentClassHandles,
129 const std::vector<MAKRti::DtU32>& totalClassHandles);
131 void clearParameterNames();
133 void updateParameterNames(
const std::vector<MAKRti::DtU32>& interClassHandles,
134 const std::vector<MAKRti::DtU32>& paramHandles,
135 const std::vector<MAKRti::DtString>& paramNames,
136 const std::vector<MAKRti::DtU32>& parentInterHandles,
137 const std::vector<MAKRti::DtU32>& totalInterHandles);
138 void updateAttrFomState(
const std::vector<MAKRti::DtU32>& objectClassHandles,
139 const std::vector<MAKRti::DtU32>& attributeHandles,
140 const std::vector<bool>& attributePub,
141 const std::vector<bool>& attributeSub,
142 const std::vector<DtTransportType>& attributeTransport,
143 const std::vector<DtOrderType>& attributeOrder,
144 const std::vector<MAKRti::DtU32>& objectPubSubHandles,
145 const std::vector<bool>& objPub,
146 const std::vector<bool>& ObjSub);
147 void updateParamFomState(
const std::vector<MAKRti::DtU32>& objectClassHandles,
148 const std::vector<MAKRti::DtU32>& attributeHandles,
149 const std::vector<bool>& attributePub,
const std::vector<bool>& attributeSub,
150 const std::vector<DtTransportType>& attributeTransport,
151 const std::vector<DtOrderType>& attributeOrder,
152 const std::vector<MAKRti::DtU32>& objectPubSubHandles,
153 const std::vector<bool>& objPub,
const std::vector<bool>& ObjSub);
156 void switchFederate();
160 void setFederationNameStr(
const MAKRti::DtString& federationName);
161 MAKRti::DtString federationNameStr();
162 void setFederateHandle(
int federateHandle);
163 int federateHandle();
166 void setCompId(
unsigned int compId);
177 void loadGuiConfiguration();
180 virtual void showEvent( QShowEvent* event );
183 virtual void hideEvent( QHideEvent* event );
188 void federateIdentifierUpdated(
unsigned int );
190 void processObjectSelection(
const QModelIndex& index,
bool forceUpdate =
false);
192 void processInteractionSelection(
const QModelIndex& index,
bool forceUpdate =
false);
197 void initBasicInfoWidgets();
200 void initObjectStatsWidget();
203 void initInteractionStatsWidget();
206 void initButtonBoxWidget();
211 QDockWidget* initDockWidget(
bool isFixed, Qt::Orientation ori,
const QString& name =
"");
221 unsigned addHeaderItem(QStandardItemModel* model,
const QString& text,
222 DtColOrRow colOrRow);
225 void updateFederateId(
const QString& fedId);
234 MAKRti::DtString getFullObjectName(QStandardItem * objectItem,
bool addHandle =
false);
235 MAKRti::DtString getFullObjectName(MAKRti::DtU32 objectHandle,
bool addHandle =
false);
236 MAKRti::DtString getFullInteractionName(QStandardItem * interactionItem,
bool addHandle =
false);
237 MAKRti::DtString getFullInteractionName(MAKRti::DtU32 interactionHandle,
bool addHandle =
false);
238 const char * getObjHeader(
const enum DtFomStatisticsDialogObjectModelColumnEnum col );
239 const char * getInterHeader(
const enum DtFomStatisticsDialogInteractionModelColumnEnum col );
240 const char * getAttrHeader(
const enum DtFomStatisticsDialogAttributeModelColumnEnum col );
241 const char * getParamHeader(
const enum DtFomStatisticsDialogParameterModelColumnEnum col );
242 void updateObjectPubSub(
const std::vector<MAKRti::DtU32>& objectPubSubHandles,
243 const std::vector<bool>& objPub,
244 const std::vector<bool>& ObjSub);
245 void updateInteractionPubSub(
const std::vector<MAKRti::DtU32>& objectPubSubHandles,
246 const std::vector<bool>& objPub,
const std::vector<bool>& objSub);