OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MicroserviceNotifier.h
Go to the documentation of this file.
1#pragma once
2
3#include <list>
4#include <vector>
5#include <string>
6#include <map>
7
8#include "OldTreeIcon.h"
9#include "Geometry.h"
10
11#include "OTCore/CoreTypes.h"
12#include "OTGui/GuiTypes.h"
15
17{
18public:
21
22 // These functions needs to be executed synchronously
23 void requestFileForReading(const std::string &dialogTitle, const std::string &fileMask, const std::string &subsequentAction, int siteID);
24
25 // All other actions can be executed asynchronously
26 void fillPropertyGrid(const ot::PropertyGridCfg& _configuration);
27 void addMenuPage(const std::string &pageName);
28 void addMenuGroup(const std::string &pageName, const std::string &groupName);
29 void addMenuSubGroup(const std::string &pageName, const std::string &groupName, const std::string &subGroupName);
30 void addMenuPushButton(const std::string &pageName, const std::string &groupName, const std::string &buttonName, const std::string &text, ot::LockTypeFlags &flags, const std::string &iconName, const std::string &iconFolder = std::string("Default"), const std::string &keySequence = std::string(""));
31 void addMenuPushButton(const std::string &pageName, const std::string &groupName, const std::string &subgroupName, const std::string &buttonName, const std::string &text, ot::LockTypeFlags &flags, const std::string &iconName, const std::string &iconFolder = std::string("Default"), const std::string &keySequence = std::string(""));
32 void addMenuCheckBox(const std::string &pageName, const std::string &groupName, const std::string &subGroupName, const std::string &boxName, const std::string &boxText, bool checked, ot::LockTypeFlags &flags);
33 void addMenuLineEdit(const std::string &pageName, const std::string &groupName, const std::string &subGroupName, const std::string &editName, const std::string &editText, const std::string &editLabel, ot::LockTypeFlags &flags);
34 void addShortcut(const std::string &keySequence);
35 //Not existing in uiComponent
36 void setMenuCheckBox(const std::string &pageName, const std::string &groupName, const std::string &subGroupName, const std::string &boxName, bool checked);
37 //Not existing in uiComponent
38 void setMenuLineEdit(const std::string &pageName, const std::string &groupName, const std::string &subGroupName, const std::string &editName, const std::string &editText, bool error);
39 void removeUIElements(const std::string &type, std::list<std::string> &itemList);
40 //Not existing in uiComponent
41 void activateMenuTab(const std::string &pageName);
42 //Not existing in uiComponent
43 void enableDisableControls(std::list<std::string> &enabled, std::list<std::string> &disabled);
44 //setControlToolTip in uiComponent ?
45 void setToolTip(const std::string &item, const std::string &text);
46
47 void displayMessage(const std::string &message);
48 //Not existing in uiComponent
49 void reportError(const std::string &message);
50 //Not existing in uiComponent
51 void reportWarning(const std::string &message);
52 //Not existing in uiComponent
53 void reportInformation(const std::string &message);
54 //Not existing in uiComponent
55 void resetAllViews(ot::UID visualizationModelID);
56
57 void refreshAllViews(ot::UID visualizationModelID);
58 //Not existing in uiComponent
59 void clearSelection(ot::UID visualizationModelID);
60 void refreshSelection(ot::UID visualizationModelID);
61 //Not existing in uiComponent
62 void selectObject(ot::UID visualizationModelID, ot::UID entityID);
63 //Not existing in uiComponent
64 void promptChoice(const std::string& _message, ot::MessageDialogCfg::BasicIcon _icon, ot::MessageDialogCfg::BasicButtons _buttons, const std::string& _promptResponse, const std::string& _parameter1);
65 //Not existing in uiComponent
66 void addVisualizationNodeFromFacetData(ot::UID visModelID, const std::string &treeName, double surfaceColorRGB[3], double edgeColorRGB[3], ot::UID modelEntityID, const OldTreeIcon &treeIcons, bool backFaceCulling,
67 double offsetFactor, bool isEditable, std::vector<Geometry::Node> &nodes, std::list<Geometry::Triangle> &triangles, std::list<Geometry::Edge> &edges, std::string &errors, bool selectChildren, bool manageParentVisibility, bool manageChildVisibility, bool showWhenSelected);
68 void addVisualizationNodeFromFacetDataBase(ot::UID visModelID, const std::string &treeName, double surfaceColorRGB[3], double edgeColorRGB[3], const std::string &materialType, const std::string &textureType, bool textureReflective, ot::UID modelEntityID, const OldTreeIcon &treeIcons, bool backFaceCulling,
69 double offsetFactor, bool isHidden, bool isEditable, const std::string &projectName, ot::UID entityID, ot::UID entityVersion, bool selectChildren, bool manageParentVisibility, bool manageChildVisibility, bool showWhenSelected, std::vector<double> &transformation);
70 void addVisualizationContainerNode(ot::UID visModelID, const std::string &treeName, ot::UID modelEntityID, const OldTreeIcon &treeIcons, bool isEditable);
71 void addVisualizationAnnotationNode(ot::UID visModelID, const std::string &name, ot::UID UID, const OldTreeIcon &treeIcons, bool isHidden,
72 const double edgeColorRGB[3],
73 const std::vector<std::array<double, 3>> &points,
74 const std::vector<std::array<double, 3>> &points_rgb,
75 const std::vector<std::array<double, 3>> &triangle_p1,
76 const std::vector<std::array<double, 3>> &triangle_p2,
77 const std::vector<std::array<double, 3>> &triangle_p3,
78 const std::vector<std::array<double, 3>> &triangle_rgb);
79
80 void updateObjectColor(ot::UID visModelID, ot::UID modelEntityID, double surfaceColorRGB[3], double edgeColorRGB[3], const std::string &materialType, const std::string &textureType, bool textureReflective);
81 void updateObjectFacetsFromDataBase(ot::UID visModelID, ot::UID modelEntityID, ot::UID entityID, ot::UID entityVersion);
82
83 void removeShapesFromVisualization(ot::UID visualizationModelID, std::list<ot::UID> entityID);
84 void setShapeVisibility(ot::UID visualizationModelID, std::list<ot::UID> &visibleEntityIDs, std::list<ot::UID> &hiddenEntityIDs);
85 void hideEntities(ot::UID visualizationModelID, std::list<ot::UID> &hiddenEntityIDs);
86 void setTreeStateRecording(ot::UID visualizationModelID, bool flag);
87 //until here
88 void enterEntitySelectionMode(ot::UID visualizationModelID, const std::string &selectionType, bool allowMultipleSelection, const std::string &selectionFilter, const std::string &selectionAction, const std::string &selectionMessage, const std::map<std::string, std::string> &options);
89 //Not existing in uiComponent
90 void isModified(ot::UID visualizationModelID, bool modifiedState);
91 //Not existing in uiComponent
92 void enableQueuingHttpRequests(bool flag);
93 //Not existing in uiComponent
94 void queuedHttpRequestToUI(ot::JsonDocument &doc, std::list<std::pair<ot::UID, ot::UID>> &prefetchIds);
95
96 std::string sendMessageToService(bool queue, const std::string &owner, ot::JsonDocument &doc);
97
98 //Not existing in uiComponent
99 bool isUIAvailable(void);
100};
@ nodes
Definition MonitorSettings.h:17
@ edges
Definition MonitorSettings.h:17
Definition MicroserviceNotifier.h:17
void enableDisableControls(std::list< std::string > &enabled, std::list< std::string > &disabled)
Definition MicroserviceNotifier.cpp:198
bool isUIAvailable(void)
Definition MicroserviceNotifier.cpp:556
void setShapeVisibility(ot::UID visualizationModelID, std::list< ot::UID > &visibleEntityIDs, std::list< ot::UID > &hiddenEntityIDs)
Definition MicroserviceNotifier.cpp:509
void reportError(const std::string &message)
Definition MicroserviceNotifier.cpp:234
void removeUIElements(const std::string &type, std::list< std::string > &itemList)
Definition MicroserviceNotifier.cpp:186
void addMenuPushButton(const std::string &pageName, const std::string &groupName, const std::string &buttonName, const std::string &text, ot::LockTypeFlags &flags, const std::string &iconName, const std::string &iconFolder=std::string("Default"), const std::string &keySequence=std::string(""))
Definition MicroserviceNotifier.cpp:81
void addVisualizationAnnotationNode(ot::UID visModelID, const std::string &name, ot::UID UID, const OldTreeIcon &treeIcons, bool isHidden, const double edgeColorRGB[3], const std::vector< std::array< double, 3 > > &points, const std::vector< std::array< double, 3 > > &points_rgb, const std::vector< std::array< double, 3 > > &triangle_p1, const std::vector< std::array< double, 3 > > &triangle_p2, const std::vector< std::array< double, 3 > > &triangle_p3, const std::vector< std::array< double, 3 > > &triangle_rgb)
Definition MicroserviceNotifier.cpp:403
void selectObject(ot::UID visualizationModelID, ot::UID entityID)
Definition MicroserviceNotifier.cpp:310
void isModified(ot::UID visualizationModelID, bool modifiedState)
Definition MicroserviceNotifier.cpp:536
void addMenuCheckBox(const std::string &pageName, const std::string &groupName, const std::string &subGroupName, const std::string &boxName, const std::string &boxText, bool checked, ot::LockTypeFlags &flags)
Definition MicroserviceNotifier.cpp:107
std::string sendMessageToService(bool queue, const std::string &owner, ot::JsonDocument &doc)
Definition MicroserviceNotifier.cpp:561
void enableQueuingHttpRequests(bool flag)
Definition MicroserviceNotifier.cpp:546
MicroserviceNotifier()
Definition MicroserviceNotifier.h:19
void fillPropertyGrid(const ot::PropertyGridCfg &_configuration)
Definition MicroserviceNotifier.cpp:37
void updateObjectFacetsFromDataBase(ot::UID visModelID, ot::UID modelEntityID, ot::UID entityID, ot::UID entityVersion)
Definition MicroserviceNotifier.cpp:445
void addMenuLineEdit(const std::string &pageName, const std::string &groupName, const std::string &subGroupName, const std::string &editName, const std::string &editText, const std::string &editLabel, ot::LockTypeFlags &flags)
Definition MicroserviceNotifier.cpp:123
void addVisualizationNodeFromFacetDataBase(ot::UID visModelID, const std::string &treeName, double surfaceColorRGB[3], double edgeColorRGB[3], const std::string &materialType, const std::string &textureType, bool textureReflective, ot::UID modelEntityID, const OldTreeIcon &treeIcons, bool backFaceCulling, double offsetFactor, bool isHidden, bool isEditable, const std::string &projectName, ot::UID entityID, ot::UID entityVersion, bool selectChildren, bool manageParentVisibility, bool manageChildVisibility, bool showWhenSelected, std::vector< double > &transformation)
Definition MicroserviceNotifier.cpp:357
void activateMenuTab(const std::string &pageName)
Definition MicroserviceNotifier.cpp:176
void clearSelection(ot::UID visualizationModelID)
Definition MicroserviceNotifier.cpp:292
virtual ~MicroserviceNotifier()
Definition MicroserviceNotifier.h:20
void refreshSelection(ot::UID visualizationModelID)
Definition MicroserviceNotifier.cpp:301
void addVisualizationNodeFromFacetData(ot::UID visModelID, const std::string &treeName, double surfaceColorRGB[3], double edgeColorRGB[3], ot::UID modelEntityID, const OldTreeIcon &treeIcons, bool backFaceCulling, double offsetFactor, bool isEditable, std::vector< Geometry::Node > &nodes, std::list< Geometry::Triangle > &triangles, std::list< Geometry::Edge > &edges, std::string &errors, bool selectChildren, bool manageParentVisibility, bool manageChildVisibility, bool showWhenSelected)
Definition MicroserviceNotifier.cpp:329
void displayMessage(const std::string &message)
Definition MicroserviceNotifier.cpp:225
void addVisualizationContainerNode(ot::UID visModelID, const std::string &treeName, ot::UID modelEntityID, const OldTreeIcon &treeIcons, bool isEditable)
Definition MicroserviceNotifier.cpp:390
void reportWarning(const std::string &message)
Definition MicroserviceNotifier.cpp:243
void addShortcut(const std::string &keySequence)
Definition MicroserviceNotifier.cpp:139
void requestFileForReading(const std::string &dialogTitle, const std::string &fileMask, const std::string &subsequentAction, int siteID)
Definition MicroserviceNotifier.cpp:24
void promptChoice(const std::string &_message, ot::MessageDialogCfg::BasicIcon _icon, ot::MessageDialogCfg::BasicButtons _buttons, const std::string &_promptResponse, const std::string &_parameter1)
Definition MicroserviceNotifier.cpp:261
void refreshAllViews(ot::UID visualizationModelID)
Definition MicroserviceNotifier.cpp:320
void setMenuLineEdit(const std::string &pageName, const std::string &groupName, const std::string &subGroupName, const std::string &editName, const std::string &editText, bool error)
Definition MicroserviceNotifier.cpp:162
void updateObjectColor(ot::UID visModelID, ot::UID modelEntityID, double surfaceColorRGB[3], double edgeColorRGB[3], const std::string &materialType, const std::string &textureType, bool textureReflective)
Definition MicroserviceNotifier.cpp:430
void setTreeStateRecording(ot::UID visualizationModelID, bool flag)
Definition MicroserviceNotifier.cpp:469
void reportInformation(const std::string &message)
Definition MicroserviceNotifier.cpp:252
void setToolTip(const std::string &item, const std::string &text)
Definition MicroserviceNotifier.cpp:214
void setMenuCheckBox(const std::string &pageName, const std::string &groupName, const std::string &subGroupName, const std::string &boxName, bool checked)
Definition MicroserviceNotifier.cpp:149
void addMenuSubGroup(const std::string &pageName, const std::string &groupName, const std::string &subGroupName)
Definition MicroserviceNotifier.cpp:69
void queuedHttpRequestToUI(ot::JsonDocument &doc, std::list< std::pair< ot::UID, ot::UID > > &prefetchIds)
Definition MicroserviceNotifier.cpp:551
void addMenuPage(const std::string &pageName)
Definition MicroserviceNotifier.cpp:48
void hideEntities(ot::UID visualizationModelID, std::list< ot::UID > &hiddenEntityIDs)
Definition MicroserviceNotifier.cpp:524
void resetAllViews(ot::UID visualizationModelID)
Definition MicroserviceNotifier.cpp:283
void enterEntitySelectionMode(ot::UID visualizationModelID, const std::string &selectionType, bool allowMultipleSelection, const std::string &selectionFilter, const std::string &selectionAction, const std::string &selectionMessage, const std::map< std::string, std::string > &options)
Definition MicroserviceNotifier.cpp:479
void addMenuGroup(const std::string &pageName, const std::string &groupName)
Definition MicroserviceNotifier.cpp:58
void removeShapesFromVisualization(ot::UID visualizationModelID, std::list< ot::UID > entityID)
Definition MicroserviceNotifier.cpp:458
JSON document.
Definition JSON.h:276
BasicIcon
Definition MessageDialogCfg.h:42
Definition PropertyGridCfg.h:21
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27