IntelliPhoto  1
IntelliImage Class Referenceabstract

An abstract class which manages the basic IntelliImage operations. More...

#include <IntelliImage.h>

Inheritance diagram for IntelliImage:
IntelliRasterImage IntelliShapedImage

Public Member Functions

 IntelliImage (int width, int height, bool fastRendererOn)
 The Construcor of the IntelliImage. Given the Image dimensions. More...
 
virtual ~IntelliImage ()=0
 An Abstract Destructor. More...
 
virtual void drawPixel (const QPoint &p1, const QColor &color)
 A funtcion used to draw a pixel on the Image with the given Color. More...
 
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. More...
 
virtual void drawPoint (const QPoint &p1, const QColor &color, const int &penWidth)
 A function that draws a point between on a given point in a given color. More...
 
virtual void drawPlain (const QColor &color)
 A function that clears the whole image in a given Color. More...
 
virtual QImage getDisplayable (const QSize &displaySize, int alpha)=0
 A function returning the displayable ImageData in a requested transparence and size. More...
 
virtual QImage getDisplayable (int alpha=255)=0
 A function returning the displayable ImageData in a requested transparence and it's standart size. More...
 
virtual IntelliImagegetDeepCopy ()=0
 A function that copys all that returns a [allocated] Image. More...
 
virtual void calculateVisiblity ()=0
 An abstract function that calculates the visiblity of the Image data if needed. More...
 
virtual void setPolygon (const std::vector< QPoint > &polygonData)=0
 An abstract function that sets the data of the visible Polygon, if needed. More...
 
virtual std::vector< QPoint > getPolygonData ()
 A function that returns the Polygondata if existent. More...
 
virtual ImageType getTypeOfImage ()
 
virtual bool loadImage (const QString &filePath)
 A function that loads and sclaes an image to the fitting dimensions. More...
 
virtual QColor getPixelColor (QPoint &point)
 A function that returns the pixelcolor at a certain point. More...
 
virtual void updateRendererSetting (bool fastRendererOn)
 updateRendererSetting updates the existing image format to the new format. More...
 
virtual QImage getImageData ()
 getImageData returns the data of the current image (Note: It will allways return a ARGB32bit QImage!). More...
 
virtual void setImageData (const QImage &newData)
 setImageData overwrites the old imageData the new imageData. More...
 
virtual int getWidth () const
 getWidth returns the width of the Image. More...
 
virtual int getHeight () const
 getHeight returns the height of the Image. More...
 
virtual bool isFastRendering () const
 isFastRendering returns if the Image is in fast rendering mode. More...
 

Protected Member Functions

void resizeImage (QImage *image, const QSize &newSize)
 

Protected Attributes

QImage imageData
 The underlying image data. More...
 
ImageType TypeOfImage
 The Type, an Image is. More...
 
bool fastRenderering
 fastRendering is the flag that represents the usage of 8bit pictures. More...
 

Detailed Description

An abstract class which manages the basic IntelliImage operations.

Definition at line 30 of file IntelliImage.h.

Constructor & Destructor Documentation

◆ IntelliImage()

IntelliImage::IntelliImage ( int  width,
int  height,
bool  fastRendererOn 
)

The Construcor of the IntelliImage. Given the Image dimensions.

Parameters
width- The width of the Image.
height- The height of the Image.
fastRendererOn- Represents the flag for 8bit picture handelling.

Definition at line 5 of file IntelliImage.cpp.

◆ ~IntelliImage()

IntelliImage::~IntelliImage ( )
pure virtual

An Abstract Destructor.

Definition at line 19 of file IntelliImage.cpp.

Member Function Documentation

◆ calculateVisiblity()

virtual void IntelliImage::calculateVisiblity ( )
pure virtual

An abstract function that calculates the visiblity of the Image data if needed.

Implemented in IntelliRasterImage.

◆ drawLine()

void IntelliImage::drawLine ( const QPoint &  p1,
const QPoint &  p2,
const QColor &  color,
const int &  penWidth 
)
virtual

A function that draws a line between two given points in a given color.

Parameters
p1- The coordinates of the first Point.
p2- The coordinates of the second Point.
color- The color of the line.
penWidth- The width of the line.

Definition at line 97 of file IntelliImage.cpp.

◆ drawPixel()

void IntelliImage::drawPixel ( const QPoint &  p1,
const QColor &  color 
)
virtual

A funtcion used to draw a pixel on the Image with the given Color.

Parameters
p1- The coordinates of the pixel, which should be drawn. [Top-Left-System]
color- The color of the pixel.

Definition at line 58 of file IntelliImage.cpp.

◆ drawPlain()

void IntelliImage::drawPlain ( const QColor &  color)
virtual

A function that clears the whole image in a given Color.

Parameters
color- The color, in which the image will be filled.

Definition at line 117 of file IntelliImage.cpp.

◆ drawPoint()

void IntelliImage::drawPoint ( const QPoint &  p1,
const QColor &  color,
const int &  penWidth 
)
virtual

A function that draws a point between on a given point in a given color.

Parameters
p1- The coordinates of the first Point.
color- The color of the point.
penWidth- The size of the point.

Definition at line 78 of file IntelliImage.cpp.

◆ getDeepCopy()

virtual IntelliImage* IntelliImage::getDeepCopy ( )
pure virtual

A function that copys all that returns a [allocated] Image.

Returns
An [allocated] image with all the properties of the instance.

Implemented in IntelliShapedImage, and IntelliRasterImage.

◆ getDisplayable() [1/2]

virtual QImage IntelliImage::getDisplayable ( const QSize &  displaySize,
int  alpha 
)
pure virtual

A function returning the displayable ImageData in a requested transparence and size.

Parameters
displaySize- The size, in whcih the Image should be displayed.
alpha- The maximum alpha value, a pixel can have.
Returns
A QImage which is ready to be displayed.

Implemented in IntelliShapedImage, and IntelliRasterImage.

◆ getDisplayable() [2/2]

virtual QImage IntelliImage::getDisplayable ( int  alpha = 255)
pure virtual

A function returning the displayable ImageData in a requested transparence and it's standart size.

Parameters
alpha- The maximum alpha value, a pixel can have.
Returns
A QImage which is ready to be displayed.

Implemented in IntelliShapedImage, and IntelliRasterImage.

◆ getHeight()

int IntelliImage::getHeight ( ) const
virtual

getHeight returns the height of the Image.

Returns
The height of the Image in pixel.

Definition at line 167 of file IntelliImage.cpp.

◆ getImageData()

QImage IntelliImage::getImageData ( )
virtual

getImageData returns the data of the current image (Note: It will allways return a ARGB32bit QImage!).

Definition at line 135 of file IntelliImage.cpp.

◆ getPixelColor()

QColor IntelliImage::getPixelColor ( QPoint &  point)
virtual

A function that returns the pixelcolor at a certain point.

Parameters
point- The point from whcih to get the coordinates.
Returns
The color of the Pixel as QColor.

Definition at line 127 of file IntelliImage.cpp.

◆ getPolygonData()

virtual std::vector<QPoint> IntelliImage::getPolygonData ( )
inlinevirtual

A function that returns the Polygondata if existent.

Returns
The Polygondata if existent.

Reimplemented in IntelliShapedImage.

Definition at line 135 of file IntelliImage.h.

◆ getTypeOfImage()

virtual ImageType IntelliImage::getTypeOfImage ( )
inlinevirtual

Definition at line 139 of file IntelliImage.h.

◆ getWidth()

int IntelliImage::getWidth ( ) const
virtual

getWidth returns the width of the Image.

Returns
The width of the Image in pixel.

Definition at line 163 of file IntelliImage.cpp.

◆ isFastRendering()

bool IntelliImage::isFastRendering ( ) const
virtual

isFastRendering returns if the Image is in fast rendering mode.

Returns
True if the Image is fast rendered, flase otherwiese.

Definition at line 171 of file IntelliImage.cpp.

◆ loadImage()

bool IntelliImage::loadImage ( const QString &  filePath)
virtual

A function that loads and sclaes an image to the fitting dimensions.

Parameters
filePath- The path+name of the image which to loaded.
Returns
True if the image could be loaded, false otherwise.

Definition at line 23 of file IntelliImage.cpp.

◆ resizeImage()

void IntelliImage::resizeImage ( QImage *  image,
const QSize &  newSize 
)
protected

Definition at line 38 of file IntelliImage.cpp.

◆ setImageData()

void IntelliImage::setImageData ( const QImage &  newData)
virtual

setImageData overwrites the old imageData the new imageData.

Parameters
newData- represents the new imageData

Definition at line 143 of file IntelliImage.cpp.

◆ setPolygon()

virtual void IntelliImage::setPolygon ( const std::vector< QPoint > &  polygonData)
pure virtual

An abstract function that sets the data of the visible Polygon, if needed.

Parameters
polygonData- The Vertices of the Polygon. Just Planar Polygons are allowed.

Implemented in IntelliShapedImage, and IntelliRasterImage.

◆ updateRendererSetting()

void IntelliImage::updateRendererSetting ( bool  fastRendererOn)
virtual

updateRendererSetting updates the existing image format to the new format.

Parameters
fastRendererOnflag for the 8bit image handeling.

Definition at line 153 of file IntelliImage.cpp.

Member Data Documentation

◆ fastRenderering

bool IntelliImage::fastRenderering
protected

fastRendering is the flag that represents the usage of 8bit pictures.

Definition at line 51 of file IntelliImage.h.

◆ imageData

QImage IntelliImage::imageData
protected

The underlying image data.

Definition at line 41 of file IntelliImage.h.

◆ TypeOfImage

ImageType IntelliImage::TypeOfImage
protected

The Type, an Image is.

Definition at line 46 of file IntelliImage.h.


The documentation for this class was generated from the following files: