Move printing into it's own library
Create a libQtPrintSupport library that contains our current printing infrastructure. Long term this will get replaced with a libQtPrint, as the current architecture is not really maintainable. Change-Id: I7362fff6786b58c5b4e9213c23eda36d15048aa2 Reviewed-on: http://codereview.qt.nokia.com/3209 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
@ -8,7 +8,7 @@ echo $files
|
||||
|
||||
for module in $modules; do
|
||||
# once we change other things, change the line from == "QtWidgets" to != "Qt" to get everything fixed
|
||||
if [ $module == "QtWidgets" ]; then
|
||||
if [ $module == "QtWidgets" ] || [ $module == "QtPrintSupport" ]; then
|
||||
echo $module ":"
|
||||
includes=`ls $QTDIR/include/$module`
|
||||
for i in $includes; do
|
||||
|
@ -7,7 +7,7 @@ TARGET =
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += .
|
||||
|
||||
QT += widgets
|
||||
QT += widgets printsupport
|
||||
CONFIG += qt warn_on
|
||||
#unix:contains(QT_CONFIG, dbus):QT += dbus widgets
|
||||
|
||||
|
@ -19,5 +19,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html *.doc images
|
||||
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/textedit
|
||||
INSTALLS += target sources
|
||||
|
||||
QT += widgets
|
||||
QT += widgets printsupport
|
||||
symbian: CONFIG += qt_example
|
||||
|
@ -21,7 +21,6 @@ include(text/text.pri)
|
||||
include(painting/painting.pri)
|
||||
include(util/util.pri)
|
||||
include(math3d/math3d.pri)
|
||||
include(printsupport/printsupport.pri)
|
||||
|
||||
include(egl/egl.pri)
|
||||
|
||||
|
@ -43,7 +43,6 @@
|
||||
|
||||
#include <QtGui/QPlatformFontDatabase>
|
||||
#include <QtGui/QPlatformClipboard>
|
||||
#include <QtGui/QPlatformPrinterSupport>
|
||||
#include <QtGui/private/qguiapplication_p.h>
|
||||
#include <QtGui/private/qpixmap_raster_p.h>
|
||||
#include <private/qdnd_p.h>
|
||||
@ -209,12 +208,7 @@ QPlatformGLContext *QPlatformIntegration::createPlatformGLContext(QGuiGLContext
|
||||
|
||||
QPlatformPrinterSupport *QPlatformIntegration::printerSupport() const
|
||||
{
|
||||
static QPlatformPrinterSupport *ps = 0;
|
||||
#ifndef QT_NO_PRINTER
|
||||
if (!ps)
|
||||
ps = new QPlatformPrinterSupport;
|
||||
#endif
|
||||
return ps;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -164,7 +164,7 @@ private:
|
||||
class QPdfWriter;
|
||||
class QPdfEnginePrivate;
|
||||
|
||||
class QPdfEngine : public QPaintEngine
|
||||
class Q_GUI_EXPORT QPdfEngine : public QPaintEngine
|
||||
{
|
||||
Q_DECLARE_PRIVATE(QPdfEngine)
|
||||
friend class QPdfWriter;
|
||||
@ -210,7 +210,7 @@ private:
|
||||
void updateClipPath(const QPainterPath & path, Qt::ClipOperation op);
|
||||
};
|
||||
|
||||
class QPdfEnginePrivate : public QPaintEnginePrivate
|
||||
class Q_GUI_EXPORT QPdfEnginePrivate : public QPaintEnginePrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QPdfEngine)
|
||||
public:
|
||||
|
@ -57,7 +57,6 @@
|
||||
#include "qtextdocument.h"
|
||||
#include "private/qtextdocument_p.h"
|
||||
#include "qtextlist.h"
|
||||
#include "qprinter.h"
|
||||
#include "qtextdocumentwriter.h"
|
||||
#include "private/qtextcursor_p.h"
|
||||
#include "qpagedpaintdevice.h"
|
||||
|
@ -55,7 +55,6 @@
|
||||
|
||||
#include "qtexthtmlparser_p.h"
|
||||
#include "qpainter.h"
|
||||
#include "qprinter.h"
|
||||
#include <qfile.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qdir.h>
|
||||
@ -63,7 +62,6 @@
|
||||
#include "private/qdataurl_p.h"
|
||||
|
||||
#include "qtextdocument_p.h"
|
||||
#include <private/qprinter_p.h>
|
||||
#include <private/qabstracttextdocumentlayout_p.h>
|
||||
#include "qpagedpaintdevice.h"
|
||||
|
||||
|
@ -10,5 +10,5 @@ QT.gui.sources = $$QT_MODULE_BASE/src/gui
|
||||
QT.gui.libs = $$QT_MODULE_LIB_BASE
|
||||
QT.gui.plugins = $$QT_MODULE_PLUGIN_BASE
|
||||
QT.gui.imports = $$QT_MODULE_IMPORT_BASE
|
||||
QT.gui.depends = core network
|
||||
QT.gui.depends = core
|
||||
QT.gui.DEFINES = QT_GUI_LIB
|
||||
|
14
src/modules/qt_printsupport.pri
Normal file
@ -0,0 +1,14 @@
|
||||
QT.printsupport.VERSION = 5.0.0
|
||||
QT.printsupport.MAJOR_VERSION = 5
|
||||
QT.printsupport.MINOR_VERSION = 0
|
||||
QT.printsupport.PATCH_VERSION = 0
|
||||
|
||||
QT.printsupport.name = QtPrintSupport
|
||||
QT.printsupport.includes = $$QT_MODULE_INCLUDE_BASE/QtPrintSupport
|
||||
QT.printsupport.private_includes = $$QT_MODULE_INCLUDE_BASE/QtPrintSupport/$$QT.printsupport.VERSION
|
||||
QT.printsupport.sources = $$QT_MODULE_BASE/src/printsupport
|
||||
QT.printsupport.libs = $$QT_MODULE_LIB_BASE
|
||||
QT.printsupport.plugins = $$QT_MODULE_PLUGIN_BASE
|
||||
QT.printsupport.imports = $$QT_MODULE_IMPORT_BASE
|
||||
QT.printsupport.depends = core gui widgets
|
||||
QT.printsupport.DEFINES = QT_PRINTSUPPORT_LIB
|
@ -1,2 +1,4 @@
|
||||
QT += printsupport printsupport-private
|
||||
|
||||
HEADERS += $$PWD/qgenericunixprintersupport_p.h
|
||||
SOURCES += $$PWD/qgenericunixprintersupport.cpp
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include "qgenericunixprintersupport_p.h"
|
||||
|
||||
#include <QtGui/QPrinterInfo>
|
||||
#include <QtPrintSupport/QPrinterInfo>
|
||||
#include <private/qcups_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QGENERICUNIXPRINTINGSUPPORT_H
|
||||
#define QGENERICUNIXPRINTINGSUPPORT_H
|
||||
|
||||
#include <QtGui/QPlatformPrinterSupport>
|
||||
#include <QtPrintSupport/QPlatformPrinterSupport>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
43
src/printsupport/dialogs/dialogs.pri
Normal file
@ -0,0 +1,43 @@
|
||||
# Qt dialogs module
|
||||
|
||||
HEADERS += \
|
||||
dialogs/qabstractprintdialog.h \
|
||||
dialogs/qabstractprintdialog_p.h \
|
||||
dialogs/qabstractpagesetupdialog.h \
|
||||
dialogs/qabstractpagesetupdialog_p.h \
|
||||
dialogs/qpagesetupdialog.h \
|
||||
dialogs/qprintdialog.h \
|
||||
dialogs/qprintpreviewdialog.h
|
||||
|
||||
!qpa:mac {
|
||||
OBJECTIVE_SOURCES += dialogs/qpagesetupdialog_mac.mm \
|
||||
dialogs/qprintdialog_mac.mm
|
||||
|
||||
}
|
||||
|
||||
win32 {
|
||||
qpa:DEFINES += QT_NO_PRINTDIALOG
|
||||
|
||||
SOURCES += dialogs/qpagesetupdialog_win.cpp \
|
||||
dialogs/qprintdialog_win.cpp
|
||||
}
|
||||
|
||||
!mac:!symbian:unix|qpa:!win32 {
|
||||
HEADERS += dialogs/qpagesetupdialog_unix_p.h
|
||||
SOURCES += dialogs/qprintdialog_unix.cpp \
|
||||
dialogs/qpagesetupdialog_unix.cpp
|
||||
FORMS += dialogs/qprintsettingsoutput.ui \
|
||||
dialogs/qprintwidget.ui \
|
||||
dialogs/qprintpropertieswidget.ui
|
||||
}
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
SOURCES += \
|
||||
dialogs/qabstractprintdialog.cpp \
|
||||
dialogs/qabstractpagesetupdialog.cpp \
|
||||
dialogs/qpagesetupdialog.cpp \
|
||||
dialogs/qprintpreviewdialog.cpp
|
||||
|
||||
FORMS += dialogs/qpagesetupwidget.ui
|
||||
RESOURCES += dialogs/qprintdialog.qrc
|
Before Width: | Height: | Size: 985 B After Width: | Height: | Size: 985 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 706 B After Width: | Height: | Size: 706 B |
Before Width: | Height: | Size: 1004 B After Width: | Height: | Size: 1004 B |
Before Width: | Height: | Size: 796 B After Width: | Height: | Size: 796 B |
Before Width: | Height: | Size: 985 B After Width: | Height: | Size: 985 B |
Before Width: | Height: | Size: 792 B After Width: | Height: | Size: 792 B |
Before Width: | Height: | Size: 984 B After Width: | Height: | Size: 984 B |
Before Width: | Height: | Size: 782 B After Width: | Height: | Size: 782 B |
Before Width: | Height: | Size: 948 B After Width: | Height: | Size: 948 B |
Before Width: | Height: | Size: 797 B After Width: | Height: | Size: 797 B |
Before Width: | Height: | Size: 945 B After Width: | Height: | Size: 945 B |
Before Width: | Height: | Size: 820 B After Width: | Height: | Size: 820 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 817 B After Width: | Height: | Size: 817 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 620 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 914 B After Width: | Height: | Size: 914 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 390 B |
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 556 B |
Before Width: | Height: | Size: 662 B After Width: | Height: | Size: 662 B |
Before Width: | Height: | Size: 810 B After Width: | Height: | Size: 810 B |
Before Width: | Height: | Size: 700 B After Width: | Height: | Size: 700 B |
Before Width: | Height: | Size: 908 B After Width: | Height: | Size: 908 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
@ -45,7 +45,7 @@
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
|
||||
#include <QtCore/qcoreapplication.h>
|
||||
#include <QtGui/qprinter.h>
|
||||
#include <QtPrintSupport/qprinter.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
#ifndef QT_NO_PRINTDIALOG
|
||||
|
||||
#include "QtWidgets/qabstractprintdialog.h"
|
||||
#include "QtPrintSupport/qabstractprintdialog.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QPAGESETUPDIALOG_H
|
||||
#define QPAGESETUPDIALOG_H
|
||||
|
||||
#include <QtWidgets/qabstractpagesetupdialog.h>
|
||||
#include <QtPrintSupport/qabstractpagesetupdialog.h>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
@ -49,7 +49,7 @@
|
||||
#include "qdialogbuttonbox.h"
|
||||
#include <ui_qpagesetupwidget.h>
|
||||
|
||||
#include <QtGui/qprinter.h>
|
||||
#include <QtPrintSupport/qprinter.h>
|
||||
#include <private/qabstractpagesetupdialog_p.h>
|
||||
#include <private/qprinter_p.h>
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QPRINTDIALOG_H
|
||||
#define QPRINTDIALOG_H
|
||||
|
||||
#include <QtWidgets/qabstractprintdialog.h>
|
||||
#include <QtPrintSupport/qabstractprintdialog.h>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
@ -51,11 +51,11 @@
|
||||
#include <QtGui/qevent.h>
|
||||
#include <QtWidgets/qfilesystemmodel.h>
|
||||
#include <QtWidgets/qstyleditemdelegate.h>
|
||||
#include <QtGui/qprinter.h>
|
||||
#include <QtPrintSupport/qprinter.h>
|
||||
|
||||
#include <QtWidgets/qdialogbuttonbox.h>
|
||||
|
||||
#include "qfscompleter_p.h"
|
||||
#include "private/qfscompleter_p.h"
|
||||
#include "ui_qprintpropertieswidget.h"
|
||||
#include "ui_qprintsettingsoutput.h"
|
||||
#include "ui_qprintwidget.h"
|
@ -50,8 +50,8 @@
|
||||
#include <QtWidgets/qcombobox.h>
|
||||
#include <QtWidgets/qlabel.h>
|
||||
#include <QtWidgets/qlineedit.h>
|
||||
#include <QtWidgets/qpagesetupdialog.h>
|
||||
#include <QtGui/qprinter.h>
|
||||
#include <QtPrintSupport/qpagesetupdialog.h>
|
||||
#include <QtPrintSupport/qprinter.h>
|
||||
#include <QtWidgets/qstyle.h>
|
||||
#include <QtWidgets/qtoolbutton.h>
|
||||
#include <QtGui/qvalidator.h>
|
@ -6,7 +6,8 @@ HEADERS += \
|
||||
$$PWD/qprinter_p.h \
|
||||
$$PWD/qprinterinfo.h \
|
||||
$$PWD/qprinterinfo_p.h \
|
||||
$$PWD/qprintabletextdocument.h
|
||||
$$PWD/qplatformprintplugin_qpa.h \
|
||||
$$PWD/qplatformprintersupport_qpa.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/qpaintengine_alpha.cpp \
|
||||
@ -14,7 +15,8 @@ SOURCES += \
|
||||
$$PWD/qprintengine_pdf.cpp \
|
||||
$$PWD/qprinter.cpp \
|
||||
$$PWD/qprinterinfo.cpp \
|
||||
$$PWD/qprintabletextdocument.cpp
|
||||
$$PWD/qplatformprintplugin.cpp \
|
||||
$$PWD/qplatformprintersupport_qpa.cpp
|
||||
|
||||
unix:!symbian {
|
||||
HEADERS += \
|
||||
@ -23,12 +25,6 @@ unix:!symbian {
|
||||
$$PWD/qprinterinfo_unix.cpp
|
||||
}
|
||||
|
||||
qpa {
|
||||
HEADERS += $$PWD/qplatformprintersupport_qpa.h
|
||||
SOURCES += \
|
||||
$$PWD/qplatformprintersupport_qpa.cpp
|
||||
}
|
||||
|
||||
|
||||
x11|qpa:!win32 {
|
||||
SOURCES += $$PWD/qcups.cpp
|
@ -55,7 +55,7 @@
|
||||
#include "QtCore/qstring.h"
|
||||
#include "QtCore/qstringlist.h"
|
||||
#include "QtCore/qpair.h"
|
||||
#include "QtGui/qprinter.h"
|
||||
#include "QtPrintSupport/qprinter.h"
|
||||
|
||||
#ifndef QT_NO_CUPS
|
||||
#include <QtCore/qlibrary.h>
|
@ -44,7 +44,7 @@
|
||||
#include <private/qpaintengine_p.h>
|
||||
#include <private/qpicture_p.h>
|
||||
|
||||
#include <QtGui/qprintengine.h>
|
||||
#include <QtPrintSupport/qprintengine.h>
|
||||
#include <QtGui/qpainter.h>
|
||||
#include <QtGui/qpicture.h>
|
||||
|
@ -55,7 +55,7 @@
|
||||
//
|
||||
|
||||
#include <QtGui/qpaintengine.h>
|
||||
#include <QtGui/qprintengine.h>
|
||||
#include <QtPrintSupport/qprintengine.h>
|
||||
|
||||
#ifndef QT_NO_PRINTPREVIEWWIDGET
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include "qplatformprintersupport_qpa.h"
|
||||
|
||||
#include <QtGui/qprinterinfo.h>
|
||||
#include <QtPrintSupport/qprinterinfo.h>
|
||||
|
||||
#include <private/qprinterinfo_p.h>
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QPLATFORMPRINTINGSUPPORT_H
|
||||
#define QPLATFORMPRINTINGSUPPORT_H
|
||||
|
||||
#include <QtGui/qprinter.h>
|
||||
#include <QtPrintSupport/qprinter.h>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
72
src/printsupport/kernel/qplatformprintplugin.cpp
Normal file
@ -0,0 +1,72 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** GNU Lesser General Public License Usage
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this
|
||||
** file. Please review the following information to ensure the GNU Lesser
|
||||
** General Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License version 3.0 as published by the Free Software Foundation
|
||||
** and appearing in the file LICENSE.GPL included in the packaging of this
|
||||
** file. Please review the following information to ensure the GNU General
|
||||
** Public License version 3.0 requirements will be met:
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** Other Usage
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qplatformprintplugin_qpa.h"
|
||||
#include "private/qfactoryloader_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
|
||||
(QPlatformPrinterSupportFactoryInterface_iid, QLatin1String("/printsupport"), Qt::CaseInsensitive))
|
||||
#endif
|
||||
|
||||
QPlatformPrinterSupportPlugin::QPlatformPrinterSupportPlugin(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
QPlatformPrinterSupportPlugin::~QPlatformPrinterSupportPlugin()
|
||||
{
|
||||
}
|
||||
|
||||
QPlatformPrinterSupport *QPlatformPrinterSupportPlugin::get()
|
||||
{
|
||||
QStringList k = loader()->keys();
|
||||
if (k.isEmpty())
|
||||
return 0;
|
||||
QPlatformPrinterSupportPlugin *plugin = qobject_cast<QPlatformPrinterSupportPlugin *>(loader()->instance(k.first()));
|
||||
if (!plugin)
|
||||
return 0;
|
||||
return plugin->create(k.first());
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
94
src/printsupport/kernel/qplatformprintplugin_qpa.h
Normal file
@ -0,0 +1,94 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** GNU Lesser General Public License Usage
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this
|
||||
** file. Please review the following information to ensure the GNU Lesser
|
||||
** General Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License version 3.0 as published by the Free Software Foundation
|
||||
** and appearing in the file LICENSE.GPL included in the packaging of this
|
||||
** file. Please review the following information to ensure the GNU General
|
||||
** Public License version 3.0 requirements will be met:
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** Other Usage
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QPLATFORMPRINTERSUPPORTPLUGIN_H
|
||||
#define QPLATFORMPRINTERSUPPORTPLUGIN_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/qplugin.h>
|
||||
#include <QtCore/qfactoryinterface.h>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QT_MODULE(Gui)
|
||||
|
||||
class QPlatformPrinterSupport;
|
||||
|
||||
struct QPlatformPrinterSupportFactoryInterface : public QFactoryInterface
|
||||
{
|
||||
virtual QPlatformPrinterSupport *create(const QString &key) = 0;
|
||||
};
|
||||
|
||||
#define QPlatformPrinterSupportFactoryInterface_iid "org.qt-project.QPlatformPrinterSupportFactoryInterface"
|
||||
|
||||
Q_DECLARE_INTERFACE(QPlatformPrinterSupportFactoryInterface, QPlatformPrinterSupportFactoryInterface_iid)
|
||||
|
||||
class Q_GUI_EXPORT QPlatformPrinterSupportPlugin : public QObject, public QPlatformPrinterSupportFactoryInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QPlatformPrinterSupportFactoryInterface:QFactoryInterface)
|
||||
public:
|
||||
explicit QPlatformPrinterSupportPlugin(QObject *parent = 0);
|
||||
~QPlatformPrinterSupportPlugin();
|
||||
|
||||
virtual QStringList keys() const = 0;
|
||||
virtual QPlatformPrinterSupport *create(const QString &key) = 0;
|
||||
|
||||
static QPlatformPrinterSupport *get();
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // QPLATFORMPRINTERSUPPORTPLUGIN_H
|
@ -43,7 +43,7 @@
|
||||
#define QPRINTENGINE_H
|
||||
|
||||
#include <QtCore/qvariant.h>
|
||||
#include <QtGui/qprinter.h>
|
||||
#include <QtPrintSupport/qprinter.h>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
@ -39,7 +39,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtGui/qprintengine.h>
|
||||
#include <QtPrintSupport/qprintengine.h>
|
||||
|
||||
#include <qiodevice.h>
|
||||
#include <qfile.h>
|
@ -53,7 +53,7 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "QtGui/qprintengine.h"
|
||||
#include "QtPrintSupport/qprintengine.h"
|
||||
|
||||
#ifndef QT_NO_PRINTER
|
||||
#include "QtCore/qmap.h"
|
@ -53,7 +53,7 @@
|
||||
#ifndef QT_NO_PRINTER
|
||||
|
||||
#include <private/qguiapplication_p.h>
|
||||
#include <QtGui/QPlatformPrinterSupport>
|
||||
#include <QtPrintSupport/QPlatformPrinterSupport>
|
||||
|
||||
#if defined (Q_WS_WIN)
|
||||
#include <private/qprintengine_win_p.h>
|
@ -58,8 +58,8 @@
|
||||
|
||||
#ifndef QT_NO_PRINTER
|
||||
|
||||
#include "QtGui/qprinter.h"
|
||||
#include "QtGui/qprintengine.h"
|
||||
#include "QtPrintSupport/qprinter.h"
|
||||
#include "QtPrintSupport/qprintengine.h"
|
||||
#include "QtCore/qpointer.h"
|
||||
|
||||
#include <limits.h>
|
@ -31,7 +31,7 @@
|
||||
#ifndef QT_NO_PRINTER
|
||||
|
||||
#include <private/qguiapplication_p.h>
|
||||
#include <QtGui/QPlatformPrinterSupport>
|
||||
#include <QtPrintSupport/QPlatformPrinterSupport>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
#include <QtCore/QList>
|
||||
|
||||
#include <QtGui/QPrinter>
|
||||
#include <QtPrintSupport/QPrinter>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QPRINTERINFO_UNIX_P_H
|
||||
#define QPRINTERINFO_UNIX_P_H
|
||||
|
||||
#include <QtGui/qprinter.h>
|
||||
#include <QtPrintSupport/qprinter.h>
|
||||
#include <QtCore/qstringlist.h>
|
||||
|
||||
#ifndef QT_NO_NIS
|
22
src/printsupport/printsupport.pro
Normal file
@ -0,0 +1,22 @@
|
||||
load(qt_module)
|
||||
|
||||
TARGET = QtPrintSupport
|
||||
QPRO_PWD = $$PWD
|
||||
QT = core-private gui-private widgets-private
|
||||
|
||||
CONFIG += module
|
||||
MODULE_PRI = ../modules/qt_printsupport.pri
|
||||
|
||||
DEFINES += QT_BUILD_PRINTSUPPORT_LIB QT_NO_USING_NAMESPACE
|
||||
|
||||
unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
|
||||
|
||||
load(qt_module_config)
|
||||
|
||||
HEADERS += $$QT_SOURCE_TREE/src/printsupport/qtprintsupportversion.h
|
||||
|
||||
QMAKE_LIBS += $$QMAKE_LIBS_PRINTSUPPORT
|
||||
|
||||
include(kernel/kernel.pri)
|
||||
include(widgets/widgets.pri)
|
||||
include(dialogs/dialogs.pri)
|
@ -43,7 +43,7 @@
|
||||
#define QPRINTPREVIEWWIDGET_H
|
||||
|
||||
#include <QtWidgets/qwidget.h>
|
||||
#include <QtGui/qprinter.h>
|
||||
#include <QtPrintSupport/qprinter.h>
|
||||
|
||||
#ifndef QT_NO_PRINTPREVIEWWIDGET
|
||||
|
2
src/printsupport/widgets/widgets.pri
Normal file
@ -0,0 +1,2 @@
|
||||
HEADERS += widgets/qprintpreviewwidget.h
|
||||
SOURCES += widgets/qprintpreviewwidget.cpp
|
@ -10,7 +10,7 @@ SRC_SUBDIRS += src_corelib
|
||||
!cross_compile {
|
||||
win32:!wince*: SRC_SUBDIRS += src_tools_idc
|
||||
}
|
||||
SRC_SUBDIRS += src_network src_sql src_gui src_xml src_uitools src_widgets src_testlib src_platformsupport
|
||||
SRC_SUBDIRS += src_network src_sql src_gui src_xml src_uitools src_printsupport src_widgets src_testlib src_platformsupport
|
||||
nacl: SRC_SUBDIRS -= src_network src_testlib
|
||||
!symbian:contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus
|
||||
contains(QT_CONFIG, no-gui): SRC_SUBDIRS -= src_gui
|
||||
@ -48,6 +48,8 @@ src_plugins.subdir = $$QT_SOURCE_TREE/src/plugins
|
||||
src_plugins.target = sub-plugins
|
||||
src_widgets.subdir = $$QT_SOURCE_TREE/src/widgets
|
||||
src_widgets.target = sub-widgets
|
||||
src_printsupport.subdir = $$QT_SOURCE_TREE/src/printsupport
|
||||
src_printsupport.target = sub-printsupport
|
||||
src_testlib.subdir = $$QT_SOURCE_TREE/src/testlib
|
||||
src_testlib.target = sub-testlib
|
||||
src_platformsupport.subdir = $$QT_SOURCE_TREE/src/platformsupport
|
||||
@ -58,7 +60,8 @@ src_platformsupport.target = sub-platformsupport
|
||||
!wince*:!ordered:!symbian-abld:!symbian-sbsv2 {
|
||||
src_corelib.depends = src_tools_moc src_tools_rcc
|
||||
src_gui.depends = src_corelib
|
||||
src_widgets.depends = src_corelib src_gui src_tools_uic
|
||||
src_printsupport.depends = src_corelib src_gui
|
||||
src_widgets.depends = src_corelib src_gui src_printsupport src_tools_uic
|
||||
embedded: src_gui.depends += src_network
|
||||
src_xml.depends = src_corelib
|
||||
src_uitools.depends = src_corelib src_widgets
|
||||
|
@ -1,10 +1,6 @@
|
||||
# Qt dialogs module
|
||||
|
||||
HEADERS += \
|
||||
dialogs/qabstractprintdialog.h \
|
||||
dialogs/qabstractprintdialog_p.h \
|
||||
dialogs/qabstractpagesetupdialog.h \
|
||||
dialogs/qabstractpagesetupdialog_p.h \
|
||||
dialogs/qcolordialog.h \
|
||||
dialogs/qcolordialog_p.h \
|
||||
dialogs/qfscompleter_p.h \
|
||||
@ -17,22 +13,17 @@ HEADERS += \
|
||||
dialogs/qfontdialog_p.h \
|
||||
dialogs/qinputdialog.h \
|
||||
dialogs/qmessagebox.h \
|
||||
dialogs/qpagesetupdialog.h \
|
||||
dialogs/qprintdialog.h \
|
||||
dialogs/qprogressdialog.h \
|
||||
dialogs/qsidebar_p.h \
|
||||
dialogs/qfilesystemmodel.h \
|
||||
dialogs/qfilesystemmodel_p.h \
|
||||
dialogs/qfileinfogatherer_p.h \
|
||||
dialogs/qwizard.h \
|
||||
dialogs/qprintpreviewdialog.h
|
||||
dialogs/qwizard.h
|
||||
|
||||
!qpa:mac {
|
||||
OBJECTIVE_SOURCES += dialogs/qfiledialog_mac.mm \
|
||||
dialogs/qfontdialog_mac.mm \
|
||||
dialogs/qnspanelproxy_mac.mm \
|
||||
dialogs/qpagesetupdialog_mac.mm \
|
||||
dialogs/qprintdialog_mac.mm
|
||||
dialogs/qnspanelproxy_mac.mm
|
||||
|
||||
# Compile qcolordialog_mac.mm with exception support, disregarding the -no-exceptions
|
||||
# configure option. (qcolordialog_mac needs to catch exceptions thrown by cocoa)
|
||||
@ -56,29 +47,16 @@ win32 {
|
||||
dialogs/qfiledialog_win_p.h
|
||||
SOURCES += dialogs/qdialogsbinarycompat_win.cpp \
|
||||
dialogs/qfiledialog_win.cpp \
|
||||
dialogs/qpagesetupdialog_win.cpp \
|
||||
dialogs/qprintdialog_win.cpp \
|
||||
dialogs/qwizard_win.cpp
|
||||
|
||||
!win32-borland:!wince*: LIBS += -lshell32 # the filedialog needs this library
|
||||
}
|
||||
|
||||
!mac:!symbian:unix|qpa:!win32 {
|
||||
HEADERS += dialogs/qpagesetupdialog_unix_p.h
|
||||
SOURCES += dialogs/qprintdialog_unix.cpp \
|
||||
dialogs/qpagesetupdialog_unix.cpp
|
||||
FORMS += dialogs/qprintsettingsoutput.ui \
|
||||
dialogs/qprintwidget.ui \
|
||||
dialogs/qprintpropertieswidget.ui
|
||||
}
|
||||
|
||||
wince*|symbian: FORMS += dialogs/qfiledialog_embedded.ui
|
||||
else: FORMS += dialogs/qfiledialog.ui
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
SOURCES += \
|
||||
dialogs/qabstractprintdialog.cpp \
|
||||
dialogs/qabstractpagesetupdialog.cpp \
|
||||
dialogs/qcolordialog.cpp \
|
||||
dialogs/qdialog.cpp \
|
||||
dialogs/qerrormessage.cpp \
|
||||
@ -90,9 +68,7 @@ SOURCES += \
|
||||
dialogs/qsidebar.cpp \
|
||||
dialogs/qfilesystemmodel.cpp \
|
||||
dialogs/qfileinfogatherer.cpp \
|
||||
dialogs/qpagesetupdialog.cpp \
|
||||
dialogs/qwizard.cpp \
|
||||
dialogs/qprintpreviewdialog.cpp
|
||||
|
||||
symbian:contains(QT_CONFIG, s60) {
|
||||
LIBS += -lCommonDialogs
|
||||
@ -100,8 +76,6 @@ symbian:contains(QT_CONFIG, s60) {
|
||||
dialogs/qcolordialog_symbian.cpp
|
||||
}
|
||||
|
||||
FORMS += dialogs/qpagesetupwidget.ui
|
||||
RESOURCES += dialogs/qprintdialog.qrc
|
||||
RESOURCES += dialogs/qmessagebox.qrc
|
||||
|
||||
# Compensate for lack of platform defines in Symbian3
|
||||
|
@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
|
||||
/*!
|
||||
QCompleter that can deal with QFileSystemModel
|
||||
*/
|
||||
class QFSCompleter : public QCompleter {
|
||||
class Q_WIDGETS_EXPORT QFSCompleter : public QCompleter {
|
||||
public:
|
||||
QFSCompleter(QFileSystemModel *model, QObject *parent = 0)
|
||||
: QCompleter(model, parent), proxyModel(0), sourceModel(model)
|
||||
|
@ -141,10 +141,6 @@ static void initResources()
|
||||
#endif
|
||||
Q_INIT_RESOURCE_EXTERN(qmessagebox)
|
||||
Q_INIT_RESOURCE(qmessagebox);
|
||||
#if !defined(QT_NO_PRINTDIALOG)
|
||||
Q_INIT_RESOURCE_EXTERN(qprintdialog)
|
||||
Q_INIT_RESOURCE(qprintdialog);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|