Qt:Документация 4.3.2/qprintdialog

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

QPrintDialog Class Reference
[модуль QtGui ]

The QPrintDialog class provides a dialog for specifying the printer's configuration. More...

 #include <QPrintDialog>

Inherits QAbstractPrintDialog.

Открытые функции

  • 14 открытых функций унаследованных от QAbstractPrintDialog
  • 5 открытых функций унаследованных от QDialog
  • 201 открытых функций унаследованных от QWidget
  • 29 открытых функций унаследованных от QObject
  • 12 открытых функций унаследованных от QPaintDevice

Дополнительные унаследованные члены

  • 2 свойства унаследованных от QDialog
  • 56 свойства унаследованных от QWidget
  • 1 свойство унаследованное от QObject
  • 4 открытых слотов унаследованных от QDialog
  • 19 открытых слотов унаследованных от QWidget
  • 1 открытый слот унаследованный от QObject
  • 3 сигнала унаследованных от QDialog
  • 1 сигнал унаследованный от QWidget
  • 1 сигнал унаследованный от QObject
  • 4 статических открытых члена унаследованных от QWidget
  • 5 статических открытых члена унаследованных от QObject
  • 38 защищенных функций унаследованных от QWidget
  • 7 защищенных функций унаследованных от QObject
  • 1 защищенная функция унаследованна от QPaintDevice
  • 1 защищенный слот унаследованный от QWidget

Подробное описание

The QPrintDialog class provides a dialog for specifying the printer's configuration.

The dialog allows users to change document-related settings, such as the paper size and orientation, type of print (color or grayscale), range of pages, and number of copies to print.

Controls are also provided to enable users to choose from the printers available, including any configured network printers.

Typically, QPrintDialog objects are constructed with a QPrinter object, and executed using the exec() function.

 QPrintDialog printDialog(printer, parent);
 if (printDialog.exec() == QDialog::Accepted) {
     // print ...
 }

If the dialog is accepted by the user, the QPrinter object is correctly configured for printing.

Файл:Plastique-printdialog.png

Файл:Plastique-printdialog-properties.png

The printer dialog (shown above in Plastique style) enables access to common printing properties. On X11 platforms that use the CUPS printing system, the settings for each available printer can be modified via the dialog's Свойства push button.

On Windows and Mac OS X, the native print dialog is used, which means that some QWidget and QDialog properties set on the dialog won't be respected. In addition, the native print dialog on Mac OS X does not support setting printer options, i.e. QAbstractPrintDialog::setEnabledOptions() and QAbstractPrintDialog::addEnabledOption() have no effect.

See also QPageSetupDialog, QPrinter, Pixelator Example, Order Form Example, Image Viewer Example, and Scribble Example.


Описание функций-членов

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

Constructs a new modal printer dialog for the given printer with the given parent.

QPrintDialog::~QPrintDialog ()

Destroys the print dialog.


Copyright © 2007 Trolltech Trademarks
Qt 4.3.2