Merge remote-tracking branch 'origin/dev_FormTool' into dev

This commit is contained in:
Sonaion
2019-12-12 11:30:26 +01:00
8 changed files with 135 additions and 2 deletions

View File

@@ -0,0 +1,36 @@
#include "IntelliColorPicker.h"
#include "QDebug"
IntelliColorPicker::IntelliColorPicker(PaintingArea* Area)
:IntelliTool(Area){
firstColor = {255,0,0,255};
secondColor = {0,0,255,255};
}
IntelliColorPicker::~IntelliColorPicker(){
}
void IntelliColorPicker::getColorbar(int firstOrSecondColor = 1){
QString Titel;
QColor newColor;
if(firstOrSecondColor == 1){
Titel = "Choose first Color";
newColor = QColorDialog::getColor(this->firstColor,nullptr,Titel);
this->firstColor = newColor;
qDebug() << "Firstcolor" << this->firstColor;
}
else{
Titel = "Choose second Color";
newColor = QColorDialog::getColor(this->secondColor,nullptr,Titel);
this->secondColor = newColor;
}
}
QColor IntelliColorPicker::getFirstColor(){
return firstColor;
}
QColor IntelliColorPicker::getSecondColor(){
return secondColor;
}

View File

@@ -21,7 +21,6 @@ public:
IntelliTool(PaintingArea* Area);
virtual ~IntelliTool() = 0;
virtual void onMouseRightPressed(int x, int y);
virtual void onMouseRightReleased(int x, int y);
virtual void onMouseLeftPressed(int x, int y);