VR-Forces 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>
18 #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  {
33  public:
34  DtEntityList( makVrv::DtDe& de, QWidget* parent = 0, Qt::WindowFlags flags = 0);
35 
36  virtual ~DtEntityList() override;
37 
38  //Get the icon of the page.
39  virtual QIcon icon() override;
40 
43  virtual makVrv::DtQIconConfigurations qIconConfigurations() const override;
44 
45  //Get the title of the page.
46  virtual QString title() override;
47 
48  //Get the class name of the page.
49  virtual const std::string& pageClassName() const override;
50 
51  //Called when the page is displayed.
52  virtual void activate() override;
53 
54  //Called when the page is hidden.
55  virtual void deactivate() override;
56 
57  static std::string thePageClassName();
58 
59  //Goes through the entire list of entities and populates the tree
60  virtual void populateEntityList();
61 
62  protected:
63  //Sets up the contents of the widget onto the supplied parent
64  void setupUi(QWidget* p);
65 
66  //Clears out widget
67  virtual void clear();
68 
69 
70  protected:
74  virtual void slot_onCurrentTaskChanged(DtUUID entityName);
75 
76  //Using the known task, fill in the destination line in the entity list
77  void fillDestinationLine(DtSimTask* task,QTreeWidgetItem* displayEntityItem);
78 
79  public:
80  Ui_DtEntityListUi myUi;
81 
82  //This maps keeps track of each line in the target list
84  {
86  boost::signals2::scoped_connection connection;
87  };
88 
89  std::map<makVrv::DtUniqueID, LineToStateView> myLineToStateViewMap;
91  };
92 
93  //Create a "creator" helper class using the template.
95 }
QTreeWidgetItem * item
Definition: DtEntityList.h:85
UUID is a unique ID wrapper class.
Definition: uuid.h:59
Contains makVrv::DtUserInterfaceAssembler class.
Contains makVrv::DtPage class declaration.
virtual void activate() override
Called when the page is displayed.
virtual QString title() override
Get the title of the page.
boost::signals2::scoped_connection connection
Definition: DtEntityList.h:86
Definition: DtPage.h:181
Definition: DtEntityList.h:31
void fillDestinationLine(DtSimTask *task, QTreeWidgetItem *displayEntityItem)
virtual const std::string & pageClassName() const override
Get the class name of the page.
virtual void deactivate() override
Called when the page is hidden.
virtual makVrv::DtQIconConfigurations qIconConfigurations() const override
Get the icon configurations for the page. This is used to style the page&#39;s icon based on application ...
Ui_DtEntityListUi myUi
Definition: DtEntityList.h:80
std::map< makVrv::DtUniqueID, LineToStateView > myLineToStateViewMap
Definition: DtEntityList.h:89
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
The page is a single widget component which is viewed in a page collection.
Definition: DtPage.h:51
makVrv::DtSignalConnectionManager myConnections
Definition: DtEntityList.h:90
virtual void slot_onObjectAdded(makVrf::DtSimObjectReference)
Base class to provide boost signal/slot management.
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
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:76
A collection of icon configurations. The collection maintains flags indicating whether to generate ic...
Definition: DtQIconConfiguration.h:131
virtual void slot_onObjectUpdated(makVrf::DtSimObjectReference)
static std::string thePageClassName()
virtual void slot_onObjectAboutToBeRemoved(makVrf::DtSimObjectReference)
virtual QIcon icon() override
Get the icon of the page.
DtEntityList(makVrv::DtDe &de, QWidget *parent=0, Qt::WindowFlags flags=0)

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)