Changeset 573 for trunk/src/gui/dialogs/qprintdialog_unix.cpp
- Timestamp:
- Feb 17, 2010, 8:53:20 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/dialogs/qprintdialog_unix.cpp
r561 r573 61 61 #include "ui_qprintwidget.h" 62 62 63 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)63 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 64 64 # include <private/qcups_p.h> 65 65 # include <cups/cups.h> … … 85 85 ~QPrintPropertiesDialog(); 86 86 87 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)87 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 88 88 void setCups(QCUPSSupport *cups) { m_cups = cups; } 89 89 void addItemToOptions(QOptionTreeItem *parent, QList<const ppd_option_t*>& options, QList<const char*>& markedOptions) const; … … 103 103 Ui::QPrintPropertiesWidget widget; 104 104 QDialogButtonBox *m_buttons; 105 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)105 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 106 106 QCUPSSupport *m_cups; 107 107 QPPDOptionsModel *m_cupsOptionsModel; … … 121 121 void applyPrinterProperties(QPrinter *p); 122 122 123 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)123 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 124 124 void selectPrinter(QCUPSSupport *cups); 125 125 #endif … … 143 143 }; 144 144 145 #if defined (Q_OS_UNIX) 145 #if defined (Q_OS_UNIX) || defined (Q_WS_PM) 146 146 class QUnixPrintWidgetPrivate 147 147 { … … 172 172 QPrintDialogPrivate *optionsPane; 173 173 bool filePrintersAdded; 174 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)174 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 175 175 QCUPSSupport* cups; 176 176 int cupsPrinterCount; … … 181 181 #endif 182 182 183 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)183 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 184 184 class QOptionTreeItem 185 185 { … … 257 257 QPrintPropertiesDialog::QPrintPropertiesDialog(QAbstractPrintDialog *parent) 258 258 : QDialog(parent) 259 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)259 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 260 260 , m_cups(0), m_cupsOptionsModel(0) 261 261 #endif … … 275 275 QPrintPropertiesDialog::~QPrintPropertiesDialog() 276 276 { 277 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)277 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 278 278 delete m_cupsOptionsModel; 279 279 #else … … 291 291 widget.pageSetup->setupPrinter(); 292 292 293 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)293 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 294 294 QPPDOptionsModel* model = static_cast<QPPDOptionsModel*>(widget.treeView->model()); 295 295 if (model) { … … 306 306 void QPrintPropertiesDialog::selectPrinter() 307 307 { 308 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)308 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 309 309 widget.pageSetup->selectPrinter(m_cups); 310 310 widget.treeView->setModel(0); … … 352 352 } 353 353 354 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)354 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 355 355 void QPrintPropertiesDialog::addItemToOptions(QOptionTreeItem *parent, QList<const ppd_option_t*>& options, QList<const char*>& markedOptions) const 356 356 { … … 566 566 } 567 567 568 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)568 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 569 569 void QPrintDialogPrivate::selectPrinter(QCUPSSupport *cups) 570 570 { … … 644 644 #endif // QT3_SUPPORT 645 645 646 #if defined (Q_OS_UNIX) 646 #if defined (Q_OS_UNIX) || defined (Q_WS_PM) 647 647 648 648 /*! \internal … … 650 650 QUnixPrintWidgetPrivate::QUnixPrintWidgetPrivate(QUnixPrintWidget *p) 651 651 : parent(p), propertiesDialog(0), printer(0), optionsPane(0), filePrintersAdded(false) 652 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)652 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 653 653 , cups(0), cupsPrinterCount(0), cupsPrinters(0), cupsPPD(0) 654 654 #endif … … 661 661 662 662 int currentPrinterIndex = 0; 663 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)663 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 664 664 cups = new QCUPSSupport; 665 665 if (QCUPSSupport::isAvailable()) { … … 685 685 } else { 686 686 #endif 687 #ifndef Q_WS_PM 687 688 currentPrinterIndex = qt_getLprPrinters(lprPrinters); 688 689 // populating printer combo … … 690 691 for(; i != lprPrinters.constEnd(); ++i) 691 692 widget.printers->addItem((*i).name); 692 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) 693 #endif 694 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 693 695 } 694 696 #endif … … 749 751 QUnixPrintWidgetPrivate::~QUnixPrintWidgetPrivate() 750 752 { 751 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)753 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 752 754 delete cups; 753 755 #endif … … 781 783 if (propertiesDialog) 782 784 propertiesDialog->selectPdfPsPrinter(printer); 783 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)785 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 784 786 if (optionsPane) 785 787 optionsPane->selectPrinter(0); … … 790 792 791 793 widget.location->setText(QString()); 792 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)794 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 793 795 if (QCUPSSupport::isAvailable()) { 794 796 cups->setCurrentPrinter(index); … … 822 824 propertiesDialog->selectPrinter(); 823 825 } 824 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)826 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 825 827 } 826 828 #endif … … 949 951 950 952 if (propertiesDialog->result() == QDialog::Rejected) { 951 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)953 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 952 954 propertiesDialog->setCups(cups); 953 955 #endif … … 1017 1019 1018 1020 //////////////////////////////////////////////////////////////////////////////// 1019 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) 1021 1022 #if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined (Q_WS_PM)) 1020 1023 1021 1024 QPPDOptionsModel::QPPDOptionsModel(QCUPSSupport *c, QObject *parent)
Note:
See TracChangeset
for help on using the changeset viewer.