diff options
author | John Layt <jlayt@kde.org> | 2014-03-24 18:53:06 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-05 21:48:03 +0200 |
commit | 39c5098dbb3dd547c315c5baf0f83ebe81b28756 (patch) | |
tree | 9dbbe5d87d4d82e594ef6385671d3e513ad10c8c /tests | |
parent | bc46b591b2cb81a5cb0c513aa4139b7e88fa8b06 (diff) |
QPrintDialog - Add Direct print to manual test
Enable printing without dialog.
Change-Id: I1058361febc7ddd8a5e0471e4365969e2f8becfe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manual/dialogs/printdialogpanel.cpp | 8 | ||||
-rw-r--r-- | tests/manual/dialogs/printdialogpanel.h | 1 | ||||
-rw-r--r-- | tests/manual/dialogs/printdialogpanel.ui | 7 |
3 files changed, 16 insertions, 0 deletions
diff --git a/tests/manual/dialogs/printdialogpanel.cpp b/tests/manual/dialogs/printdialogpanel.cpp index f7d027020c..1a18f94406 100644 --- a/tests/manual/dialogs/printdialogpanel.cpp +++ b/tests/manual/dialogs/printdialogpanel.cpp @@ -379,6 +379,7 @@ PrintDialogPanel::PrintDialogPanel(QWidget *parent) connect(m_panel.m_printButton, SIGNAL(clicked()), this, SLOT(showPrintDialog())); connect(m_panel.m_printPreviewButton, SIGNAL(clicked()), this, SLOT(showPreviewDialog())); connect(m_panel.m_pageSetupButton, SIGNAL(clicked()), this, SLOT(showPageSetupDialog())); + connect(m_panel.m_directPrintButton, SIGNAL(clicked()), this, SLOT(directPrint())); enablePanels(); m_blockSignals = false; @@ -686,6 +687,13 @@ void PrintDialogPanel::showPageSetupDialog() retrieveSettings(m_printer.data()); } +void PrintDialogPanel::directPrint() +{ + applySettings(m_printer.data()); + print(m_printer.data()); + retrieveSettings(m_printer.data()); +} + #include "moc_printdialogpanel.cpp" #include "printdialogpanel.moc" diff --git a/tests/manual/dialogs/printdialogpanel.h b/tests/manual/dialogs/printdialogpanel.h index 3932cd174f..3d340c7ccc 100644 --- a/tests/manual/dialogs/printdialogpanel.h +++ b/tests/manual/dialogs/printdialogpanel.h @@ -101,6 +101,7 @@ private slots: void showPrintDialog(); void showPreviewDialog(); void showPageSetupDialog(); + void directPrint(); void unitsChanged(); void pageSizeChanged(); void pageDimensionsChanged(); diff --git a/tests/manual/dialogs/printdialogpanel.ui b/tests/manual/dialogs/printdialogpanel.ui index 733d52ad9e..2f0fe606a3 100644 --- a/tests/manual/dialogs/printdialogpanel.ui +++ b/tests/manual/dialogs/printdialogpanel.ui @@ -644,6 +644,13 @@ </property> </widget> </item> + <item> + <widget class="QPushButton" name="m_directPrintButton"> + <property name="text"> + <string>Direct Print</string> + </property> + </widget> + </item> </layout> </widget> </item> |