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  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QAbstractPrintDialog Class

The QAbstractPrintDialog class provides a base implementation for print dialogs used to configure printers. More...

 #include <QAbstractPrintDialog>

Inherits: QDialog.

Inherited by: QPrintDialog.

Public Types

enum PaintDeviceMetric { PdmWidth, PdmHeight, PdmWidthMM, PdmHeightMM, ..., PdmPhysicalDpiY }
enum PrintDialogOption { None, PrintToFile, PrintSelection, PrintPageRange, ..., DontUseSheet }
flags PrintDialogOptions
enum PrintRange { AllPages, Selection, PageRange, CurrentPage }

Public Functions

QAbstractPrintDialog(QPrinter * printer, QWidget * parent = 0)
virtual ~QPaintDevice()
int colorCount() const
int depth() const
int fromPage() const
int height() const
int heightMM() const
int logicalDpiX() const
int logicalDpiY() const
int maxPage() const
int minPage() const
virtual QPaintEngine * paintEngine() const = 0
bool paintingActive() const
int physicalDpiX() const
int physicalDpiY() const
PrintRange printRange() const
QPrinter * printer() const
void setFromTo(int from, int to)
void setMinMax(int min, int max)
void setOptionTabs(const QList<QWidget *> & tabs)
void setPrintRange(PrintRange range)
int toPage() const
int width() const
int widthMM() const

Reimplemented Public Functions

virtual int exec() = 0
  • 8 public functions inherited from QDialog
  • 215 public functions inherited from QWidget
  • 31 public functions inherited from QObject

Protected Functions

QPaintDevice()
virtual void init(QPainter * painter) const
virtual int metric(PaintDeviceMetric metric) const
virtual QPaintDevice * redirected(QPoint * offset) const
virtual QPainter * sharedPainter() const
  • 7 protected functions inherited from QDialog
  • 37 protected functions inherited from QWidget
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 2 properties inherited from QDialog
  • 58 properties inherited from QWidget
  • 1 property inherited from QObject
  • 5 public slots inherited from QDialog
  • 19 public slots inherited from QWidget
  • 1 public slot inherited from QObject
  • 3 signal inherited from QDialog
  • 1 signal inherited from QWidget
  • 2 signal inherited from QObject
  • 4 static public members inherited from QWidget
  • 11 static public members inherited from QObject
  • 1 protected slot inherited from QWidget

Detailed Description

The QAbstractPrintDialog class provides a base implementation for print dialogs used to configure printers.

This class implements getter and setter functions that are used to customize settings shown in print dialogs, but it is not used directly. Use QPrintDialog to display a print dialog in your application.

See also QPrintDialog, QPrinter, and Printing with Qt.

Member Type Documentation

enum QAbstractPrintDialog::PrintDialogOption
flags QAbstractPrintDialog::PrintDialogOptions

Used to specify which parts of the print dialog should be visible.

ConstantValueDescription
QAbstractPrintDialog::None0x0000None of the options are enabled.
QAbstractPrintDialog::PrintToFile0x0001The print to file option is enabled.
QAbstractPrintDialog::PrintSelection0x0002The print selection option is enabled.
QAbstractPrintDialog::PrintPageRange0x0004The page range selection option is enabled.
QAbstractPrintDialog::PrintShowPageSize0x0008Show the page size + margins page only if this is enabled.
QAbstractPrintDialog::PrintCollateCopies0x0010The collate copies option is enabled
QAbstractPrintDialog::PrintCurrentPage0x0040The print current page option is enabled

This value is obsolete and does nothing since Qt 4.5:

ConstantValueDescription
QAbstractPrintDialog::DontUseSheet0x0020In previous versions of Qt, exec() the print dialog would create a sheet by default the dialog was given a parent. This is no longer supported in Qt 4.5. If you want to use sheets, use QPrintDialog::open() instead.

The PrintDialogOptions type is a typedef for QFlags<PrintDialogOption>. It stores an OR combination of PrintDialogOption values.

enum QAbstractPrintDialog::PrintRange

Used to specify the print range selection option.

ConstantValueDescription
QAbstractPrintDialog::AllPages0All pages should be printed.
QAbstractPrintDialog::Selection1Only the selection should be printed.
QAbstractPrintDialog::PageRange2The specified page range should be printed.
QAbstractPrintDialog::CurrentPage3Only the currently visible page should be printed.

See also QPrinter::PrintRange.

Member Function Documentation

QAbstractPrintDialog::QAbstractPrintDialog(QPrinter * printer, QWidget * parent = 0)

Constructs an abstract print dialog for printer with parent as parent widget.

int QAbstractPrintDialog::exec() [pure virtual]

Reimplemented from QDialog::exec().

This virtual function is called to pop up the dialog. It must be reimplemented in subclasses.

int QAbstractPrintDialog::fromPage() const

Returns the first page to be printed By default, this value is set to 0.

int QAbstractPrintDialog::maxPage() const

Returns the maximum page in the page range. As of Qt 4.4, this function returns INT_MAX by default. Previous versions returned 1 by default.

int QAbstractPrintDialog::minPage() const

Returns the minimum page in the page range. By default, this value is set to 1.

PrintRange QAbstractPrintDialog::printRange() const

Returns the print range.

See also setPrintRange().

QPrinter * QAbstractPrintDialog::printer() const

Returns the printer that this printer dialog operates on.

void QAbstractPrintDialog::setFromTo(int from, int to)

Sets the range in the print dialog to be from from to to.

void QAbstractPrintDialog::setMinMax(int min, int max)

Sets the page range in this dialog to be from min to max. This also enables the PrintPageRange option.

void QAbstractPrintDialog::setOptionTabs(const QList<QWidget *> & tabs)

Set a list of widgets as tabs to be shown on the print dialog, if supported.

Currently this option is only supported on X11.

Setting the option tabs will transfer their ownership to the print dialog.

This function was introduced in Qt 4.4.

void QAbstractPrintDialog::setPrintRange(PrintRange range)

Sets the print range option in to be range.

See also printRange().

int QAbstractPrintDialog::toPage() const

Returns the last page to be printed. By default, this value is set to 0.

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 5.0-snapshot
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