summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-07-27 10:42:50 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-07-27 10:42:50 +0200
commit0e4afe263d6dba8320b445a99cc033b08ca0988e (patch)
treed5bd0117113ffdb720ead60ce00ccb674e936b26 /src
parentA lot of fixes here: (diff)
parentBackport to QPrintPreview instead incomplete KPrintPreview (diff)
downloadrekonq-0e4afe263d6dba8320b445a99cc033b08ca0988e.tar.xz
Merge commit 'megabigbug/PrintPreview'
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 3d5631e0..b93d4dc9 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -66,7 +66,7 @@
#include <KIconLoader>
#include <kdeprintdialog.h>
-#include <kprintpreview.h>
+
// Qt Includes
@@ -83,6 +83,7 @@
#include <QtGui/QDesktopWidget>
#include <QtGui/QPrinter>
#include <QtGui/QPrintDialog>
+#include <QtGui/QPrintPreviewDialog>
#include <QtWebKit/QWebFrame>
#include <QtWebKit/QWebHistory>
@@ -337,7 +338,7 @@ void MainWindow::setupTools()
toolsMenu->setDelayed(false);
toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::SaveAs)));
- toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Print)));
+ toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::PrintPreview)));
toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Find)));
KActionMenu *webMenu = new KActionMenu(KIcon("applications-development-web"), i18n("Web Development"), this);
@@ -543,8 +544,9 @@ void MainWindow::slotFilePrintPreview()
return;
QPrinter printer;
- KPrintPreview previewdlg(&printer, this);
- currentTab()->print(&printer);
+ QPrintPreviewDialog previewdlg(&printer, this);
+ connect(&previewdlg, SIGNAL(paintRequested(QPrinter *)),
+ currentTab(), SLOT(print(QPrinter *)));
previewdlg.exec();
}