QPrintDialog - Add Direct print to manual test
Enable printing without dialog. Change-Id: I1058361febc7ddd8a5e0471e4365969e2f8becfe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
bc46b591b2
commit
39c5098dbb
@ -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"
|
||||
|
||||
|
@ -101,6 +101,7 @@ private slots:
|
||||
void showPrintDialog();
|
||||
void showPreviewDialog();
|
||||
void showPageSetupDialog();
|
||||
void directPrint();
|
||||
void unitsChanged();
|
||||
void pageSizeChanged();
|
||||
void pageDimensionsChanged();
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user