OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
GraphicsItemPreview.h
Go to the documentation of this file.
1
5// ###########################################################################################################################################################################################################################################################################################################################
6
7#pragma once
8
9// OpenTwin header
12
13// Qt header
14#include <QtWidgets/qlabel.h>
15
16namespace ot {
17
18 class GraphicsItemPreviewDrag;
19
20 class GraphicsItemPreview : public QLabel {
21 public:
23 virtual ~GraphicsItemPreview();
24
25 virtual void mousePressEvent(QMouseEvent* _event) override;
26 virtual void enterEvent(QEnterEvent* _event) override;
27 virtual void leaveEvent(QEvent* _event) override;
28
29 void setItemName(const std::string& _itemName) { m_itemName = _itemName; };
30 const std::string itemName(void) const { return m_itemName; };
31
32 void setOwner(const BasicServiceInformation& _owner) { m_owner = _owner; };
33 const BasicServiceInformation& getOwner(void) const { return m_owner; };
34
35 private:
36 std::string m_itemName;
38
40 };
41
42}
The BasicServiceInformation class is used to hold a service name and type. The BasicServiceInformatio...
Definition BasicServiceInformation.h:21
Definition GraphicsItemPreviewDrag.h:23
Definition GraphicsItemPreview.h:20
virtual void leaveEvent(QEvent *_event) override
Definition GraphicsItemPreview.cpp:39
virtual void enterEvent(QEnterEvent *_event) override
Definition GraphicsItemPreview.cpp:33
GraphicsItemPreview()
Definition GraphicsItemPreview.cpp:14
virtual ~GraphicsItemPreview()
Definition GraphicsItemPreview.cpp:20
void setOwner(const BasicServiceInformation &_owner)
Definition GraphicsItemPreview.h:32
virtual void mousePressEvent(QMouseEvent *_event) override
Definition GraphicsItemPreview.cpp:24
const std::string itemName(void) const
Definition GraphicsItemPreview.h:30
void setItemName(const std::string &_itemName)
Definition GraphicsItemPreview.h:29
const BasicServiceInformation & getOwner(void) const
Definition GraphicsItemPreview.h:33
Definition Connector.h:8