PythonQtWrapper_QPrinter.cpp
407 lines
| 12.3 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QPrinter.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QPrinterInfo> | ||
#include <QVariant> | ||||
#include <qlist.h> | ||||
#include <qpaintdevice.h> | ||||
#include <qpaintengine.h> | ||||
#include <qprintengine.h> | ||||
#include <qprinter.h> | ||||
#include <qrect.h> | ||||
#include <qsize.h> | ||||
florianlink
|
r24 | int PythonQtShell_QPrinter::devType() const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "devType"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"int"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
int returnValue; | ||||
florianlink
|
r24 | void* args[1] = {NULL}; | ||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("devType", methodInfo, result); | ||||
} else { | ||||
returnValue = *((int*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QPrinter::devType(); | ||||
} | ||||
int PythonQtShell_QPrinter::metric(QPaintDevice::PaintDeviceMetric arg__1) const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "metric"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"int" , "QPaintDevice::PaintDeviceMetric"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | ||||
int returnValue; | ||||
florianlink
|
r24 | void* args[2] = {NULL, (void*)&arg__1}; | ||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("metric", methodInfo, result); | ||||
} else { | ||||
returnValue = *((int*)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QPrinter::metric(arg__1); | ||||
} | ||||
QPaintEngine* PythonQtShell_QPrinter::paintEngine() const | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "paintEngine"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
florianlink
|
r73 | static const char* argumentList[] ={"QPaintEngine*"}; | ||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); | ||||
QPaintEngine* returnValue; | ||||
florianlink
|
r24 | void* args[1] = {NULL}; | ||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
florianlink
|
r73 | if (args[0]==NULL) { | ||
PythonQt::priv()->handleVirtualOverloadReturnError("paintEngine", methodInfo, result); | ||||
} else { | ||||
returnValue = *((QPaintEngine**)args[0]); | ||||
} | ||||
florianlink
|
r24 | } | ||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QPrinter::paintEngine(); | ||||
} | ||||
florianlink
|
r13 | QPrinter* PythonQtWrapper_QPrinter::new_QPrinter(QPrinter::PrinterMode mode) | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QPrinter(mode); } | ||
florianlink
|
r13 | |||
QPrinter* PythonQtWrapper_QPrinter::new_QPrinter(const QPrinterInfo& printer, QPrinter::PrinterMode mode) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QPrinter(printer, mode); } | ||
florianlink
|
r13 | |||
florianlink
|
r73 | int PythonQtWrapper_QPrinter::devType(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QPrinter*)theWrappedObject)->promoted_devType()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QPrinter::OutputFormat PythonQtWrapper_QPrinter::outputFormat(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->outputFormat()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QPrinter::fromPage(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->fromPage()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QPrinter::PageSize PythonQtWrapper_QPrinter::pageSize(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->pageSize()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QPrinter::fontEmbeddingEnabled(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->fontEmbeddingEnabled()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QPrinter::toPage(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->toPage()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QPrinter::creator(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->creator()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setPrintProgram(QPrinter* theWrappedObject, const QString& arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setPrintProgram(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QPrinter::outputFileName(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->outputFileName()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QPrinter::PageOrder PythonQtWrapper_QPrinter::pageOrder(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->pageOrder()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QPrinter::printerName(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->printerName()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QPrinter::PageSize PythonQtWrapper_QPrinter::paperSize(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->paperSize()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QPrinter::PrinterState PythonQtWrapper_QPrinter::printerState(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->printerState()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setPageOrder(QPrinter* theWrappedObject, QPrinter::PageOrder arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setPageOrder(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setPrinterName(QPrinter* theWrappedObject, const QString& arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setPrinterName(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QPrinter::abort(QPrinter* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->abort()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setDoubleSidedPrinting(QPrinter* theWrappedObject, bool enable) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setDoubleSidedPrinting(enable)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSizeF PythonQtWrapper_QPrinter::paperSize(QPrinter* theWrappedObject, QPrinter::Unit unit) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->paperSize(unit)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setOutputFileName(QPrinter* theWrappedObject, const QString& arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setOutputFileName(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QPrinter::doubleSidedPrinting(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->doubleSidedPrinting()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QPrinter::numCopies(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->numCopies()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QRect PythonQtWrapper_QPrinter::paperRect(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->paperRect()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QPrinter::ColorMode PythonQtWrapper_QPrinter::colorMode(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->colorMode()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::getPageMargins(QPrinter* theWrappedObject, qreal* left, qreal* top, qreal* right, qreal* bottom, QPrinter::Unit unit) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->getPageMargins(left, top, right, bottom, unit)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setDocName(QPrinter* theWrappedObject, const QString& arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setDocName(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setDuplex(QPrinter* theWrappedObject, QPrinter::DuplexMode duplex) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setDuplex(duplex)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setPageMargins(QPrinter* theWrappedObject, qreal left, qreal top, qreal right, qreal bottom, QPrinter::Unit unit) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setPageMargins(left, top, right, bottom, unit)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setPaperSize(QPrinter* theWrappedObject, const QSizeF& paperSize, QPrinter::Unit unit) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setPaperSize(paperSize, unit)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QPrintEngine* PythonQtWrapper_QPrinter::printEngine(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->printEngine()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setPaperSize(QPrinter* theWrappedObject, QPrinter::PageSize arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setPaperSize(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setFontEmbeddingEnabled(QPrinter* theWrappedObject, bool enable) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setFontEmbeddingEnabled(enable)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QPrinter::docName(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->docName()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QPrinter::metric(QPrinter* theWrappedObject, QPaintDevice::PaintDeviceMetric arg__1) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QPrinter*)theWrappedObject)->promoted_metric(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setFromTo(QPrinter* theWrappedObject, int fromPage, int toPage) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setFromTo(fromPage, toPage)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setOrientation(QPrinter* theWrappedObject, QPrinter::Orientation arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setOrientation(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setNumCopies(QPrinter* theWrappedObject, int arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setNumCopies(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setPaperSource(QPrinter* theWrappedObject, QPrinter::PaperSource arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setPaperSource(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QPrinter::Orientation PythonQtWrapper_QPrinter::orientation(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->orientation()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setPrintRange(QPrinter* theWrappedObject, QPrinter::PrintRange range) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setPrintRange(range)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setFullPage(QPrinter* theWrappedObject, bool arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setFullPage(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QList<int > PythonQtWrapper_QPrinter::supportedResolutions(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->supportedResolutions()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QRectF PythonQtWrapper_QPrinter::pageRect(QPrinter* theWrappedObject, QPrinter::Unit arg__1) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->pageRect(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QPrinter::fullPage(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->fullPage()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QRectF PythonQtWrapper_QPrinter::paperRect(QPrinter* theWrappedObject, QPrinter::Unit arg__1) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->paperRect(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QPrinter::PaperSource PythonQtWrapper_QPrinter::paperSource(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->paperSource()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setCollateCopies(QPrinter* theWrappedObject, bool collate) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setCollateCopies(collate)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setPageSize(QPrinter* theWrappedObject, QPrinter::PageSize arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setPageSize(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QPrinter::collateCopies(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->collateCopies()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QPrinter::newPage(QPrinter* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->newPage()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QPrinter::DuplexMode PythonQtWrapper_QPrinter::duplex(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->duplex()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setColorMode(QPrinter* theWrappedObject, QPrinter::ColorMode arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setColorMode(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QPaintEngine* PythonQtWrapper_QPrinter::paintEngine(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( ((PythonQtPublicPromoter_QPrinter*)theWrappedObject)->promoted_paintEngine()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QPrinter::resolution(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->resolution()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QPrinter::isValid(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->isValid()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setCreator(QPrinter* theWrappedObject, const QString& arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setCreator(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setResolution(QPrinter* theWrappedObject, int arg__1) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setResolution(arg__1)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QPrinter::printProgram(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->printProgram()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QPrinter::setOutputFormat(QPrinter* theWrappedObject, QPrinter::OutputFormat format) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setOutputFormat(format)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QRect PythonQtWrapper_QPrinter::pageRect(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->pageRect()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QPrinter::PrintRange PythonQtWrapper_QPrinter::printRange(QPrinter* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->printRange()); | ||
florianlink
|
r13 | } | ||