8#include <private/qpagesetupdialog_p.h>
9#include <private/qprintdevice_p.h>
11#include <private/qcups_p.h>
18#include <ui_qpagesetupwidget.h>
20#include <QtPrintSupport/qprinter.h>
22#include <qpa/qplatformprintplugin.h>
23#include <qpa/qplatformprintersupport.h>
27using namespace Qt::StringLiterals;
34#ifdef PSD_ENABLE_PAPERSOURCE
35static const char *paperSourceNames[] = {
52struct PaperSourceNames
54 PaperSourceNames(
const char *nam, QPrinter::PaperSource ps)
55 : paperSource(ps), name(nam) {}
56 QPrinter::PaperSource paperSource;
71 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
72 setMinimumSize(50, 50);
77 m_pageLayout = layout;
83 m_pagePreviewColumns = columns;
84 m_pagePreviewRows = rows;
91 QSize pageSize = m_pageLayout.fullRectPoints().size();
92 QSizeF scaledSize = pageSize.scaled(width() - 10, height() - 10, Qt::KeepAspectRatio);
93 QRect pageRect = QRect(QPoint(0,0), scaledSize.toSize());
94 pageRect.moveCenter(rect().center());
95 qreal width_factor = scaledSize.width() / pageSize.width();
96 qreal height_factor = scaledSize.height() / pageSize.height();
97 QMarginsF margins = m_pageLayout.margins(QPageLayout::Point);
98 int left = qRound(margins.left() * width_factor);
99 int top = qRound(margins.top() * height_factor);
100 int right = qRound(margins.right() * width_factor);
101 int bottom = qRound(margins.bottom() * height_factor);
102 QRect marginRect(pageRect.x() + left, pageRect.y() + top,
103 pageRect.width() - (left + right + 1), pageRect.height() - (top + bottom + 1));
106 QColor shadow(palette().mid().color());
107 for (
int i=1; i<6; ++i) {
108 shadow.setAlpha(180-i*30);
109 QRect offset(pageRect.adjusted(i, i, i, i));
111 p.drawLine(offset.left(), offset.bottom(), offset.right(), offset.bottom());
112 p.drawLine(offset.right(), offset.top(), offset.right(), offset.bottom()-1);
114 p.fillRect(pageRect, palette().light());
116 if (marginRect.isValid()) {
117 p.setPen(QPen(palette().color(QPalette::Dark), 0, Qt::DotLine));
118 p.drawRect(marginRect);
120 marginRect.adjust(2, 2, -1, -1);
121 p.setClipRect(marginRect);
123 font.setPointSizeF(font.pointSizeF()*0.25);
125 p.setPen(palette().color(QPalette::Dark));
126 QString text(
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi."_L1);
127 for (
int i=0; i<3; ++i)
130 const int spacing = pageRect.width() * 0.1;
131 const int textWidth = (marginRect.width() - (spacing * (m_pagePreviewColumns-1))) / m_pagePreviewColumns;
132 const int textHeight = (marginRect.height() - (spacing * (m_pagePreviewRows-1))) / m_pagePreviewRows;
134 for (
int x = 0 ; x < m_pagePreviewColumns; ++x) {
135 for (
int y = 0 ; y < m_pagePreviewRows; ++y) {
136 QRect textRect(marginRect.left() + x * (textWidth + spacing),
137 marginRect.top() + y * (textHeight + spacing),
138 textWidth, textHeight);
139 p.drawText(textRect, Qt::TextWordWrap|Qt::AlignVCenter, text);
147 QPageLayout m_pageLayout;
149 int m_pagePreviewColumns, m_pagePreviewRows;
159 Q_DECLARE_PUBLIC(QPageSetupDialog)
179 Q_Q(QPageSetupDialog);
181 widget =
new QPageSetupWidget(q);
182 widget->setPrinter(printer,
nullptr, printer->outputFormat(), printer->printerName());
184 QDialogButtonBox *buttons =
new QDialogButtonBox(QDialogButtonBox::Ok
185 | QDialogButtonBox::Cancel,
187 QObject::connect(buttons, SIGNAL(accepted()), q, SLOT(accept()));
188 QObject::connect(buttons, SIGNAL(rejected()), q, SLOT(reject()));
190 QVBoxLayout *lay =
new QVBoxLayout(q);
192 lay->addWidget(buttons);
202 m_pagePreview(
nullptr),
204 m_printDevice(
nullptr),
206 m_pageSizePpdOption(
nullptr),
208 m_outputFormat(QPrinter::PdfFormat),
209 m_units(QPageLayout::Point),
210 m_savedUnits(QPageLayout::Point),
211 m_savedPagesPerSheet(-1),
212 m_savedPagesPerSheetLayout(-1),
213 m_blockSignals(
false),
214 m_realCustomPageSizeIndex(-1)
218 QVBoxLayout *lay =
new QVBoxLayout(m_ui.preview);
219 m_pagePreview =
new QPagePreview(m_ui.preview);
222 lay->addWidget(m_pagePreview);
224 setAttribute(Qt::WA_WState_Polished,
false);
226#ifdef PSD_ENABLE_PAPERSOURCE
227 for (
int i=0; paperSourceNames[i]; ++i)
228 m_ui.paperSource->insertItem(paperSourceNames[i]);
230 m_ui.paperSourceLabel->setVisible(
false);
231 m_ui.paperSource->setVisible(
false);
234 m_ui.reverseLandscape->setVisible(
false);
235 m_ui.reversePortrait->setVisible(
false);
240 connect(m_ui.unitCombo, &QComboBox::activated,
this, &QPageSetupWidget::unitChanged);
242 connect(m_ui.pageSizeCombo, &QComboBox::currentIndexChanged,
this, &QPageSetupWidget::pageSizeChanged);
243 connect(m_ui.pageWidth, &QDoubleSpinBox::valueChanged,
this, &QPageSetupWidget::pageSizeChanged);
244 connect(m_ui.pageHeight, &QDoubleSpinBox::valueChanged,
this, &QPageSetupWidget::pageSizeChanged);
246 connect(m_ui.leftMargin, &QDoubleSpinBox::valueChanged,
this, &QPageSetupWidget::leftMarginChanged);
247 connect(m_ui.topMargin, &QDoubleSpinBox::valueChanged,
this, &QPageSetupWidget::topMarginChanged);
248 connect(m_ui.rightMargin, &QDoubleSpinBox::valueChanged,
this, &QPageSetupWidget::rightMarginChanged);
249 connect(m_ui.bottomMargin, &QDoubleSpinBox::valueChanged,
this, &QPageSetupWidget::bottomMarginChanged);
251 connect(m_ui.portrait, &QRadioButton::clicked,
this, &QPageSetupWidget::pageOrientationChanged);
252 connect(m_ui.landscape, &QRadioButton::clicked,
this, &QPageSetupWidget::pageOrientationChanged);
254 connect(m_ui.pagesPerSheetCombo, &QComboBox::currentIndexChanged,
this, &QPageSetupWidget::pagesPerSheetChanged);
260 m_ui.unitCombo->addItem(tr(
"Millimeters (mm)"), QVariant::fromValue(QPageLayout::Millimeter));
261 m_ui.unitCombo->addItem(tr(
"Inches (in)"), QVariant::fromValue(QPageLayout::Inch));
262 m_ui.unitCombo->addItem(tr(
"Points (pt)"), QVariant::fromValue(QPageLayout::Point));
263 m_ui.unitCombo->addItem(tr(
"Pica (P̸)"), QVariant::fromValue(QPageLayout::Pica));
264 m_ui.unitCombo->addItem(tr(
"Didot (DD)"), QVariant::fromValue(QPageLayout::Didot));
265 m_ui.unitCombo->addItem(tr(
"Cicero (CC)"), QVariant::fromValue(QPageLayout::Cicero));
268 m_ui.unitCombo->setCurrentIndex(QLocale().measurementSystem() != QLocale::MetricSystem);
275 m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr(
"Left to Right, Top to Bottom"),
276 QVariant::fromValue(QCUPSSupport::LeftToRightTopToBottom));
277 m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr(
"Left to Right, Bottom to Top"),
278 QVariant::fromValue(QCUPSSupport::LeftToRightBottomToTop));
279 m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr(
"Right to Left, Bottom to Top"),
280 QVariant::fromValue(QCUPSSupport::RightToLeftBottomToTop));
281 m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr(
"Right to Left, Top to Bottom"),
282 QVariant::fromValue(QCUPSSupport::RightToLeftTopToBottom));
283 m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr(
"Bottom to Top, Left to Right"),
284 QVariant::fromValue(QCUPSSupport::BottomToTopLeftToRight));
285 m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr(
"Bottom to Top, Right to Left"),
286 QVariant::fromValue(QCUPSSupport::BottomToTopRightToLeft));
287 m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr(
"Top to Bottom, Left to Right"),
288 QVariant::fromValue(QCUPSSupport::TopToBottomLeftToRight));
289 m_ui.pagesPerSheetLayoutCombo->addItem(QPrintDialog::tr(
"Top to Bottom, Right to Left"),
290 QVariant::fromValue(QCUPSSupport::TopToBottomRightToLeft));
292 m_ui.pagesPerSheetCombo->addItem(QPrintDialog::tr(
"1 (1x1)"),
293 QVariant::fromValue(QCUPSSupport::OnePagePerSheet));
294 m_ui.pagesPerSheetCombo->addItem(QPrintDialog::tr(
"2 (2x1)"),
295 QVariant::fromValue(QCUPSSupport::TwoPagesPerSheet));
296 m_ui.pagesPerSheetCombo->addItem(QPrintDialog::tr(
"4 (2x2)"),
297 QVariant::fromValue(QCUPSSupport::FourPagesPerSheet));
298 m_ui.pagesPerSheetCombo->addItem(QPrintDialog::tr(
"6 (2x3)"),
299 QVariant::fromValue(QCUPSSupport::SixPagesPerSheet));
300 m_ui.pagesPerSheetCombo->addItem(QPrintDialog::tr(
"9 (3x3)"),
301 QVariant::fromValue(QCUPSSupport::NinePagesPerSheet));
302 m_ui.pagesPerSheetCombo->addItem(QPrintDialog::tr(
"16 (4x4)"),
303 QVariant::fromValue(QCUPSSupport::SixteenPagesPerSheet));
306 m_ui.pagesPerSheetCombo->setCurrentIndex(0);
308 m_ui.pagesPerSheetLayoutCombo->setCurrentIndex(0);
311 m_ui.pagesPerSheetButtonGroup->hide();
317 m_blockSignals =
true;
319 m_ui.pageSizeCombo->clear();
321 m_realCustomPageSizeIndex = -1;
323 if (m_outputFormat == QPrinter::NativeFormat && !m_printerName.isEmpty()) {
324 QPlatformPrinterSupport *ps = QPlatformPrinterSupportPlugin::get();
326 QPrintDevice printDevice = ps->createPrintDevice(m_printerName);
327 const QPageSize defaultSize = printDevice.defaultPageSize();
328 const auto pageSizes = printDevice.supportedPageSizes();
329 for (
const QPageSize &pageSize : pageSizes)
330 m_ui.pageSizeCombo->addItem(pageSize.name(), QVariant::fromValue(pageSize));
331 if (m_ui.pageSizeCombo->count() > 0) {
332 if (printDevice.supportsCustomPageSizes()) {
333 m_ui.pageSizeCombo->addItem(tr(
"Custom"));
334 m_realCustomPageSizeIndex = m_ui.pageSizeCombo->count() - 1;
336 m_blockSignals =
false;
340 m_ui.pageSizeCombo->setCurrentIndex(-1);
341 m_ui.pageSizeCombo->setCurrentIndex(m_ui.pageSizeCombo->findData(QVariant::fromValue(defaultSize)));
348 for (
int id = 0; id < QPageSize::LastPageSize; ++id) {
349 if (QPageSize::PageSizeId(id) == QPageSize::Custom) {
350 m_ui.pageSizeCombo->addItem(tr(
"Custom"));
351 m_realCustomPageSizeIndex = m_ui.pageSizeCombo->count() - 1;
353 QPageSize pageSize = QPageSize(QPageSize::PageSizeId(id));
354 m_ui.pageSizeCombo->addItem(pageSize.name(), QVariant::fromValue(pageSize));
358 m_blockSignals =
false;
364 QPrinter::OutputFormat outputFormat,
const QString &printerName)
367 m_printDevice = printDevice;
371 m_pageSizePpdOption = m_printDevice ? QCUPSSupport::findPpdOption(
"PageSize", m_printDevice) :
nullptr;
375 m_pageLayout = m_printer->pageLayout();
378 if (m_pageLayout.units() == QPageLayout::Point) {
379 if (QLocale().measurementSystem() == QLocale::MetricSystem)
380 m_pageLayout.setUnits(QPageLayout::Millimeter);
382 m_pageLayout.setUnits(QPageLayout::Inch);
384 m_units = m_pageLayout.units();
385 m_pagePreview->setPageLayout(m_pageLayout);
387 m_outputFormat = outputFormat;
388 m_printerName = printerName;
393 if (m_ui.pageSizeCombo->currentIndex() == -1) {
396 m_ui.pageSizeCombo->setCurrentIndex(0);
404 m_blockSignals =
true;
408 case QPageLayout::Millimeter:
412 case QPageLayout::Point:
416 case QPageLayout::Inch:
420 case QPageLayout::Pica:
424 case QPageLayout::Didot:
428 case QPageLayout::Cicero:
434 m_ui.unitCombo->setCurrentIndex(m_ui.unitCombo->findData(QVariant::fromValue(m_units)));
436 const bool isCustom = m_ui.pageSizeCombo->currentIndex() == m_realCustomPageSizeIndex && m_realCustomPageSizeIndex != -1;
438 m_ui.pageSizeCombo->setCurrentIndex(m_ui.pageSizeCombo->findData(QVariant::fromValue(m_pageLayout.pageSize())));
443 if (m_pageLayout.mode() == QPageLayout::FullPageMode) {
444 min = QMarginsF(0.0, 0.0, 0.0, 0.0);
445 max = QMarginsF(9999.9999, 9999.9999, 9999.9999, 9999.9999);
447 min = m_pageLayout.minimumMargins();
448 max = m_pageLayout.maximumMargins();
451 m_ui.leftMargin->setSuffix(suffix);
452 m_ui.leftMargin->setMinimum(min.left());
453 m_ui.leftMargin->setMaximum(max.left());
454 m_ui.leftMargin->setValue(m_pageLayout.margins().left());
456 m_ui.rightMargin->setSuffix(suffix);
457 m_ui.rightMargin->setMinimum(min.right());
458 m_ui.rightMargin->setMaximum(max.right());
459 m_ui.rightMargin->setValue(m_pageLayout.margins().right());
461 m_ui.topMargin->setSuffix(suffix);
462 m_ui.topMargin->setMinimum(min.top());
463 m_ui.topMargin->setMaximum(max.top());
464 m_ui.topMargin->setValue(m_pageLayout.margins().top());
466 m_ui.bottomMargin->setSuffix(suffix);
467 m_ui.bottomMargin->setMinimum(min.bottom());
468 m_ui.bottomMargin->setMaximum(max.bottom());
469 m_ui.bottomMargin->setValue(m_pageLayout.margins().bottom());
471 m_ui.pageWidth->setSuffix(suffix);
472 m_ui.pageWidth->setValue(m_pageLayout.fullRect(m_units).width());
473 m_ui.pageWidth->setEnabled(isCustom);
474 m_ui.widthLabel->setEnabled(isCustom);
476 m_ui.pageHeight->setSuffix(suffix);
477 m_ui.pageHeight->setValue(m_pageLayout.fullRect(m_units).height());
478 m_ui.pageHeight->setEnabled(isCustom);
479 m_ui.heightLabel->setEnabled(isCustom);
481 m_ui.portrait->setChecked(m_pageLayout.orientation() == QPageLayout::Portrait);
482 m_ui.landscape->setChecked(m_pageLayout.orientation() == QPageLayout::Landscape);
484 m_ui.pagesPerSheetButtonGroup->setEnabled(m_outputFormat == QPrinter::NativeFormat);
486#ifdef PSD_ENABLE_PAPERSOURCE
487 m_ui.paperSource->setCurrentItem(printer->paperSource());
490 m_blockSignals =
false;
497 m_printer->setPageLayout(m_pageLayout);
498 m_printer->setPageOrientation(m_pageLayout.orientation());
500 QCUPSSupport::PagesPerSheet pagesPerSheet = qvariant_cast<QCUPSSupport::PagesPerSheet>(m_ui.pagesPerSheetCombo->currentData()
502 QCUPSSupport::PagesPerSheetLayout pagesPerSheetLayout = qvariant_cast<QCUPSSupport::PagesPerSheetLayout>(m_ui.pagesPerSheetLayoutCombo->currentData()
504 QCUPSSupport::setPagesPerSheetLayout(m_printer, pagesPerSheet, pagesPerSheetLayout);
506#ifdef PSD_ENABLE_PAPERSOURCE
507 m_printer->setPaperSource((QPrinter::PaperSource)m_ui.paperSource->currentIndex());
513 m_savedUnits = m_units;
514 m_savedPageLayout = m_pageLayout;
515 m_savedPagesPerSheet = m_ui.pagesPerSheetCombo->currentIndex();
516 m_savedPagesPerSheetLayout = m_ui.pagesPerSheetLayoutCombo->currentIndex();
521 m_units = m_savedUnits;
522 m_pageLayout = m_savedPageLayout;
523 m_pagePreview->setPageLayout(m_pageLayout);
527 m_ui.pagesPerSheetCombo->setCurrentIndex(m_savedPagesPerSheet);
528 m_ui.pagesPerSheetLayoutCombo->setCurrentIndex(m_savedPagesPerSheetLayout);
532bool QPageSetupWidget::hasPpdConflict()
const
534 if (m_pageSizePpdOption) {
535 if (m_pageSizePpdOption->conflicted) {
536 const QIcon warning = QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning,
nullptr,
nullptr);
537 const int pixmap_size = m_ui.pageSizeCombo->sizeHint().height() * .75;
538 m_ui.pageSizeWarningLabel->setPixmap(warning.pixmap(pixmap_size, pixmap_size));
540 m_ui.pageSizeWarningLabel->setPixmap(QPixmap());
542 return m_pageSizePpdOption->conflicted;
553 if (m_ui.pageSizeCombo->currentIndex() != m_realCustomPageSizeIndex) {
554 pageSize = qvariant_cast<QPageSize>(m_ui.pageSizeCombo->currentData());
557 if (m_pageSizePpdOption) {
558 ppd_file_t *ppd = qvariant_cast<ppd_file_t*>(m_printDevice->property(PDPK_PpdFile));
559 QStringDecoder toUtf16(ppd->lang_encoding, QStringDecoder::Flag::Stateless);
560 if (!toUtf16.isValid()) {
561 qWarning() <<
"QPrinSupport: Cups uses unsupported encoding" << ppd->lang_encoding;
562 toUtf16 = QStringDecoder(QStringDecoder::Utf8);
564 for (
int i = 0; i < m_pageSizePpdOption->num_choices; ++i) {
565 const ppd_choice_t *choice = &m_pageSizePpdOption->choices[i];
566 if (toUtf16(choice->text) == m_ui.pageSizeCombo->currentText()) {
567 const auto values = QStringList{} << QString::fromLatin1(m_pageSizePpdOption->keyword)
568 << QString::fromLatin1(choice->choice);
569 m_printDevice->setProperty(PDPK_PpdOption, values);
570 emit ppdOptionChanged();
579 if (m_pageLayout.orientation() == QPageLayout::Landscape)
580 customSize = QSizeF(m_ui.pageHeight->value(), m_ui.pageWidth->value());
582 customSize = QSizeF(m_ui.pageWidth->value(), m_ui.pageHeight->value());
583 pageSize = QPageSize(customSize, QPageSize::Unit(m_units));
586 if (m_pageSizePpdOption) {
587 const auto values = QStringList{} << QString::fromLatin1(m_pageSizePpdOption->keyword)
588 << QStringLiteral(
"Custom");
589 m_printDevice->setProperty(PDPK_PpdOption, values);
590 emit ppdOptionChanged();
600 const QMarginsF printable = m_printDevice ? m_printDevice->printableMargins(pageSize, m_pageLayout.orientation(), m_printer->resolution())
602 m_pageLayout.setPageSize(pageSize, qt_convertMargins(printable, QPageLayout::Point, m_pageLayout.units()));
603 m_pagePreview->setPageLayout(m_pageLayout);
612 m_pageLayout.setOrientation(m_ui.portrait->isChecked() ? QPageLayout::Portrait : QPageLayout::Landscape);
613 m_pagePreview->setPageLayout(m_pageLayout);
620 switch (m_ui.pagesPerSheetCombo->currentData().toInt()) {
621 case QCUPSSupport::OnePagePerSheet:
622 m_pagePreview->setPagePreviewLayout(1, 1);
624 case QCUPSSupport::TwoPagesPerSheet:
625 m_pagePreview->setPagePreviewLayout(1, 2);
627 case QCUPSSupport::FourPagesPerSheet:
628 m_pagePreview->setPagePreviewLayout(2, 2);
630 case QCUPSSupport::SixPagesPerSheet:
631 m_pagePreview->setPagePreviewLayout(3, 2);
633 case QCUPSSupport::NinePagesPerSheet:
634 m_pagePreview->setPagePreviewLayout(3, 3);
636 case QCUPSSupport::SixteenPagesPerSheet:
637 m_pagePreview->setPagePreviewLayout(4, 4);
647 m_units = qvariant_cast<QPageLayout::Unit>(m_ui.unitCombo->currentData());
648 m_pageLayout.setUnits(m_units);
656 m_pageLayout.setTopMargin(newValue);
657 m_pagePreview->setPageLayout(m_pageLayout);
664 m_pageLayout.setBottomMargin(newValue);
665 m_pagePreview->setPageLayout(m_pageLayout);
672 m_pageLayout.setLeftMargin(newValue);
673 m_pagePreview->setPageLayout(m_pageLayout);
680 m_pageLayout.setRightMargin(newValue);
681 m_pagePreview->setPageLayout(m_pageLayout);
687QPageSetupDialog::QPageSetupDialog(QPrinter *printer, QWidget *parent)
688 : QDialog(*(
new QUnixPageSetupDialogPrivate(printer)), parent)
690 Q_D(QPageSetupDialog);
691 setWindowTitle(QCoreApplication::translate(
"QPrintPreviewDialog",
"Page Setup"));
692 static_cast<QUnixPageSetupDialogPrivate *>(d)->init();
695QPageSetupDialog::QPageSetupDialog(QWidget *parent)
696 : QDialog(*(
new QUnixPageSetupDialogPrivate(
nullptr)), parent)
698 Q_D(QPageSetupDialog);
699 setWindowTitle(QCoreApplication::translate(
"QPrintPreviewDialog",
"Page Setup"));
700 static_cast<QUnixPageSetupDialogPrivate *>(d)->init();
703int QPageSetupDialog::exec()
705 Q_D(QPageSetupDialog);
707 int ret = QDialog::exec();
708 if (ret == Accepted) {
709 static_cast <QUnixPageSetupDialogPrivate*>(d)->widget->setupPrinter();
710 static_cast <QUnixPageSetupDialogPrivate*>(d)->widget->updateSavedValues();
712 static_cast <QUnixPageSetupDialogPrivate*>(d)->widget->revertToSavedValues();
719#include "moc_qpagesetupdialog_unix_p.cpp"
721#include "moc_qpagesetupdialog.cpp"
void setPageLayout(const QPageLayout &layout)
void setPagePreviewLayout(int columns, int rows)
QPagePreview(QWidget *parent)
void paintEvent(QPaintEvent *) override
This event handler can be reimplemented in a subclass to receive paint events passed in event.
void revertToSavedValues()
void setPrinter(QPrinter *printer, QPrintDevice *printDevice, QPrinter::OutputFormat outputFormat, const QString &printerName)
void setupPrinter() const
QPainter(QPaintDevice *)
Constructs a painter that begins painting the paint device immediately.
QPageSetupWidget * widget
~QUnixPageSetupDialogPrivate()
QMarginsF qt_convertMargins(const QMarginsF &margins, QPageLayout::Unit fromUnits, QPageLayout::Unit toUnits)