VR-Forces 4.6.1 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 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)