OpenLexocad  27.0
PropertyDrawStyle.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Draw/DrawStyle.h>
4 
5 #include "Core/Property.h"
6 #include "Core/Variant.h"
7 
8 namespace Core
9 {
11 {
13 
14 public:
15  PropertyDrawStyle(void);
16  virtual ~PropertyDrawStyle(void);
17 
18  void setValue(const Draw::DrawStyle& ds);
19  bool setValueFromVariant(const Core::Variant& value);
20  virtual bool setKeyValue(const std::string& name, const Core::Variant& value);
21  void copyValue(Core::Property* p);
22 
23  const Draw::DrawStyle& getValue() const;
24  Core::Variant getVariant(void) const;
25 
27  virtual std::map<std::string, Core::Variant> getKeyValueMap() const;
28 
29  virtual void save(Base::AbstractWriter& writer, Base::PersistanceVersion& save_version);
30  virtual void restore(Base::AbstractXMLReader& reader, Base::PersistanceVersion& version);
31  virtual bool isEqual(const Property*) const;
32  std::shared_ptr<Core::DbgInfo> getDbgInfo() const override;
33 
34 protected:
35  Draw::DrawStyle _drawstyle;
36 };
37 
38 DECLARE_PROPERTY_FACTORY(PropertyDrawStyle_Factory, Core::PropertyDrawStyle);
39 
41 
43 {
45 
46 public:
47  PropertyArrowheads(void);
48  virtual ~PropertyArrowheads(void);
49 
50  void setValue(const Draw::Arrowheads& value);
51  bool setValueFromVariant(const Core::Variant& value);
52  virtual bool setKeyValue(const std::string& name, const Core::Variant& value);
53  void copyValue(Core::Property* p);
54 
55  const Draw::Arrowheads& getValue() const;
56  Core::Variant getVariant(void) const;
57  virtual std::map<std::string, Core::Variant> getKeyValueMap() const;
58 
59  virtual void save(Base::AbstractWriter& writer, Base::PersistanceVersion& save_version);
60  virtual void restore(Base::AbstractXMLReader& reader, Base::PersistanceVersion& version);
61  virtual bool isEqual(const Property*) const;
62 
63 protected:
64  Draw::Arrowheads _arrowHeads;
65 };
66 
67 DECLARE_PROPERTY_FACTORY(PropertyArrowheads_Factory, Core::PropertyArrowheads);
68 } // namespace Core
#define CORE_EXPORT
Definition: core_defines2.h:10
Core::PropertyText name
Definition: CoreDocument.h:143
Definition: PropertyDrawStyle.h:42
Definition: Persistance.h:20
Draw::DrawStyle _drawstyle
Definition: PropertyDrawStyle.h:35
LX_CORE_EXPORT Version & version
Definition: Variant.h:90
Definition: AbstractXMLReader.h:10
Definition: PropertyDrawStyle.h:10
Definition: Base.h:19
Definition: Writer.h:27
Definition: Property.h:81
Draw::Arrowheads _arrowHeads
Definition: PropertyDrawStyle.h:64
TYPESYSTEM_HEADER()
DECLARE_PROPERTY_FACTORY(PropertyAxis1_Factory, Core::PropertyAxis1)