OpenLexocad  27.1
PropertyFont.h
Go to the documentation of this file.
1 #pragma once
2 #include <memory>
3 #include <string>
4 
5 #include "Core/Property.h"
6 #include "Core/Variant.h"
7 
8 class QFont;
9 
10 namespace Core
11 {
12 class LX_CORE_EXPORT PropertyFont : public Core::Property
13 {
15 
16 public:
17  PropertyFont(void);
18  PropertyFont(const PropertyFont& o);
19  PropertyFont& operator=(const PropertyFont& o);
20  virtual ~PropertyFont(void);
21 
22  void setValue(const QFont& font);
23  bool setValueFromVariant(const Core::Variant& value);
24  void copyValue(Core::Property* p);
25 
26  const QFont& getValue() const;
27  Core::Variant getVariant(void) 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  virtual Core::Property* copy(void) const override;
33  virtual void paste(const Core::Property& from) override;
34 
35 protected:
36  class Impl;
37  std::unique_ptr<Impl> _M_impl;
38 };
39 
40 
41 DECLARE_PROPERTY_FACTORY(PropertyFont_Factory, Core::PropertyFont);
42 
43 
44 } // namespace Core
Definition: Persistence.h:14
std::unique_ptr< Impl > _M_impl
Definition: PropertyFont.h:36
LX_CORE_EXPORT Version & version
Definition: Variant.h:87
Definition: PropertyFont.h:12
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)