summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoanativeinterface.h
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2012-02-29 15:23:22 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-15 09:50:18 +0100
commit4f246bceb5958cb7ae86d7c5d59c78cad25bdd56 (patch)
tree11fcbfe821c66ed49a7df053c12d594016804410 /src/plugins/platforms/cocoa/qcocoanativeinterface.h
parent7e3c632e96dbbd6f577c2ba98464a54176c5b7b0 (diff)
Add a QPlatformPrinterSupportPlugin for Cocoa
This is used to create the actual QPrintEngine and to query the system about printer information. The QCocoaPrinterSupport actually lives in the Cocoa platform plugin, so the QCocoaPrinterSupportPlugin uses the createPlatformPrinterSupport() function in the QPlatformNativeInterface (since the latter is a QObject). This is done to avoid adding a printing related virtual function to QPlatformIntegration (since we have plans to do a new printing API in the future). Change-Id: I8bf9be668ff8ae1d07840e2af1e0846dc3299334 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoanativeinterface.h')
-rw-r--r--src/plugins/platforms/cocoa/qcocoanativeinterface.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.h b/src/plugins/platforms/cocoa/qcocoanativeinterface.h
index d277cb2964..2665768edc 100644
--- a/src/plugins/platforms/cocoa/qcocoanativeinterface.h
+++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.h
@@ -43,6 +43,7 @@
#define QCOCOANATIVEINTERFACE_H
#include <QtGui/QPlatformNativeInterface>
+#include <QtPrintSupport/QPlatformPrinterSupport>
class QWidget;
@@ -51,6 +52,20 @@ class QCocoaNativeInterface : public QPlatformNativeInterface
Q_OBJECT
public:
void *nativeResourceForWindow(const QByteArray &resourceString, QWindow *window);
+
+private:
+ /*
+ "Virtual" function to create the platform printer support
+ implementation.
+
+ We use an invokable function instead of a virtual one, we do not want
+ this in the QPlatform* API yet.
+
+ This was added here only because QPlatformNativeInterface is a QObject
+ and allow us to use QMetaObject::indexOfMethod() from the printsupport
+ plugin.
+ */
+ Q_INVOKABLE QPlatformPrinterSupport *createPlatformPrinterSupport();
};
#endif // QCOCOANATIVEINTERFACE_H