OpenLexocad  27.1
PropertyPen.h
Go to the documentation of this file.
1 #pragma once
2 #include <QPen>
3 #include <string>
4 
5 #include "Core/Property.h"
6 #include "Core/Variant.h"
7 
8 namespace Core
9 {
10 class LX_CORE_EXPORT PropertyPen : public Core::Property
11 {
13 
14 public:
15  PropertyPen(void);
16  virtual ~PropertyPen(void);
17 
18  void setValue(const QPen& pen);
19  bool setValueFromVariant(const Core::Variant& value);
20  void copyValue(Core::Property* p);
21 
22  const QPen& getValue() const;
23  Core::Variant getVariant(void) const;
24 
25  virtual void save(Base::AbstractWriter& writer, Base::PersistenceVersion& save_version);
26  virtual void restore(Base::AbstractXMLReader& reader, Base::PersistenceVersion& version);
27  virtual bool isEqual(const Property*) const;
28  virtual Core::Property* copy(void) const override;
29  virtual void paste(const Core::Property& from) override;
30 
31 protected:
32  QPen _pen;
33 };
34 
35 DECLARE_PROPERTY_FACTORY(PropertyPen_Factory, Core::PropertyPen);
36 
37 
38 } // namespace Core
Definition: Persistence.h:14
Definition: PropertyPen.h:10
QPen _pen
Definition: PropertyPen.h:32
LX_CORE_EXPORT Version & version
Definition: Variant.h:87
Definition: AbstractXMLReader.h:7
Definition: Base.h:12
Definition: Writer.h:16
Definition: Property.h:77
TYPESYSTEM_HEADER()
DECLARE_PROPERTY_FACTORY(PropertyAxis1_Factory, Core::PropertyAxis1)