MAK RTIspy API Documentation for HLA 1.3
rtiNCVTree.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2010 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: rtiNCVTree.h,v $ $Revision: 1.0 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 //
00012 #ifndef _rtiNCVTree_H_
00013 #define _rtiNCVTree_H_
00014 
00015 #include "rtiMsConfig.h"
00016 #include "federationInfo.h"
00017 #include "forwarderConfig.h"
00018 #include <qtreewidget.h>
00019 #include <vector>
00020 #include <map>
00021 #include <set>
00022 #include <vlutil/vlTime.h>
00023 
00024 class DtAssistantForwarderInfo;
00025 
00026 class DT_DLL_ASSISTANTAPP DtNCVTree : public QTreeWidget
00027 {
00028    Q_OBJECT
00029 
00030 public:
00031 
00032    DtNCVTree( QWidget* parent );
00033    virtual ~DtNCVTree();
00034 
00035 private:
00036 
00038    DtNCVTree( DtNCVTree const&);
00039 
00041    DtNCVTree& operator=( DtNCVTree const& );
00042 
00043 public:
00045    virtual void clearConnectionTree();
00046 
00048    virtual bool updateInformation(const DtAssistantForwarderInfo& data);
00049 
00052    virtual QMenu* columnViewMenu() { return myColViewMenu; };
00053 
00055    virtual std::vector<DtNCVTreeInfo> getNCVTreeInfo();
00056 
00058    virtual int getNumberOfColumns();
00059 
00061    virtual void setTreeInfo( std::vector<DtNCVTreeInfo> treeInfo );
00062 
00064    virtual void refreshCommandsEnabled();
00065 
00067    virtual void enableRtiExecCommand( bool enable );
00068 
00070    virtual void enableRtiForwarderCommand( bool enable );
00071 
00073    virtual void displayLoadingIndication();
00074 
00075 public:
00076 
00077    enum DtNCVTreeCol
00078    {
00079       FederateProcessIndex = 0,
00080       FederateIPIndex,
00081       FederateHandleIndex,
00082       FederateHostNameIndex,
00083       FederateQueueStatusIndex,
00084       FederateNameIndex,
00085       FederateTypeIndex,
00086       FederateHlaVersionIndex,
00087       FederatePIDIndex,
00088       FederateCommandArgsIndex,
00089       NUM_NCV_TREE_COLUMNS,
00090    };
00091 
00093 
00094    static const QString theFederateProcessString;
00095    static const QString theFederateIPString;
00096    static const QString theFederateHandleString;
00097    static const QString theFederateHostNameString;
00098    static const QString theFederateQueueStatusString;
00099    static const QString theFederateNameString;
00100    static const QString theFederateTypeString;
00101    static const QString theFederateHlaVersionString;
00102    static const QString theFederatePIDString;
00103    static const QString theFederateCommandArgsString;
00104    static const QString theLoadingText;
00106 
00108 
00109    static const QString theFederateProcessToolTip;
00110    static const QString theFederateIPToolTip;
00111    static const QString theFederateHandleToolTip;
00112    static const QString theFederateHostNameToolTip;
00113    static const QString theFederateQueueStatusToolTip;
00114    static const QString theFederateNameToolTip;
00115    static const QString theFederateTypeToolTip;
00116    static const QString theFederateHlaVersionToolTip;
00117    static const QString theFederatePIDToolTip;
00118    static const QString theFederateCommandArgsToolTip;
00120 
00121    public slots:
00122 
00124       virtual void showColumns();
00125 
00127       virtual void setAllColumns( const std::map<QString, std::pair<int, bool> >& columns );
00128 
00130       virtual void allColumns( std::map<QString, std::pair<int, bool> >& columns  );
00131 
00133       virtual void showColCustomizeDlg();
00134 
00136       virtual void refreshMenus();
00137 
00139       virtual void showContextMenu( const QPoint& );
00140 
00142       virtual void shutdownRtiexec();
00143 
00145       virtual void shutdownRtiForwarder();
00146 
00147 signals:
00148       void fedDeleteRequest( int, const QString& );
00149       void federationDeleteRequest( const QString& fedexName );
00150       void openFedWebSpyRequest( const QString&, int );
00151       void enableNetworkTestingRequest( const QString& );
00152       void disableNetworkTestingRequest( const QString& );
00153       void showFedLatencyTest( const QString&, int );
00154 
00156       void shutdownCurrentRtiexec();
00157 
00159       void shutdownCurrentRtiForwarder();
00160 
00161 protected:
00162 
00163    QTreeWidgetItem* myExecItem;
00164    QTreeWidgetItem* myCurrentViewedItem;
00165    bool myRtiExecInCurrentViewedConn;
00166 
00168    QIcon myDroppedIcon;
00169 
00170    static const int FederateNameRole;
00171    static const int FederateHandleRole;
00172    static const int TestEnableRole;
00173 
00175    QMenu* myColViewMenu;
00176 
00178    std::vector< QAction* > myColDispActions;
00179    QAction* myColCustomizeAction;
00180 
00181    QAction* myShutdownAction;
00182    QAction* myShutdownForwarderAction;
00183 
00185    QMenu* myContextMenu;   
00186    QMenu* myFederateMenu;
00187    QMenu* myFederationMenu;
00188 
00194    std::map<QTreeWidgetItem*, std::pair<MAKRti::DtTime, std::pair<QString, int> > > myInvalidTreeWidgets;
00195 
00197    std::map<QTreeWidgetItem*, std::pair<QString, int> > myReconnectingFederates;
00198 
00200    std::map<QTreeWidgetItem*, std::pair<QString, int> > myReconnectedFederates;
00201 
00203    std::set< std::pair<QString, int > > myClearedDefunctFederates;
00204 
00206    std::set<QTreeWidgetItem* > myTestDisabledFederations;
00207 
00209    float myFederateRemovalTime;
00210 
00212    std::set<QTreeWidgetItem*> myListOfWebSpyEnabledFederates;
00213 
00215    QTreeWidgetItem* myLoadingIndicationItem;
00216 
00218    bool myDeletionEnabled;
00219 
00220    MAKRti::DtClock myTimer;
00221 
00224    static const int theLastColDefaultedOn;
00225 
00227    bool myExecCommandEnabled;
00228    bool myForwarderCommandEnabled;
00229 
00230 };
00231 
00232 #endif
00233 
00234 
00235 
00236 
00237 

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)