<class name="QSvgWidget" doc="/** <p>The <a href="QSvgWidget.html#QSvgWidget(java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>QSvgWidget</tt></a> class provides a widget that is used to display the contents of Scalable Vector Graphics (SVG) files.</p> <p>This class enables developers to display SVG drawings alongside standard widgets, and is used in much the same way as <a href="%2E%2E/gui/QLabel.html"><tt>QLabel</tt></a> is used for displaying text and bitmap images.</p> <p>Since <a href="QSvgWidget.html#QSvgWidget(java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>QSvgWidget</tt></a> is a subclass of <a href="%2E%2E/gui/%2E%2E/gui/QWidget.html#QWidget(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QWidget</tt></a>, SVG drawings are rendered using the properties of the display. More control can be exercised over the rendering process with the <a href="QSvgRenderer.html"><tt>QSvgRenderer</tt></a> class, as this can be used to paint onto other paint devices, such as <a href="%2E%2E/gui/QImage.html"><tt>QImage</tt></a> and <a href="%2E%2E/opengl/QGLWidget.html"><tt>QGLWidget</tt></a>. The renderer used by the widget can be obtained with the <a href="QSvgWidget.html#renderer()"><tt>renderer</tt></a> function.</p> <p>Each <a href="QSvgWidget.html#QSvgWidget(java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>QSvgWidget</tt></a> 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 <a href="QSvgWidget.html#load(java.lang.String)"><tt>load</tt></a> functions provide two different ways to load an SVG file: they accept either the file name of an SVG file or a <a href="%2E%2E/core/QByteArray.html"><tt>QByteArray</tt></a> containing the serialized XML representation of an SVG file.</p> <p>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 <a href="%2E%2E/gui/%2E%2E/gui/QWidget.html#QWidget(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QWidget</tt></a> size hint. Subclass this class and reimplement <a href="QSvgWidget.html#sizeHint()"><tt>sizeHint</tt></a> if you need to customize this behavior.</p> @see <a href="QSvgRenderer.html"><tt>QSvgRenderer</tt></a> @see <tt>QtSvg Module</tt> @see <a href="%2E%2E/gui/QPicture.html"><tt>QPicture</tt></a> */"> <signal name="protected final void customContextMenuRequested(com.trolltech.qt.core.QPoint pos)" doc="/** <p>This signal is emitted when the widget's <a href="%2E%2E/gui/%2E%2E/gui/QWidget.html#contextMenuPolicy()"><tt>contextMenuPolicy</tt></a> is Qt::CustomContextMenu, and the user has requested a context menu on the widget. The position <tt>pos</tt> is the position of the context menu event that the widget receives. Normally this is in widget coordinates. The exception to this rule is <a href="%2E%2E/gui/QAbstractScrollArea.html"><tt>QAbstractScrollArea</tt></a> and its subclasses that map the context menu event to coordinates of the viewport()</tt> .</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(com.trolltech.qt.core.QPoint pos)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="%2E%2E/gui/%2E%2E/gui/QWidget.html#mapToGlobal(com.trolltech.qt.core.QPoint)"><tt>mapToGlobal</tt></a>, <a href="%2E%2E/gui/QMenu.html"><tt>QMenu</tt></a>, <a href="%2E%2E/gui/%2E%2E/gui/QWidget.html#contextMenuPolicy()"><tt>contextMenuPolicy</tt></a></dd> </dl> */"/> <method name="public QSvgWidget(com.trolltech.qt.gui.QWidget parent)" doc="/** <p>Constructs a new SVG display widget with the given <tt>parent</tt>.</p> */"/> <method name="public QSvgWidget()" doc="/** <p>Equivalent to <a href="QSvgWidget.html#QSvgWidget(java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>QSvgWidget</tt></a>(0). */"/> <method name="public QSvgWidget(java.lang.String file, com.trolltech.qt.gui.QWidget parent)" doc="/** <p>Constructs a new SVG display widget with the given <tt>parent</tt> and loads the contents of the specified <tt>file</tt>.</p> */"/> <method name="public QSvgWidget(java.lang.String file)" doc="/** <p>Equivalent to <a href="QSvgWidget.html#QSvgWidget(java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>QSvgWidget</tt></a>(<tt>file</tt>, 0). */"/> <method name="public final void load(com.trolltech.qt.core.QByteArray contents)" doc="/** <p>Loads the specified SVG format <tt>contents</tt> and updates the widget.</p> */"/> <method name="public final void load(java.lang.String file)" doc="/** <p>Loads the contents of the specified SVG <tt>file</tt> and updates the widget.</p> */"/> <method name="public final com.trolltech.qt.svg.QSvgRenderer renderer()" doc="/** <p>Returns the renderer used to display the contents of the widget.</p> */"/> <method name="protected void paintEvent(com.trolltech.qt.gui.QPaintEvent event)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="public com.trolltech.qt.core.QSize sizeHint()" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> </class>