/usr/share/qt5/doc/qtdesigner/qdesignerwidgetboxinterface.html is in qttools5-doc-html 5.9.5-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- abstractwidgetbox.cpp -->
<title>QDesignerWidgetBoxInterface Class | Qt Designer Manual</title>
<link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
<script type="text/javascript">
document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
// loading style sheet breaks anchors that were jumped to before
// so force jumping to anchor again
setTimeout(function() {
var anchor = location.hash;
// need to jump to different anchor first (e.g. none)
location.hash = "#";
setTimeout(function() {
location.hash = anchor;
}, 0);
}, 0);
</script>
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<table><tr>
<td >Qt 5.9</td><td ><a href="qtdesigner-manual.html">Qt Designer Manual</a></td><td ><a href="qtdesigner-module.html">C++ Classes</a></td><td >QDesignerWidgetBoxInterface</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.5 Reference Documentation</td>
</tr></table>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QDesignerWidgetBoxInterface Class</h1>
<!-- $$$QDesignerWidgetBoxInterface-brief -->
<p>The <a href="qdesignerwidgetboxinterface.html">QDesignerWidgetBoxInterface</a> class allows you to control the contents of Qt Designer's widget box. <a href="#details">More...</a></p>
<!-- @@@QDesignerWidgetBoxInterface -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QDesignerWidgetBoxInterface></span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += designer</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="../qtwidgets/qwidget.html">QWidget</a></td></tr></table></div><ul>
<li><a href="qdesignerwidgetboxinterface-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdesignerwidgetboxinterface.html#QDesignerWidgetBoxInterface">QDesignerWidgetBoxInterface</a></b>(QWidget *<i>parent</i> = Q_NULLPTR, Qt::WindowFlags <i>flags</i> = Qt::WindowFlags())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qdesignerwidgetboxinterface.html#dtor.QDesignerWidgetBoxInterface">~QDesignerWidgetBoxInterface</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="qdesignerwidgetboxinterface.html#fileName">fileName</a></b>() const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qdesignerwidgetboxinterface.html#load">load</a></b>() = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qdesignerwidgetboxinterface.html#save">save</a></b>() = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdesignerwidgetboxinterface.html#setFileName">setFileName</a></b>(const QString &<i>fileName</i>) = 0</td></tr>
</table></div>
<ul>
<li class="fn">216 public functions inherited from <a href="../qtwidgets/qwidget.html#public-functions">QWidget</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">59 properties inherited from <a href="../qtwidgets/qwidget.html#properties">QWidget</a></li>
<li class="fn">19 public slots inherited from <a href="../qtwidgets/qwidget.html#public-slots">QWidget</a></li>
<li class="fn">3 signals inherited from <a href="../qtwidgets/qwidget.html#signals">QWidget</a></li>
<li class="fn">5 static public members inherited from <a href="../qtwidgets/qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">35 protected functions inherited from <a href="../qtwidgets/qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">1 protected slot inherited from <a href="../qtwidgets/qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QDesignerWidgetBoxInterface-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qdesignerwidgetboxinterface.html">QDesignerWidgetBoxInterface</a> class allows you to control the contents of Qt Designer's widget box.</p>
<p><a href="qdesignerwidgetboxinterface.html">QDesignerWidgetBoxInterface</a> contains a collection of functions that is typically used to manipulate the contents of <i>Qt Designer</i>'s widget box.</p>
<p><i>Qt Designer</i> uses an XML file to populate its widget box. The name of that file is one of the widget box's properties, and you can retrieve it using the <a href="qdesignerwidgetboxinterface.html#fileName">fileName</a>() function.</p>
<p><a href="qdesignerwidgetboxinterface.html">QDesignerWidgetBoxInterface</a> also provides the <a href="qdesignerwidgetboxinterface.html#save">save</a>() function that saves the contents of the widget box in the file specified by the widget box's file name property. If you have made changes to the widget box, for example by dropping a widget into the widget box, without calling the <a href="qdesignerwidgetboxinterface.html#save">save</a>() function, the original content can be restored by a simple invocation of the <a href="qdesignerwidgetboxinterface.html#load">load</a>() function:</p>
<pre class="cpp">
<span class="type"><a href="qdesignerwidgetboxinterface.html#QDesignerWidgetBoxInterface">QDesignerWidgetBoxInterface</a></span> <span class="operator">*</span>widgetBox <span class="operator">=</span> <span class="number">0</span>:
widgetBox <span class="operator">=</span> formEditor<span class="operator">-</span><span class="operator">></span>widgetBox();
widgetBox<span class="operator">-</span><span class="operator">></span>load();
</pre>
<p>The <a href="qdesignerwidgetboxinterface.html">QDesignerWidgetBoxInterface</a> class is not intended to be instantiated directly. You can retrieve an interface to Qt Designer's widget box using the <a href="qdesignerformeditorinterface.html#widgetBox">QDesignerFormEditorInterface::widgetBox</a>() function. A pointer to <i>Qt Designer</i>'s current <a href="qdesignerformeditorinterface.html">QDesignerFormEditorInterface</a> object (<code>formEditor</code> in the example above) is provided by the <a href="qdesignercustomwidgetinterface.html#initialize">QDesignerCustomWidgetInterface::initialize</a>() function's parameter. When implementing a custom widget plugin, you must subclass the <a href="qdesignercustomwidgetinterface.html">QDesignerCustomWidgetInterface</a> to expose your plugin to <i>Qt Designer</i>.</p>
<p>If you want to save your changes, and at the same time preserve the original contents, you can use the <a href="qdesignerwidgetboxinterface.html#save">save</a>() function combined with the <a href="qdesignerwidgetboxinterface.html#setFileName">setFileName</a>() function to save your changes into another file. Remember to store the name of the original file first:</p>
<pre class="cpp">
<span class="type"><a href="../qtcore/qstring.html">QString</a></span> originalFile <span class="operator">=</span> widgetBox<span class="operator">-</span><span class="operator">></span>fileName();
widgetBox<span class="operator">-</span><span class="operator">></span>setFileName(<span class="string">"myWidgetBox.xml"</span>);
widgetBox<span class="operator">-</span><span class="operator">></span>save();
</pre>
<p>Then you can restore the original contents of the widget box by resetting the file name to the original file and calling <a href="qdesignerwidgetboxinterface.html#load">load</a>():</p>
<pre class="cpp">
widgetBox<span class="operator">-</span><span class="operator">></span>setFileName(originalFile);
widgetBox<span class="operator">-</span><span class="operator">></span>load();
</pre>
<p>In a similar way, you can later use your customized XML file:</p>
<pre class="cpp">
<span class="keyword">if</span> (widgetBox<span class="operator">-</span><span class="operator">></span>filename() <span class="operator">!</span><span class="operator">=</span> <span class="string">"myWidgetBox.xml"</span>) {
widgetBox<span class="operator">-</span><span class="operator">></span>setFileName(<span class="string">"myWidgetBox.xml"</span>);
widgetBox<span class="operator">-</span><span class="operator">></span>load();
}
</pre>
</div>
<p><b>See also </b><a href="qdesignerformeditorinterface.html">QDesignerFormEditorInterface</a>.</p>
<!-- @@@QDesignerWidgetBoxInterface -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QDesignerWidgetBoxInterface[overload1]$$$QDesignerWidgetBoxInterfaceQWidget*Qt::WindowFlags -->
<h3 class="fn" id="QDesignerWidgetBoxInterface"><a name="QDesignerWidgetBoxInterface"></a>QDesignerWidgetBoxInterface::<span class="name">QDesignerWidgetBoxInterface</span>(<span class="type"><a href="../qtwidgets/qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = Q_NULLPTR, <span class="type"><a href="../qtcore/qt.html#WindowType-enum">Qt::WindowFlags</a></span> <i>flags</i> = Qt::WindowFlags())</h3>
<p>Constructs a widget box interface with the given <i>parent</i> and the specified window <i>flags</i>.</p>
<!-- @@@QDesignerWidgetBoxInterface -->
<!-- $$$~QDesignerWidgetBoxInterface[overload1]$$$~QDesignerWidgetBoxInterface -->
<h3 class="fn" id="dtor.QDesignerWidgetBoxInterface"><a name="dtor.QDesignerWidgetBoxInterface"></a><code>[virtual] </code>QDesignerWidgetBoxInterface::<span class="name">~QDesignerWidgetBoxInterface</span>()</h3>
<p>Destroys the widget box interface.</p>
<!-- @@@~QDesignerWidgetBoxInterface -->
<!-- $$$fileName[overload1]$$$fileName -->
<h3 class="fn" id="fileName"><a name="fileName"></a><code>[pure virtual] </code><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QDesignerWidgetBoxInterface::<span class="name">fileName</span>() const</h3>
<p>Returns the name of the XML file <i>Qt Designer</i> is currently using to populate its widget box.</p>
<p><b>See also </b><a href="qdesignerwidgetboxinterface.html#setFileName">setFileName</a>().</p>
<!-- @@@fileName -->
<!-- $$$load[overload1]$$$load -->
<h3 class="fn" id="load"><a name="load"></a><code>[pure virtual] </code><span class="type">bool</span> QDesignerWidgetBoxInterface::<span class="name">load</span>()</h3>
<p>Populates <i>Qt Designer</i>'s widget box by loading (or reloading) the currently specified XML file. Returns true if the file is successfully loaded; otherwise false.</p>
<p><b>See also </b><a href="qdesignerwidgetboxinterface.html#setFileName">setFileName</a>().</p>
<!-- @@@load -->
<!-- $$$save[overload1]$$$save -->
<h3 class="fn" id="save"><a name="save"></a><code>[pure virtual] </code><span class="type">bool</span> QDesignerWidgetBoxInterface::<span class="name">save</span>()</h3>
<p>Saves the contents of <i>Qt Designer</i>'s widget box in the file specified by the <a href="qdesignerwidgetboxinterface.html#fileName">fileName</a>() function. Returns true if the content is successfully saved; otherwise false.</p>
<p><b>See also </b><a href="qdesignerwidgetboxinterface.html#fileName">fileName</a>() and <a href="qdesignerwidgetboxinterface.html#setFileName">setFileName</a>().</p>
<!-- @@@save -->
<!-- $$$setFileName[overload1]$$$setFileNameconstQString& -->
<h3 class="fn" id="setFileName"><a name="setFileName"></a><code>[pure virtual] </code><span class="type">void</span> QDesignerWidgetBoxInterface::<span class="name">setFileName</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>fileName</i>)</h3>
<p>Sets the XML file that <i>Qt Designer</i> will use to populate its widget box, to <i>fileName</i>. You must call <a href="qdesignerwidgetboxinterface.html#load">load</a>() to update the widget box with the new XML file.</p>
<p><b>See also </b><a href="qdesignerwidgetboxinterface.html#fileName">fileName</a>() and <a href="qdesignerwidgetboxinterface.html#load">load</a>().</p>
<!-- @@@setFileName -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2017 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. </p>
</div>
</body>
</html>
|