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
|
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>The Edit Custom Widgets Dialog</title>
<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.49">
<link rel="HOME" href="book1.html">
<link rel="UP" title="The Dialogs" href="chap7_1.html">
<link rel="PREVIOUS" title="The Connection Viewer Dialog (Edit Connections)" href="chap7_3.html">
<link rel="NEXT" title="The Edit Icon View Dialog" href="chap7_5.html">
</head>
<body class="SECT1" bgcolor="white" text="black" link="blue" vlink="#840084" alink="blue">
<div class="NAVHEADER">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="500" align="left" valign="middle"><img height="90" width="475" src="figures/title.png" border="0"></td>
<td></td>
<td align="right" valign="top"><a href="../company/about/trolls.html">
<table border="0" cellpadding="0" cellspacing="0" width="137">
<tr>
<td><img height="100" width="100" src="figures/f001.png" border="0"></td>
<td><img height="100" width="100" src="figures/qtlogo.png" align="top" border="0"></td>
</tr>
</table>
</a></td>
</tr>
<tr>
<td width="500"><spacer type="block" width="500" height="20"></td>
<td><spacer type="block" width="42" height="20"></td>
<td><br>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="black">
<tr>
<td width="10%" align="left" valign="bottom"><a href="chap7_3.html"><img height="20" width="20" src="arrows/left.png" border="0"></a></td>
<td width="80%" align="center" valign="bottom"><font color="white"><b>Chapter 7. The Dialogs</b></font></td>
<td width="10%" align="right" valign="bottom"><a href="chap7_5.html"><img height="20" width="20" src="arrows/right.png" border="0"></a></td>
</tr>
</table>
</div>
<div class="SECT1">
<h1 class="SECT1"><a name="AEN1841"></a>The Edit Custom Widgets Dialog</h1>
<div class="FIGURE">
<a name="QT-DESIGNER-DIALOGS-CUSTOMWIDGETS"></a>
<p><b>Figure 7-4. The Custom Widgets dialog</b></p>
<p><img src="figures/customwidgets.png"></p>
</div>
<p>This dialog lets you create descriptions for custom widgets; i.e., widgets that are not included in Qt but that you have written yourself or purchased from a third-party manufacturer. You can invoke it by selecting <span class="GUIMENU">Tools/Custom/Edit Custom Widgets</span>. The unlabeled list box to the left always shows the list of custom widgets known to Qt Designer.</p>
<dl>
<dt><span class="GUILABEL">New Widget</span>
<dd>
<p>Click on this button to start the description of a new custom widget. Qt Designer will create a new description with some default values for a widget class called <tt class="LITERAL">MyCustomWidget</tt>.</p>
<dt><span class="GUILABEL">Delete Widget</span>
<dd>
<p>Deletes the description for the currently selected custom widget.</p>
<dt><span class="GUILABEL">Load Descriptions</span>
<dd>
<p>Loads a file with descriptions for custom widgets. <a href="chap10_1.html">Chapter 10</a> explains the format of these files.</p>
<dt><span class="GUILABEL">Save Descriptions</span>
<dd>
<p>Saves the descriptions for the custom widgets to a file. <a href="chap10_1.html">Chapter 10</a> explains the format of these files.</p>
</dl>
<div class="SECT2">
<h2 class="SECT2"><a name="AEN1875"></a>The Definitions Tab Page</h2>
<p>On this tab page, you specify some general properties of the custom widget, like how the class is called and how it should be represented in Qt Designer.</p>
<dl>
<dt><span class="GUILABEL">Class</span>
<dd>
<p>Fill in the class name of the custom widget in this field.</p>
<dt><span class="GUILABEL">Headerfile</span>
<dd>
<p>Fill in the name of the header file for the custom widget class in this field. By clicking on the button labeled <span class="GUILABEL">...</span> next to the entry field, you can bring up a file selection dialog to make selection of the header file name easier. Finally, in the combo box next to the button, you can select whether the header file should be included globally (by surrounding the filename with <tt class="LITERAL"><></tt> in the include statement) or locally (by surrounding the filename with <tt class="LITERAL">""</tt>).</p>
<dt><span class="GUILABEL">Pixmap</span>
<dd>
<p>In the row labeled pixmap, the pixmap that Qt Designer uses to represent your custom widget (in the menu and in the toolbar) is displayed. By default, the Qt logo is used, but you can select another pixmap by clicking on the button labeled <span class="GUILABEL">...</span>.</p>
<dt><span class="GUILABEL">Size Hint</span>
<dd>
<p>In this row, you can specify the size hint for the custom widget; i.e., the size at which the widget displays best. If there is no such size for your widget, or the size hint can only be computed dynamically because it is dependent on runtime characteristics, leave the default <tt class="LITERAL">-1, -1</tt> here.</p>
<dt><span class="GUILABEL">Size Policy</span>
<dd>
<p>In this row, you can specify the horizontal and vertical size policies for the custom widget. For an explanation of the possible values, please see the Qt Reference Documentation.</p>
</dl>
</div>
<div class="SECT2">
<h2 class="SECT2"><a name="AEN1909"></a>The Signals Tab Page</h2>
<p>On this tab page, you specify the signals of your custom widget. The central, unlabeled list box lists all the signals together with their parameters.</p>
<dl>
<dt><span class="GUILABEL">New Signal</span>
<dd>
<p>Click on this button to insert a new signal entry. By default, the signal will be called <tt class="LITERAL">signal</tt> and will have no parameters.</p>
<dt><span class="GUILABEL">Delete Signal</span>
<dd>
<p>Clicking on this button removes the currently selected signal from the list.</p>
<dt><span class="GUILABEL">Signal</span>
<dd>
<p>In this edit field, you can edit the name and the parameter types of the currently selected signal. Just fill in the name of the signal and write the parameter types in parentheses.</p>
</dl>
</div>
<div class="SECT2">
<h2 class="SECT2"><a name="AEN1929"></a>The Slots Tab Page</h2>
<p>On this tab page, you specify the slots of your custom widget. The central, unlabeled list box lists all the slots together with their parameters and their access specifiers.</p>
<dl>
<dt><span class="GUILABEL">New Slot</span>
<dd>
<p>Click on this button to insert a new slot entry. By default, the slot will be called <tt class="LITERAL">slot</tt>, and it will have no parameters and the access specifier <tt class="LITERAL">public</tt>.</p>
<dt><span class="GUILABEL">Delete Slot</span>
<dd>
<p>Clicking on this button removes the currently selected slot from the list.</p>
<dt><span class="GUILABEL">Slot</span>
<dd>
<p>In this edit field, you can edit the name and the parameter types of the currently selected slot. Just fill in the name of the slot and write the parameter types in parentheses.</p>
<dt><span class="GUILABEL">Access</span>
<dd>
<p>Here you can specify the access specifier of the slot, either <tt class="LITERAL">public</tt> or <tt class="LITERAL">protected</tt>.</p>
</dl>
</div>
<div class="SECT2">
<h2 class="SECT2"><a name="AEN1957"></a>The Properties Tab Page</h2>
<p>On this tab page, you specify the properties of your custom widget. The central, unlabeled list box lists all the properties together with their types.</p>
<dl>
<dt><span class="GUILABEL">New Property</span>
<dd>
<p>Click on this button to insert a new property entry. By default, the property will be called <tt class="LITERAL">property</tt> and will have the type <tt class="LITERAL">String</tt>.</p>
<dt><span class="GUILABEL">Delete Property</span>
<dd>
<p>Clicking on this button removes the currently selected property from the list.</p>
<dt><span class="GUILABEL">Property</span>
<dd>
<p>In this edit field, you can edit the name of the currently selected property. Just fill in the name of the property.</p>
<dt><span class="GUILABEL">Type</span>
<dd>
<p>Here you can specify the type of the property. The following types are available: <tt class="LITERAL">String</tt> (a Unicode string), <tt class="LITERAL">CString</tt> (an 8-bit string), <tt class="LITERAL">StringList</tt> (a list of Unicode strings), <tt class="LITERAL">bool</tt> <tt class="LITERAL">Int</tt>, <tt class="LITERAL">UInt</tt>, <tt class="LITERAL">Font</tt>, <tt class="LITERAL">Color</tt>, <tt class="LITERAL">Rect</tt>, <tt class="LITERAL">Point</tt>, <tt class="LITERAL">Size</tt>, <tt class="LITERAL">Pixmap</tt>, <tt class="LITERAL">Palette</tt>, <tt class="LITERAL">SizePolicy</tt>, and <tt class="LITERAL">Cursor</tt>.</p>
</dl>
</div>
</div>
<div class="NAVFOOTER">
<br>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="black">
<tr>
<td width="33%" align="left" valign="top"><a href="chap7_3.html"><img height="20" width="20" src="arrows/left.png" border="0"></a></td>
<td width="34%" align="center" valign="top"><a href="book1.html"><img height="20" width="25" src="arrows/home.png" border="0"></a></td>
<td width="33%" align="right" valign="top"><a href="chap7_5.html"><img height="20" width="20" src="arrows/right.png" border="0"></a></td>
</tr>
<tr>
<td width="33%" align="left" valign="top"><font color="white" >The Connection Viewer Dialog (Edit Connections)</font></td>
<td width="34%" align="center" valign="top"><a href="chap7_1.html"><img height="20" width="20" src="arrows/up.png" border="0"></a></td>
<td width="33%" align="right" valign="top"><font color="white">The Edit Icon View Dialog</font></td>
</tr>
</table>
</div>
</body>
</html>
|