summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authormegabigbug <megabigbug@arrakis.(none)>2009-07-26 19:40:12 +0200
committermegabigbug <megabigbug@arrakis.(none)>2009-07-26 19:40:12 +0200
commita96811fc915046a810a864c9eb53decebd42e64d (patch)
tree066a96ca9a221b9a9163929429c570df5f32d03f /src/mainwindow.cpp
parentFixed clear private data (diff)
downloadrekonq-a96811fc915046a810a864c9eb53decebd42e64d.tar.xz
Backport to QPrintPreview instead incomplete KPrintPreview
Replace "Print..." action by "Print preview" in the tool menu
Diffstat (limited to 'src/mainwindow.cpp')
-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();
}