42 #include "qplatformdefs.h" 44 #include <private/qabstractprintdialog_p.h> 47 #ifndef QT_NO_PRINTDIALOG 70 #include <rpcsvc/ypclnt.h> 71 #include <rpcsvc/yp_prot.h> 145 #ifndef QT_NO_MESSAGEBOX 154 #endif // QT_NO_MESSAGEBOX 412 switch (static_cast<QKeyEvent*>(e)->key()) {
445 if (p && pickUpSettings) {
502 switch (q->printRange()) {
518 if (p && q->maxPage()) {
519 int from = q->minPage();
520 int to = q->maxPage();
522 from = q->fromPage();
535 d->setPrinter(
d->printer,
true);
545 (*_qt_print_dialog_creator)(q);
554 q->installEventFilter(q);
564 #include "moc_qprintdialog.cpp" 565 #include "qrc_qprintdialog.cpp" 567 #endif // QT_NO_PRINTDIALOG
QPrinter::ColorMode colorMode2
void setPageOrder(PageOrder)
Sets the page order to pageOrder.
int findData(const QVariant &data, int role=Qt::UserRole, Qt::MatchFlags flags=static_cast< Qt::MatchFlags >(Qt::MatchExactly|Qt::MatchCaseSensitive)) const
Returns the index of the item containing the given data for the given role; otherwise returns -1...
void setupPrinterSettings()
void _q_paperSizeSelected(int)
void _q_colorModeSelected(QAbstractButton *)
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
#define QT_END_NAMESPACE
This macro expands to.
static void isc(QPrintDialogPrivate *d, const QString &text, QPrinter::PaperSize ps)
int exec()
Shows the dialog as a modal dialog, blocking until the user closes it.
int length() const
Returns the number of characters in this string.
void _q_orientSelected(int)
Orientation
This enum type (not to be confused with Orientation) is used to specify each page's orientation...
QButtonGroup * printerOrFile
void interpretText()
This function interprets the text of the spin box.
void(* QPrintDialogCreator)(QPrintDialog *parent)
QPrinter::Orientation orientation
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
void setCurrentIndex(int index)
void setPaperSize(PaperSize)
Sets the printer paper size to newPaperSize if that size is supported.
The QString class provides a Unicode character string.
QPrinter::PageOrder pageOrder2
QString outputFileName() const
Returns the name of the output file.
The QObject class is the base class of all Qt objects.
void addItem(const QString &text, const QVariant &userData=QVariant())
Adds an item to the combobox with the given text, and containing the specified userData (stored in th...
QComboBox * orientationCombo
void setRange(int min, int max)
Convenience function to set the minimum, and maximum values with a single function call...
static StandardButton warning(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton)
Opens a warning message box with the given title and text in front of the specified parent widget...
QPrinter::PaperSize indexToPaperSize[QPrinter::NPaperSize]
PageSize pageSize() const
Returns the printer page size.
void setOrientation(Orientation)
Sets the print orientation to orientation.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
QRadioButton * printColor
QVariant itemData(int index, int role=Qt::UserRole) const
Returns the data for the given role in the given index in the combobox, or QVariant::Invalid if there...
void setCopyCount(int)
Sets the number of copies to be printed to count.
int toInt(bool *ok=0) const
Returns the variant as an int if the variant has type() Int , Bool , ByteArray , Char ...
~QPrintDialog()
Destroys the print dialog.
The QPrintDialog class provides a dialog for specifying the printer's configuration.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QRadioButton * printToPrinterButton
Orientation orientation() const
Returns the orientation setting.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
void _q_printerOrFileSelected(QAbstractButton *b)
QString text
the line edit's text
QPrinter::PaperSize pageSize
The QPrinter class is a paint device that paints on a printer.
The QComboBox widget is a combined button and popup list.
T findChild(const QString &aName=QString()) const
Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object.
const T * ptr(const T &t)
int exec()
Reimplemented Function
ColorMode colorMode() const
Returns the current color mode.
void setColorMode(ColorMode)
Sets the printer's color mode to newColorMode, which can be either Color or GrayScale.
QComboBox * pageOrderCombo
void setText(const QString &)
void _q_fileNameEditChanged(const QString &text)
int value
the value of the spin box
The QAbstractPrintDialog class provides a base implementation for print dialogs used to configure pri...
#define Q_DECLARE_PUBLIC(Class)
void setPrinter(QPrinter *p, bool pickUpSettings)
void removeItem(int index)
Removes the item at the given index from the combobox.
PaperSize
This enum type specifies what paper size QPrinter should use.
bool eventFilter(QObject *, QEvent *)
Reimplemented Function
ColorMode
This enum type is used to indicate whether QPrinter should print in color or not. ...
The QSpinBox class provides a spin box widget.
The QLineEdit widget is a one-line text editor.
PageOrder
This enum type is used by QPrinter to tell the application program how to print.
int copyCount() const
Returns the number of copies that will be printed.
void _q_setNumCopies(int)
int count
the number of items in the combobox
void setVisible(bool visible)
Reimplemented Function
int currentIndex
the index of the current item in the combobox.
QRadioButton * printToFileButton
void setCursorPosition(int)
void selectAll()
Selects all the text (i.e.
Q_GUI_EXPORT QPrintDialogCreator _qt_print_dialog_creator
void _q_pageOrderSelected(int)
The QFileInfo class provides system-independent file information.
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
void setVisible(bool visible)
Reimplemented Function
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
QPrintDialog(QPrinter *printer, QWidget *parent=0)
Constructs a new modal printer dialog for the given printer with the given parent.
PageOrder pageOrder() const
Returns the current page order.
void _q_printRangeSelected(int)
void _q_setFirstPage(int)
void setOutputFileName(const QString &)
Sets the name of the output file to fileName.