Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QPrintEngine Class Reference

The QPrintEngine class defines an interface for how QPrinter interacts with a given printing subsystem. More...

 #include <QPrintEngine>

Note: All functions in this class are reentrant.

Public Types

enum PrintEnginePropertyKey { PPK_CollateCopies, PPK_ColorMode, PPK_Creator, PPK_Duplex, ..., PPK_CustomBase }

Public Functions

virtual ~QPrintEngine ()
virtual bool abort () = 0
virtual int metric ( QPaintDevice::PaintDeviceMetric id ) const = 0
virtual bool newPage () = 0
virtual QPrinter::PrinterState printerState () const = 0
virtual QVariant property ( PrintEnginePropertyKey key ) const = 0
virtual void setProperty ( PrintEnginePropertyKey key, const QVariant & value ) = 0

Detailed Description

The QPrintEngine class defines an interface for how QPrinter interacts with a given printing subsystem.

The common case when creating your own print engine is to derive from both QPaintEngine and QPrintEngine. Various properties of a print engine are given with property() and set with setProperty().

See also QPaintEngine.

Member Type Documentation

enum QPrintEngine::PrintEnginePropertyKey

This enum is used to communicate properties between the print engine and QPrinter. A property may or may not be supported by a given print engine.

ConstantValueDescription
QPrintEngine::PPK_CollateCopies0A boolean value indicating whether the printout should be collated or not.
QPrintEngine::PPK_ColorMode1Refers to QPrinter::ColorMode, either color or monochrome.
QPrintEngine::PPK_Creator2A string describing the document's creator.
QPrintEngine::PPK_Duplex21A boolean value indicating whether both sides of the printer paper should be used for the printout.
QPrintEngine::PPK_DocumentName3A string describing the document name in the spooler.
QPrintEngine::PPK_FontEmbedding19A boolean value indicating whether data for the document's fonts should be embedded in the data sent to the printer.
QPrintEngine::PPK_FullPage4A boolean describing if the printer should be full page or not.
QPrintEngine::PPK_NumberOfCopies5Obsolete. An integer specifying the number of copies. Use PPK_CopyCount instead.
QPrintEngine::PPK_Orientation6Specifies a QPrinter::Orientation value.
QPrintEngine::PPK_OutputFileName7The output file name as a string. An empty file name indicates that the printer should not print to a file.
QPrintEngine::PPK_PageOrder8Specifies a QPrinter::PageOrder value.
QPrintEngine::PPK_PageRect9A QRect specifying the page rectangle
QPrintEngine::PPK_PageSize10Obsolete. Use PPK_PaperSize instead.
QPrintEngine::PPK_PaperRect11A QRect specifying the paper rectangle.
QPrintEngine::PPK_PaperSource12Specifies a QPrinter::PaperSource value.
QPrintEngine::PPK_PaperSources22Specifies more than one QPrinter::PaperSource value.
QPrintEngine::PPK_PaperSizePPK_PageSizeSpecifies a QPrinter::PaperSize value.
QPrintEngine::PPK_PrinterName13A string specifying the name of the printer.
QPrintEngine::PPK_PrinterProgram14A string specifying the name of the printer program used for printing,
QPrintEngine::PPK_Resolution15An integer describing the dots per inch for this printer.
QPrintEngine::PPK_SelectionOption16 
QPrintEngine::PPK_SupportedResolutions17A list of integer QVariants describing the set of supported resolutions that the printer has.
QPrintEngine::PPK_SuppressSystemPrintStatus20Suppress the built-in dialog for showing printing progress. As of 4.1 this only has effect on Mac OS X where, by default, a status dialog is shown.
QPrintEngine::PPK_WindowsPageSize18An integer specifying a DM_PAPER entry on Windows.
QPrintEngine::PPK_CustomPaperSize23A QSizeF specifying a custom paper size in the QPrinter::Point unit.
QPrintEngine::PPK_PageMargins24A QList<QVariant> containing the left, top, right and bottom margin values.
QPrintEngine::PPK_CopyCount25An integer specifying the number of copies to print.
QPrintEngine::PPK_SupportsMultipleCopies26A boolean value indicating whether or not the printer supports printing multiple copies in one job.
QPrintEngine::PPK_CustomBase0xff00Basis for extension.

Member Function Documentation

QPrintEngine::~QPrintEngine () [virtual]

Destroys the print engine.

bool QPrintEngine::abort () [pure virtual]

Instructs the print engine to abort the printing process. Returns true if successful; otherwise returns false.

int QPrintEngine::metric ( QPaintDevice::PaintDeviceMetric id ) const [pure virtual]

Returns the metric for the given id.

bool QPrintEngine::newPage () [pure virtual]

Instructs the print engine to start a new page. Returns true if the printer was able to create the new page; otherwise returns false.

QPrinter::PrinterState QPrintEngine::printerState () const [pure virtual]

Returns the current state of the printer being used by the print engine.

QVariant QPrintEngine::property ( PrintEnginePropertyKey key ) const [pure virtual]

Returns the print engine's property specified by key.

See also setProperty().

void QPrintEngine::setProperty ( PrintEnginePropertyKey key, const QVariant & value ) [pure virtual]

Sets the print engine's property specified by key to the given value.

See also property().

Publicit�

Best Of

Actualit�s les plus lues

Semaine
Mois
Ann�e
  1. Microsoft ouvre aux autres compilateurs C++ AMP, la sp�cification pour la conception d'applications parall�les C++ utilisant le GPU 22
  2. Les d�veloppeurs ignorent-ils trop les failles d�couvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  3. RIM : � 13 % des d�veloppeurs ont gagn� plus de 100 000 $ sur l'AppWord �, Qt et open-source au menu du BlackBerry DevCon Europe 0
  4. BlackBerry 10 : premi�res images du prochain OS de RIM qui devrait int�grer des widgets et des tuiles inspir�es de Windows Phone 0
  5. � Quelque chose ne va vraiment pas avec les d�veloppeurs "modernes" �, un d�veloppeur � "l'ancienne" critique la multiplication des biblioth�ques 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil d�claratif et extensible pour la compilation de projets Qt 17
  7. Quelles nouveaut�s de C++11 Visual C++ doit-il rapidement int�grer ? Donnez-nous votre avis 10
Page suivante

Le Qt Labs au hasard

Logo

La folie est de mettre en forme le m�me texte

Les Qt Labs sont les laboratoires des d�veloppeurs de Qt, o� ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait �tre son futur. Lire l'article.

Communaut�

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la r�daction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, �crite par Nokia Corporation and/or its subsidiary(-ies). Les �ventuels probl�mes r�sultant d'une mauvaise traduction ne sont pas imputables � Nokia. Qt 4.7
Copyright © 2012 Developpez LLC. Tous droits r�serv�s Developpez LLC. Aucune reproduction, m�me partielle, ne peut �tre faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'� 3 ans de prison et jusqu'� 300 000 E de dommages et int�r�ts. Cette page est d�pos�e � la SACD.
Vous avez d�nich� une erreur ? Un bug ? Une redirection cass�e ? Ou tout autre probl�me, quel qu'il soit ? Ou bien vous d�sirez participer � ce projet de traduction ? N'h�sitez pas � nous contacter ou par MP !
 
 
 
 
Partenaires

H�bergement Web