OpenLexocad  28.0
PropertyAxis1.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Core/Property.h>
4 namespace Base { class AbstractWriter; }
5 namespace Base { class AbstractXMLReader; }
6 namespace Core { class CoreDocument; }
7 
8 namespace Core
9 {
10 class LX_CORE_EXPORT PropertyAxis1 : public Core::Property
11 {
13 
14 public:
16 
17  void setValue(const Geom::Ax1& ax1);
18  bool setValueFromVariant(const Core::Variant& value);
19 
20  void setLocation(const Geom::Pnt& loc);
21  void setDirection(const Geom::Dir& dir);
22 
24 
25  const Geom::Ax1& getValue() const;
27 
28  virtual void save(Base::AbstractWriter& writer, Base::PersistenceVersion& save_version);
29 
32  virtual bool isEqual(const Property*) const;
33  virtual Core::Property* copy(void) const override;
34  virtual void paste(const Core::Property& from) override;
35 
36 protected:
38 };
39 
40 class LX_CORE_EXPORT PropertyAxis2D : public Core::Property
41 {
43 
44 public:
46 
47  void setValue(const Geom::Ax2d& ax);
48  bool setValueFromVariant(const Core::Variant& value);
50 
51  const Geom::Ax2d& getValue() const;
53 
54  void save(Base::AbstractWriter& writer, Base::PersistenceVersion& save_version);
55 
58  virtual bool isEqual(const Property*) const;
59  virtual Core::Property* copy(void) const override;
60  virtual void paste(const Core::Property& from) override;
61 
62 protected:
64 };
65 
66 
68 DECLARE_PROPERTY_FACTORY(PropertyAxis2D_Factory, PropertyAxis2D);
69 
70 } // namespace Core
Property.h
Core::PropertyAxis1::paste
virtual void paste(const Core::Property &from) override
Paste the value from the property (mainly for Undo/Redo and transactions)
Core::PropertyAxis2D::setValueFromVariant
bool setValueFromVariant(const Core::Variant &value)
Core::PropertyAxis2D::restore
void restore(Base::AbstractXMLReader &reader, Base::PersistenceVersion &version)
Throws Base::FileException.
Core::PropertyAxis2D::_ax
Geom::Ax2d _ax
Definition: PropertyAxis1.h:63
Core::PropertyAxis2D::PropertyAxis2D
PropertyAxis2D(void)
Core::PropertyAxis2D
Definition: PropertyAxis1.h:41
Core::PropertyAxis2D::paste
virtual void paste(const Core::Property &from) override
Paste the value from the property (mainly for Undo/Redo and transactions)
Core::PropertyAxis1::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...
Geom::Ax1
Definition: Ax1.h:50
Core::PropertyAxis1::getVariant
Core::Variant getVariant(void) const
Core::PropertyAxis1
Definition: PropertyAxis1.h:11
Geom::Dir
Definition: Dir.h:45
Core::PropertyAxis2D::save
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::PropertyAxis1::setValue
void setValue(const Geom::Ax1 &ax1)
Base::PersistenceVersion
Definition: Persistence.h:13
Core::PropertyAxis1::setValueFromVariant
bool setValueFromVariant(const Core::Variant &value)
Core
Definition: Base.h:5
Core::Variant
Definition: Variant.h:78
Geom::Pnt
Defines a non-persistent 3D Cartesian point.
Definition: Pnt.h:44
Core::PropertyAxis1::restore
virtual void restore(Base::AbstractXMLReader &reader, Base::PersistenceVersion &version)
Throws Base::FileException.
Base::AbstractWriter
Definition: Writer.h:13
Core::PropertyAxis1::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::PropertyAxis1::setDirection
void setDirection(const Geom::Dir &dir)
Base::AbstractXMLReader
Definition: AbstractXMLReader.h:7
Core::PropertyAxis2D::setValue
void setValue(const Geom::Ax2d &ax)
Core::PropertyAxis1::copyValue
void copyValue(Core::Property *p)
Core::PropertyAxis1::isEqual
virtual bool isEqual(const Property *) const
compare properties
Core::PropertyAxis1::PropertyAxis1
PropertyAxis1(void)
Core::PropertyAxis2D::isEqual
virtual bool isEqual(const Property *) const
compare properties
Geom::Ax2d
Definition: Ax2d.h:51
Core::PropertyAxis2D::getValue
const Geom::Ax2d & getValue() const
Core::version
LX_CORE_EXPORT Version & version
Core::Property
Definition: Property.h:72
Core::PropertyAxis1::setLocation
void setLocation(const Geom::Pnt &loc)
Core::PropertyAxis2D::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::PropertyAxis1::_ax1
Geom::Ax1 _ax1
Definition: PropertyAxis1.h:37
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::PropertyAxis2D::getVariant
Core::Variant getVariant(void) const
Core::PropertyAxis2D::copyValue
void copyValue(Core::Property *p)
Core::PropertyAxis1::getValue
const Geom::Ax1 & getValue() const
Base
Definition: AbstractXMLReader.h:5