// qprinter.sip generated by MetaSIP on Fri Sep 28 17:07:47 2007 // // This file is part of the QtGui Python extension module. // // Copyright (c) 2007 // Phil Thompson // // This file is part of PyQt. // // This copy of PyQt is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 as published by // the Free Software Foundation and appearing in the file LICENSE included in the // packaging of this file. // // PyQt is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with // PyQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class QPrinter : QPaintDevice { %TypeHeaderCode #include %End public: enum PrinterMode { ScreenResolution, PrinterResolution, HighResolution, }; explicit QPrinter(QPrinter::PrinterMode mode = QPrinter::ScreenResolution); virtual ~QPrinter(); virtual int devType() const; enum Orientation { Portrait, Landscape, }; enum PageSize { A4, B5, Letter, Legal, Executive, A0, A1, A2, A3, A5, A6, A7, A8, A9, B0, B1, B10, B2, B3, B4, B6, B7, B8, B9, C5E, Comm10E, DLE, Folio, Ledger, Tabloid, Custom, NPageSize, }; enum PageOrder { FirstPageFirst, LastPageFirst, }; enum ColorMode { GrayScale, Color, }; enum PaperSource { OnlyOne, Lower, Middle, Manual, Envelope, EnvelopeManual, Auto, Tractor, SmallFormat, LargeFormat, LargeCapacity, Cassette, FormSource, %If (Qt_4_3_0 -) MaxPageSource, %End }; enum PrinterState { Idle, Active, Aborted, Error, }; enum OutputFormat { NativeFormat, PdfFormat, %If (Qt_4_2_0 -) PostScriptFormat, %End }; enum PrintRange { AllPages, Selection, PageRange, }; void setPrinterName(const QString &); QString printerName() const; void setOutputFileName(const QString &); QString outputFileName() const; void setPrintProgram(const QString &); QString printProgram() const; void setDocName(const QString &); QString docName() const; void setCreator(const QString &); QString creator() const; void setOrientation(QPrinter::Orientation); QPrinter::Orientation orientation() const; void setPageSize(QPrinter::PageSize); QPrinter::PageSize pageSize() const; void setPageOrder(QPrinter::PageOrder); QPrinter::PageOrder pageOrder() const; void setResolution(int); int resolution() const; void setColorMode(QPrinter::ColorMode); QPrinter::ColorMode colorMode() const; void setCollateCopies(bool collate); bool collateCopies() const; void setFullPage(bool); bool fullPage() const; void setNumCopies(int); int numCopies() const; void setPaperSource(QPrinter::PaperSource); QPrinter::PaperSource paperSource() const; QList supportedResolutions() const; %If (WS_WIN) void setWinPageSize(int winPageSize); %End %If (WS_WIN) int winPageSize() const; %End QRect paperRect() const; QRect pageRect() const; %If (WS_X11 || WS_MACX) QString printerSelectionOption() const; %End %If (WS_X11 || WS_MACX) void setPrinterSelectionOption(const QString &); %End bool newPage(); bool abort(); QPrinter::PrinterState printerState() const; virtual QPaintEngine *paintEngine() const; void setOutputFormat(QPrinter::OutputFormat format); QPrinter::OutputFormat outputFormat() const; void setFontEmbeddingEnabled(bool enable); bool fontEmbeddingEnabled() const; QPrintEngine *printEngine() const; void setFromTo(int fromPage, int toPage); int fromPage() const; int toPage() const; %If (PyQt_NoQtPrintRangeBug) void setPrintRange(QPrinter::PrintRange range); %End %If (PyQt_NoQtPrintRangeBug) QPrinter::PrintRange printRange() const; %End %If (Qt_4_2_0 -) void setDoubleSidedPrinting(bool enable); %End %If (Qt_4_2_0 -) bool doubleSidedPrinting() const; %End protected: virtual int metric(QPaintDevice::PaintDeviceMetric) const; void setEngines(QPrintEngine *printEngine, QPaintEngine *paintEngine); private: QPrinter(const QPrinter &); };