# https://wiki.archlinux.org/index.php/Arch_package_guidelines
pkgname=katie-git
-pkgver=4.13.0.r7921.ea280c959
+pkgver=4.13.0.r7943.1ffa66d5c
pkgrel=1
pkgdesc='C++ toolkit derived from the Qt 4.8 framework'
arch=('i486' 'i686' 'pentium4' 'x86_64' 'arm')
case QPaintDevice::PdmDepth: {
return d->depth;
}
- case QPaintDevice::PdmDpiX:
- case QPaintDevice::PdmPhysicalDpiX: {
+ case QPaintDevice::PdmDpiX: {
return QX11Info::appDpiX();
}
- case QPaintDevice::PdmDpiY:
- case QPaintDevice::PdmPhysicalDpiY: {
+ case QPaintDevice::PdmDpiY: {
return QX11Info::appDpiY();
}
}
return 0;
case QPaintDevice::PdmDepth:
return depth();
- case QPaintDevice::PdmDpiX: // fall-through
- case QPaintDevice::PdmPhysicalDpiX:
+ case QPaintDevice::PdmDpiX:
return QX11Info::appDpiX();
- case QPaintDevice::PdmDpiY: // fall-through
- case QPaintDevice::PdmPhysicalDpiY:
+ case QPaintDevice::PdmDpiY:
return QX11Info::appDpiY();
}
int scr = d->xinfo.screen();
switch (m) {
case PdmDpiX:
- case PdmPhysicalDpiX:
if (d->parent)
val = static_cast<QWidget *>(d->parent)->metric(m);
else
val = QX11Info::appDpiX(scr);
break;
case PdmDpiY:
- case PdmPhysicalDpiY:
if (d->parent)
val = static_cast<QWidget *>(d->parent)->metric(m);
else
PdmNumColors,
PdmDepth,
PdmDpiX,
- PdmDpiY,
- PdmPhysicalDpiX,
- PdmPhysicalDpiY
+ PdmDpiY
};
virtual ~QPaintDevice();
int heightMM() const { return metric(PdmHeightMM); }
int logicalDpiX() const { return metric(PdmDpiX); }
int logicalDpiY() const { return metric(PdmDpiY); }
- int physicalDpiX() const { return metric(PdmPhysicalDpiX); }
- int physicalDpiY() const { return metric(PdmPhysicalDpiY); }
int colorCount() const { return metric(PdmNumColors); }
int depth() const { return metric(PdmDepth); }
The logicalDpiX() and logicalDpiY() functions return the
horizontal and vertical resolution of the device in dots per
- inch. The physicalDpiX() and physicalDpiY() functions also return
- the resolution of the device in dots per inch, but note that if
- the logical and physical resolution differ, the corresponding
- QPaintEngine must handle the mapping. Finally, the colorCount()
- function returns the number of different colors available for the
- paint device.
+ inch. Finally, the colorCount() function returns the number of
+ different colors available for the paint device.
\sa QPaintEngine, QPainter, {Coordinate System}, {Paint System}
*/
\value PdmDpiY The vertical resolution of the device in dots per inch. See
also logicalDpiY().
- \value PdmPhysicalDpiX The horizontal resolution of the device in
- dots per inch. See also physicalDpiX().
-
- \value PdmPhysicalDpiY The vertical resolution of the device in
- dots per inch. See also physicalDpiY().
-
\sa metric()
*/
which is used when computing font sizes. For X11, this is usually
the same as could be computed from widthMM().
- Note that if the logicalDpiX() doesn't equal the physicalDpiX(),
- the corresponding QPaintEngine must handle the resolution mapping.
-
- \sa logicalDpiY(), physicalDpiX()
+ \sa logicalDpiY()
*/
/*!
which is used when computing font sizes. For X11, this is usually
the same as could be computed from heightMM().
- Note that if the logicalDpiY() doesn't equal the physicalDpiY(),
- the corresponding QPaintEngine must handle the resolution mapping.
-
- \sa logicalDpiX(), physicalDpiY()
-*/
-
-/*!
- \fn int QPaintDevice::physicalDpiX() const
-
- Returns the horizontal resolution of the device in dots per inch.
- For example, when printing, this resolution refers to the physical
- printer's resolution. The logical DPI on the other hand, refers to
- the resolution used by the actual paint engine.
-
- Note that if the physicalDpiX() doesn't equal the logicalDpiX(),
- the corresponding QPaintEngine must handle the resolution mapping.
-
- \sa physicalDpiY(), logicalDpiX()
-*/
-
-/*!
- \fn int QPaintDevice::physicalDpiY() const
-
- Returns the horizontal resolution of the device in dots per inch.
- For example, when printing, this resolution refers to the physical
- printer's resolution. The logical DPI on the other hand, refers to
- the resolution used by the actual paint engine.
-
- Note that if the physicalDpiY() doesn't equal the logicalDpiY(),
- the corresponding QPaintEngine must handle the resolution mapping.
-
- \sa physicalDpiX(), logicalDpiY()
+ \sa logicalDpiX()
*/
case QPaintDevice::PdmDpiY:
val = d->resolution;
break;
- case QPaintDevice::PdmPhysicalDpiX:
- case QPaintDevice::PdmPhysicalDpiY:
- val = 1200;
- break;
case QPaintDevice::PdmWidthMM:
val = qRound(r.width()*25.4/d->resolution);
break;
return ret;
}
-QPdfBaseEnginePrivate::QPdfBaseEnginePrivate(QPrinter::PrinterMode m)
+QPdfBaseEnginePrivate::QPdfBaseEnginePrivate()
: clipEnabled(false), allClipped(false), hasPen(true), hasBrush(false), simplePen(false),
useAlphaEngine(false),
outDevice(0), fd(-1),
hasCustomPageMargins(false),
leftMargin(0), topMargin(0), rightMargin(0), bottomMargin(0)
{
- resolution = 72;
- if (m == QPrinter::HighResolution)
- resolution = 1200;
- else if (m == QPrinter::ScreenResolution)
- resolution = QX11Info::appDpiY();
-
+ resolution = QX11Info::appDpiY();
postscript = false;
currentObject = 1;
currentPage = 0;
Q_DECLARE_PRIVATE(QPdfBaseEngine)
public:
QPdfBaseEngine(QPdfBaseEnginePrivate &d, PaintEngineFeatures f);
- ~QPdfBaseEngine() {}
// reimplementations QPaintEngine
bool begin(QPaintDevice *pdev);
{
Q_DECLARE_PUBLIC(QPdfBaseEngine)
public:
- QPdfBaseEnginePrivate(QPrinter::PrinterMode m);
+ QPdfBaseEnginePrivate();
~QPdfBaseEnginePrivate();
bool openPrintDevice();
// ----------------------------- Internal class declarations -----------------------------
-QPSPrintEnginePrivate::QPSPrintEnginePrivate(QPrinter::PrinterMode m)
- : QPdfBaseEnginePrivate(m),
+QPSPrintEnginePrivate::QPSPrintEnginePrivate()
+ : QPdfBaseEnginePrivate(),
printerState(QPrinter::Idle), hugeDocument(false), headerDone(false)
{
useAlphaEngine = false;
// ================ PSPrinter class ========================
-QPSPrintEngine::QPSPrintEngine(QPrinter::PrinterMode m)
- : QPdfBaseEngine(*(new QPSPrintEnginePrivate(m)),
+QPSPrintEngine::QPSPrintEngine()
+ : QPdfBaseEngine(*(new QPSPrintEnginePrivate()),
PatternTransform
| PixmapTransform
| PainterPaths
Q_DECLARE_PRIVATE(QPSPrintEngine)
public:
// QPrinter uses these
- explicit QPSPrintEngine(QPrinter::PrinterMode m);
+ QPSPrintEngine();
~QPSPrintEngine();
class QPSPrintEnginePrivate : public QPdfBaseEnginePrivate {
public:
- QPSPrintEnginePrivate(QPrinter::PrinterMode m);
+ QPSPrintEnginePrivate();
~QPSPrintEnginePrivate();
void emitHeader(bool finished);
void QPrinterPrivate::createDefaultEngines()
{
- QPSPrintEngine *psEngine = new QPSPrintEngine(printerMode);
+ QPSPrintEngine *psEngine = new QPSPrintEngine();
paintEngine = psEngine;
printEngine = psEngine;
use_default_engine = true;
*/
/*!
- \enum QPrinter::PrinterMode
-
- This enum describes the mode the printer should work in. It
- basically presets a certain resolution and working mode.
-
- \value ScreenResolution Sets the resolution of the print device to
- the screen resolution. This has the big advantage that the results
- obtained when painting on the printer will match more or less
- exactly the visible output on the screen. It is the easiest to
- use, as font metrics on the screen and on the printer are the
- same. This is the default value. ScreenResolution will produce a
- lower quality output than HighResolution and should only be used
- for drafts.
-
- \value PrinterResolution This value is deprecated. Is is
- equivalent to ScreenResolution on Unix and HighResolution on
- Windows and Mac. Due do the difference between ScreenResolution
- and HighResolution, use of this value may lead to non-portable
- printer code.
-
- \value HighResolution On Windows, sets the printer resolution to that
- defined for the printer in use. For PostScript printing, sets the
- resolution of the PostScript driver to 1200 dpi.
-
- \note When rendering text on a QPrinter device, it is important
- to realize that the size of text, when specified in points, is
- independent of the resolution specified for the device itself.
- Therefore, it may be useful to specify the font size in pixels
- when combining text with graphics to ensure that their relative
- sizes are what you expect.
-*/
-
-/*!
\enum QPrinter::Orientation
This enum type (not to be confused with \c Orientation) is used
*/
/*!
- Creates a new printer object with the given \a mode.
+ Creates a new printer object.
*/
-QPrinter::QPrinter(PrinterMode mode)
+QPrinter::QPrinter()
: QPaintDevice(),
d_ptr(new QPrinterPrivate(this))
{
- init(mode);
+ init();
QPrinterInfo defPrn(QPrinterInfo::defaultPrinter());
if (!defPrn.isNull()) {
setPrinterName(defPrn.printerName());
/*!
\since 4.4
- Creates a new printer object with the given \a printer and \a mode.
+ Creates a new printer object with the given \a printer.
*/
-QPrinter::QPrinter(const QPrinterInfo& printer, PrinterMode mode)
+QPrinter::QPrinter(const QPrinterInfo& printer)
: QPaintDevice(),
d_ptr(new QPrinterPrivate(this))
{
- init(mode);
+ init();
setPrinterName(printer.printerName());
}
-void QPrinter::init(PrinterMode mode)
+void QPrinter::init()
{
if (Q_UNLIKELY(!qApp || QApplication::type() != QApplication::Gui)) {
qFatal("QPrinter: Must construct a QApplication before a QPaintDevice");
}
Q_D(QPrinter);
- d->printerMode = mode;
d->createDefaultEngines();
#ifndef QT_NO_PRINTPREVIEWWIDGET
For X11 where all printing is directly to postscript, this
function will always return a one item list containing only the
- postscript resolution, i.e., 72 (72 dpi -- but see PrinterMode).
+ postscript resolution, i.e., 72 (72 dpi).
*/
QList<int> QPrinter::supportedResolutions() const
{
{
Q_DECLARE_PRIVATE(QPrinter)
public:
- enum PrinterMode { ScreenResolution, PrinterResolution, HighResolution };
-
- explicit QPrinter(PrinterMode mode = ScreenResolution);
- explicit QPrinter(const QPrinterInfo& printer, PrinterMode mode = ScreenResolution);
+ QPrinter();
+ explicit QPrinter(const QPrinterInfo& printer);
~QPrinter();
int devType() const;
void setEngines(QPrintEngine *printEngine, QPaintEngine *paintEngine);
private:
- void init(PrinterMode mode);
+ void init();
Q_DISABLE_COPY(QPrinter)
void addToManualSetList(QPrintEngine::PrintEnginePropertyKey key);
- QPrinter::PrinterMode printerMode;
QPrintEngine *printEngine;
QPaintEngine *paintEngine;