summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qcups_p.h
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2014-01-29 16:04:10 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-17 13:46:23 +0100
commit69e9b12001be08fe2b3f2c2def0ca3468d83b675 (patch)
treed8746996901a4eb18e13a0411e3c43902b062055 /src/printsupport/kernel/qcups_p.h
parentaa76fcc301ecc1faab0edff9e5f99b83eb6b3d7c (diff)
QCupsSupport - Remove obsolete CUPS code
All code directly using CUPS is now in the QPA plugin and QCupsSupport is no longer needed, other than the utilities for setting CUPS options which do not need direct access to CUPS. Delete all the obsolete code. Change-Id: I561ad8af2415a9b745e2d35fd0624a5acdf27648 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/printsupport/kernel/qcups_p.h')
-rw-r--r--src/printsupport/kernel/qcups_p.h65
1 files changed, 0 insertions, 65 deletions
diff --git a/src/printsupport/kernel/qcups_p.h b/src/printsupport/kernel/qcups_p.h
index 337f2250c5..0b327d4228 100644
--- a/src/printsupport/kernel/qcups_p.h
+++ b/src/printsupport/kernel/qcups_p.h
@@ -54,15 +54,10 @@
//
#include "QtCore/qstring.h"
#include "QtCore/qstringlist.h"
-#include "QtCore/qpair.h"
#include "QtPrintSupport/qprinter.h"
#include "QtCore/qdatetime.h"
#ifndef QT_NO_CUPS
-#include <QtCore/qlibrary.h>
-#include <cups/cups.h>
-#include <cups/ppd.h>
-#include "qprintengine.h"
QT_BEGIN_NAMESPACE
@@ -72,22 +67,9 @@ QT_BEGIN_NAMESPACE
// removed from the dialogs.
#define PPK_CupsOptions QPrintEngine::PrintEnginePropertyKey(0xfe00)
-Q_DECLARE_TYPEINFO(cups_option_t, Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE);
-
class Q_PRINTSUPPORT_EXPORT QCUPSSupport
{
public:
- struct Printer
- {
- Printer(const QString &name = QString());
-
- QString name;
- bool isDefault;
- int cupsPrinterIndex;
- };
- QCUPSSupport();
- ~QCUPSSupport();
-
// Enum for values of job-hold-until option
enum JobHoldUntil {
NoHold = 0, //CUPS Default
@@ -140,28 +122,6 @@ public:
TopToBottomRightToLeft
};
- static bool isAvailable();
- static int cupsVersion() { return isAvailable() ? CUPS_VERSION_MAJOR*10000+CUPS_VERSION_MINOR*100+CUPS_VERSION_PATCH : 0; }
- int availablePrintersCount() const;
- const cups_dest_t* availablePrinters() const;
- int currentPrinterIndex() const;
- const ppd_file_t* setCurrentPrinter(int index);
- const ppd_file_t* setCurrentPrinter(const QString &printerName);
-
- const ppd_file_t* currentPPD() const;
- const ppd_option_t* ppdOption(const char *key) const;
-
- const cups_option_t* printerOption(const QString &key) const;
- const ppd_option_t* pageSizes() const;
-
- int markOption(const char* name, const char* value);
- void saveOptions(QList<const ppd_option_t*> options, QList<const char*> markedOptions);
-
- QRect paperRect(const char *choice) const;
- QRect pageRect(const char *choice) const;
-
- QStringList options() const;
-
static QStringList cupsOptionsList(QPrinter *printer);
static void setCupsOptions(QPrinter *printer, const QStringList &cupsOptions);
static void setCupsOption(QStringList &cupsOptions, const QString &option, const QString &value);
@@ -174,31 +134,6 @@ public:
static void setPagesPerSheetLayout(QPrinter *printer, const PagesPerSheet pagesPerSheet,
const PagesPerSheetLayout pagesPerSheetLayout);
static void setPageRange(QPrinter *printer, int pageFrom, int pageTo);
-
- static bool printerHasPPD(const char *printerName);
-
- QString unicodeString(const char *s);
-
- QPair<int, QString> tempFd();
- int printFile(const char * printerName, const char * filename, const char * title,
- int num_options, cups_option_t * options);
-
- static QList<Printer> availableUnixPrinters();
- static QList<QPrinter::PaperSize> getCupsPrinterPaperSizes(int cupsPrinterIndex);
- static QList<QPair<QString, QSizeF> > getCupsPrinterPaperSizesWithNames(int cupsPrinterIndex);
-
-private:
- void collectMarkedOptions(QStringList& list, const ppd_group_t* group = 0) const;
- void collectMarkedOptionsHelper(QStringList& list, const ppd_group_t* group) const;
-
- int prnCount;
- cups_dest_t *printers;
- const ppd_option_t* page_sizes;
- int currPrinterIndex;
- ppd_file_t *currPPD;
-#ifndef QT_NO_TEXTCODEC
- QTextCodec *codec;
-#endif
};
QT_END_NAMESPACE