Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef IMAGEWIDGET_H
00030 #define IMAGEWIDGET_H
00031
00032 #include "GraphicObject.h"
00033
00034 namespace SciFigs {
00035
00036 class AxisWindow;
00037 class GraphicObjectProperties;
00038
00039 class SCIFIGS_EXPORT ImageWidget : public GraphicObject
00040 {
00041 Q_OBJECT
00042
00043 Q_PROPERTY(QString imageFormat READ dummyPropertyString WRITE setDummyProperty STORED false)
00044 Q_PROPERTY(bool fixedXYRatio READ dummyPropertyInt WRITE setConstantWidthHeightRatio STORED false)
00045
00046 Q_PROPERTY(QString imageFile READ fileName WRITE setFileName SCRIPTABLE true)
00047 public:
00048 ImageWidget(QWidget * parent=0);
00049 ~ImageWidget();
00050
00051 virtual const QString& xml_tagName() const {return xmlImageWidgetTag;}
00052 static const QString xmlImageWidgetTag;
00053
00054 QString fileName() const {return _fileName;}
00055 void setFileName(QString s) {_fileName=s;}
00056
00057 void loadImage();
00058
00059 virtual void addProperties(PropertyProxy * pp);
00060 virtual void removeProperties(PropertyProxy * pp);
00061 virtual void properties(PropertyWidget * w) const;
00062 virtual void setProperty(uint wid, int pid, QVariant val);
00063 private:
00064 QImage _trueImage;
00065 QPixmap _pixmap;
00066 QString _fileName;
00067 static uint _category, _tabLink;
00068
00069 virtual void xml_polish(XML_POLISH_ARGS);
00070 virtual void resizeEvent(QResizeEvent *);
00071 virtual void paintEvent(QPaintEvent * e);
00072 virtual void updateMask();
00073 virtual void paint(QPainter& p, double dotpercm,int w, int h, bool mask);
00074 virtual void update();
00075 };
00076
00077 }
00078
00079 #endif // IMAGEWIDGET_H