|  | Home · 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.

This class was introduced in Qt 4.3.

- List of all members, including inherited members

### Public Functions

- QSvgGenerator ()
- ~QSvgGenerator ()
- QString fileName () const
- QIODevice * outputDevice () const
- void setFileName ( const QString & fileName )
- void setOutputDevice ( QIODevice * outputDevice )
- void setResolution ( int resolution )
- void setSize ( const QSize & size )
- QSize size () const

- 12 public functions inherited from QPaintDevice

### Protected Functions

- virtual int metric ( QPaintDevice::PaintDeviceMetric metric ) const
- virtual QPaintEngine * paintEngine () const

- 1 protected function inherited from QPaintDevice

## Detailed Description

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

See also QSvgRenderer and QSvgWidget.

## Member Function Documentation

### QSvgGenerator::QSvgGenerator ()

### QSvgGenerator::~QSvgGenerator ()

### QString QSvgGenerator::fileName () const

See also setFileName().

### int QSvgGenerator::metric ( QPaintDevice::PaintDeviceMetric metric ) const `[virtual protected]`

### QIODevice * QSvgGenerator::outputDevice () const

Returns the target output device for generated SVGs.

See also setOutputDevice().

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

### void QSvgGenerator::setFileName ( const QString & fileName )

Sets the target filename for generated SVGs to fileName.

See also fileName() and setOutputDevice().

### void QSvgGenerator::setOutputDevice ( QIODevice * outputDevice )

Sets the output device for generated SVGs to outputDevice.

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

See also outputDevice().

### void QSvgGenerator::setResolution ( int resolution )

### void QSvgGenerator::setSize ( const QSize & size )

Sets the size of the generated SVG to size.

It is not possible to set the size while the SVG is being generated.

See also size().

### QSize QSvgGenerator::size () const

Returns the size of the generated SVG.

See also setSize().