mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-14 20:30:32 +02:00
start of unit test
This commit is contained in:
@@ -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(){
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user