start of unit test

This commit is contained in:
Jonas Mucke
2020-01-12 20:23:39 +01:00
parent 573cabf448
commit 5a05aa4a19
21 changed files with 180 additions and 97 deletions

View File

@@ -22,20 +22,6 @@ PaintingArea::PaintingArea(int maxWidth, int maxHeight, QWidget*parent)
: QWidget(parent){
this->Tool = nullptr;
this->setLayerDimensions(maxWidth, maxHeight);
this->addLayer(200,200,0,0,IntelliImage::ImageType::SHAPEDIMAGE);
layerBundle[0].image->drawPlain(QColor(0,0,255,255));
std::vector<QPoint> polygon;
polygon.push_back(QPoint(100,000));
polygon.push_back(QPoint(200,100));
polygon.push_back(QPoint(100,200));
polygon.push_back(QPoint(000,100));
layerBundle[0].image->setPolygon(polygon);
this->addLayer(200,200,150,150,IntelliImage::ImageType::RASTERIMAGE);
layerBundle[1].image->drawPlain(QColor(0,255,0,255));
layerBundle[1].alpha=200;
activeLayer=0;
}
PaintingArea::~PaintingArea(){

View File

@@ -14,6 +14,9 @@
#include "Tool/IntelliTool.h"
#include "IntelliHelper/IntelliColorPicker.h"
//for unit testing
class UnitTest;
/*!
* \brief The LayerObject struct holds all the information needed to construct a layer
* \param width - Stores the width of a layer in pixels
@@ -36,6 +39,7 @@ struct LayerObject {
*/
class PaintingArea : public QWidget
{
friend UnitTest;
// Declares our class as a QObject which is the base class
// for all Qt objects
// QObjects handle events