summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-04-27 01:04:36 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-04-27 01:04:36 +0200
commita03c2606e80829bb65bd5621e206f161a79a6e6c (patch)
treedf61d69a38bbf0432af7f02bdb00e8775a50c7fa /src/mainwindow.cpp
parentbookmarks fixes (diff)
downloadrekonq-a03c2606e80829bb65bd5621e206f161a79a6e6c.tar.xz
KDE printing system
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 78995855..a9364ef1 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -59,6 +59,9 @@
#include <KPushButton>
#include <KTemporaryFile>
+#include <kdeprintdialog.h>
+#include <kprintpreview.h>
+
// Qt Includes
#include <QtGui>
@@ -533,14 +536,15 @@ void MainWindow::slotFileOpen()
}
-// TODO: Port to KDE
void MainWindow::slotFilePrintPreview()
{
if (!currentTab())
return;
- QPrintPreviewDialog *dialog = new QPrintPreviewDialog(this);
- connect(dialog, SIGNAL(paintRequested(QPrinter *)), currentTab(), SLOT(print(QPrinter *)));
- dialog->exec();
+
+ QPrinter printer;
+ KPrintPreview previewdlg( &printer, this );
+ currentTab()->print(&printer);
+ previewdlg.exec();
}
@@ -552,12 +556,11 @@ void MainWindow::slotFilePrint()
}
-// TODO: Port to KDE
void MainWindow::printRequested(QWebFrame *frame)
{
QPrinter printer;
- QPrintDialog *dialog = new QPrintDialog(&printer, this);
- dialog->setWindowTitle(i18n("Print Document"));
+
+ QPrintDialog *dialog = KdePrint::createPrintDialog( &printer, this );
if (dialog->exec() != QDialog::Accepted)
return;
frame->print(&printer);