ImageCanvas.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef IMAGECANVAS
00008 #define IMAGECANVAS
00009
00010 #include <qwidget.h>
00011 #include <qmainwindow.h>
00012 #include <qpen.h>
00013 #include <qpoint.h>
00014 #include <qpixmap.h>
00015 #include <qstring.h>
00016 #include <qpointarray.h>
00017 #include <qlabel.h>
00018 #include <qlayout.h>
00019 #include "Image/Image.H"
00020 #include "Image/Pixels.H"
00021 #include "QtUtil/ImageConvert.H"
00022 #include <qpopupmenu.h>
00023
00024 class QMouseEvent;
00025
00026 class ImageCanvas : public QWidget
00027 {
00028 Q_OBJECT
00029 public:
00030 ImageCanvas(QWidget *parent = 0, const char *name = 0 );
00031 ~ImageCanvas();
00032
00033
00034 std::vector<Point2D<int> > itsPointsClicked;
00035 signals:
00036 void mousePressed(int x, int y, int button);
00037
00038 public slots:
00039 void paintEvent(QPaintEvent*);
00040
00041 void setImage(Image<PixRGB<byte> > &img);
00042
00043 void setImage(Image<float> &img);
00044 void saveImg();
00045
00046 Image<PixRGB<byte> > getImage();
00047
00048
00049 protected:
00050
00051 void mousePressEvent( QMouseEvent *e );
00052
00053 private:
00054
00055 Image<PixRGB<byte> > itsImgByte;
00056 Image<float> itsImgFloat;
00057
00058
00059
00060
00061
00062 };
00063
00064 #endif