ddt  0.1
ddtJPEGImageGraphicsItem.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 ddtJPEGImageGraphicsItem.hpp
8 // @brief DDT Widgets. Class for JPEG Image Graphics Items.
9 //
10 // Class derived from QGraphicsItem. Allows to render a JPEG image as a
11 // QGraphicsItem.
12 //
13 // @author Carsten Mannel, CGI
14 // @since 2020/01/30
15 //
16 
17 #ifndef DDT_DATAVISUALISATION_DDTWIDGETS_JPEG_IMAGE_GRAPHICSITEM_HPP
18 #define DDT_DATAVISUALISATION_DDTWIDGETS_JPEG_IMAGE_GRAPHICSITEM_HPP
19 
21 
26  public:
40 
45  QRectF boundingRect() const;
52  void paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
53  QWidget* widget);
54 
59  virtual QImage* GetImage();
60 
64  enum { Type = UserType + 500 };
65 
70  int type() const;
71 
72  protected:
76  QImage image;
77 
78  private:
79  int width;
80  int height;
81 };
82 
83 #endif // DDT_DATAVISUALISATION_DDTWIDGETS_JPEG_IMAGE_GRAPHICSITEM_HPP
DdtJPEGImageGraphicsItem::image
QImage image
Definition: ddtJPEGImageGraphicsItem.hpp:76
DdtJPEGImageGraphicsItem::DdtJPEGImageGraphicsItem
DdtJPEGImageGraphicsItem()
Definition: ddtJPEGImageGraphicsItem.cpp:19
DdtImageGraphicsItem
Definition: ddtImageGraphicsItem.hpp:25
DdtJPEGImageGraphicsItem::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Definition: ddtJPEGImageGraphicsItem.cpp:42
DdtJPEGImageGraphicsItem::Type
@ Type
Definition: ddtJPEGImageGraphicsItem.hpp:64
DdtJPEGImageGraphicsItem::type
int type() const
Definition: ddtJPEGImageGraphicsItem.cpp:37
DdtJPEGImageGraphicsItem::~DdtJPEGImageGraphicsItem
virtual ~DdtJPEGImageGraphicsItem()
ddtImageGraphicsItem.hpp
DdtJPEGImageGraphicsItem::boundingRect
QRectF boundingRect() const
Definition: ddtJPEGImageGraphicsItem.cpp:33
DdtJPEGImageGraphicsItem
Definition: ddtJPEGImageGraphicsItem.hpp:25
DdtJPEGImageGraphicsItem::GetImage
virtual QImage * GetImage()
Definition: ddtJPEGImageGraphicsItem.cpp:49