VR-Forces 5.0.2 Developer's Guide
 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 
45 
46  //Get the title of the page.
47  virtual QString title();
48 
49  //Get the class name of the page.
50  virtual const std::string& pageClassName() const;
51 
52  //Called when the page is displayed.
53  virtual void activate();
54 
55  //Called when the page is hidden.
56  virtual void deactivate();
57 
58  static std::string thePageClassName();
59 
60  //Goes through the entire list of entities and populates the tree
61  virtual void populateEntityList();
62 
63  protected:
64  //Sets up the contents of the widget onto the supplied parent
65  void setupUi(QWidget* p);
66 
67  //Clears out widget
68  virtual void clear();
69 
70 
71  protected:
75  virtual void slot_onCurrentTaskChanged(DtUUID entityName);
76 
77  //Using the known task, fill in the destination line in the entity list
78  void fillDestinationLine(DtSimTask* task,QTreeWidgetItem* displayEntityItem);
79 
80  public:
81  Ui_DtEntityListUi myUi;
82 
83  //A list of all simulated entities.
84  //Each State View is a collection of similar objects
85  //that the VR-Forces front end knows about. This particular view
86  //keeps a list of all simulated entities.
88 
89  //This maps keeps track of each line in the target list
90  std::map<const makVrv::DtStateView<makVrv::DtVrlinkSimulatedEntityState>*, QTreeWidgetItem*> myLineToStateViewMap;
91  };
92 
93  //Create a "creator" helper class using the template.
95 }
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
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:90
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:150
Definition: DtEntityList.h:31
void fillDestinationLine(DtSimTask *task, QTreeWidgetItem *displayEntityItem)
makVrf::DtVrfSimulatedEntityStateViewCollection * mySimulatedEntityStateView
Definition: DtEntityList.h:87
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:81
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. It manages the read/write capab...
Definition: simTask.h:30
virtual QIcon icon()
Get the icon of the page.
virtual makVrv::DtQIconConfigurations qIconConfigurations() const
Get the icon configurations for the page. This is used to style the page&#39;s icon based on application ...
makVrv::DtPageCreatorTemplate< DtEntityList > DtEntityListWidgetCreator
Definition: DtEntityList.h:94
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
A collection of icon configurations. The collection maintains flags indicating whether to generate ic...
Definition: DtQIconConfiguration.h:75
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 Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)