mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-16 21:30:31 +02:00
Merge branch 'dev' into UnitTesting
This commit is contained in:
@@ -31,7 +31,7 @@ struct LayerObject {
|
||||
int height;
|
||||
int widthOffset;
|
||||
int heightOffset;
|
||||
int alpha=255;
|
||||
int alpha = 255;
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -53,15 +53,13 @@ public:
|
||||
* \param maxHeight - The maximum amount of pixles that are inside painting area from top to bottom (default=600px)
|
||||
* \param parent - The parent window of the main window (default=nullptr)
|
||||
*/
|
||||
PaintingArea(int maxWidth=600, int maxHeight=600, QWidget*parent = nullptr);
|
||||
PaintingArea(int maxWidth = 600, int maxHeight = 600, QWidget*parent = nullptr);
|
||||
|
||||
/*!
|
||||
* \brief This deconstructor is used to clear up the memory and remove the currently active window
|
||||
*/
|
||||
~PaintingArea() override;
|
||||
|
||||
// Handles all events
|
||||
|
||||
/*!
|
||||
* \brief setRenderSettings updates all Images to the new Rendersetting.
|
||||
* \param isFastRenderingOn is the new given flag for the FastRenderer.
|
||||
@@ -91,7 +89,7 @@ bool save(const QString &filePath, const char*fileFormat);
|
||||
* \param type - Defining the ImageType of the new layer
|
||||
* \return Returns the number of layers in the project
|
||||
*/
|
||||
int addLayer(int width, int height, int widthOffset=0, int heightOffset=0, IntelliImage::ImageType type = IntelliImage::ImageType::RASTERIMAGE);
|
||||
int addLayer(int width, int height, int widthOffset = 0, int heightOffset = 0, IntelliImage::ImageType type = IntelliImage::ImageType::RASTERIMAGE);
|
||||
/*!
|
||||
* \brief The addLayerAt adds a layer to the current project/ painting area at a specific position in the layer stack
|
||||
* \param idx - Index of the position the new layer should be added
|
||||
@@ -102,7 +100,7 @@ int addLayer(int width, int height, int widthOffset=0, int heightOffset=0, Intel
|
||||
* \param type - Defining the ImageType of the new layer
|
||||
* \return Returns the id of the layer position
|
||||
*/
|
||||
int addLayerAt(int idx, int width, int height, int widthOffset=0, int heightOffset=0, IntelliImage::ImageType type = IntelliImage::ImageType::RASTERIMAGE);
|
||||
int addLayerAt(int idx, int width, int height, int widthOffset = 0, int heightOffset = 0, IntelliImage::ImageType type = IntelliImage::ImageType::RASTERIMAGE);
|
||||
/*!
|
||||
* \brief The deleteLayer method removes a layer at a given idx
|
||||
* \param idx - The index of the layer to be removed
|
||||
@@ -137,7 +135,6 @@ void movePositionActive(int x, int y);
|
||||
*/
|
||||
void moveActiveLayer(int idx);
|
||||
|
||||
//change properties of colorPicker
|
||||
/*!
|
||||
* \brief The colorPickerSetFirstColor calls the QTColorPicker to determine the primary drawing color
|
||||
*/
|
||||
@@ -151,7 +148,6 @@ void colorPickerSetSecondColor();
|
||||
*/
|
||||
void colorPickerSwapColors();
|
||||
|
||||
// Create tools
|
||||
void createPenTool();
|
||||
void createPlainTool();
|
||||
void createLineTool();
|
||||
@@ -171,6 +167,10 @@ int getWidthOfActive();
|
||||
*/
|
||||
int getHeightOfActive();
|
||||
|
||||
int getMaxWidth();
|
||||
|
||||
int getMaxHeight();
|
||||
|
||||
IntelliImage::ImageType getTypeOfImageRealLayer();
|
||||
|
||||
std::vector<QPoint> getPolygonDataOfRealLayer();
|
||||
@@ -189,7 +189,6 @@ IntelliToolsettings Toolsettings;
|
||||
IntelliColorPicker colorPicker;
|
||||
|
||||
public slots:
|
||||
// Events to handle
|
||||
/*!
|
||||
* \brief The slotActivateLayer method handles the event of selecting one layer as active
|
||||
* \param a - idx of the layer to be active
|
||||
@@ -206,11 +205,9 @@ void mouseMoveEvent(QMouseEvent*event) override;
|
||||
void mouseReleaseEvent(QMouseEvent*event) override;
|
||||
|
||||
void wheelEvent(QWheelEvent*event) override;
|
||||
// Updates the painting area where we are painting
|
||||
|
||||
void paintEvent(QPaintEvent*event) override;
|
||||
|
||||
// Makes sure the area we are drawing on remains
|
||||
// as large as the widget
|
||||
void resizeEvent(QResizeEvent*event) override;
|
||||
|
||||
private:
|
||||
@@ -230,16 +227,14 @@ IntelliTool* Tool;
|
||||
IntelliPhotoGui* DummyGui;
|
||||
|
||||
std::vector<LayerObject> layerBundle;
|
||||
int activeLayer=-1;
|
||||
int activeLayer = -1;
|
||||
|
||||
void drawLayers(bool forSaving=false);
|
||||
void drawLayers(bool forSaving = false);
|
||||
|
||||
void resizeLayer(QImage*image_res, const QSize &newSize);
|
||||
|
||||
// Helper for Tool
|
||||
bool createTempTopLayer(int idx);
|
||||
|
||||
//this function is needed to avoid errors in inputhandeling if a layer has changed
|
||||
void updateTools();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user