8#include "private/qprinter_p.h"
65 d->maxPage = to > 0 ? to : INT_MAX;
100 if (!(
d->options &
option) != !on)
113 return (
d->options &
option) != 0;
133 PrintDialogOptions changed = (
options ^
d->options);
171 Q_ASSERT_X(min <= max,
"QAbstractPrintDialog::setMinMax",
172 "'min' must be less than or equal to 'max'");
205 Q_ASSERT_X(from <= to,
"QAbstractPrintDialog::setFromTo",
206 "'from' must be less than or equal to 'to'");
207 d->printer->setFromTo(from, to);
209 if (
d->minPage == 0 &&
d->maxPage == 0)
220 return d->printer->fromPage();
230 return d->printer->toPage();
371 if (
d->receiverToDisconnectOnClose) {
373 d->receiverToDisconnectOnClose,
d->memberToDisconnectOnClose);
374 d->receiverToDisconnectOnClose =
nullptr;
376 d->memberToDisconnectOnClose.clear();
392 d->receiverToDisconnectOnClose = receiver;
393 d->memberToDisconnectOnClose = member;
399#include "moc_qabstractprintdialog.cpp"
QAbstractPrintDialog::PrintDialogOptions options
void setPrinter(QPrinter *newPrinter)
The QAbstractPrintDialog class provides a base implementation for print dialogs used to configure pri...
PrintDialogOption
Used to specify which parts of the print dialog should be visible.
PrintRange printRange() const
Returns the print range.
PrintRange
Used to specify the print range selection option.
void setFromTo(int fromPage, int toPage)
Sets the range in the print dialog to be from from to to.
int toPage() const
Returns the last page to be printed.
int maxPage() const
Returns the maximum page in the page range.
int minPage() const
Returns the minimum page in the page range.
QPrinter * printer() const
Returns the printer that this printer dialog operates on.
void setOptionTabs(const QList< QWidget * > &tabs)
int fromPage() const
Returns the first page to be printed By default, this value is set to 0.
QAbstractPrintDialog(QPrinter *printer, QWidget *parent=nullptr)
Constructs an abstract print dialog for printer with parent as parent widget.
void setPrintRange(PrintRange range)
Sets the print range option in to be range.
void setMinMax(int min, int max)
Sets the page range in this dialog to be from min to max.
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
\threadsafe
The QDialog class is the base class of dialog windows.
virtual void done(int)
Closes the dialog and sets its result code to r.
QScopedPointer< QObjectData > d_ptr
void accepted(QPrinter *printer)
This signal is emitted when the user accepts the values set in the print dialog.
PrintDialogOptions options
the various options that affect the look and feel of the dialog
void setOptions(PrintDialogOptions options)
bool testOption(PrintDialogOption option) const
Returns true if the given option is enabled; otherwise, returns false.
void setOption(PrintDialogOption option, bool on=true)
Sets the given option to be enabled if on is true; otherwise, clears the given option.
PrintRange
Used to specify the print range selection option.
T * data() const noexcept
Returns the value of the pointer referenced by this object.
Combined button and popup list for selecting options.
static ControlElement< T > * ptr(QWidget *widget)
#define Q_ASSERT_X(cond, x, msg)
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
myObject disconnect()
[26]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent