Home · All Namespaces · All Classes · Main Classes · Grouped Classes · Modules · Functions

QSvgGenerator Class Reference
[QtSvg module]

The QSvgGenerator class provides a paint device that is used to create SVG drawings. More...

 #include <QSvgGenerator>

Inherits QPaintDevice.

Note: All the functions in this class are reentrant.

This class was introduced in Qt 4.3.

Properties

Public Functions

Protected Functions

Additional Inherited Members


Detailed Description

The QSvgGenerator class provides a paint device that is used to create SVG drawings.

See also QSvgRenderer and QSvgWidget.


Property Documentation

description : QString

This property holds the description of the generated SVG drawing.

This property was introduced in Qt 4.5.

Access functions:

See also title.

fileName : QString

This property holds the target filename for the generated SVG drawing.

This property was introduced in Qt 4.5.

Access functions:

See also outputDevice.

outputDevice : QIODevice *

This property holds the output device for the generated SVG drawing.

If both output device and file name are specified, the output device will have precedence.

This property was introduced in Qt 4.5.

Access functions:

See also fileName.

resolution : int

This property holds the resolution of the generated output.

The resolution is specified in dots per inch, and is used to calculate the physical size of an SVG drawing.

This property was introduced in Qt 4.5.

Access functions:

See also size and viewBox.

size : QSize

This property holds the size of the generated SVG drawing.

By default this property is set to QSize(-1, -1), which indicates that the generator should not output the width and height attributes of the <svg> element.

Note: It is not possible to change this property while a QPainter is active on the generator.

This property was introduced in Qt 4.5.

Access functions:

See also viewBox and resolution.

title : QString

This property holds the title of the generated SVG drawing.

This property was introduced in Qt 4.5.

Access functions:

See also description.

viewBox : QRectF

This property holds the viewBox of the generated SVG drawing.

By default this property is set to QRect(0, 0, -1, -1), which indicates that the generator should not output the viewBox attribute of the <svg> element.

Note: It is not possible to change this property while a QPainter is active on the generator.

This property was introduced in Qt 4.5.

Access functions:

See also viewBox(), size, and resolution.


Member Function Documentation

QSvgGenerator::QSvgGenerator ()

Constructs a new generator.

QSvgGenerator::~QSvgGenerator ()

Destroys the generator.

QPaintEngine * QSvgGenerator::paintEngine () const   [virtual protected]

Returns the paint engine used to render graphics to be converted to SVG format information.

Reimplemented from QPaintDevice.

QRect QSvgGenerator::viewBox () const

Returns viewBoxF().toRect().

This function was introduced in Qt 4.5.

See also setViewBox() and viewBoxF().


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.5.0