summaryrefslogtreecommitdiffstats
path: root/src/printsupport
diff options
context:
space:
mode:
Diffstat (limited to 'src/printsupport')
-rw-r--r--src/printsupport/kernel/qprinterinfo.cpp41
-rw-r--r--src/printsupport/kernel/qprinterinfo.h5
-rw-r--r--src/printsupport/kernel/qprinterinfo_p.h3
3 files changed, 49 insertions, 0 deletions
diff --git a/src/printsupport/kernel/qprinterinfo.cpp b/src/printsupport/kernel/qprinterinfo.cpp
index dc60d7a50f..5ce0165a15 100644
--- a/src/printsupport/kernel/qprinterinfo.cpp
+++ b/src/printsupport/kernel/qprinterinfo.cpp
@@ -137,6 +137,9 @@ QPrinterInfo &QPrinterInfo::operator=(const QPrinterInfo &other)
/*!
Returns the name of the printer.
+ This is a unique id to identify the printer and may not be human-readable.
+
+ \sa QPrinterInfo::description()
\sa QPrinter::setPrinterName()
*/
QString QPrinterInfo::printerName() const
@@ -146,6 +149,44 @@ QString QPrinterInfo::printerName() const
}
/*!
+ \fn QString QPrinterInfo::description()
+ \since 5.0
+
+ Returns the human-readable description of the printer.
+
+ \sa QPrinterInfo::printerName()
+*/
+QString QPrinterInfo::description() const
+{
+ const Q_D(QPrinterInfo);
+ return d->description;
+}
+
+/*!
+ \fn QString QPrinterInfo::location()
+ \since 5.0
+
+ Returns the human-readable location of the printer.
+*/
+QString QPrinterInfo::location() const
+{
+ const Q_D(QPrinterInfo);
+ return d->location;
+}
+
+/*!
+ \fn QString QPrinterInfo::makeAndModel()
+ \since 5.0
+
+ Returns the human-readable make and model of the printer.
+*/
+QString QPrinterInfo::makeAndModel() const
+{
+ const Q_D(QPrinterInfo);
+ return d->makeAndModel;
+}
+
+/*!
Returns whether this QPrinterInfo object holds a printer definition.
An empty QPrinterInfo object could result for example from calling
diff --git a/src/printsupport/kernel/qprinterinfo.h b/src/printsupport/kernel/qprinterinfo.h
index 8b3ab448c8..634b68ceb0 100644
--- a/src/printsupport/kernel/qprinterinfo.h
+++ b/src/printsupport/kernel/qprinterinfo.h
@@ -65,8 +65,13 @@ public:
QPrinterInfo &operator=(const QPrinterInfo &other);
QString printerName() const;
+ QString description() const;
+ QString location() const;
+ QString makeAndModel() const;
+
bool isNull() const;
bool isDefault() const;
+
QList<QPrinter::PaperSize> supportedPaperSizes() const;
static QList<QPrinterInfo> availablePrinters();
diff --git a/src/printsupport/kernel/qprinterinfo_p.h b/src/printsupport/kernel/qprinterinfo_p.h
index ee139762c4..6e1c088f79 100644
--- a/src/printsupport/kernel/qprinterinfo_p.h
+++ b/src/printsupport/kernel/qprinterinfo_p.h
@@ -77,6 +77,9 @@ public:
static QPrinterInfoPrivate shared_null;
QString name;
+ QString description;
+ QString location;
+ QString makeAndModel;
bool isDefault;
#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)