Mercurial > retraceit
comparison src/imagelabel.h @ 38:26e1521b9afd
Add the possibility to detach the picture label on doubleclick
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 06 May 2015 18:09:34 +0200 |
parents | 64a51a42c01f |
children | 098a10fc2e83 |
comparison
equal
deleted
inserted
replaced
37:0c05958d254c | 38:26e1521b9afd |
---|---|
10 | 10 |
11 #include <QWidget> | 11 #include <QWidget> |
12 #include <QPixmap> | 12 #include <QPixmap> |
13 #include <QLabel> | 13 #include <QLabel> |
14 | 14 |
15 class QMouseEvent; | |
16 | |
15 class ImageLabel : public QWidget | 17 class ImageLabel : public QWidget |
16 { | 18 { |
17 Q_OBJECT | 19 Q_OBJECT |
18 | 20 |
19 public: | 21 public: |
21 const QPixmap* pixmap() const; | 23 const QPixmap* pixmap() const; |
22 | 24 |
23 public slots: | 25 public slots: |
24 void setPixmap(const QPixmap&); | 26 void setPixmap(const QPixmap&); |
25 | 27 |
28 Q_SIGNALS: | |
29 void doubleClicked(); | |
30 void closeRequested(); | |
31 | |
26 protected: | 32 protected: |
27 void resizeEvent(QResizeEvent *); | 33 void resizeEvent(QResizeEvent *); |
34 void mouseDoubleClickEvent(QMouseEvent * event); | |
35 void closeEvent(QCloseEvent *); | |
28 | 36 |
29 private slots: | 37 private slots: |
30 void resizeImage(); | 38 void resizeImage(); |
31 | 39 |
32 private: | 40 private: |