OpenLexocad  27.1
PropertyPercent.h
Go to the documentation of this file.
1 #pragma once
2 #include <string>
3 
4 #include "Core/Property.h"
5 #include "Core/Variant.h"
6 
7 namespace Core
8 {
9 class LX_CORE_EXPORT PropertyPercent : public Core::Property
10 {
12 
13 public:
14  PropertyPercent(void);
15  virtual ~PropertyPercent(void);
16 
17  void setValue(int i);
18  bool setValueFromVariant(const Core::Variant& value);
19  void copyValue(Core::Property* p);
20 
21  int getValue() const;
22  Core::Variant getVariant(void) const;
23 
24  virtual void save(Base::AbstractWriter& writer, Base::PersistenceVersion& save_version);
25  virtual void restore(Base::AbstractXMLReader& reader, Base::PersistenceVersion& 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  int _nValue;
32 };
33 
34 DECLARE_PROPERTY_FACTORY(PropertyPercent_Factory, Core::PropertyPercent);
35 
36 } // namespace Core
Definition: Persistence.h:14
Definition: PropertyPercent.h:9
LX_CORE_EXPORT Version & version
Definition: Variant.h:87
Definition: AbstractXMLReader.h:7
Definition: Base.h:12
int _nValue
Definition: PropertyPercent.h:31
Definition: Writer.h:16
Definition: Property.h:77
TYPESYSTEM_HEADER()
DECLARE_PROPERTY_FACTORY(PropertyAxis1_Factory, Core::PropertyAxis1)