BiblioteQ: Source/biblioteq_image_drop_site.h Source File

BiblioteQ

biblioteq_image_drop_site.h
1 #ifndef _BIBLIOTEQ_IMAGE_DROP_SITE_H_
2 #define _BIBLIOTEQ_IMAGE_DROP_SITE_H_
3
4 #include <QGraphicsView>
5
6 class biblioteq_image_drop_site: public QGraphicsView
7 {
8 Q_OBJECT
9
10 public:
11 QImage m_image;
12 QString m_imageFormat;
13 biblioteq_image_drop_site(QWidget *parent);
14 void clear(void);
15 void enableDoubleClickResize(const bool state);
16 void loadFromData(const QByteArray &bytes);
17 void setImage(const QImage &image);
18 void setReadOnly(const bool readOnly);
19
20 private:
21 bool m_doubleClickResizeEnabled;
22 bool m_doubleclicked;
23 QString determineFormat(const QByteArray &bytes) const;
24 QString determineFormat(const QString &filename) const;
25 void dragEnterEvent(QDragEnterEvent *event);
26 void dragLeaveEvent(QDragLeaveEvent *event);
27 void dragMoveEvent(QDragMoveEvent *event);
28 void dropEvent(QDropEvent *event);
29 void keyPressEvent(QKeyEvent *event);
30 void mouseDoubleClickEvent(QMouseEvent *event);
31 };
32
33 #endif
biblioteq_image_drop_site
Definition: biblioteq_image_drop_site.h:6