MCPcopy Create free account
hub / github.com/Faster3ck/Converseen / startConversion

Method startConversion

src/mainwindowimpl.cpp:576–660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574}
575
576void 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())

Callers

nothing calls this directly

Calls 10

valueMethod · 0.80
resetMethod · 0.80
setResizeMethod · 0.80
setDensityMethod · 0.80
setRotationMethod · 0.80
setFlipMethod · 0.80
setResamplingFilterMethod · 0.80
setupMethod · 0.80
countCheckedMethod · 0.80
setBackgroundColorMethod · 0.45

Tested by

no test coverage detected