OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityResultText.h
Go to the documentation of this file.
1#pragma once
2#pragma warning(disable : 4251)
3
4#include "EntityContainer.h"
5#include "OldTreeIcon.h"
7
8class EntityResultTextData;
9
10class __declspec(dllexport) EntityResultText : public EntityBase, public IVisualisationText
11{
12public:
13 EntityResultText(ot::UID ID, EntityBase *parent, EntityObserver *mdl, ModelState *ms, ClassFactoryHandler* factory, const std::string &owner);
14 virtual ~EntityResultText();
15
16 virtual bool getEntityBox(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) override;
17
18 virtual bool considerForPropertyFilter(void) override { return true; };
19 virtual bool considerChildrenForPropertyFilter(void) override { return false; };
20
21 virtual void StoreToDataBase(void) override;
22 virtual void addVisualizationNodes(void) override;
23 void addVisualizationItem(bool isHidden);
24
25 virtual std::string getClassName(void) { return "EntityResultText"; };
26
27 virtual entityType getEntityType(void) override { return TOPOLOGY; };
28
29 void createProperties(void);
30
31 virtual bool updateFromProperties(void) override;
32
33 void deleteTextData(void);
34
35 void storeTextData(void);
36 void releaseTextData(void);
37
38 ot::UID getTextDataStorageId(void) { return m_textDataStorageId; }
39 ot::UID getTextDataStorageVersion(void) { return m_textDataStorageVersion; }
40
41 // Inherited via IVisualisationText
42 void setText(const std::string &text) override;
43 std::string getText() override;
44 bool visualiseText() override;
45 ot::TextEditorCfg createConfig() override;
46 ot::ContentChangedHandling getTextContentChangedHandling() override;
47
48private:
49 void ensureTextDataLoaded(void);
50 virtual int getSchemaVersion(void) { return 1; };
51 virtual void AddStorageData(bsoncxx::builder::basic::document &storage) override;
52 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap) override;
53 EntityResultTextData *getTextData(void);
54
55 EntityResultTextData *m_textData = nullptr;
56 ot::UID m_textDataStorageId = 0;
57 ot::UID m_textDataStorageVersion = 0;
59};
60
61
62
Definition TextEditorCfg.h:19
UICORE_API_EXPORT void setText(UID _actionUID, const QString &_text)
Will set the text of the action.
Definition uiAPI.cpp:344
UICORE_API_EXPORT QString getText(UID _actionUID)
Will return the text of the action.
Definition uiAPI.cpp:362
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27
ContentChangedHandling
Defines how the model service shall deal with a content changed notification from the ui....
Definition ContentChangedHandling.h:8