OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
GraphicsPickerItemInformation.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
10#include "OTCore/Serializable.h"
11
12// std header
13#include <string>
14
15#pragma warning(disable:4251)
16
17namespace ot {
18
20 public:
22 GraphicsPickerItemInformation(const std::string& _name, const std::string& _title, const std::string& _previewIcon);
25
27
31 virtual void addToJsonObject(JsonValue& _object, JsonAllocator& _allocator) const override;
32
36 virtual void setFromJsonObject(const ConstJsonObject& _object) override;
37
38 void setName(const std::string& _name) { m_name = _name; };
39 const std::string& getName(void) const { return m_name; };
40
41 void setTitle(const std::string& _title) { m_title = _title; };
42 const std::string& getTitle(void) const { return m_title; };
43
44 void setPreviewIcon(const std::string& _iconPath) { m_previewIcon = _iconPath; };
45 const std::string& getPreviewIcon(void) const { return m_previewIcon; };
46
47 private:
48 std::string m_name;
49 std::string m_title;
50 std::string m_previewIcon;
51 };
52
53}
#define OT_GUI_API_EXPORT
Definition OTGuiAPIExport.h:9
Definition GraphicsPickerItemInformation.h:19
void setTitle(const std::string &_title)
Definition GraphicsPickerItemInformation.h:41
const std::string & getTitle(void) const
Definition GraphicsPickerItemInformation.h:42
const std::string & getName(void) const
Definition GraphicsPickerItemInformation.h:39
void setPreviewIcon(const std::string &_iconPath)
Definition GraphicsPickerItemInformation.h:44
void setName(const std::string &_name)
Definition GraphicsPickerItemInformation.h:38
const std::string & getPreviewIcon(void) const
Definition GraphicsPickerItemInformation.h:45
The Serializable class is the default interface of serializable objects.
Definition Serializable.h:17
Definition Connector.h:8
rapidjson::Value JsonValue
Writable JSON value.
Definition JSON.h:27
rapidjson::GenericObject< true, rapidjson::GenericValue< rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > > > ConstJsonObject
Read only JSON Object.
Definition JSON.h:35
rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > JsonAllocator
Allocator used for writing to JSON values.
Definition JSON.h:30