1 #ifndef PIXMAPVIEVWER_H_
2 #define PIXMAPVIEVWER_H_
6 class PixmapViewer
: public QWidget
11 PixmapViewer(QWidget
* parent
= 0) : QWidget(parent
) {
13 setMinimumHeight(150);
15 void setPixmap(const QPixmap
& p
) {
16 m_p
= p
.scaled(qMin(p
.width(), 400),qMin(p
.height(),400),Qt::KeepAspectRatio
);
19 QPixmap
pixmap() const { return m_p
; }
20 void paintEvent(QPaintEvent
* );
24 void mousePressEvent(QMouseEvent
* e
);