Schim
grect.h
1 #ifndef GRECT_H
2 #define GRECT_H
3 
4 #include "gobject.h"
5 #include "model/rect.h"
6 
7 #include <QGraphicsRectItem>
8 
9 
13 class GRect : public GObject
14 {
15 public:
16  // CONSTRUCTORS
17  explicit GRect(Rect *obj = new Rect);
18 
19  // GETTERS
20  Rect *get() override;
21  const Rect *get() const override;
22 
23  // OVERRIDDE QGraphicsItem
24  QRectF boundingRect() const override;
25  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
26  QPainterPath shape() const override;
27 
28  // OBJECT EDITING
30  void reloadFromModel() override;
32  void applyToModel() override;
34  void showHandles(bool show = true) override;
36  void handleChanged(GObjectHandle *handle) override;
37 };
38 
39 #endif // GRECT_H
void handleChanged(GObjectHandle *handle) override
Called when a handle&#39;s position has changed.
A visual rectangle object.
Definition: rect.h:14
void reloadFromModel() override
Object * obj
The object that is being wrapped.
Definition: gobject.h:177
void showHandles(bool show=true) override
Display/hide the handles for this item.
The base class of all objects represented in a graphical scene.
Definition: gobject.h:24
Graphical rectangle object that wraps a Rect.
Definition: grect.h:13
The base class for object handles.
Definition: gobject.h:194
void applyToModel() override