Commit 741c616c authored by Olivier Churlaud's avatar Olivier Churlaud

Port most of part.cpp out of KDELibsSupport

minor: Change header cases : <qicon.h> becomes <QIcon>
parent 1f69f5fd
......@@ -18,7 +18,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(ECMAddTests)
include(ECMAddAppIcon)
include(ECMAddAppIcon)
include(ECMPackageConfigHelpers)
ecm_setup_version(1.0.0 VARIABLE_PREFIX OKULAR
......@@ -312,6 +312,7 @@ target_link_libraries(okularpart okularcore
Qt5::Svg
Phonon::phonon4qt5
KF5::Archive
KF5::Bookmarks
KF5::IconThemes
KF5::KDELibs4Support
KF5::Parts
......
......@@ -25,53 +25,53 @@
// qt/kde includes
#include <QApplication>
#include <QDialog>
#include <QDialogButtonBox>
#include <QFile>
#include <QFileDialog>
#include <QIcon>
#include <QInputDialog>
#include <QLayout>
#include <QLabel>
#include <QMenu>
#include <QTimer>
#include <QTemporaryFile>
#include <QtPrintSupport/QPrinter>
#include <QtPrintSupport/QPrintDialog>
#include <QPrinter>
#include <QPrintDialog>
#include <QPrintPreviewDialog>
#include <QScrollBar>
#include <QInputDialog>
#include <QWidgetAction>
#include <QFileDialog>
#include <QDialog>
#include <QDialogButtonBox>
#include <QStandardPaths>
#include <QSlider>
#include <QSpinBox>
#include <QStandardPaths>
#include <QWidgetAction>
#include <Kdelibs4Migration>
#include <KAboutApplicationDialog>
#include <KActionCollection>
#include <KBookmarkAction>
#include <KBookmarkMenu>
#include <Kdelibs4ConfigMigrator>
#include <Kdelibs4Migration>
#include <KDirWatch>
#include <KFilterBase>
#include <KFilterDev>
#include <KIO/Job>
#include <KJobWidgets>
#include <kaboutapplicationdialog.h>
#include <kactioncollection.h>
#include <kbookmarkaction.h>
#include <kdirwatch.h>
#include <kstandardaction.h>
#include <kpluginfactory.h>
#include <KMessageBox>
#include <KPasswordDialog>
#include <KPluginFactory>
#include <KPluginMetaData>
#include <kmessagebox.h>
#include <kio/netaccess.h>
#include <kmenu.h>
#include <kxmlguiclient.h>
#include <kxmlguifactory.h>
#include <kstandardshortcut.h>
#include <ktoggleaction.h>
#include <ktogglefullscreenaction.h>
#include <kio/job.h>
#include <QIcon>
#include <kfilterdev.h>
#include <kfilterbase.h>
#include <KSharedDataCache>
#include <KStandardShortcut>
#include <KToggleAction>
#include <KToggleFullScreenAction>
#include <KWallet>
#include <KXMLGUIClient>
#include <KXMLGUIFactory>
#if 0
#include <knewstuff2/engine.h>
#endif
#include <kdeprintdialog.h>
#include <kprintpreview.h>
#include <kbookmarkmenu.h>
#include <kpassworddialog.h>
#include <kwallet.h>
#include <kdeversion.h>
// local includes
......@@ -2461,7 +2461,7 @@ void Part::slotPrintPreview()
// Native printing supports KPrintPreview, Postscript needs to use FilePrinterPreview
if ( m_document->printingSupport() == Okular::Document::NativePrinting )
{
KPrintPreview previewdlg( &printer, widget() );
QPrintPreviewDialog previewdlg( &printer, widget() );
setupPrint( printer );
doPrint( printer );
previewdlg.exec();
......@@ -2740,14 +2740,14 @@ void Part::slotPrint()
{
printConfigWidget = m_document->printConfigurationWidget();
}
if ( printConfigWidget )
{
printDialog = KdePrint::createPrintDialog( &printer, QList<QWidget*>() << printConfigWidget, widget() );
}
else
{
printDialog = KdePrint::createPrintDialog( &printer, widget() );
printDialog = new QPrintDialog(&printer, widget());
printDialog->setWindowTitle(i18nc("@title:window", "Print"));
QList<QWidget*> options;
if (printConfigWidget) {
options << printConfigWidget;
}
printDialog->setOptionTabs(options);
if ( printDialog )
{
......
......@@ -16,16 +16,19 @@
#ifndef _PART_H_
#define _PART_H_
#include <kparts/readwritepart.h>
#include <kpluginfactory.h>
#include <kmessagewidget.h>
#include <KCompressionDevice>
#include <qicon.h>
#include <qlist.h>
#include <qpointer.h>
#include <qprocess.h>
#include <QIcon>
#include <QList>
#include <QPointer>
#include <QProcess>
#include <QtDBus>
#include <QUrl>
#include <kio/job.h>
#include <KCompressionDevice>
#include <KIO/Job>
#include <KMessageWidget>
#include <KParts/ReadWritePart>
#include <KPluginFactory>
#include "core/observer.h"
#include "core/document.h"
#include "kdocumentviewer.h"
......@@ -33,8 +36,6 @@
#include "okularpart_export.h"
#include <QtDBus/QtDBus>
class QAction;
class QWidget;
class QPrinter;
......@@ -102,7 +103,7 @@ class OKULARPART_EXPORT Part : public KParts::ReadWritePart, public Okular::Docu
Q_CLASSINFO("D-Bus Interface", "org.kde.okular")
Q_INTERFACES(KDocumentViewer)
Q_INTERFACES(Okular::ViewerInterface)
friend class PartTest;
public:
......@@ -253,7 +254,7 @@ class OKULARPART_EXPORT Part : public KParts::ReadWritePart, public Okular::Docu
void unsetDummyMode();
void slotRenameBookmark( const DocumentViewport &viewport );
void resetStartArguments();
static int numberOfParts;
QTemporaryFile *m_tempfile;
......
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