Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
graphicsitem.h
Go to the documentation of this file.
1 #ifndef GRAPHICSITEM_H
2 #define GRAPHICSITEM_H
3 
4 #include <QFileInfo>
5 #include <QGraphicsItem>
6 
7 /* class GraphicsItem : public QGraphicsItem { */
8 class GraphicsItem : public QGraphicsObject {
9  Q_OBJECT
10 
11 public:
12  GraphicsItem( QString name, QPixmap pix, QFileInfo file );
13  virtual QRectF boundingRect( ) const Q_DECL_OVERRIDE;
14  virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget ) Q_DECL_OVERRIDE;
15  QPixmap pixmap( ) const;
16  QFileInfo fileInfo( ) const;
17  void setPix2( const QPixmap &value );
18  QPixmap getPix2( ) const;
19 
20 signals:
21  void Image( const QPixmap &, const QFileInfo & );
22 
23 protected:
24  virtual void mousePressEvent( QGraphicsSceneMouseEvent *event ) Q_DECL_OVERRIDE;
25  virtual void mouseMoveEvent( QGraphicsSceneMouseEvent *event ) Q_DECL_OVERRIDE;
26  virtual void mouseReleaseEvent( QGraphicsSceneMouseEvent *event ) Q_DECL_OVERRIDE;
27 
28 private:
29  QPixmap pix;
30  QPixmap pix2;
31  QFileInfo file;
32 };
33 
34 #endif /* GRAPHICSITEM_H */
GraphicsItem(QString name, QPixmap pix, QFileInfo file)
Definition: graphicsitem.cpp:6
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE
QPixmap getPix2() const
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE
void setPix2(const QPixmap &value)
virtual QRectF boundingRect() const Q_DECL_OVERRIDE
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE
QPixmap pixmap() const
Definition: gzappend.c:170
void Image(const QPixmap &, const QFileInfo &)
QFileInfo fileInfo() const