ddt  0.1
ddtImageGraphicsItem.hpp
Go to the documentation of this file.
1 // @copyright
2 // (c) Copyright ESO 2020
3 // All Rights Reserved
4 // ESO (eso.org) is an Intergovernmental Organization, and therefore special
5 // legal conditions apply.
6 //
7 // @file ddtImageGraphicsItem.hpp
8 // @brief DDT Widgets. Class for CPL Image Graphics Items.
9 //
10 // Class derived from QGraphicsItem. Base class for all types of DDT Images.
11 //
12 // @author Carsten Mannel, CGI
13 // @since 2020/03/11
14 //
15 
16 #ifndef DDT_DATAVISUALISATION_DDTWIDGETS_DDT_IMAGE_GRAPHICSITEM_HPP
17 #define DDT_DATAVISUALISATION_DDTWIDGETS_DDT_IMAGE_GRAPHICSITEM_HPP
18 
19 #include <QGraphicsItem>
20 #include <QPainter>
21 
25 class DdtImageGraphicsItem : public QGraphicsItem {
26  public:
40 
45  QRectF boundingRect() const = 0;
52  void paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
53  QWidget* widget) = 0;
54 
59  virtual QImage* GetImage() = 0;
60 
64  enum { Type = UserType + 500 };
65 
70  virtual int type() const = 0;
71 
72  protected:
76  QImage image;
77 
78  private:
79  int width;
80  int height;
81 };
82 
83 #endif // DDT_DATAVISUALISATION_DDTWIDGETS_DDT_IMAGE_GRAPHICSITEM_HPP
DdtImageGraphicsItem::type
virtual int type() const =0
DdtImageGraphicsItem::image
QImage image
Definition: ddtImageGraphicsItem.hpp:76
DdtImageGraphicsItem
Definition: ddtImageGraphicsItem.hpp:25
DdtImageGraphicsItem::~DdtImageGraphicsItem
virtual ~DdtImageGraphicsItem()
DdtImageGraphicsItem::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)=0
DdtImageGraphicsItem::Type
@ Type
Definition: ddtImageGraphicsItem.hpp:64
DdtImageGraphicsItem::DdtImageGraphicsItem
DdtImageGraphicsItem()
Definition: ddtImageGraphicsItem.cpp:18
DdtImageGraphicsItem::GetImage
virtual QImage * GetImage()=0
DdtImageGraphicsItem::boundingRect
QRectF boundingRect() const =0