mr=set.value("marginRight").toDouble();
mb=set.value("marginBottom").toDouble();
mt=set.value("marginTop").toDouble();
- prn.setFullPage(true);
- prn.setPageMargins(QMarginsF(ml,mr,mb,mt),QPageLayout::Millimeter);
+ prn.setFullPage(set.value("fullPage",true).toBool());
+ prn.setPageMargins(QMarginsF(ml,mt,mr,mb),QPageLayout::Millimeter);
prn.setDuplex(QPrinter::DuplexMode(set.value("duplex",QPrinter::DuplexAuto).toInt()));
prn.setOrientation((set.value("orientation","portrait").toString()=="portrait")?QPrinter::Portrait:QPrinter::Landscape);
if(set.contains("resolution"))
set.setValue("marginRight",marg.right());
set.setValue("marginBottom",marg.bottom());
set.setValue("marginTop",marg.top());
+ set.setValue("fullPage",prn.fullPage());
set.setValue("duplex",(int)prn.duplex());
set.setValue("orientation",prn.orientation()==QPrinter::Portrait?"portrait":"landscape");
set.setValue("paper",(int)prn.paperSize());
//qreal ml,mr,mt,mb;
QMarginsF marg=mprinter->pageLayout().margins(QPageLayout::Millimeter);
//mprinter->getPageMargins(&ml,&mt,&mr,&mb,QPrinter::Millimeter);
- gl->addWidget(mmargtop=new QDoubleSpinBox,0,1);
+ gl->addWidget(mfullpage=new QCheckBox(tr("Use Full Page")),0,0,1,3);
+ mfullpage->setChecked(mprinter->fullPage());
+ gl->addWidget(mmargtop=new QDoubleSpinBox,1,1);
mmargtop->setValue(marg.top()/moldunit);
- gl->addWidget(mmargleft=new QDoubleSpinBox,1,0);
+ gl->addWidget(mmargleft=new QDoubleSpinBox,2,0);
mmargleft->setValue(marg.left()/moldunit);
- gl->addWidget(mmargright=new QDoubleSpinBox,1,2);
+ gl->addWidget(mmargright=new QDoubleSpinBox,2,2);
mmargright->setValue(marg.right()/moldunit);
- gl->addWidget(mmargbottom=new QDoubleSpinBox,2,1);
+ gl->addWidget(mmargbottom=new QDoubleSpinBox,3,1);
mmargbottom->setValue(marg.bottom()/moldunit);
fl->addRow(tr("Resolution:"),mresolution=new QComboBox);
fl->addRow(new QLabel(" "));
mprinter->setPaperSize(QPrinter::PaperSize(mpaper->itemData(mpaper->currentIndex()).toInt()));
mprinter->setPageSizeMM(QSizeF(msizex->value()*moldunit,msizey->value()*moldunit));
//mprinter->setPageMargins(mmargleft->value()*moldunit, mmargtop->value()*moldunit, mmargright->value()*moldunit, mmargbottom->value()*moldunit, QPrinter::Millimeter);
+ mprinter->setFullPage(mfullpage->isChecked());
mprinter->setPageMargins(QMarginsF(mmargleft->value()*moldunit, mmargtop->value()*moldunit, mmargright->value()*moldunit, mmargbottom->value()*moldunit), QPageLayout::Millimeter);
mprinter->setResolution(mresolution->itemData(mresolution->currentIndex()).toInt());