OpenLexocad  28.0
PropertyBrush.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Core/Property.h>
4 
5 class QBrush;
6 
7 namespace Core
8 {
9 class LX_CORE_EXPORT PropertyBrush : public Core::Property
10 {
12 
13 public:
16 
17  void setValue(const QBrush& brush);
18  bool setValueFromVariant(const Core::Variant& value);
20 
21  const QBrush& getValue() const;
23 
24  virtual void save(Base::AbstractWriter& writer, Base::PersistenceVersion& save_version);
26  virtual bool isEqual(const Property*) const;
27  virtual Core::Property* copy(void) const override;
28  virtual void paste(const Core::Property& from) override;
29 
30 protected:
31  std::unique_ptr<QBrush> _pimpl;
32 };
33 
35 
36 
37 } // namespace Core
Property.h
Core::PropertyBrush::copyValue
void copyValue(Core::Property *p)
Core::PropertyBrush::_pimpl
std::unique_ptr< QBrush > _pimpl
Definition: PropertyBrush.h:31
Core::PropertyBrush::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::PropertyBrush::isEqual
virtual bool isEqual(const Property *) const
compare properties
Core::PropertyBrush::paste
virtual void paste(const Core::Property &from) override
Paste the value from the property (mainly for Undo/Redo and transactions)
Core::PropertyBrush::setValueFromVariant
bool setValueFromVariant(const Core::Variant &value)
Base::PersistenceVersion
Definition: Persistence.h:13
Core::PropertyBrush::setValue
void setValue(const QBrush &brush)
Core
Definition: Base.h:5
Core::Variant
Definition: Variant.h:78
Base::AbstractWriter
Definition: Writer.h:13
Core::PropertyBrush::getVariant
Core::Variant getVariant(void) const
Core::PropertyBrush
Definition: PropertyBrush.h:10
Core::PropertyBrush::getValue
const QBrush & getValue() const
Base::AbstractXMLReader
Definition: AbstractXMLReader.h:7
Core::PropertyBrush::~PropertyBrush
~PropertyBrush()
Core::PropertyBrush::PropertyBrush
PropertyBrush()
Core::version
LX_CORE_EXPORT Version & version
Core::PropertyBrush::restore
virtual void restore(Base::AbstractXMLReader &reader, Base::PersistenceVersion &version)
This method is used to restore properties from an XML document.
Core::Property
Definition: Property.h:72
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::PropertyBrush::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...