1 #ifndef PIXMAPVIEVWER_H_
2 #define PIXMAPVIEVWER_H_
6 class PixmapViewer
: public QWidget
12 PixmapViewer(QWidget
* parent
= 0, bool scaling
=true) : QWidget(parent
) {
14 setMinimumHeight(150);
17 void setPixmap(const QPixmap
& p
) {
19 m_p
= p
.scaled(qMin(p
.width(), 400),qMin(p
.height(),400),Qt::KeepAspectRatio
);
25 QPixmap
pixmap() const { return m_p
; }
26 void paintEvent(QPaintEvent
* );
30 // void keyPressEvent(QKeyEvent*);
31 void mousePressEvent(QMouseEvent
* e
);