VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtEntityList.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 //\file DtEntityList.h
7 //\brief Contains makVrf::makVrfEntityListExample::DtEntityList class.
8 
9 #pragma once
10 
11 #include <vrvUtil/signalslib.h>
12 
13 #include "entityListUi.hpp"
14 
15 #include <vrvCoreQt/DtPage.h>
19 #include <vrftasks/simTask.h>
20 
21 namespace makVrv
22 {
23  class DtDe;
24 }
25 
26 namespace makVrfEntityListExample
27 {
28 
29  //A widget class that displays all existing entities
30  //as well as their current task and, if available, their destination.
32  : public makVrv::DtPage
33  {
34  public:
35  DtEntityList( makVrv::DtDe& de, QWidget* parent = 0, Qt::WindowFlags flags = 0);
36 
37  virtual ~DtEntityList();
38 
39  //Get the icon of the page.
40  virtual QIcon icon();
41 
42  //Get the title of the page.
43  virtual QString title();
44 
45  //Get the class name of the page.
46  virtual const std::string& pageClassName() const;
47 
48  //Called when the page is displayed.
49  virtual void activate();
50 
51  //Called when the page is hidden.
52  virtual void deactivate();
53 
54  static std::string thePageClassName();
55 
56  //Goes through the entire list of entities and populates the tree
57  virtual void populateEntityList();
58 
59  protected:
60  //Sets up the contents of the widget onto the supplied parent
61  void setupUi(QWidget* p);
62 
63  //Clears out widget
64  virtual void clear();
65 
66 
67  protected:
71  virtual void slot_onCurrentTaskChanged(DtUUID entityName);
72 
73  //Using the known task, fill in the destination line in the entity list
74  void fillDestinationLine(DtSimTask* task,QTreeWidgetItem* displayEntityItem);
75 
76  public:
77  Ui_DtEntityListUi myUi;
78 
79  //A list of all simulated entities.
80  //Each State View is a collection of similar objects
81  //that the VR-Forces front end knows about. This particular view
82  //keeps a list of all simulated entities.
84 
85  //This maps keeps track of each line in the target list
86  std::map<const makVrv::DtStateView<makVrv::DtVrlinkSimulatedEntityState>*, QTreeWidgetItem*> myLineToStateViewMap;
87  };
88 
89  //Create a "creator" helper class using the template.
91 }
UUID is a unique ID wrapper class.
Definition: rwUUID.h:222
virtual void deactivate()
Called when the page is hidden.
Contains makVrv::DtUserInterfaceAssembler class.
Contains makVrv::DtStateViewCollection class.
Contains makVrv::DtPage class.
std::map< const makVrv::DtStateView< makVrv::DtVrlinkSimulatedEntityState > *, QTreeWidgetItem * > myLineToStateViewMap
Definition: DtEntityList.h:86
virtual QString title()
Get the title of the page.
virtual void activate()
Called when the page is displayed.
virtual const std::string & pageClassName() const
Get the class name of the page.
Definition: DtPage.h:146
Definition: DtEntityList.h:31
void fillDestinationLine(DtSimTask *task, QTreeWidgetItem *displayEntityItem)
makVrf::DtVrfSimulatedEntityStateViewCollection * mySimulatedEntityStateView
Definition: DtEntityList.h:83
State view collection for entity state data.
Definition: vrfStateViewCollectionManager.h:76
virtual void slot_onObjectAdded(const makVrv::DtStateView< makVrv::DtVrlinkSimulatedEntityState > &)
virtual void slot_onObjectUpdated(makVrv::DtStateView< makVrv::DtVrlinkSimulatedEntityState > *)
Ui_DtEntityListUi myUi
Definition: DtEntityList.h:77
The page is a single widget component which is viewed in a page collection.
Definition: DtPage.h:30
virtual void slot_onCurrentTaskChanged(DtUUID entityName)
DtSimTask is an abstract base class from which real tasks can derive.
Definition: simTask.h:33
virtual QIcon icon()
Get the icon of the page.
makVrv::DtPageCreatorTemplate< DtEntityList > DtEntityListWidgetCreator
Definition: DtEntityList.h:90
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
static std::string thePageClassName()
virtual void slot_onObjectAboutToBeRemoved(const makVrv::DtStateView< makVrv::DtVrlinkSimulatedEntityState > &)
DtEntityList(makVrv::DtDe &de, QWidget *parent=0, Qt::WindowFlags flags=0)

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)