IntelliPhoto  0.4
IntelliImage.h
Go to the documentation of this file.
1 #ifndef INTELLIIMAGE_H
2 #define INTELLIIMAGE_H
3 
4 #include<QImage>
5 #include<QPoint>
6 #include<QColor>
7 #include<QSize>
8 #include<QWidget>
9 #include<vector>
10 
14 enum class ImageType{
17 };
18 
19 class IntelliTool;
20 
25  friend IntelliTool;
26 protected:
27  void resizeImage(QImage *image, const QSize &newSize);
28 
32  QImage imageData;
33 public:
39  IntelliImage(int weight, int height);
40 
44  virtual ~IntelliImage() = 0;
45 
46 
52  virtual void drawPixel(const QPoint &p1, const QColor& color);
53 
61  virtual void drawLine(const QPoint &p1, const QPoint& p2, const QColor& color, const int& penWidth);
62 
69  virtual void drawPoint(const QPoint &p1, const QColor& color, const int& penWidth);
70 
75  virtual void drawPlain(const QColor& color);
76 
83  virtual QImage getDisplayable(const QSize& displaySize, int alpha)=0;
84 
90  virtual QImage getDisplayable(int alpha=255)=0;
91 
96  virtual IntelliImage* getDeepCopy()=0;
97 
101  virtual void calculateVisiblity()=0;
102 
107  virtual void setPolygon(const std::vector<QPoint>& polygonData)=0;
108 
113  virtual std::vector<QPoint> getPolygonData(){ return std::vector<QPoint>();}
114 
120  virtual bool loadImage(const QString &fileName);
121 
127  virtual QColor getPixelColor(QPoint& point);
128 };
129 
130 #endif
ImageType
ImageType
The Types, which an Image can be.
Definition: IntelliImage.h:14
IntelliImage::drawLine
virtual void drawLine(const QPoint &p1, const QPoint &p2, const QColor &color, const int &penWidth)
A function that draws A Line between two given Points in a given color.
Definition: IntelliImage.cpp:65
IntelliImage::~IntelliImage
virtual ~IntelliImage()=0
An Abstract Destructor.
Definition: IntelliImage.cpp:10
IntelliImage::drawPixel
virtual void drawPixel(const QPoint &p1, const QColor &color)
A funtcion used to draw a pixel on the Image with the given Color.
Definition: IntelliImage.cpp:44
IntelliImage::loadImage
virtual bool loadImage(const QString &fileName)
A function that loads and sclaes an image to the fitting dimensions.
Definition: IntelliImage.cpp:14
IntelliImage::getDisplayable
virtual QImage getDisplayable(const QSize &displaySize, int alpha)=0
A function returning the displayable ImageData in a requested transparence and size.
ImageType::Raster_Image
IntelliImage::getPolygonData
virtual std::vector< QPoint > getPolygonData()
A function that returns the Polygondata if existent.
Definition: IntelliImage.h:113
IntelliImage::drawPoint
virtual void drawPoint(const QPoint &p1, const QColor &color, const int &penWidth)
A.
Definition: IntelliImage.cpp:55
IntelliImage::IntelliImage
IntelliImage(int weight, int height)
The Construcor of the IntelliImage. Given the Image dimensions.
Definition: IntelliImage.cpp:5
IntelliTool
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition: IntelliTool.h:13
ImageType::Shaped_Image
IntelliImage::resizeImage
void resizeImage(QImage *image, const QSize &newSize)
Definition: IntelliImage.cpp:29
IntelliImage::getPixelColor
virtual QColor getPixelColor(QPoint &point)
A function that returns the pixelcolor at a certain point.
Definition: IntelliImage.cpp:81
IntelliImage::imageData
QImage imageData
The underlying image data.
Definition: IntelliImage.h:32
IntelliImage
An abstract class which manages the basic IntelliImage operations.
Definition: IntelliImage.h:24
IntelliImage::getDeepCopy
virtual IntelliImage * getDeepCopy()=0
A function that copys all that returns a [allocated] Image.
IntelliImage::calculateVisiblity
virtual void calculateVisiblity()=0
An abstract function that calculates the visiblity of the Image data if needed.
IntelliImage::drawPlain
virtual void drawPlain(const QColor &color)
A function that clears the whole image in a given Color.
Definition: IntelliImage.cpp:77
IntelliImage::setPolygon
virtual void setPolygon(const std::vector< QPoint > &polygonData)=0
An abstract function that sets the data of the visible Polygon, if needed.