QSvgWidget Class Reference [модуль QtSvg]
The QSvgWidget class provides a widget that is used to display the contents of Scalable Vector Graphics (SVG) files. Далее...
#include <QSvgWidget> Унаследован от QWidget.
This class was introduced in Qt 4.1.
Открытые функции
- 201 свойство, унаследованное от QWidget
- 29 открытых функций, унаследованных от QObject
- 12 открытых функций, унаследованных от QPaintDevice
Открытые слоты
- void load ( const QString & file )
- void load ( const QByteArray & contents )
- 19 открытых слотов, унаследованных от QWidget
- 1 открытый слот, унаследованный от QObject
Дополнительные унаследованные члены
- 56 свойств, унаследованных от QWidget
- 1 свойство, унаследованное от QObject
- 1 сигнал, унаследованный от QWidget
- 1 сигнал, унаследованный от QObject
- 4 статических открытых члена, унаследованных от QWidget
- 5 статических открытых членов, унаследованных от QObject
- 38 защищенных функций, унаследованных от QWidget
- 7 защищенных функций, унаследованных от QObject
- 1 защищённая функция, унаследованная от QPaintDevice
- 1 защищенный слот, унаследованный от QWidget
Подробное описание
The QSvgWidget class provides a widget that is used to display the contents of Scalable Vector Graphics (SVG) files.
This class enables developers to display SVG drawings alongside standard widgets, and is used in much the same way as QLabel is used for displaying text and bitmap images.
Since QSvgWidget is a subclass of QWidget, SVG drawings are rendered using the properties of the display. More control can be exercised over the rendering process with the QSvgRenderer class, as this can be used to paint onto other paint devices, such as QImage and QGLWidget. The renderer used by the widget can be obtained with the renderer() function.
Each QSvgWidget can be constructed with the file name of a SVG file, or they can be constructed without a specific file to render and one can be supplied later. The load() functions provide two different ways to load an SVG file: they accept either the file name of an SVG file or a QByteArray containing the serialized XML representation of an SVG file.
By default, the widget provides a size hint to reflect the size of the drawing that it displays. If no data has been loaded, the widget provides the default QWidget size hint. Subclass this class and reimplement sizeHint() if you need to customize this behavior.
See also QSvgRenderer, QtSvg Module, and QPicture.
Описание функций-членов
QSvgWidget::QSvgWidget ( QWidget * parent = 0 )
Constructs a new SVG display widget with the given parent.
QSvgWidget::QSvgWidget ( const QString & file, QWidget * parent = 0 )
Constructs a new SVG display widget with the given parent and loads the contents of the specified file.
QSvgWidget::~QSvgWidget ()
Разрушает виджет.
void QSvgWidget::load ( const QString & file ) [slot]
Loads the contents of the specified SVG file and updates the widget.
void QSvgWidget::load ( const QByteArray & contents ) [slot]
Это перегруженная функция, предоставленная для удобства.
Loads the specified SVG format contents and updates the widget.
QSvgRenderer * QSvgWidget::renderer () const
Returns the renderer used to display the contents of the widget.
|