Schim
gcomponent.h
1 #ifndef GCOMPONENT_H
2 #define GCOMPONENT_H
3 
4 #include "model/component.h"
5 #include "ui/objects/gcompositeobject.h"
6 
7 #include <QObject>
8 
13 {
14  Q_OBJECT
15 public:
16  // CONSTRUCTORS
17  explicit GComponent(Component *obj);
18 
19  // GETTERS
20  Component *get() override;
21  const Component *get() const override;
22 
23 private slots:
24  void onContextEdit();
25 
26 private:
27  // EVENTS
28  void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
29  void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
30  void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
31  QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
32  void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override;
33 };
34 
35 #endif // GCOMPONENT_H
Graphical object that wraps a Component.
Definition: gcomponent.h:12
Object * obj
The object that is being wrapped.
Definition: gobject.h:177
A graphical object that wraps a CompositeObject.
Definition: gcompositeobject.h:11
Model of an electrical component.
Definition: component.h:16