void PageSettings::landscapeToggled(bool flag) { PageFormat pf; pf.copy(*preview->score()->pageFormat()); if (flag ^ (pf.width() > pf.height())) pf.setSize(QSizeF(pf.height(), pf.width())); double f = mmUnit ? 1.0/INCH : 1.0; pf.setPrintableWidth(pf.width() - (oddPageLeftMargin->value() + oddPageRightMargin->value()) * f); preview->score()->setPageFormat(pf); updatePreview(0); }
void PageSettings::ormChanged(double val) { if (mmUnit) val /= INCH; PageFormat pf; pf.copy(*preview->score()->pageFormat()); if (twosided->isChecked()) { evenPageLeftMargin->blockSignals(true); evenPageLeftMargin->setValue(val * (mmUnit ? INCH : 1.0)); pf.setEvenLeftMargin(val); evenPageLeftMargin->blockSignals(false); } else { evenPageRightMargin->blockSignals(true); evenPageRightMargin->setValue(val * (mmUnit ? INCH : 1.0)); evenPageRightMargin->blockSignals(false); } pf.setPrintableWidth(pf.width() - pf.oddLeftMargin() - val); preview->score()->setPageFormat(pf); updatePreview(0); }
void PageSettings::pageFormatSelected(int size) { PageFormat pf; pf.copy(*preview->score()->pageFormat()); pf.setSize(&paperSizes[size]); double f = mmUnit ? 1.0/INCH : 1.0; pf.setPrintableWidth(pf.width() - (oddPageLeftMargin->value() + oddPageRightMargin->value()) * f); preview->score()->setPageFormat(pf); updatePreview(0); }