VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
taskStatePageLogic.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
12 #if !defined(Q_MOC_RUN)
17 
19 #endif
20 
21 #include <map>
22 #include <vector>
23 
24 class DtUnitFormatter;
25 
26 class QTreeWidget;
27 class QTreeWidgetItem;
28 
29 const char BehaviorGraphEnabledKeyword[] = "behaviorGraphEnabled";
30 
31 namespace makVrf
32 {
33  class DtQSvgView;
34 
35  namespace makVrfGuiObjectInformationQt
36  {
37  class DtTaskStatePageLogic;
38  class DtTaskStateItem;
39 
41  {
42  public:
44 
45  protected:
46  virtual void processBehaviorGraphResponse(const DtAdminMessage&) override;
47 
48  protected:
50  };
51 
54  {
55  Q_OBJECT
56  Q_PROPERTY(QColor ActiveColor MEMBER myActiveColor USER true)
57  Q_PROPERTY(QColor InactiveColor MEMBER myInactiveColor USER true)
58 
59  public:
60 
62  DtTaskStatePageLogic(makVrv::DtDe&, DtInformationDialogPage* iface);
63 
65  virtual ~DtTaskStatePageLogic() override;
66 
68  virtual QWidget* widgetRepresentation(QWidget* parent, DtSimObjectReference);
69 
70  virtual void disconnectSignals();
71  virtual void connectSignals();
72 
73  const QColor& activeColor() const
74  {
75  return myActiveColor;
76  }
77 
78  const QColor& inactiveColor() const
79  {
80  return myInactiveColor;
81  }
82 
85  virtual void getAllScriptIds(std::map<std::string, std::string>& scriptIdMap);
86  virtual void getAllScriptIds(const DtTaskStateItem *pItem, std::map<std::string, std::string>& scriptIdMap);
88 
90  virtual bool isBehaviorGraphEnabled() const;
91 
93  virtual void processBehaviorGraphResponse(const DtAdminMessage&);
94 
95  public slots:
96 
98  virtual void slot_currentTabChanged(int, const std::string&);
99 
100  protected:
102  virtual void activate(DtSimObjectReference state) override;
103 
105  virtual void deactivate() override;
106 
107  protected:
108 
110  virtual void slot_onTaskUpdated(const DtUUID& entity);
111 
113  virtual void updateTaskData();
114 
116  virtual DtTaskStateItem* createTaskStateItem(QTreeWidget*) const;
117  virtual DtTaskStateItem* createTaskStateItem(QTreeWidgetItem*) const;
118 
121  virtual void addTasks(const DtVrfCurrentTaskManager::EntityTaskInformation&, QTreeWidgetItem* parent = 0);
122 
124  virtual DtTaskStateItem* addReactiveTask(const DtVrfCurrentTaskManager::TaskInformation&, QTreeWidgetItem* parent = 0);
125 
127  virtual DtTaskStateItem* addBackgroundProcess(const DtVrfCurrentTaskManager::TaskInformation&, QTreeWidgetItem* parent = 0);
128 
130  virtual DtTaskStateItem* addScriptedSet(const DtVrfCurrentTaskManager::TaskInformation&, QTreeWidgetItem* parent = 0);
131 
133  virtual DtTaskStateItem* addTask(const DtVrfCurrentTaskManager::TaskInformation&, QTreeWidgetItem* parent = 0);
134 
136  virtual void requestBehaviorGraphsFrom(const std::string& sScriptId);
137 
139  virtual void updateBehaviorGraph(const std::string& sScriptId, const std::string& sSvgContent);
140 
142  virtual void stateViewUpdated() override;
143 
144  virtual QString formatTextForSingleLine(const QString& text) const;
145 
146  protected:
147  virtual void nameChanged();
148  virtual void uuidChanged();
149 
150  protected:
163 
167  std::map<std::string, bool> myGraphCapableMap;
168 
169  //TMP
171  };
172  }
173 }
UUID is a unique ID wrapper class.
Definition: uuid.h:59
The logic for this page. Will subscribe/unsubscribe from registering for task messages.
Definition: taskStatePageLogic.h:53
DtUnitFormatter * myUnitFormatter
Definition: taskStatePageLogic.h:151
Note, check task or set. Since scripted sets are now running as part of the scripted task manager...
Definition: vrfCurrentTaskManager.h:50
QColor myInactiveColor
Definition: taskStatePageLogic.h:162
int myMsgCount
Definition: taskStatePageLogic.h:170
std::map< std::string, bool > myGraphCapableMap
Caches the capability test of a scripted task to generate graphs.
Definition: taskStatePageLogic.h:167
makVrv::DtSignalConnectionManager myWidgetUpdateConnectionManager
Definition: taskStatePageLogic.h:154
Contains makVrv::DtInformationDialogPage class.
bool myConnected
Definition: taskStatePageLogic.h:159
QLabel * myCurrentTaskIcon
Definition: taskStatePageLogic.h:156
makVrv::DtSignalConnectionManager myTaskConnectionManager
Definition: taskStatePageLogic.h:153
makVrv::DtSignalConnectionManager myConnectionManager
Definition: taskStatePageLogic.h:152
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
const QColor & inactiveColor() const
Definition: taskStatePageLogic.h:78
QLabel * myCurrentTask
Definition: taskStatePageLogic.h:155
const char BehaviorGraphEnabledKeyword[]
Definition: taskStatePageLogic.h:29
DtTaskStateItem is the tree widget item that will be used to display task information.
Definition: taskStatePage.h:225
Base class to provide boost signal/slot management.
#define DT_DLL_VRFGUIOBJECTINFORMATIONQT
Contains DLL export macros.
Definition: vrfGuiObjectInformationQt.h:24
QWidget * myWidgetRepresentation
Definition: taskStatePageLogic.h:157
DtUUID myMonitoring
Definition: taskStatePageLogic.h:165
QColor myActiveColor
Definition: taskStatePageLogic.h:161
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
bool myMadeUUIDChangedConnection
Definition: taskStatePageLogic.h:160
The class that is the interface between the GUI and the back-end. Specialize to implement processBeha...
Definition: behaviorGraphRequestor.h:31
Definition: unitFormatter.h:24
DtTaskStatePageLogic * myLogic
Definition: taskStatePageLogic.h:49
DtTaskStateItem * myBestTaskToShow
Definition: taskStatePageLogic.h:158
DtTaskPageBehaviorRequestor myBehaviorGraphRequestor
Definition: taskStatePageLogic.h:164
std::vector< TaskInformation > EntityTaskInformation
Definition: vrfCurrentTaskManager.h:60
Definition: adminMessage.h:20

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)