IntelliPhoto  0.4
IntelliImage Class Referenceabstract

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

#include <IntelliImage.h>

Inheritance diagram for IntelliImage:

Public Member Functions

 IntelliImage (int weight, int height)
 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. 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 bool loadImage (const QString &fileName)
 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...
 

Protected Member Functions

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

Protected Attributes

QImage imageData
 The underlying image data. More...
 

Detailed Description

An abstract class which manages the basic IntelliImage operations.

Definition at line 24 of file IntelliImage.h.

Constructor & Destructor Documentation

◆ IntelliImage()

IntelliImage::IntelliImage ( int  weight,
int  height 
)

The Construcor of the IntelliImage. Given the Image dimensions.

Parameters
weight- The weight of the Image.
height- The height of the Image.

Definition at line 5 of file IntelliImage.cpp.

◆ ~IntelliImage()

IntelliImage::~IntelliImage ( )
pure virtual

An Abstract Destructor.

Definition at line 10 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.

Here is the caller graph for this function:

◆ 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 65 of file IntelliImage.cpp.

Here is the caller graph for this function:

◆ 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 44 of file IntelliImage.cpp.

Here is the caller graph for this function:

◆ 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 77 of file IntelliImage.cpp.

Here is the caller graph for this function:

◆ drawPoint()

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

A.

Parameters
p1
color
penWidth

Definition at line 55 of file IntelliImage.cpp.

◆ getDeepCopy()

virtual IntelliImage* IntelliImage::getDeepCopy ( )
pure virtual

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

Returns
A [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.

◆ 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 81 of file IntelliImage.cpp.

Here is the caller graph for this function:

◆ 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 113 of file IntelliImage.h.

◆ loadImage()

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

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

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

Definition at line 14 of file IntelliImage.cpp.

Here is the caller graph for this function:

◆ resizeImage()

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

Definition at line 29 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.

Member Data Documentation

◆ imageData

QImage IntelliImage::imageData
protected

The underlying image data.

Definition at line 32 of file IntelliImage.h.


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