Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
graphicsview.h
Go to the documentation of this file.
1 #ifndef GRAPHICSVIEW_H
2 #define GRAPHICSVIEW_H
3 
4 #include <QGraphicsView>
5 
6 class GraphicsView : public QGraphicsView {
7  Q_OBJECT
8 
9 public:
10  explicit GraphicsView( QWidget *parent = 0 );
11 
12  bool getFit( ) const;
13  void setFit( bool value );
14 
15 signals:
16  void dropImage( const QString &filePath );
17  void dropFolder( const QString &folderPath );
18  void saveFile( const QString &item );
19 
20  /* QWidget interface */
21 protected:
22  virtual void dragEnterEvent( QDragEnterEvent *event ) override;
23  virtual void dragMoveEvent( QDragMoveEvent *event ) override;
24  virtual void dragLeaveEvent( QDragLeaveEvent *event ) override;
25  virtual void dropEvent( QDropEvent *event ) override;
26 
27  /* QWidget interface */
28 protected:
29  virtual void resizeEvent( QResizeEvent *event ) override;
30  bool fit = false;
31 };
32 
33 #endif /* GRAPHICSVIEW_H */
virtual void dragLeaveEvent(QDragLeaveEvent *event) override
void saveFile(const QString &item)
void dropImage(const QString &filePath)
void setFit(bool value)
GraphicsView(QWidget *parent=0)
Definition: graphicsview.cpp:8
virtual void dropEvent(QDropEvent *event) override
virtual void dragEnterEvent(QDragEnterEvent *event) override
virtual void resizeEvent(QResizeEvent *event) override
bool getFit() const
virtual void dragMoveEvent(QDragMoveEvent *event) override
void dropFolder(const QString &folderPath)