Skip to content
Snippets Groups Projects
Commit 35942a12 authored by ariotte's avatar ariotte
Browse files

Merge branch 'dev2018' of https://github.com/eiimage/eiimage into dev2018

parents 8f9093c5 9d02ca2e
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ using namespace imagein; ...@@ -33,6 +33,7 @@ using namespace imagein;
RotateOp::RotateOp() : Operation(qApp->translate("Operations", "Rotation").toStdString()) RotateOp::RotateOp() : Operation(qApp->translate("Operations", "Rotation").toStdString())
{ {
_test=false, _angle=0.00;
} }
bool RotateOp::needCurrentImg() const { bool RotateOp::needCurrentImg() const {
...@@ -84,9 +85,13 @@ void RotateOp::operator()(const Image* img, const map<const Image*, string>& img ...@@ -84,9 +85,13 @@ void RotateOp::operator()(const Image* img, const map<const Image*, string>& img
QObject::connect(buttonBox, SIGNAL(accepted()), dialog, SLOT(accept())); QObject::connect(buttonBox, SIGNAL(accepted()), dialog, SLOT(accept()));
QObject::connect(buttonBox, SIGNAL(rejected()), dialog, SLOT(reject())); QObject::connect(buttonBox, SIGNAL(rejected()), dialog, SLOT(reject()));
QDialog::DialogCode code = static_cast<QDialog::DialogCode>(dialog->exec()); if(_test){
angleSpinBox->setValue(_angle);
if(code!=QDialog::Accepted) return; }
else{
QDialog::DialogCode code = static_cast<QDialog::DialogCode>(dialog->exec());
if(code!=QDialog::Accepted) return;
}
double angle = angleSpinBox->value() * acos(0)/90; double angle = angleSpinBox->value() * acos(0)/90;
Image::depth_t fillValue = valueSpinBox->value(); Image::depth_t fillValue = valueSpinBox->value();
...@@ -144,3 +149,11 @@ void RotateOp::operator()(const Image* img, const map<const Image*, string>& img ...@@ -144,3 +149,11 @@ void RotateOp::operator()(const Image* img, const map<const Image*, string>& img
QString name = qApp->translate("Rotation", "rotated %1").arg(angleSpinBox->value()); QString name = qApp->translate("Rotation", "rotated %1").arg(angleSpinBox->value());
this->outImage(resImg, name.toStdString()); this->outImage(resImg, name.toStdString());
} }
void RotateOp::setTest(bool a){
_test =a;
}
void RotateOp::setAngle(double a){
_angle=a;
}
...@@ -43,6 +43,14 @@ public: ...@@ -43,6 +43,14 @@ public:
void operator()(const imagein::Image*, const std::map<const imagein::Image*, std::string>&); void operator()(const imagein::Image*, const std::map<const imagein::Image*, std::string>&);
bool needCurrentImg() const; bool needCurrentImg() const;
void setTest(bool);
void setAngle(double);
private:
bool _test;
double _angle;
}; };
#endif // ROTATEOP_H #endif // ROTATEOP_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment