00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PIXMAPWIDGET_H
00021 #define PIXMAPWIDGET_H
00022
00023 #include <QWidget>
00024 #include <QLabel>
00025 #include <QPixmap>
00026 #include <QString>
00027
00028 #include <list>
00029
00030 #include <libthjc/geometry.h>
00031
00032 class PixmapWidget : public QLabel
00033 {
00034 Q_OBJECT
00035
00036 public:
00037 PixmapWidget(QWidget *parent=0 );
00038 ~PixmapWidget();
00039
00040 void setImage(const QImage & Im);
00041 void setPoints(std::list<Point2D> aPoints) {mPoints=aPoints;repaint();};
00042 void clearPoints() {mPoints.clear();repaint();};
00043
00044 public slots:
00045 void setZoomFactor( float );
00046
00047 signals:
00048 void zoomFactorChanged( float );
00049
00050 protected:
00051 void paintEvent( QPaintEvent* );
00052 void wheelEvent( QWheelEvent* );
00053
00054 private:
00055 QPixmap m_pm;
00056 float zoomFactor;
00057
00058 std::list<Point2D> mPoints;
00059 };
00060
00061 #endif // PIXMAPWIDGET_H