OpenLexocad  27.1
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 {
10 class LX_CORE_EXPORT PropertyDrawStyle : public Core::Property
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::PersistenceVersion& save_version);
30  virtual void restore(Base::AbstractXMLReader& reader, Base::PersistenceVersion& version);
31  virtual bool isEqual(const Property*) const;
32  std::shared_ptr<Core::DbgInfo> getDbgInfo() const override;
33  virtual Core::Property* copy(void) const override;
34  virtual void paste(const Core::Property& from) override;
35 
36 protected:
37  Draw::DrawStyle _drawstyle;
38 };
39 
40 DECLARE_PROPERTY_FACTORY(PropertyDrawStyle_Factory, Core::PropertyDrawStyle);
41 
43 
44 class LX_CORE_EXPORT PropertyArrowheads : public Core::Property
45 {
47 
48 public:
49  PropertyArrowheads(void);
50  virtual ~PropertyArrowheads(void);
51 
52  void setValue(const Draw::Arrowheads& value);
53  bool setValueFromVariant(const Core::Variant& value);
54  virtual bool setKeyValue(const std::string& name, const Core::Variant& value);
55  void copyValue(Core::Property* p);
56 
57  const Draw::Arrowheads& getValue() const;
58  Core::Variant getVariant(void) const;
59  virtual std::map<std::string, Core::Variant> getKeyValueMap() const;
60 
61  virtual void save(Base::AbstractWriter& writer, Base::PersistenceVersion& save_version);
62  virtual void restore(Base::AbstractXMLReader& reader, Base::PersistenceVersion& version);
63  virtual bool isEqual(const Property*) const;
64  virtual Core::Property* copy(void) const override;
65  virtual void paste(const Core::Property& from) override;
66 
67 protected:
68  Draw::Arrowheads _arrowHeads;
69 };
70 
71 DECLARE_PROPERTY_FACTORY(PropertyArrowheads_Factory, Core::PropertyArrowheads);
72 } // namespace Core
Definition: Persistence.h:14
Core::PropertyText name
Definition: CoreDocument.h:167
Definition: PropertyDrawStyle.h:44
Draw::DrawStyle _drawstyle
Definition: PropertyDrawStyle.h:37
LX_CORE_EXPORT Version & version
Definition: Variant.h:87
Definition: AbstractXMLReader.h:7
Definition: PropertyDrawStyle.h:10
Definition: Base.h:12
Definition: Writer.h:16
Definition: Property.h:77
Draw::Arrowheads _arrowHeads
Definition: PropertyDrawStyle.h:68
TYPESYSTEM_HEADER()
DECLARE_PROPERTY_FACTORY(PropertyAxis1_Factory, Core::PropertyAxis1)