|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
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
public class QPrintPreviewDialog
The QPrintPreviewDialog class provides a dialog for previewing and configuring page layouts for printer output. Using QPrintPreviewDialog in your existing application is straightforward:
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.
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.
exec()
. Call QPrintPreviewDialog::exec()
to show the preview dialog.
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.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary | |
---|---|
QSignalEmitter.Signal1 |
paintRequested
This signal takes 1 generic argument(s). |
Fields inherited from class com.trolltech.qt.gui.QDialog |
---|
accepted, finished, rejected |
Fields inherited from class com.trolltech.qt.gui.QWidget |
---|
customContextMenuRequested |
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
QPrintPreviewDialog()
This is an overloaded member function, provided for convenience. |
|
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)
This is an overloaded method provided for convenience. |
|
QPrintPreviewDialog(QWidget parent)
This is an overloaded member function, provided for convenience. |
|
QPrintPreviewDialog(QWidget parent,
Qt.WindowFlags flags)
This is an overloaded member function, provided for convenience. |
|
QPrintPreviewDialog(QWidget parent,
Qt.WindowType[] flags)
This is an overloaded method provided for convenience. |
Method Summary | |
---|---|
QPrinter |
printer()
Returns a pointer to the QPrinter object this dialog is currently operating on. |
Methods inherited from class com.trolltech.qt.gui.QDialog |
---|
accept, done, exec, isSizeGripEnabled, open, reject, result, setModal, setResult, setSizeGripEnabled |
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 com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
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 |
---|
public final QSignalEmitter.Signal1 paintRequested
This signal takes 1 generic argument(s). We list their type and the name they go by in the description of this signal. <com.trolltech.qt.gui.QPrinter(named: printer)>:
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 |
---|
public QPrintPreviewDialog(QPrinter printer, QWidget parent, Qt.WindowType[] flags)
public QPrintPreviewDialog(QPrinter printer, QWidget parent)
QWidget
constructor. QWidget::setWindowFlags()
.
public QPrintPreviewDialog(QPrinter printer)
QWidget
constructor. QWidget::setWindowFlags()
.
public QPrintPreviewDialog(QPrinter printer, QWidget parent, Qt.WindowFlags flags)
QWidget
constructor. QWidget::setWindowFlags()
.
public QPrintPreviewDialog(QWidget parent, Qt.WindowType[] flags)
public QPrintPreviewDialog(QWidget parent)
This will create an internal QPrinter
object, which will use the system default printer.
public QPrintPreviewDialog()
This will create an internal QPrinter
object, which will use the system default printer.
public QPrintPreviewDialog(QWidget parent, Qt.WindowFlags flags)
This will create an internal QPrinter
object, which will use the system default printer.
Method Detail |
---|
public final QPrinter printer()
QPrinter
object this dialog is currently operating on.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |