This commit is contained in:
Mienek
2019-12-18 17:50:10 +01:00
parent 4f808620b8
commit fa4a8ddad2
8 changed files with 20 additions and 256 deletions

View File

@@ -3,38 +3,40 @@
#include "QColorDialog"
#include "QInputDialog"
IntelliToolLine::IntelliToolLine(PaintingArea* Area, IntelliColorPicker* colorPicker)
IntelliToolFloodFill::IntelliToolFloodFill(PaintingArea* Area, IntelliColorPicker* colorPicker)
:IntelliTool(Area, colorPicker){
this->lineWidth = QInputDialog::getInt(nullptr,"Line Width Input", "Width",1,1,50,1);
//create checkbox or scroll dialog to get line style
this->lineStyle = LineStyle::SOLID_LINE;
}
IntelliToolLine::~IntelliToolLine(){
IntelliToolFloodFill::~IntelliToolFloodFill(){
}
void IntelliToolLine::onMouseRightPressed(int x, int y){
void IntelliToolFloodFill::onMouseRightPressed(int x, int y){
IntelliTool::onMouseRightPressed(x,y);
}
void IntelliToolLine::onMouseRightReleased(int x, int y){
void IntelliToolFloodFill::onMouseRightReleased(int x, int y){
IntelliTool::onMouseRightReleased(x,y);
}
void IntelliToolLine::onMouseLeftPressed(int x, int y){
void IntelliToolFloodFill::onMouseLeftPressed(int x, int y){
IntelliTool::onMouseLeftPressed(x,y);
this->start=QPoint(x,y);
this->Canvas->image->drawLine(start, start, colorPicker->getFirstColor(),lineWidth);
this->Canvas->image->get
auto depthsearch = [](int x, int y, LayerObject* Canvas){
};
Canvas->image->calculateVisiblity();
}
void IntelliToolLine::onMouseLeftReleased(int x, int y){
void IntelliToolFloodFill::onMouseLeftReleased(int x, int y){
IntelliTool::onMouseLeftReleased(x,y);
}
void IntelliToolLine::onWheelScrolled(int value){
void IntelliToolFloodFill::onWheelScrolled(int value){
IntelliTool::onWheelScrolled(value);
this->lineWidth+=value;
if(this->lineWidth<=0){
@@ -42,7 +44,7 @@ void IntelliToolLine::onWheelScrolled(int value){
}
}
void IntelliToolLine::onMouseMoved(int x, int y){
void IntelliToolFloodFill::onMouseMoved(int x, int y){
IntelliTool::onMouseMoved(x,y);
if(this->drawing){
this->Canvas->image->drawPlain(Qt::transparent);