summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/mainwindow.cpp17
2 files changed, 11 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3e22ac5d..a64cc747 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -50,6 +50,7 @@ TARGET_LINK_LIBRARIES( rekonq
${QT_QTNETWORK_LIBRARY}
${QT_QTWEBKIT_LIBRARY}
${QT_QTUITOOLS_LIBRARY}
+ ${KDE4_KUTILS_LIBS}
${KDE4_KDEUI_LIBS}
${KDE4_KIO_LIBS}
)
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);