| 574 | } |
| 575 | |
| 576 | void MainWindowImpl::startConversion() |
| 577 | { |
| 578 | double width; |
| 579 | double height; |
| 580 | bool percent = false; |
| 581 | bool maintainAspectRatio = false; |
| 582 | bool noTransparency; |
| 583 | |
| 584 | |
| 585 | IniSettings::setOutputDir(lineDirectory->text()); |
| 586 | |
| 587 | abort_all = false; |
| 588 | |
| 589 | |
| 590 | statusBar()->showMessage(tr("Processing...")); |
| 591 | curr_index = 0; |
| 592 | |
| 593 | m_progressiveNren = spinProgressiveRen->value(); // Used when the progressive number renaming is checked |
| 594 | |
| 595 | convertThread->reset(); |
| 596 | |
| 597 | // Colore |
| 598 | noTransparency = this->checkNoTransp->isChecked(); |
| 599 | convertThread->setBackgroundColor(m_bgColor, noTransparency); |
| 600 | |
| 601 | // setResize(const double &width, const double &height, const bool &percent, const bool &maintainAspectRatio) |
| 602 | |
| 603 | /* Change image size */ |
| 604 | if (groupDimensions->isChecked()) { |
| 605 | width = spin_geoWidth->value(); |
| 606 | height = spin_geoHeight->value(); |
| 607 | |
| 608 | if (checkRelative->isChecked()) |
| 609 | maintainAspectRatio = true; |
| 610 | |
| 611 | if (comboResizeValues->currentText() == "px") |
| 612 | percent = false; |
| 613 | |
| 614 | if (comboResizeValues->currentText() == "%") |
| 615 | percent = true; |
| 616 | |
| 617 | //if (!(((percent) && ((int)width == 100)) && ((int)height == 100))) |
| 618 | convertThread->setResize(width, height, percent, maintainAspectRatio); |
| 619 | } |
| 620 | |
| 621 | /* Change image density */ |
| 622 | if ((groupResolution->isChecked()) && ((m_xResolution != spin_resX->value()) || (m_yResolution != spin_resY->value()))) { |
| 623 | QString densStr = QString("%1x%2") |
| 624 | .arg(spin_resX->value()) |
| 625 | .arg(spin_resY->value()); |
| 626 | |
| 627 | convertThread->setDensity(densStr); |
| 628 | } |
| 629 | |
| 630 | if (!radioRotNo->isChecked()) { |
| 631 | double rotation = 0; |
| 632 | |
| 633 | if (radioRotPos90->isChecked()) |
nothing calls this directly
no test coverage detected