Go to the documentation of this file.
73 PaintingArea(
int maxWidth = 600,
int maxHeight = 600, QWidget*parent =
nullptr);
97 bool open(
const QString &filePath);
104 bool save(
const QString &filePath,
const char*fileFormat);
255 int offsetXDimension;
256 int offsetYDimension;
258 void selectLayerUp();
259 void selectLayerDown();
267 bool isSettingPolygon =
false;
273 std::vector<LayerObject> layerBundle;
274 int activeLayer = -1;
276 void drawLayers(
bool forSaving =
false);
278 bool createTempTopLayer(
int idx);
282 std::vector<LayerObject> history[100] = {layerBundle};
283 int historyMaxPast = 0;
284 int historyMaxFuture = 0;
285 int historyPresent = 0;
int getWidthOfActive()
The getWidthOfActive gets the horizontal dimensions of the active layer.
ImageType
The Types, which an Image can be.
int addLayerAt(int idx, int width, int height, int widthOffset=0, int heightOffset=0, ImageType type=ImageType::RASTERIMAGE)
The addLayerAt adds a layer to the current project/ painting area at a specific position in the layer...
void setRenderSettings(bool isFastRenderingOn)
setRenderSettings updates all Images to the new Rendersetting.
IntelliImage * getImageOfActiveLayer()
void mouseReleaseEvent(QMouseEvent *event) override
void createRectangleTool()
bool save(const QString &filePath, const char *fileFormat)
The save method is used for exporting the current project as one picture.
void setLayerAlpha(int idx, int alpha)
The setAlphaOfLayer method sets the alpha value of a specific layer.
void setLayerActive(int idx)
The setLayerToActive method marks a specific layer as active.
int widthOffset
widthOffset - Stores the number of pixles from the left side of the painting area.
void deleteLayer(int idx, bool isTool=false)
The deleteLayer method removes a layer at a given idx.
The IntelliPhotoGui base class handles the graphical user interface and events for the intelliPhoto p...
int heightOffset
heightOffset - Stores the number of pixles from the top of the painting area.
int getHeightOfActive()
The getHeightOfActive gets the vertical dimensions of the active layer.
void wheelEvent(QWheelEvent *event) override
The PaintingArea class manages the methods and stores information about the current painting area,...
The LayerObject struct holds all the information needed to construct a layer.
void mousePressEvent(QMouseEvent *event) override
int alpha
alpha - Stores the alpha value of the layer (default=255).
void colorPickerSetSecondColor()
The colorPickerSetSecondColor calls the QTColorPicker to determine the secondary drawing color.
void colorPickerSetFirstColor()
The colorPickerSetFirstColor calls the QTColorPicker to determine the primary drawing color.
std::vector< LayerObject > * getLayerBundle()
getLayerBundle returns the real active layerbundle (care!)
int width
width - Stores the width of a layer in pixels.
~PaintingArea() override
This deconstructor is used to clear up the memory and remove the currently active window.
void mouseMoveEvent(QMouseEvent *event) override
int getNumberOfActiveLayer()
void slotDeleteActiveLayer()
The slotDeleteActiveLayer method handles the deletion of the active layer.
ImageType getTypeOfImageRealLayer()
bool open(const QString &filePath)
The open method is used for loading a picture into the current layer.
void moveActiveLayer(int idx)
The moveActiveLayer moves the active layer to a specific position in the layer stack.
IntelliColorPicker colorPicker
PaintingArea(int maxWidth=600, int maxHeight=600, QWidget *parent=nullptr)
PaintingArea is the constructor of the PaintingArea class, which initiates the working environment.
void setPixelToActive(QColor color, QPoint point)
int height
height - Stores the height of a layer in pixels.
void deleteAllLayers()
deleteAllLayers deletes all layers
QImage getImageDataOfActiveLayer()
getImageDataOfActiveLayer used to get the currents active imageData (if there isn't any active layer ...
void setLayerDimensions(int maxWidth, int maxHeight)
void createFloodFillTool()
void slotActivateLayer(int a)
The slotActivateLayer method handles the event of selecting one layer as active.
The IntelliColorPicker manages the selected colors for one whole project.
void paintEvent(QPaintEvent *event) override
bool getRenderSettings()
getRenderSettings updates all Images to the new Rendersetting.
IntelliImage * image
image - Stores the imageData of the current LayerObject.
std::vector< QPoint > getPolygonDataOfRealLayer()
IntelliToolsettings Toolsettings
void setPolygon(int idx)
setPolygon is used for setting polygondata, it only works on RASTER images
void colorPickerSwapColors()
The colorPickerSwitchColor swaps the primary color with the secondary drawing color.
void movePositionActive(int x, int y)
The movePositionActive method moves the active layer to certain position.
An abstract class which manages the basic IntelliImage operations.
int addLayer(int width, int height, int widthOffset=0, int heightOffset=0, int alpha=255, ImageType type=ImageType::RASTERIMAGE)
The addLayer adds a layer to the current project/ painting area.
void setPolygonDataToActive(std::vector< QPoint > points)