IntelliPhoto  0.5
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 
13 
14 class IntelliTool;
15 
19 class IntelliImage {
20 friend IntelliTool;
21 public:
22 
26 enum class ImageType {
29 };
30 
31 protected:
32 void resizeImage(QImage*image, const QSize &newSize);
33 
37 QImage imageData;
38 
43 
48 
49 public:
56 IntelliImage(int width, int height, bool fastRendererOn);
57 
61 virtual ~IntelliImage() = 0;
62 
63 
69 virtual void drawPixel(const QPoint &p1, const QColor& color);
70 
78 virtual void drawLine(const QPoint &p1, const QPoint& p2, const QColor& color, const int& penWidth);
79 
86 virtual void drawPoint(const QPoint &p1, const QColor& color, const int& penWidth);
87 
92 virtual void drawPlain(const QColor& color);
93 
100 virtual QImage getDisplayable(const QSize& displaySize, int alpha) = 0;
101 
107 virtual QImage getDisplayable(int alpha = 255) = 0;
108 
113 virtual IntelliImage* getDeepCopy() = 0;
114 
118 virtual void calculateVisiblity() = 0;
119 
124 virtual void setPolygon(const std::vector<QPoint>& polygonData) = 0;
125 
130 virtual std::vector<QPoint> getPolygonData(){
131  return std::vector<QPoint>();
132 }
133 
135  return TypeOfImage;
136 }
137 
143 virtual bool loadImage(const QString &filePath);
144 
150 virtual QColor getPixelColor(QPoint& point);
151 
156 virtual void updateRendererSetting(bool fastRendererOn);
157 
161 virtual QImage getImageData();
162 
167 virtual void setImageData(const QImage& newData);
168 
169 };
170 
171 #endif
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:90
IntelliImage::~IntelliImage
virtual ~IntelliImage()=0
An Abstract Destructor.
Definition: IntelliImage.cpp:18
IntelliRenderSettings.h
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:57
IntelliImage::getDisplayable
virtual QImage getDisplayable(const QSize &displaySize, int alpha)=0
A function returning the displayable ImageData in a requested transparence and size.
IntelliImage::getTypeOfImage
virtual ImageType getTypeOfImage()
Definition: IntelliImage.h:134
IntelliImage::getPolygonData
virtual std::vector< QPoint > getPolygonData()
A function that returns the Polygondata if existent.
Definition: IntelliImage.h:130
IntelliImage::IntelliImage
IntelliImage(int width, int height, bool fastRendererOn)
The Construcor of the IntelliImage. Given the Image dimensions.
Definition: IntelliImage.cpp:5
IntelliImage::drawPoint
virtual void drawPoint(const QPoint &p1, const QColor &color, const int &penWidth)
A.
Definition: IntelliImage.cpp:74
IntelliImage::updateRendererSetting
virtual void updateRendererSetting(bool fastRendererOn)
updateRendererSetting updates the existing image format to the new format.
Definition: IntelliImage.cpp:143
IntelliImage::fastRenderering
bool fastRenderering
fastRendering is the flag that represents the usage of 8bit pictures.
Definition: IntelliImage.h:47
IntelliTool
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition: IntelliTool.h:14
IntelliImage::ImageType::SHAPEDIMAGE
@ SHAPEDIMAGE
IntelliImage::getImageData
virtual QImage getImageData()
getImageData returns the data of the current image (Note: It will allways return a ARGB32bit QImage!...
Definition: IntelliImage.cpp:125
IntelliImage::resizeImage
void resizeImage(QImage *image, const QSize &newSize)
Definition: IntelliImage.cpp:37
IntelliImage::setImageData
virtual void setImageData(const QImage &newData)
setImageData overwrites the old imageData the new imageData.
Definition: IntelliImage.cpp:133
IntelliImage::TypeOfImage
ImageType TypeOfImage
The Type, an Image is.
Definition: IntelliImage.h:42
IntelliImage::getPixelColor
virtual QColor getPixelColor(QPoint &point)
A function that returns the pixelcolor at a certain point.
Definition: IntelliImage.cpp:117
IntelliImage::ImageType::RASTERIMAGE
@ RASTERIMAGE
IntelliImage::imageData
QImage imageData
The underlying image data.
Definition: IntelliImage.h:37
IntelliImage::loadImage
virtual bool loadImage(const QString &filePath)
A function that loads and sclaes an image to the fitting dimensions.
Definition: IntelliImage.cpp:22
IntelliImage
An abstract class which manages the basic IntelliImage operations.
Definition: IntelliImage.h:19
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.
IntelliTriangulation.h
IntelliImage::ImageType
ImageType
The Types, which an Image can be.
Definition: IntelliImage.h:26
IntelliImage::drawPlain
virtual void drawPlain(const QColor &color)
A function that clears the whole image in a given Color.
Definition: IntelliImage.cpp:107
IntelliImage::setPolygon
virtual void setPolygon(const std::vector< QPoint > &polygonData)=0
An abstract function that sets the data of the visible Polygon, if needed.