Schim
object.h
1 #ifndef ELEMENT_H
2 #define ELEMENT_H
3 
4 #include <QPointF>
5 #include <QString>
6 
7 class CompositeObject;
8 class Sheet;
9 
21 class Object
22 {
23 public:
24  // CONSTRUCTORS
30  virtual ~Object() = default;
31  virtual Object *clone() const = 0;
32 
33  // GETTERS
35  virtual QPointF getPos() const = 0;
36  virtual QString getProperty(const QString &name) const;
37 
38  // SETTERS
40  virtual void setPos(const QPointF &pos) = 0;
41  virtual void setProperty(const QString &name, const QString &value);
42 
43  // OPERATORS
44  virtual bool operator==(const Object &obj) const;
45  virtual bool operator!=(const Object &obj) const;
46 };
47 
48 #endif // ELEMENT_H
The abstract base class for all objects in a sheet.
Definition: object.h:21
virtual void setPos(const QPointF &pos)=0
Set the position of the object in the sheet.
virtual QPointF getPos() const =0
Return the position of the object in the sheet.
This class models a sheet of paper.
Definition: sheet.h:16
An object that consists of other child objects.
Definition: compositeobject.h:16
virtual ~Object()=default
This destructor does nothing.