objprinter.cpp File Reference
#include "objprinter.h"#include "cmdutil.h"#include "prefsmanager.h"#include <structmember.h>#include <QFileInfo>#include <QDir>#include <vector>#include "pslib.h"#include "util_ghostscript.h"#include "util_printer.h"#include "scribuscore.h"#include "util.h"#include "scpaths.h"

Go to the source code of this file.
Classes | |
| struct | Printer |
Functions | |
| bool SCRIBUS_API | loadText (QString nam, QString *Buffer) |
| void SCRIBUS_API | ReOrderText (ScribusDoc *doc, ScribusView *view) |
| static void | Printer_dealloc (Printer *self) |
| static PyObject * | Printer_new (PyTypeObject *type, PyObject *, PyObject *) |
| static int | Printer_init (Printer *self, PyObject *, PyObject *) |
| static PyObject * | Printer_getallPrinters (Printer *self, void *) |
| static int | Printer_setallPrinters (Printer *, PyObject *, void *) |
| static PyObject * | Printer_getprinter (Printer *self, void *) |
| static int | Printer_setprinter (Printer *self, PyObject *value, void *) |
| static PyObject * | Printer_getfile (Printer *self, void *) |
| static int | Printer_setfile (Printer *self, PyObject *value, void *) |
| static PyObject * | Printer_getcmd (Printer *self, void *) |
| static int | Printer_setcmd (Printer *self, PyObject *value, void *) |
| static PyObject * | Printer_getpages (Printer *self, void *) |
| static int | Printer_setpages (Printer *self, PyObject *value, void *) |
| static PyObject * | Printer_getseparation (Printer *self, void *) |
| static int | Printer_setseparation (Printer *self, PyObject *value, void *) |
| static PyObject * | Printer_print (Printer *self) |
Variables | |
| static PyMemberDef | Printer_members [] |
| static PyGetSetDef | Printer_getseters [] |
| static PyMethodDef | Printer_methods [] |
| PyTypeObject | Printer_Type |
Function Documentation
| bool SCRIBUS_API loadText | ( | QString | nam, | |
| QString * | Buffer | |||
| ) |
Definition at line 186 of file util.cpp.
Referenced by ScribusView::contentsDropEvent(), ScribusMainWindow::doPasteRecent(), FDialogPreview::GenPreview(), PrinterUtil::getPrinterNames(), OODPlug::import(), LegacyMode::importToPage(), SVGPlug::loadData(), and PatternDialog::loadVectors().
| static void Printer_dealloc | ( | Printer * | self | ) | [static] |
Definition at line 53 of file objprinter.cpp.
| static PyObject* Printer_getallPrinters | ( | Printer * | self, | |
| void * | ||||
| ) | [static] |
Definition at line 238 of file objprinter.cpp.
| static PyObject* Printer_getcmd | ( | Printer * | self, | |
| void * | ||||
| ) | [static] |
Definition at line 303 of file objprinter.cpp.
| static PyObject* Printer_getfile | ( | Printer * | self, | |
| void * | ||||
| ) | [static] |
Definition at line 281 of file objprinter.cpp.
| static PyObject* Printer_getpages | ( | Printer * | self, | |
| void * | ||||
| ) | [static] |
Definition at line 325 of file objprinter.cpp.
| static PyObject* Printer_getprinter | ( | Printer * | self, | |
| void * | ||||
| ) | [static] |
Definition at line 250 of file objprinter.cpp.
| static PyObject* Printer_getseparation | ( | Printer * | self, | |
| void * | ||||
| ) | [static] |
Definition at line 359 of file objprinter.cpp.
| static int Printer_init | ( | Printer * | self, | |
| PyObject * | , | |||
| PyObject * | ||||
| ) | [static] |
Definition at line 129 of file objprinter.cpp.
References PDFOptions::Datei, ScribusMainWindow::doc, ScribusDoc::DocName, PrinterUtil::getPrinterNames(), ScribusMainWindow::HaveDoc, ScribusDoc::Pages, ScribusDoc::PDF_Options, ScribusCore::primaryMainWindow(), and ScCore.
| static PyObject* Printer_new | ( | PyTypeObject * | type, | |
| PyObject * | , | |||
| PyObject * | ||||
| ) | [static] |
Definition at line 64 of file objprinter.cpp.
References ScribusMainWindow::HaveDoc, ScribusCore::primaryMainWindow(), and ScCore.
| static PyObject* Printer_print | ( | Printer * | self | ) | [static] |
Definition at line 393 of file objprinter.cpp.
References PrefsManager::appPrefs, ApplicationPrefs::AvailFonts, PrintOptions::bleedMarks, PrintOptions::bleeds, MarginStruct::Bottom, PrinterUtil::checkPrintEngineSupport(), PrintOptions::colorMarks, convertPS2PS(), PSLib::CreatePS(), PrintOptions::cropMarks, data, PrintOptions::devMode, ScribusMainWindow::doc, PrintOptions::doClip, PrintOptions::doGCR, PrintOptions::doOverprint, PrinterUtil::getDefaultPrintEngine(), ScPaths::getTempFileDir(), ScribusDoc::getUsedFonts(), ScribusMainWindow::HaveDoc, ScribusCore::haveGS(), PrefsManager::instance(), MarginStruct::Left, PrintOptions::markOffset, PrintOptions::mirrorH, PrintOptions::mirrorV, moveFile(), PrintOptions::outputSeparations, ScribusDoc::PageColors, ScribusDoc::pageHeight, PrintOptions::pageNumbers, ScribusDoc::pageWidth, PostScript1, PostScript2, ScribusCore::primaryMainWindow(), ScPrintEngine_GDI::print(), PrintOptions::printer, PrintOptions::prnEngine, PSLib::PS_set_file(), Py_RETURN_NONE, PrintOptions::registrationMarks, MarginStruct::Right, ScCore, PrintOptions::separationName, PrintOptions::setDevParam, PrintOptions::toFile, MarginStruct::Top, PrintOptions::useColor, and PrintOptions::useICC.
| static int Printer_setallPrinters | ( | Printer * | , | |
| PyObject * | , | |||
| void * | ||||
| ) | [static] |
Definition at line 244 of file objprinter.cpp.
| static int Printer_setcmd | ( | Printer * | self, | |
| PyObject * | value, | |||
| void * | ||||
| ) | [static] |
Definition at line 309 of file objprinter.cpp.
| static int Printer_setfile | ( | Printer * | self, | |
| PyObject * | value, | |||
| void * | ||||
| ) | [static] |
Definition at line 287 of file objprinter.cpp.
| static int Printer_setpages | ( | Printer * | self, | |
| PyObject * | value, | |||
| void * | ||||
| ) | [static] |
Definition at line 331 of file objprinter.cpp.
References ScribusMainWindow::doc, ScribusDoc::Pages, ScribusCore::primaryMainWindow(), and ScCore.
| static int Printer_setprinter | ( | Printer * | self, | |
| PyObject * | value, | |||
| void * | ||||
| ) | [static] |
Definition at line 256 of file objprinter.cpp.
| static int Printer_setseparation | ( | Printer * | self, | |
| PyObject * | value, | |||
| void * | ||||
| ) | [static] |
Definition at line 365 of file objprinter.cpp.
| void SCRIBUS_API ReOrderText | ( | ScribusDoc * | doc, | |
| ScribusView * | view | |||
| ) |
Variable Documentation
PyGetSetDef Printer_getseters[] [static] |
Initial value:
{
{const_cast<char*>("allPrinters"), (getter)Printer_getallPrinters, (setter)Printer_setallPrinters, const_cast<char*>("List of installed printers -- read only"), NULL},
{const_cast<char*>("printer"), (getter)Printer_getprinter, (setter)Printer_setprinter, const_cast<char*>("Name of printer to use.\nDefault is 'File' for printing into file"), NULL},
{const_cast<char*>("file"), (getter)Printer_getfile, (setter)Printer_setfile, const_cast<char*>("Name of file to print into"), NULL},
{const_cast<char*>("cmd"), (getter)Printer_getcmd, (setter)Printer_setcmd, const_cast<char*>("Alternative Printer Command"), NULL},
{const_cast<char*>("pages"), (getter)Printer_getpages, (setter)Printer_setpages, const_cast<char*>("List of pages to be printed"), NULL},
{const_cast<char*>("separation"), (getter)Printer_getseparation, (setter)Printer_setseparation, const_cast<char*>("Print separationl\n\t 'No' -- Default\n\t 'All'\n\t 'Cyan'\n\t 'Magenta'\n\t 'Yellow'\n\t 'Black'\nBeware of misspelling because check is not performed"), NULL},
{NULL, NULL, NULL, NULL, NULL}
}
Definition at line 382 of file objprinter.cpp.
PyMemberDef Printer_members[] [static] |
Initial value:
{
{const_cast<char*>("copies"), T_INT, offsetof(Printer, copies), 0, const_cast<char*>("Number of copies")},
{const_cast<char*>("color"), T_INT, offsetof(Printer, color), 0, const_cast<char*>("Print in color.\n\t True - color -- Default\n\t False - greyscale")},
{const_cast<char*>("useICC"), T_INT, offsetof(Printer, useICC), 0, const_cast<char*>("Use ICC Profile\n\tTrue\n\tFalse -- Default")},
{const_cast<char*>("pslevel"), T_INT, offsetof(Printer, pslevel), 0, const_cast<char*>("PostScript Level\nCan be 1 or 2 or 3 -- Default is 3.")},
{const_cast<char*>("mph"), T_INT, offsetof(Printer, mph), 0, const_cast<char*>("Mirror Pages Horizontal\n\tTrue\n\tFalse -- Default")},
{const_cast<char*>("mpv"), T_INT, offsetof(Printer, mpv), 0, const_cast<char*>("Mirror Pages Vertical\n\t True\n\tFalse -- Default")},
{const_cast<char*>("ucr"), T_INT, offsetof(Printer, ucr), 0, const_cast<char*>("Apply Under Color Removal\n\tTrue -- Default\n\tFalse")},
{NULL, 0, 0, 0, NULL}
}
Definition at line 225 of file objprinter.cpp.
PyMethodDef Printer_methods[] [static] |
Initial value:
{
{const_cast<char*>("printNow"), (PyCFunction)Printer_print, METH_NOARGS, const_cast<char*>("Prints selected pages.")},
{NULL, (PyCFunction)(0), 0, NULL}
}
Definition at line 521 of file objprinter.cpp.
| PyTypeObject Printer_Type |
