IntelliPhoto 0.5

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IntelliImage Class Referenceabstract

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

`#include <IntelliImage.h>`

Inheritance diagram for IntelliImage:

## Public Types
enum | ImageType { ImageType::RASTERIMAGE, ImageType::SHAPEDIMAGE }
| The Types, which an Image can be. More...

## 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. 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 IntelliImage * | getDeepCopy ()=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. 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 | fastRenderer
| fastRenderer 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 19 of file IntelliImage.h.

## Member Enumeration Documentation

## ◆ ImageType

enum IntelliImage::ImageType
| strong

The Types, which an Image can be.

Enumerator
RASTERIMAGE |
SHAPEDIMAGE |

Definition at line 26 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 18 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 88 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 55 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 105 of file IntelliImage.cpp.

## ◆ drawPoint()

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

A.

Parameters

  p1 |
  color |
  penWidth |

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

## ◆ getImageData()

QImage IntelliImage::getImageData | ( |  | ) |
| virtual

getImageData returns the data of the current image.

Definition at line 123 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 115 of file IntelliImage.cpp.

## ◆ getPolygonData()

virtual std::vector<QPoint> IntelliImage::getPolygonData | ( |  | ) |
| inline virtual

A function that returns the Polygondata if existent.

Returns
  The Polygondata if existent.

Reimplemented in IntelliShapedImage.

Definition at line 130 of file IntelliImage.h.

## ◆ getTypeOfImage()

virtual ImageType IntelliImage::getTypeOfImage | ( |  | ) |
| inline virtual

Definition at line 134 of file IntelliImage.h.

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

## ◆ resizeImage()

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

Definition at line 37 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

  fastRendererOn | flag for the 8bit image handeling.

Definition at line 127 of file IntelliImage.cpp.

## Member Data Documentation

## ◆ fastRenderer

bool IntelliImage::fastRenderer
| protected

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

Definition at line 47 of file IntelliImage.h.

## ◆ imageData

QImage IntelliImage::imageData
| protected

The underlying image data.

Definition at line 37 of file IntelliImage.h.

## ◆ TypeOfImage

ImageType IntelliImage::TypeOfImage
| protected

The Type, an Image is.

Definition at line 42 of file IntelliImage.h.

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

- intelliphoto/src/Image/IntelliImage.h
- intelliphoto/src/Image/IntelliImage.cpp