Commit 94db3321 authored by John Layt's avatar John Layt
Browse files

Port from KPrinter to QPrinter, remove dependency on KDE4_KDEPRINT_LIBS.

svn path=/trunk/KDE/kdeedu/marble/; revision=725033
parent 886397f4
......@@ -93,7 +93,7 @@ if (NOT QTONLY)
set(marblepart_SRCS marble_part.cpp )
kde4_add_kcfg_files(marblepart_SRCS settings.kcfgc)
kde4_add_plugin(marble_part WITH_PREFIX ${marblepart_SRCS} ControlView.cpp)
target_link_libraries(marble_part ${KDE4_KDEPRINT_LIBS} marblewidget)
target_link_libraries(marble_part ${KDE4_KPARTS_LIBS} marblewidget)
install(TARGETS marble_part DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES marble_part.desktop DESTINATION ${SERVICES_INSTALL_DIR})
......
......@@ -13,6 +13,8 @@
#include <QtGui/QClipboard>
#include <QtGui/QLabel>
#include <QtGui/QFontMetrics>
#include <QtGui/QPrinter>
#include <QtGui/QPrintDialog>
#include <kaction.h>
#include <kactioncollection.h>
......@@ -20,7 +22,6 @@
#include <kcomponentdata.h>
#include <kfiledialog.h>
#include <kmessagebox.h>
#include <kprinter.h>
#include <kparts/genericfactory.h>
#include <kparts/statusbarextension.h>
#include <kstandardaction.h>
......@@ -138,9 +139,11 @@ void MarblePart::printMapScreenShot()
{
QPixmap mapPixmap = m_controlView->mapScreenShot();
QSize printSize = mapPixmap.size();
KPrinter printer;
QPrinter printer;
if ( printer.setup( widget() ) ) {
QPrintDialog printDialog( &printer, widget() );
if ( printDialog.exec() ) {
QRect mapPageRect = printer.pageRect();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment