OpenLexocad  28.0
PropertyFont.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Core/Property.h>
4 
5 class QFont;
6 
7 namespace Core
8 {
9 class LX_CORE_EXPORT PropertyFont : public Core::Property
10 {
12 
13 public:
14  PropertyFont(void);
18 
19  void setValue(const QFont& font);
20  bool setValueFromVariant(const Core::Variant& value);
22 
23  const QFont& getValue() const;
25 
26  virtual void save(Base::AbstractWriter& writer, Base::PersistenceVersion& save_version);
28  virtual bool isEqual(const Property*) const;
29  virtual Core::Property* copy(void) const override;
30  virtual void paste(const Core::Property& from) override;
31 
32 protected:
33  std::unique_ptr<QFont> _M_impl;
34 };
35 
36 
38 
39 
40 } // namespace Core
Property.h
Core::PropertyFont::copy
virtual Core::Property * copy(void) const override
Returns a new copy of the property (mainly for Undo/Redo and transactions). The copy has no container...
Core::PropertyFont::PropertyFont
PropertyFont(void)
Core::PropertyFont::_M_impl
std::unique_ptr< QFont > _M_impl
Definition: PropertyFont.h:33
Core::PropertyFont::save
virtual void save(Base::AbstractWriter &writer, Base::PersistenceVersion &save_version)
This method is used to save properties or very small amounts of data to an XML document.
Core::PropertyFont::operator=
PropertyFont & operator=(const PropertyFont &o)
Core::PropertyFont::isEqual
virtual bool isEqual(const Property *) const
compare properties
Base::PersistenceVersion
Definition: Persistence.h:13
Core
Definition: Base.h:5
Core::Variant
Definition: Variant.h:78
Base::AbstractWriter
Definition: Writer.h:13
Core::PropertyFont::getVariant
Core::Variant getVariant(void) const
Core::PropertyFont::getValue
const QFont & getValue() const
Base::AbstractXMLReader
Definition: AbstractXMLReader.h:7
Core::PropertyFont::restore
virtual void restore(Base::AbstractXMLReader &reader, Base::PersistenceVersion &version)
This method is used to restore properties from an XML document.
Core::PropertyFont::copyValue
void copyValue(Core::Property *p)
Core::version
LX_CORE_EXPORT Version & version
Core::PropertyFont::~PropertyFont
~PropertyFont()
Core::PropertyFont::setValue
void setValue(const QFont &font)
Core::Property
Definition: Property.h:72
Core::PropertyFont::paste
virtual void paste(const Core::Property &from) override
Paste the value from the property (mainly for Undo/Redo and transactions)
Core::PropertyFont
Definition: PropertyFont.h:10
TYPESYSTEM_HEADER
#define TYPESYSTEM_HEADER()
define for subclassing Base::BaseClass
Definition: Base.h:12
Core::DECLARE_PROPERTY_FACTORY
DECLARE_PROPERTY_FACTORY(PropertyAxis1_Factory, Core::PropertyAxis1)
Core::PropertyFont::PropertyFont
PropertyFont(const PropertyFont &o)
Core::PropertyFont::setValueFromVariant
bool setValueFromVariant(const Core::Variant &value)