OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityBlockPlot1D.h
Go to the documentation of this file.
1#pragma once
2#include "EntityBlock.h"
3class __declspec(dllexport) EntityBlockPlot1D : public EntityBlock
4{
5public:
6 EntityBlockPlot1D(ot::UID ID, EntityBase* parent, EntityObserver* obs, ModelState* ms, ClassFactoryHandler* factory, const std::string& owner);
7 virtual std::string getClassName(void) override { return "EntityBlockPlot1D"; };
8 virtual entityType getEntityType(void) override { return TOPOLOGY; }
9 virtual bool updateFromProperties() override;
10
11 void createProperties();
12
13 std::string getXLabel();
14 std::string getYLabel();
15
16 std::string getXUnit();
17 std::string getYUnit();
18
19 virtual ot::GraphicsItemCfg* CreateBlockCfg() override;
20
21 const ot::Connector& getConnectorXAxis() const { return _xAxisConnector; }
22 const std::list<const ot::Connector*> getConnectorsYAxis();
23 const std::list<std::string> getCurveNames();
24 const int getNumberOfCurves();
25
26 static const std::string getIconName() { return "Graph.svg"; }
27private:
28 ot::Connector _xAxisConnector;
29
30 const std::string _propertyGroupYAxisDefinition = "Data properties";
31 const std::string _propertyCurveNameBase = "Curve Name ";
32 const int _numberOfConnectorsUnrelatedToCurves = 1;
33 const std::string _connectorYAxisNameBase = "YAxis";
34 const std::string _connectorYAxisTitleBase = "Y-Axis ";
35
36
37 void AddDynamicNumberOfCurves(int numberOfCurves);
38
39 void AddStorageData(bsoncxx::builder::basic::document& storage) override;
40 void readSpecificDataFromDataBase(bsoncxx::document::view& doc_view, std::map<ot::UID, EntityBase*>& entityMap) override;
41};
The GraphicsItemCfg is the base class for all graphics item configurations.
Definition GraphicsItemCfg.h:33
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27