QPageSetupDialog - Add manual dialog test
Add QPageSetupDialog to the manual dialog test. Change-Id: I5a7a4fedf1fe3ba074891eaed84efaa1c173e620 Reviewed-by: Lars Knoll <lars.knoll@digia.com>bb10
parent
5af95d077b
commit
75aef26c27
|
|
@ -47,6 +47,7 @@
|
|||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#include <QPrintPreviewDialog>
|
||||
#include <QPageSetupDialog>
|
||||
#include <QApplication>
|
||||
#include <QDesktopWidget>
|
||||
#include <QGroupBox>
|
||||
|
|
@ -335,6 +336,9 @@ PrintDialogPanel::PrintDialogPanel(QWidget *parent)
|
|||
button = new QPushButton(tr("Preview..."), m_dialogsGroupBox);
|
||||
connect(button, SIGNAL(clicked()), this, SLOT(showPreviewDialog()));
|
||||
vBoxLayout->addWidget(button);
|
||||
button = new QPushButton(tr("Page Setup..."), m_dialogsGroupBox);
|
||||
connect(button, SIGNAL(clicked()), this, SLOT(showPageSetupDialog()));
|
||||
vBoxLayout->addWidget(button);
|
||||
|
||||
QGridLayout *gridLayout = new QGridLayout(this);
|
||||
gridLayout->addWidget(m_creationGroupBox, 0, 0);
|
||||
|
|
@ -417,6 +421,14 @@ void PrintDialogPanel::showPreviewDialog()
|
|||
retrieveSettings(m_printer.data());
|
||||
}
|
||||
|
||||
void PrintDialogPanel::showPageSetupDialog()
|
||||
{
|
||||
applySettings(m_printer.data());
|
||||
QPageSetupDialog dialog(m_printer.data(), this);
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
retrieveSettings(m_printer.data());
|
||||
}
|
||||
|
||||
#include "printdialogpanel.moc"
|
||||
|
||||
#endif // !QT_NO_PRINTER
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ private slots:
|
|||
void deletePrinter();
|
||||
void showPrintDialog();
|
||||
void showPreviewDialog();
|
||||
void showPageSetupDialog();
|
||||
void enableCustomSizeControl();
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Reference in New Issue