class QPushButton;
class QPrinter;
-#if defined (Q_OS_UNIX) && !defined(Q_OS_MAC)
-class QUnixPrintWidgetPrivate;
-
-class Q_PRINTSUPPORT_EXPORT QUnixPrintWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit QUnixPrintWidget(QPrinter *printer, QWidget *parent = 0);
- ~QUnixPrintWidget();
- void updatePrinter();
-
-private:
- friend class QPrintDialogPrivate;
- friend class QUnixPrintWidgetPrivate;
- QUnixPrintWidgetPrivate *d;
- Q_PRIVATE_SLOT(d, void _q_printerChanged(int))
- Q_PRIVATE_SLOT(d, void _q_btnBrowseClicked())
- Q_PRIVATE_SLOT(d, void _q_btnPropertiesClicked())
-};
-#endif
-
class Q_PRINTSUPPORT_EXPORT QPrintDialog : public QAbstractPrintDialog
{
Q_OBJECT
void accepted(QPrinter *printer);
private:
- Q_PRIVATE_SLOT(d_func(), void _q_chbPrintLastFirstToggled(bool))
#if defined (Q_OS_UNIX) && !defined(Q_OS_MAC)
+ Q_PRIVATE_SLOT(d_func(), void _q_chbPrintLastFirstToggled(bool))
Q_PRIVATE_SLOT(d_func(), void _q_collapseOrExpandDialog())
-#endif
-# if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(QT_NO_MESSAGEBOX)
+# if !defined(QT_NO_MESSAGEBOX)
Q_PRIVATE_SLOT(d_func(), void _q_checkFields())
-# endif
+# endif // QT_NO_MESSAGEBOX
friend class QUnixPrintWidget;
+# endif // Q_OS_UNIX
};
#endif // QT_NO_PRINTDIALOG
# include <private/qprintengine_pdf_p.h>
#endif
+/*
+
+Print dialog class declarations
+
+ QPrintDialog: The main Print Dialog, nothing really held here.
+
+ QUnixPrintWidget:
+ QUnixPrintWidgetPrivate: The real Unix Print Dialog implementation.
+
+ Directly includes the upper half of the Print Dialog
+ containing the Printer Selection widgets and
+ Properties button.
+
+ Embeds the Properties pop-up dialog from
+ QPrintPropertiesDialog
+
+ Embeds the lower half from separate widget class
+ QPrintDialogPrivate
+
+ Layout in qprintwidget.ui
+
+ QPrintDialogPrivate: The lower half of the Print Dialog containing the
+ Copies and Options tabs that expands when the
+ Options button is selected.
+
+ Layout in qprintsettingsoutput.ui
+
+ QPrintPropertiesDialog: Dialog displayed when clicking on Properties button to
+ allow editing of Page and Advanced tabs.
+
+ Layout in qprintpropertieswidget.ui
+
+ QPPDOptionsModel: Holds the PPD Options for the printer.
+
+ QPPDOptionsEditor: Edits the PPD Options for the printer.
+
+*/
+
QT_BEGIN_NAMESPACE
class QOptionTreeItem;
#endif
};
-class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
-{
- Q_DECLARE_PUBLIC(QPrintDialog)
- Q_DECLARE_TR_FUNCTIONS(QPrintDialog)
-public:
- QPrintDialogPrivate();
- ~QPrintDialogPrivate();
-
- void init();
- /// copy printer properties to the widget
- void applyPrinterProperties(QPrinter *p);
-
-#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
- void selectPrinter(QCUPSSupport *cups);
-#endif
-
- void _q_chbPrintLastFirstToggled(bool);
-#ifndef QT_NO_MESSAGEBOX
- void _q_checkFields();
-#endif
- void _q_collapseOrExpandDialog();
+class QUnixPrintWidgetPrivate;
- void setupPrinter();
- void updateWidgets();
+class QUnixPrintWidget : public QWidget
+{
+ Q_OBJECT
- virtual void setTabs(const QList<QWidget*> &tabs);
+public:
+ explicit QUnixPrintWidget(QPrinter *printer, QWidget *parent = 0);
+ ~QUnixPrintWidget();
+ void updatePrinter();
- Ui::QPrintSettingsOutput options;
- QUnixPrintWidget *top;
- QWidget *bottom;
- QDialogButtonBox *buttons;
- QPushButton *collapseButton;
+private:
+ friend class QPrintDialogPrivate;
+ friend class QUnixPrintWidgetPrivate;
+ QUnixPrintWidgetPrivate *d;
+ Q_PRIVATE_SLOT(d, void _q_printerChanged(int))
+ Q_PRIVATE_SLOT(d, void _q_btnBrowseClicked())
+ Q_PRIVATE_SLOT(d, void _q_btnPropertiesClicked())
};
class QUnixPrintWidgetPrivate
#endif
};
+class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
+{
+ Q_DECLARE_PUBLIC(QPrintDialog)
+ Q_DECLARE_TR_FUNCTIONS(QPrintDialog)
+public:
+ QPrintDialogPrivate();
+ ~QPrintDialogPrivate();
+
+ void init();
+ /// copy printer properties to the widget
+ void applyPrinterProperties(QPrinter *p);
+
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+ void selectPrinter(QCUPSSupport *cups);
+#endif
+
+ void _q_chbPrintLastFirstToggled(bool);
+#ifndef QT_NO_MESSAGEBOX
+ void _q_checkFields();
+#endif
+ void _q_collapseOrExpandDialog();
+
+ void setupPrinter();
+ void updateWidgets();
+
+ virtual void setTabs(const QList<QWidget*> &tabs);
+
+ Ui::QPrintSettingsOutput options;
+ QUnixPrintWidget *top;
+ QWidget *bottom;
+ QDialogButtonBox *buttons;
+ QPushButton *collapseButton;
+};
+
#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
class QOptionTreeItem
{
#endif
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+
+/*
+
+ QPrintPropertiesDialog
+
+ Dialog displayed when clicking on Properties button to allow editing of Page
+ and Advanced tabs.
+
+*/
QPrintPropertiesDialog::QPrintPropertiesDialog(QAbstractPrintDialog *parent)
: QDialog(parent)
}
#endif
+////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+
+/*
+
+ QPrintDialogPrivate
+
+ The lower half of the Print Dialog containing the Copies and Options
+ tabs that expands when the Options button is selected.
+
+*/
+
QPrintDialogPrivate::QPrintDialogPrivate()
: top(0), bottom(0), buttons(0), collapseButton(0)
{
#endif
////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+
+/*
+
+ QPrintDialog
+
+ The main Print Dialog.
+
+*/
QPrintDialog::QPrintDialog(QPrinter *printer, QWidget *parent)
: QAbstractPrintDialog(*(new QPrintDialogPrivate), printer, parent)
QDialog::accept();
}
+////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+
+/*
+
+ QUnixPrintWidget && QUnixPrintWidgetPrivate
+
+ The upper half of the Print Dialog containing the Printer Selection widgets
+
+*/
+
#if defined (Q_OS_UNIX)
/*! \internal
#endif
}
-
/*! \internal
*/
QUnixPrintWidget::QUnixPrintWidget(QPrinter *printer, QWidget *parent)
}
////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+
+/*
+
+ QPPDOptionsModel
+
+ Holds the PPD Options for the printer.
+
+*/
+
#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
QPPDOptionsModel::QPPDOptionsModel(QCUPSSupport *c, QObject *parent)
}
////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+
+/*
+
+ QPPDOptionsEditor
+
+ Edits the PPD Options for the printer.
+
+*/
QWidget* QPPDOptionsEditor::createEditor(QWidget* parent, const QStyleOptionViewItem&, const QModelIndex& index) const
{
*/
}
+////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+
#endif // !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
#endif // defined (Q_OS_UNIX)