Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QPrintPreviewDialog

    java.lang.Object
      com.trolltech.qt.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.core.QObject
                  com.trolltech.qt.gui.QWidget
                      com.trolltech.qt.gui.QDialog
                          com.trolltech.qt.gui.QPrintPreviewDialog

All Implemented Interfaces:
  QPaintDeviceInterface, QtJambiInterface

    public class QPrintPreviewDialog

extends QDialog

The `QPrintPreviewDialog` class provides a dialog for previewing and configuring page layouts for printer output. Using `QPrintPreviewDialog` in your existing application is straightforward:

1. Create the `QPrintPreviewDialog`.

   You can construct a `QPrintPreviewDialog` with an existing `QPrinter` object, or you can have `QPrintPreviewDialog` create one for you, which will be the system default printer.

2. Connect the `paintRequested()` signal to a slot.

   When the dialog needs to generate a set of preview pages, the `paintRequested()` signal will be emitted. You can use the exact same code for the actual printing as for having the preview generated, including calling `QPrinter::newPage()` to start a new page in the preview. Connect a slot to the `paintRequested()` signal, where you draw onto the `QPrinter` object that is passed into the slot.

3. Call `exec()`.

   Call `QPrintPreviewDialog::exec()` to show the preview dialog.

See also:
  `QPrinter`, `QPrintDialog`, `QPageSetupDialog`, and `QPrintPreviewWidget`.

Nested Class Summary

Nested classes/interfaces inherited from class com.trolltech.qt.gui.QDialog
`QDialog.DialogCode`

Nested classes/interfaces inherited from class com.trolltech.qt.gui.QWidget
`QWidget.RenderFlag, QWidget.RenderFlags`

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

Field Summary
`QSignalEmitter.Signal1` | `paintRequested` This signal is emitted when the `QPrintPreviewDialog` needs to generate a set of preview pages.

Fields inherited from class com.trolltech.qt.gui.QDialog
`accepted, finished, rejected`

Fields inherited from class com.trolltech.qt.gui.QWidget
`customContextMenuRequested`

Constructor Summary
`QPrintPreviewDialog()` This will create an internal `QPrinter` object, which will use the system default printer.
`QPrintPreviewDialog(QPrinter printer)` Constructs a `QPrintPreviewDialog` based on `printer` and with `parent` as the parent widget.
`QPrintPreviewDialog(QPrinter printer, QWidget parent)` Constructs a `QPrintPreviewDialog` based on `printer` and with `parent` as the parent widget.
`QPrintPreviewDialog(QPrinter printer, QWidget parent, Qt.WindowFlags flags)` Constructs a `QPrintPreviewDialog` based on `printer` and with `parent` as the parent widget.
`QPrintPreviewDialog(QPrinter printer, QWidget parent, Qt.WindowType[] flags)` Constructs a `QPrintPreviewDialog` based on `printer` and with `parent` as the parent widget.
`QPrintPreviewDialog(QWidget parent)` This will create an internal `QPrinter` object, which will use the system default printer.
`QPrintPreviewDialog(QWidget parent, Qt.WindowFlags flags)` This will create an internal `QPrinter` object, which will use the system default printer.
`QPrintPreviewDialog(QWidget parent, Qt.WindowType[] flags)` This will create an internal `QPrinter` object, which will use the system default printer.

Method Summary
`static QPrintPreviewDialog` | `fromNativePointer(QNativePointer nativePointer)` This method returns the QPrintPreviewDialog instance pointed to by `nativePointer`.

Methods inherited from class com.trolltech.qt.gui.QDialog
`accept, done, exec, isSizeGripEnabled, reject, result, setModal, setResult, setSizeGripEnabled`

Methods inherited from class com.trolltech.qt.gui.QWidget
`acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsRect, contextMenuEvent, contextMenuPolicy, cursor, depth, destroy, destroy, destroy, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, enterEvent, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grabKeyboard, grabMouse, grabMouse, grabShortcut, grabShortcut, hasFocus, hasMouseTracking, height, heightForWidth, heightMM, hide, hideEvent, inputContext, inputMethodEvent, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isMaximized, isMinimized, isModal, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, keyPressEvent, keyReleaseEvent, languageChange, layout, layoutDirection, leaveEvent, locale, logicalDpiX, logicalDpiY, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, move, move, moveEvent, nativeParentWidget, nextInFocusChain, normalGeometry, numColors, overrideWindowFlags, overrideWindowFlags, paintEngine, paintEvent, paintingActive, palette, parentWidget, physicalDpiX, physicalDpiY, pos, raise, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, render, render, render, render, render, render, render, render, repaint, repaint, repaint, repaint, resetInputContext, resize, resize, resizeEvent, restoreGeometry, saveGeometry, scroll, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setBaseSize, setContentsMargins, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedSize, setFixedWidth, setFocus, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGeometry, setHidden, setInputContext, setLayout, setLayoutDirection, setLocale, setMask, setMask, setMaximumHeight, setMaximumSize, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setParent, setParent, setShortcutAutoRepeat, setShortcutAutoRepeat, setShortcutEnabled, setShortcutEnabled, setSizeIncrement, setSizeIncrement, setSizePolicy, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlags, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowState, setWindowTitle, show, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeHint, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, underMouse, unsetCursor, unsetLayoutDirection, unsetLocale, update, update, update, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, width, widthMM, window, windowFilePath, windowFlags, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, winId, x, y`

Methods inherited from class com.trolltech.qt.core.QObject
`childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty`

Methods inherited from class com.trolltech.qt.QtJambiObject
`dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr`

Methods inherited from class com.trolltech.qt.QSignalEmitter
`blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread`

Methods inherited from class java.lang.Object
`clone, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.trolltech.qt.QtJambiInterface
`disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership`

Field Detail

### paintRequested

    public final QSignalEmitter.Signal1 paintRequested

  This signal is emitted when the `QPrintPreviewDialog` needs to generate a set of preview pages.

  The `printer` instance supplied is the paint device onto which you should paint the contents of each page, using the `QPrinter` instance in the same way as you would when printing directly.

Constructor Detail

### QPrintPreviewDialog

    public QPrintPreviewDialog(QPrinter printer,
                               QWidget parent,
                               Qt.WindowType[] flags)

  Constructs a `QPrintPreviewDialog` based on `printer` and with `parent` as the parent widget. The widget flags `flags` are passed on to the `QWidget` constructor.

See also:
  `QWidget::setWindowFlags()`.

### QPrintPreviewDialog

    public QPrintPreviewDialog(QPrinter printer,
                               QWidget parent)

  Constructs a `QPrintPreviewDialog` based on `printer` and with `parent` as the parent widget. The widget flags `flags` are passed on to the `QWidget` constructor.

See also:
  `QWidget::setWindowFlags()`.

### QPrintPreviewDialog

    public QPrintPreviewDialog(QPrinter printer)

  Constructs a `QPrintPreviewDialog` based on `printer` and with `parent` as the parent widget. The widget flags `flags` are passed on to the `QWidget` constructor.

See also:
  `QWidget::setWindowFlags()`.

### QPrintPreviewDialog

    public QPrintPreviewDialog(QPrinter printer,
                               QWidget parent,
                               Qt.WindowFlags flags)

  Constructs a `QPrintPreviewDialog` based on `printer` and with `parent` as the parent widget. The widget flags `flags` are passed on to the `QWidget` constructor.

See also:
  `QWidget::setWindowFlags()`.

### QPrintPreviewDialog

    public QPrintPreviewDialog(QWidget parent,
                               Qt.WindowType[] flags)

  This will create an internal `QPrinter` object, which will use the system default printer.

### QPrintPreviewDialog

    public QPrintPreviewDialog(QWidget parent)

  This will create an internal `QPrinter` object, which will use the system default printer.

### QPrintPreviewDialog

    public QPrintPreviewDialog()

  This will create an internal `QPrinter` object, which will use the system default printer.

### QPrintPreviewDialog

    public QPrintPreviewDialog(QWidget parent,
                               Qt.WindowFlags flags)

  This will create an internal `QPrinter` object, which will use the system default printer.

Method Detail

### fromNativePointer

    public static QPrintPreviewDialog fromNativePointer(QNativePointer nativePointer)

  This method returns the QPrintPreviewDialog instance pointed to by `nativePointer`.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD