Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QAbstractPrintDialog Class

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

Header:#include <QAbstractPrintDialog>
Inherits:QDialog
Inherited By:

QPrintDialog

Public Types

enumPrintDialogOption { None, PrintToFile, PrintSelection, PrintPageRange, ..., DontUseSheet }
flagsPrintDialogOptions
enumPrintRange { AllPages, Selection, PageRange, CurrentPage }

Public Functions

QAbstractPrintDialog(QPrinter * printer, QWidget * parent = 0)
virtual intexec() = 0
intfromPage() const
intmaxPage() const
intminPage() const
PrintRangeprintRange() const
QPrinter *printer() const
voidsetFromTo(int from, int to)
voidsetMinMax(int min, int max)
voidsetOptionTabs(const QList<QWidget *> & tabs)
voidsetPrintRange(PrintRange range)
inttoPage() const
  • 8 public functions inherited fromQDialog
  • 220 public functions inherited fromQWidget
  • 29 public functions inherited fromQObject
  • 12 public functions inherited fromQPaintDevice

Additional Inherited Members

  • 2 properties inherited fromQDialog
  • 58 properties inherited fromQWidget
  • 1 property inherited fromQObject
  • 5 public slots inherited fromQDialog
  • 19 public slots inherited fromQWidget
  • 1 public slot inherited fromQObject
  • 3 signals inherited fromQDialog
  • 1 signal inherited fromQWidget
  • 1 signal inherited fromQObject
  • 4 static public members inherited fromQWidget
  • 7 static public members inherited fromQObject
  • 7 protected functions inherited fromQDialog
  • 37 protected functions inherited fromQWidget
  • 8 protected functions inherited fromQObject
  • 1 protected function inherited fromQPaintDevice
  • 1 protected slot inherited fromQWidget

Detailed Description

TheQAbstractPrintDialog 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. UseQPrintDialog to display a print dialog in your application.

In Symbian, there is no support for printing. Hence, this dialog should not be used in Symbian.

See alsoQPrintDialog,QPrinter, andPrinting 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 was introduced in 4.7.)

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, useQPrintDialog::open() instead.

The PrintDialogOptions type is a typedef forQFlags<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. (This value was introduced in 4.7.)

See alsoQPrinter::PrintRange.

Member Function Documentation

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

Constructs an abstract print dialog forprinter withparent as parent widget.

[pure virtual]int QAbstractPrintDialog::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 alsosetPrintRange().

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 fromfrom toto.

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

Sets the page range in this dialog to be frommin tomax. This also enables thePrintPageRange option.

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

Set a list of widgets astabs 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 berange.

See alsoprintRange().

int QAbstractPrintDialog::toPage() const

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

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp