OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityFileText.h
Go to the documentation of this file.
1#pragma once
2#include "EntityFile.h"
6
7class __declspec(dllexport) EntityFileText : public EntityFile, public IVisualisationText
8{
9public:
10 EntityFileText(ot::UID _ID, EntityBase* _parent, EntityObserver* _obs, ModelState* _ms, ClassFactoryHandler* _factory, const std::string& _owner);
11
12 virtual entityType getEntityType(void) override { return TOPOLOGY; };
13 virtual std::string getClassName(void) override { return "EntityFileText"; };
14
15 void setTextEncoding(ot::TextEncoding::EncodingStandard _encoding);
16 ot::TextEncoding::EncodingStandard getTextEncoding();
17
18 //Text visualisation interface
19 std::string getText(void) override;
21 void setText(const std::string& _text) override;
22 bool visualiseText() override { return true; }
23 ot::TextEditorCfg createConfig() override;
24 ot::ContentChangedHandling getTextContentChangedHandling() override;
25
26 void setContentChangedHandling(ot::ContentChangedHandling _contentChangedHandling);
27protected:
28 void setSpecializedProperties() override;
29 virtual void AddStorageData(bsoncxx::builder::basic::document& _storage) override;
30 void readSpecificDataFromDataBase(bsoncxx::document::view& _doc_view, std::map<ot::UID, EntityBase*>& _entityMap) override;
31
32private:
35};
Entity that holds a binary representation of a file. Any type of file should be supported.
MongoDB uses only UTF-8 and some errors occured if the characters with different encoding standard we...
Definition TextEditorCfg.h:19
EncodingStandard
Definition TextEncoding.h:21
@ UNKNOWN
Definition TextEncoding.h:21
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