Returns a list of all the widgets in the application.
<p> The list is created using <tt>new</tt> and must be deleted by the caller.
<p> The list is empty (<ahref="ntqptrlist.html#isEmpty">TQPtrList::isEmpty</a>()) if there are no widgets.
<p> The list is empty (<ahref="tqptrlist.html#isEmpty">TQPtrList::isEmpty</a>()) if there are no widgets.
<p> Note that some of the widgets may be hidden.
<p> Example that updates all widgets:
<pre>
@ -604,7 +604,7 @@ Returns a list of all the widgets in the application.
file.
<p><b>Warning:</b> Delete the list as soon as you have finished using it.
The widgets in the list may be deleted by someone else at any time.
<p><p>See also <ahref="#topLevelWidgets">topLevelWidgets</a>(), <ahref="tqwidget.html#visible-prop">TQWidget::visible</a>, and <ahref="ntqptrlist.html#isEmpty">TQPtrList::isEmpty</a>().
<p><p>See also <ahref="#topLevelWidgets">topLevelWidgets</a>(), <ahref="tqwidget.html#visible-prop">TQWidget::visible</a>, and <ahref="tqptrlist.html#isEmpty">TQPtrList::isEmpty</a>().
@ -1638,7 +1638,7 @@ normally takes some time. Does nothing on other platforms.
</h3>
Returns a list of the top level widgets in the application.
<p> The list is created using <tt>new</tt> and must be deleted by the caller.
<p> The list is empty (<ahref="ntqptrlist.html#isEmpty">TQPtrList::isEmpty</a>()) if there are no top level
<p> The list is empty (<ahref="tqptrlist.html#isEmpty">TQPtrList::isEmpty</a>()) if there are no top level
widgets.
<p> Note that some of the top level widgets may be hidden, for example
the tooltip if no tooltip is currently shown.
@ -1658,7 +1658,7 @@ the tooltip if no tooltip is currently shown.
<p><b>Warning:</b> Delete the list as soon you have finished using it.
The widgets in the list may be deleted by someone else at any time.
<p><p>See also <ahref="#allWidgets">allWidgets</a>(), <ahref="tqwidget.html#isTopLevel-prop">TQWidget::isTopLevel</a>, <ahref="tqwidget.html#visible-prop">TQWidget::visible</a>, and <ahref="ntqptrlist.html#isEmpty">TQPtrList::isEmpty</a>().
<p><p>See also <ahref="#allWidgets">allWidgets</a>(), <ahref="tqwidget.html#isTopLevel-prop">TQWidget::isTopLevel</a>, <ahref="tqwidget.html#visible-prop">TQWidget::visible</a>, and <ahref="tqptrlist.html#isEmpty">TQPtrList::isEmpty</a>().
<p><ahref="qasciicache-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
@ -76,17 +76,17 @@ the least recently used items in the cache are removed.
item, returns it, and by default marks it as being the most
recently used item.
<p> There are also methods to <ahref="#remove">remove</a>() or <ahref="#take">take</a>() an object from the
cache. Calling <ahref="ntqptrcollection.html#setAutoDelete">setAutoDelete(TRUE)</a> tells the cache to delete items that
cache. Calling <ahref="tqptrcollection.html#setAutoDelete">setAutoDelete(TRUE)</a> tells the cache to delete items that
are removed. The default is to not delete items when then are
removed (i.e., remove() and take() are equivalent).
<p> When inserting an item into the cache, only the pointer is copied,
not the item itself. This is called a <ahref="shclass.html#shallow-copy">shallow copy</a>. It is possible
to make the cache copy all of the item's data (known as a <ahref="shclass.html#deep-copy">deep copy</a>) when an item is inserted. insert() calls the virtual
function <ahref="ntqptrcollection.html#newItem">TQPtrCollection::newItem</a>() for the item to be inserted.
Inherit a cache and reimplement <ahref="ntqptrcollection.html#newItem">newItem</a>() if you want deep copies.
function <ahref="tqptrcollection.html#newItem">TQPtrCollection::newItem</a>() for the item to be inserted.
Inherit a cache and reimplement <ahref="tqptrcollection.html#newItem">newItem</a>() if you want deep copies.
<p> When removing a cache item the virtual function
<ahref="ntqptrcollection.html#deleteItem">TQPtrCollection::deleteItem</a>() is called. Its default implementation
in TQAsciiCache is to delete the item if <ahref="ntqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<ahref="tqptrcollection.html#deleteItem">TQPtrCollection::deleteItem</a>() is called. Its default implementation
in TQAsciiCache is to delete the item if <ahref="tqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> There is a <ahref="qasciicacheiterator.html">TQAsciiCacheIterator</a> which may be used to traverse the
items in the cache in arbitrary order.
<p><p>See also <ahref="qasciicacheiterator.html">TQAsciiCacheIterator</a>, <ahref="ntqcache.html">TQCache</a>, <ahref="ntqintcache.html">TQIntCache</a>, <ahref="collection.html">Collection Classes</a>, and <ahref="tools.html">Non-GUI Classes</a>.
@ -122,19 +122,19 @@ All iterators that access this cache will be reset.
@ -276,7 +276,7 @@ with two collections deleting the same items.
in subclasses. For example, a subclass that has a <ahref="#remove">remove</a>()
function will remove the item from its data structure, and if
auto-delete is enabled, will also delete the item.
<p><p>See also <ahref="ntqptrcollection.html#autoDelete">autoDelete</a>().
<p><p>See also <ahref="tqptrcollection.html#autoDelete">autoDelete</a>().
<p>Examples: <ahref="grapher-nsplugin-example.html#x2769">grapher/grapher.cpp</a>, <ahref="scribble-example.html#x924">scribble/scribble.cpp</a>, and <ahref="bigtable-example.html#x1291">table/bigtable/main.cpp</a>.
<p><ahref="qcache-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
@ -79,16 +79,16 @@ operates on pointers to X, or X*.
item, returns it, and by default marks it as being the most
recently used item.
<p> There are also methods to <ahref="#remove">remove</a>() or <ahref="#take">take</a>() an object from the
cache. Calling <ahref="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>(TRUE) for a cache tells it to delete
cache. Calling <ahref="tqptrcollection.html#setAutoDelete">setAutoDelete</a>(TRUE) for a cache tells it to delete
items that are removed. The default is to not delete items when
they are removed (i.e., remove() and take() are equivalent).
<p> When inserting an item into the cache, only the pointer is copied,
not the item itself. This is called a <ahref="shclass.html#shallow-copy">shallow copy</a>. It is possible
to make the cache copy all of the item's data (known as a <ahref="shclass.html#deep-copy">deep copy</a>) when an item is inserted. insert() calls the virtual
function <ahref="ntqptrcollection.html#newItem">TQPtrCollection::newItem</a>() for the item to be inserted.
Inherit a cache and reimplement <ahref="ntqptrcollection.html#newItem">newItem</a>() if you want deep copies.
function <ahref="tqptrcollection.html#newItem">TQPtrCollection::newItem</a>() for the item to be inserted.
Inherit a cache and reimplement <ahref="tqptrcollection.html#newItem">newItem</a>() if you want deep copies.
<p> When removing a cache item, the virtual function
<ahref="ntqptrcollection.html#deleteItem">TQPtrCollection::deleteItem</a>() is called. The default
<ahref="tqptrcollection.html#deleteItem">TQPtrCollection::deleteItem</a>() is called. The default
implementation deletes the item if auto-deletion is enabled, and
does nothing otherwise.
<p> There is a <ahref="qcacheiterator.html">TQCacheIterator</a> that can be used to traverse the items
@ -127,7 +127,7 @@ that access this cache will be reset.
</h3>
<p> Returns the setting of the auto-delete option. The default is FALSE.
<p><p>See also <ahref="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>().
<p><p>See also <ahref="tqptrcollection.html#setAutoDelete">setAutoDelete</a>().
<p> Removes the item associated with <em>k</em>, and returns TRUE if the
item was present in the cache; otherwise returns FALSE.
<p> The item is deleted if auto-deletion has been enabled, i.e., if
you have called <ahref="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>(TRUE).
you have called <ahref="tqptrcollection.html#setAutoDelete">setAutoDelete</a>(TRUE).
<p> If there are two or more items with equal keys, the one that was
inserted last is removed.
<p> All iterators that refer to the removed item are set to point to
@ -223,7 +223,7 @@ with two collections deleting the same items.
in subclasses. For example, a subclass that has a <ahref="#remove">remove</a>()
function will remove the item from its data structure, and if
auto-delete is enabled, will also delete the item.
<p><p>See also <ahref="ntqptrcollection.html#autoDelete">autoDelete</a>().
<p><p>See also <ahref="tqptrcollection.html#autoDelete">autoDelete</a>().
<p>Examples: <ahref="grapher-nsplugin-example.html#x2769">grapher/grapher.cpp</a>, <ahref="scribble-example.html#x924">scribble/scribble.cpp</a>, and <ahref="bigtable-example.html#x1291">table/bigtable/main.cpp</a>.
@ -350,7 +350,7 @@ with two collections deleting the same items.
in subclasses. For example, a subclass that has a <ahref="#remove">remove</a>()
function will remove the item from its data structure, and if
auto-delete is enabled, will also delete the item.
<p><p>See also <ahref="ntqptrcollection.html#autoDelete">autoDelete</a>().
<p><p>See also <ahref="tqptrcollection.html#autoDelete">autoDelete</a>().
<p>Examples: <ahref="grapher-nsplugin-example.html#x2769">grapher/grapher.cpp</a>, <ahref="scribble-example.html#x924">scribble/scribble.cpp</a>, and <ahref="bigtable-example.html#x1291">table/bigtable/main.cpp</a>.
@ -451,7 +451,7 @@ list is owned by the TQDir object and will be reused on the next
call to <ahref="#entryInfoList">entryInfoList</a>() for the same TQDir instance. If you want to
keep the entries of the list after a subsequent call to this
function you must copy them.
<p> Note: TQFileInfoList is really a <ahref="ntqptrlist.html">TQPtrList</a><TQFileInfo>.
<p> Note: TQFileInfoList is really a <ahref="tqptrlist.html">TQPtrList</a><TQFileInfo>.
<p><p>See also <ahref="#entryList">entryList</a>(), <ahref="#setNameFilter">setNameFilter</a>(), <ahref="#setSorting">setSorting</a>(), and <ahref="#setFilter">setFilter</a>().
<p>Examples: <ahref="dirview-example.html#x1666">dirview/dirview.cpp</a> and <ahref="fileiconview-example.html#x812">fileiconview/qfileiconview.cpp</a>.
@ -470,7 +470,7 @@ list is owned by the TQDir object and will be reused on the next
call to <ahref="#entryInfoList">entryInfoList</a>() for the same TQDir instance. If you want to
keep the entries of the list after a subsequent call to this
function you must copy them.
<p> Note: TQFileInfoList is really a <ahref="ntqptrlist.html">TQPtrList</a><TQFileInfo>.
<p> Note: TQFileInfoList is really a <ahref="tqptrlist.html">TQPtrList</a><TQFileInfo>.
<p><p>See also <ahref="#entryList">entryList</a>(), <ahref="#setNameFilter">setNameFilter</a>(), <ahref="#setSorting">setSorting</a>(), and <ahref="#setFilter">setFilter</a>().
<p><ahref="qintcache-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
@ -74,14 +74,14 @@ the cache are removed.
item, returns it, and by default marks it as being the most
recently used item.
<p> There are also methods to <ahref="#remove">remove</a>() or <ahref="#take">take</a>() an object from the
cache. Calling <ahref="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>(TRUE) for a cache tells it to delete
cache. Calling <ahref="tqptrcollection.html#setAutoDelete">setAutoDelete</a>(TRUE) for a cache tells it to delete
items that are removed. The default is to not delete items when
they are removed (i.e. remove() and take() are equivalent).
<p> When inserting an item into the cache, only the pointer is copied,
not the item itself. This is called a <ahref="shclass.html#shallow-copy">shallow copy</a>. It is possible
to make the cache copy all of the item's data (known as a <ahref="shclass.html#deep-copy">deep copy</a>) when an item is inserted. insert() calls the virtual
function <ahref="ntqptrcollection.html#newItem">TQPtrCollection::newItem</a>() for the item to be inserted.
Inherit a dictionary and reimplement <ahref="ntqptrcollection.html#newItem">newItem</a>() if you want deep
function <ahref="tqptrcollection.html#newItem">TQPtrCollection::newItem</a>() for the item to be inserted.
Inherit a dictionary and reimplement <ahref="tqptrcollection.html#newItem">newItem</a>() if you want deep
copies.
<p> When removing a cache item, the item will be automatically
deleted if auto-deletion is enabled.
@ -119,14 +119,14 @@ auto-deletion has been enabled.
<p> All cache iterators that operate this on cache are reset.
<p><p>See also <ahref="#remove">remove</a>() and <ahref="#take">take</a>().
<p>Reimplemented from <ahref="ntqptrcollection.html#clear">TQPtrCollection</a>.
<p>Reimplemented from <ahref="tqptrcollection.html#clear">TQPtrCollection</a>.
@ -263,7 +263,7 @@ with two collections deleting the same items.
in subclasses. For example, a subclass that has a <ahref="#remove">remove</a>()
function will remove the item from its data structure, and if
auto-delete is enabled, will also delete the item.
<p><p>See also <ahref="ntqptrcollection.html#autoDelete">autoDelete</a>().
<p><p>See also <ahref="tqptrcollection.html#autoDelete">autoDelete</a>().
<p>Examples: <ahref="grapher-nsplugin-example.html#x2769">grapher/grapher.cpp</a>, <ahref="scribble-example.html#x924">scribble/scribble.cpp</a>, and <ahref="bigtable-example.html#x1291">table/bigtable/main.cpp</a>.
<p> This signal is emitted if <ahref="#copy">copy</a>() starts a new copy operation. <em>lst</em> contains all TQNetworkOperations related to this copy
<li><ahref="qcolorgroup.html#TQColorGroup">TQColorGroup::TQColorGroup</a>( const <ahref="ntqcolor.html">TQColor</a>& foreground, const TQColor & background, const TQColor & light, const TQColor & dark, const TQColor & mid, const TQColor & text, const TQColor & base )
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>Complete Member List for TQPtrList</h1>
<p>This is the complete list of member functions for
<ahref="ntqptrlist.html">TQPtrList</a>, including inherited members.
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>Complete Member List for TQPtrVector</h1>
<p>This is the complete list of member functions for
<ahref="ntqptrvector.html">TQPtrVector</a>, including inherited members.
@ -49,12 +49,12 @@ The TQStrIList class provides a doubly-linked list of char*
with case-insensitive comparison.
<p>
<p> This class is a <ahref="ntqptrlist.html">TQPtrList</a><char> instance (a list of char*).
<p> This class is a <ahref="tqptrlist.html">TQPtrList</a><char> instance (a list of char*).
<p> TQStrIList is identical to <ahref="ntqstrlist.html">TQStrList</a> except that the virtual
<ahref="ntqptrlist.html#compareItems">compareItems</a>() function is reimplemented to compare strings
case-insensitively. The <ahref="ntqptrlist.html#inSort">inSort</a>() function inserts strings in a
<ahref="tqptrlist.html#compareItems">compareItems</a>() function is reimplemented to compare strings
case-insensitively. The <ahref="tqptrlist.html#inSort">inSort</a>() function inserts strings in a
sorted order. In general it is fastest to insert the strings as
they come and <ahref="ntqptrlist.html#sort">sort</a>() at the end; inSort() is useful when you just
they come and <ahref="tqptrlist.html#sort">sort</a>() at the end; inSort() is useful when you just
have to add a few extra strings to an already sorted list.
<p> The <ahref="qstrlistiterator.html">TQStrListIterator</a> class works for TQStrIList.
<p><p>See also <ahref="ntqstringlist.html">TQStringList</a>, <ahref="collection.html">Collection Classes</a>, and <ahref="tools.html">Non-GUI Classes</a>.
saveimage = new <ahref="ntqpopupmenu.html">TQPopupMenu</a>( menubar );
savepixmap = new <ahref="ntqpopupmenu.html">TQPopupMenu</a>( menubar );
<aname="x1344"></a><aname="x1343"></a> for (const char* f = fmt.<ahref="ntqptrlist.html#first">first</a>(); f; f = fmt.<ahref="ntqptrlist.html#next">next</a>()) {
<aname="x1344"></a><aname="x1343"></a> for (const char* f = fmt.<ahref="tqptrlist.html#first">first</a>(); f; f = fmt.<ahref="tqptrlist.html#next">next</a>()) {
<aname="x1327"></a> saveimage-><ahref="ntqmenudata.html#insertItem">insertItem</a>( f );
savepixmap-><ahref="ntqmenudata.html#insertItem">insertItem</a>( f );
@ -158,7 +158,7 @@ certain functions to exhibit undefined behaviour.
<ahref="#isWidgetType">isWidgetType</a>() returns whether an object is actually a widget. It
is much faster than <ahref="#inherits">inherits</a>( "TQWidget" ).
<p> Some TQObject functions, e.g. <ahref="#children">children</a>(), <ahref="#objectTrees">objectTrees</a>() and
<ahref="#queryList">queryList</a>() return a <ahref="tqobjectlist.html">TQObjectList</a>. A TQObjectList is a <ahref="ntqptrlist.html">TQPtrList</a> of
<ahref="#queryList">queryList</a>() return a <ahref="tqobjectlist.html">TQObjectList</a>. A TQObjectList is a <ahref="tqptrlist.html">TQPtrList</a> of
TQObjects. TQObjectLists support the same operations as TQPtrLists
and have an iterator class, TQObjectListIt.
<p>See also <ahref="objectmodel.html">Object Model</a>.
@ -255,8 +255,8 @@ in functions that depend on the state. One notable example is
children.
<p> The <ahref="tqobjectlist.html">TQObjectList</a> class is defined in the <ahref="tqobjectlist-h.html">tqobjectlist.h</a> header
file.
<p> The first child added is the <ahref="ntqptrlist.html#first">first</a>
object in the list and the last child added is the <ahref="ntqptrlist.html#last">last</a> object in the list, i.e. new
<p> The first child added is the <ahref="tqptrlist.html#first">first</a>
object in the list and the last child added is the <ahref="tqptrlist.html#last">last</a> object in the list, i.e. new
children are appended at the end.
<p> Note that the list order changes when <ahref="tqwidget.html">TQWidget</a> children are <ahref="tqwidget.html#raise">raised</a> or <ahref="tqwidget.html#lower">lowered.</a> A widget that is raised becomes the last object
in the list, and a widget that is lowered becomes the first object
@ -710,8 +710,8 @@ Returns a pointer to the list of all object trees (their root
objects), or 0 if there are no objects.
<p> The <ahref="tqobjectlist.html">TQObjectList</a> class is defined in the <ahref="tqobjectlist-h.html">tqobjectlist.h</a> header
file.
<p> The most recent root object created is the <ahref="ntqptrlist.html#first">first</a> object in the list and the first root object added
is the <ahref="ntqptrlist.html#last">last</a> object in the list.
<p> The most recent root object created is the <ahref="tqptrlist.html#first">first</a> object in the list and the first root object added
is the <ahref="tqptrlist.html#last">last</a> object in the list.
<p><p>See also <ahref="#children">children</a>(), <ahref="#parent">parent</a>(), <ahref="#insertChild">insertChild</a>(), and <ahref="#removeChild">removeChild</a>().
<p> See <ahref="tqobject.html#queryList">TQObject::queryList</a>() for an example of use.
<p><p>See also <ahref="tqobjectlistiterator.html">TQObjectListIterator</a>, <ahref="tqobject.html">TQObject</a>, <ahref="collection.html">Collection Classes</a>, and <ahref="tools.html">Non-GUI Classes</a>.
@ -65,7 +65,7 @@ inherited functions, e.g. <a href="ntqptrlist.html#getFirst">getFirst</a>(), <a
</h3>
<p> Constructs a copy of <em>list</em>.
<p> Each item in <em>list</em> is <ahref="ntqptrlist.html#append">appended</a> to this
<p> Each item in <em>list</em> is <ahref="tqptrlist.html#append">appended</a> to this
list. Only the pointers are copied (shallow copy).
<p><ahref="tqobjectlistiterator-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
@ -49,7 +49,7 @@ The TQObjectListIterator class provides an iterator for
TQObjectLists.
<p>
<p> A TQObjectListIterator iterator is a <ahref="qptrlistiterator.html">TQPtrListIterator<TQObject></a>.
<p> A TQObjectListIterator iterator is a <ahref="tqptrlistiterator.html">TQPtrListIterator<TQObject></a>.
<p> See <ahref="tqobject.html#queryList">TQObject::queryList</a>() for an example of use.
<p><p>See also <ahref="tqobjectlist.html">TQObjectList</a>, <ahref="collection.html">Collection Classes</a>, and <ahref="tools.html">Non-GUI Classes</a>.
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>Complete Member List for TQPtrCollection</h1>
<p>This is the complete list of member functions for
<ahref="ntqptrcollection.html">TQPtrCollection</a>, including inherited members.
<ahref="tqptrcollection.html">TQPtrCollection</a>, including inherited members.
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>Complete Member List for TQPtrDict</h1>
<p>This is the complete list of member functions for
<ahref="ntqptrdict.html">TQPtrDict</a>, including inherited members.
<ahref="tqptrdict.html">TQPtrDict</a>, including inherited members.
@ -267,7 +267,7 @@ with two collections deleting the same items.
in subclasses. For example, a subclass that has a <ahref="#remove">remove</a>()
function will remove the item from its data structure, and if
auto-delete is enabled, will also delete the item.
<p><p>See also <ahref="ntqptrcollection.html#autoDelete">autoDelete</a>().
<p><p>See also <ahref="tqptrcollection.html#autoDelete">autoDelete</a>().
<p>Examples: <ahref="grapher-nsplugin-example.html#x2769">grapher/grapher.cpp</a>, <ahref="scribble-example.html#x924">scribble/scribble.cpp</a>, and <ahref="bigtable-example.html#x1291">table/bigtable/main.cpp</a>.
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>Complete Member List for TQPtrDictIterator</h1>
<p>This is the complete list of member functions for
<ahref="qptrdictiterator.html">TQPtrDictIterator</a>, including inherited members.
<ahref="tqptrdictiterator.html">TQPtrDictIterator</a>, including inherited members.
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>Complete Member List for TQPtrList</h1>
<p>This is the complete list of member functions for
<ahref="tqptrlist.html">TQPtrList</a>, including inherited members.
directly on the TQLNode, but they should be used with care. The
data component of the node is available through TQLNode::getData().
<p> The <ahref="ntqstrlist.html">TQStrList</a> class defined in <ahref="qstrlist-h.html">ntqstrlist.h</a> is a list of <tt>char*</tt>.
It reimplements <ahref="ntqptrcollection.html#newItem">newItem</a>(), <ahref="ntqptrcollection.html#deleteItem">deleteItem</a>() and <ahref="#compareItems">compareItems</a>(). (But
It reimplements <ahref="tqptrcollection.html#newItem">newItem</a>(), <ahref="tqptrcollection.html#deleteItem">deleteItem</a>() and <ahref="#compareItems">compareItems</a>(). (But
see <ahref="ntqstringlist.html">TQStringList</a> for a list of Unicode TQStrings.)
<p><p>See also <ahref="qptrlistiterator.html">TQPtrListIterator</a>, <ahref="collection.html">Collection Classes</a>, and <ahref="tools.html">Non-GUI Classes</a>.
<p><p>See also <ahref="tqptrlistiterator.html">TQPtrListIterator</a>, <ahref="collection.html">Collection Classes</a>, and <ahref="tools.html">Non-GUI Classes</a>.
@ -470,20 +470,20 @@ function call was the last item, the current item will be set to
<p><p>See also <ahref="#first">first</a>(), <ahref="#last">last</a>(), <ahref="#prev">prev</a>(), and <ahref="#current">current</a>().
<p>Examples: <ahref="grapher-nsplugin-example.html#x2773">grapher/grapher.cpp</a>, <ahref="listviews-example.html#x133">listviews/listviews.h</a>, and <ahref="showimg-example.html#x1344">showimg/showimg.cpp</a>.
<p> Reads a list item from the stream <em>s</em> and returns a reference to
@ -523,13 +523,13 @@ the stream.
<p> Returns TRUE if successful, i.e. if <em>index</em> is in range;
otherwise returns FALSE. The valid range is <tt>0..(count() - 1)</tt>
inclusive.
<p> The removed item is deleted if <ahref="ntqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> The removed item is deleted if <ahref="tqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> The item after the removed item becomes the new current list item
if the removed item is not the last item in the list. If the last
item is removed, the new last item becomes the current item.
<p> All list iterators that refer to the removed item will be set to
point to the new current item.
<p><p>See also <ahref="#take">take</a>(), <ahref="#clear">clear</a>(), <ahref="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>(), <ahref="#current">current</a>(), and <ahref="#removeRef">removeRef</a>().
<p><p>See also <ahref="#take">take</a>(), <ahref="#clear">clear</a>(), <ahref="tqptrcollection.html#setAutoDelete">setAutoDelete</a>(), <ahref="#current">current</a>(), and <ahref="#removeRef">removeRef</a>().
@ -538,14 +538,14 @@ point to the new current item.
<p> Removes the current list item.
<p> Returns TRUE if successful, i.e. if the current item isn't 0;
otherwise returns FALSE.
<p> The removed item is deleted if <ahref="ntqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> The removed item is deleted if <ahref="tqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> The item after the removed item becomes the new current list item
if the removed item is not the last item in the list. If the last
item is removed, the new last item becomes the current item. The
current item is set to 0 if the list becomes empty.
<p> All list iterators that refer to the removed item will be set to
point to the new current item.
<p><p>See also <ahref="#take">take</a>(), <ahref="#clear">clear</a>(), <ahref="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>(), <ahref="#current">current</a>(), and <ahref="#removeRef">removeRef</a>().
<p><p>See also <ahref="#take">take</a>(), <ahref="#clear">clear</a>(), <ahref="tqptrcollection.html#setAutoDelete">setAutoDelete</a>(), <ahref="#current">current</a>(), and <ahref="#removeRef">removeRef</a>().
<p> Removes the first occurrence of <em>item</em> from the list.
<p> Returns TRUE if successful, i.e. if <em>item</em> is in the list;
otherwise returns FALSE.
<p> The removed item is deleted if <ahref="ntqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> The removed item is deleted if <ahref="tqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> The <ahref="#compareItems">compareItems</a>() function is called when searching for the item
in the list. If compareItems() is not reimplemented, it is more
efficient to call <ahref="#removeRef">removeRef</a>().
@ -565,38 +565,38 @@ item is removed, the new last item becomes the current item. The
current item is set to 0 if the list becomes empty.
<p> All list iterators that refer to the removed item will be set to
point to the new current item.
<p><p>See also <ahref="#removeRef">removeRef</a>(), <ahref="#take">take</a>(), <ahref="#clear">clear</a>(), <ahref="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>(), <ahref="#compareItems">compareItems</a>(), and <ahref="#current">current</a>().
<p><p>See also <ahref="#removeRef">removeRef</a>(), <ahref="#take">take</a>(), <ahref="#clear">clear</a>(), <ahref="tqptrcollection.html#setAutoDelete">setAutoDelete</a>(), <ahref="#compareItems">compareItems</a>(), and <ahref="#current">current</a>().
<p> Removes the first item from the list. Returns TRUE if successful,
i.e. if the list isn't empty; otherwise returns FALSE.
<p> The removed item is deleted if <ahref="ntqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> The removed item is deleted if <ahref="tqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> The first item in the list becomes the new current list item. The
current item is set to 0 if the list becomes empty.
<p> All list iterators that refer to the removed item will be set to
point to the new current item.
<p><p>See also <ahref="#removeLast">removeLast</a>(), <ahref="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>(), <ahref="#current">current</a>(), and <ahref="#remove">remove</a>().
<p><p>See also <ahref="#removeLast">removeLast</a>(), <ahref="tqptrcollection.html#setAutoDelete">setAutoDelete</a>(), <ahref="#current">current</a>(), and <ahref="#remove">remove</a>().
<p> Removes the last item from the list. Returns TRUE if successful,
i.e. if the list isn't empty; otherwise returns FALSE.
<p> The removed item is deleted if <ahref="ntqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> The removed item is deleted if <ahref="tqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> The last item in the list becomes the new current list item. The
current item is set to 0 if the list becomes empty.
<p> All list iterators that refer to the removed item will be set to
point to the new current item.
<p><p>See also <ahref="#removeFirst">removeFirst</a>(), <ahref="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>(), and <ahref="#current">current</a>().
<p><p>See also <ahref="#removeFirst">removeFirst</a>(), <ahref="tqptrcollection.html#setAutoDelete">setAutoDelete</a>(), and <ahref="#current">current</a>().
<p> This node must exist in the list, otherwise the program may crash.
<p> The removed item is deleted if <ahref="ntqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> The removed item is deleted if <ahref="tqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> The first item in the list will become the new current list item.
The current item is set to 0 if the list becomes empty.
<p> All list iterators that refer to the removed item will be set to
@ -611,7 +611,7 @@ the removed item was the last item.
<p> Removes the first occurrence of <em>item</em> from the list.
<p> Returns TRUE if successful, i.e. if <em>item</em> is in the list;
otherwise returns FALSE.
<p> The removed item is deleted if <ahref="ntqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> The removed item is deleted if <ahref="tqptrcollection.html#setAutoDelete">auto-deletion</a> is enabled.
<p> Equivalent to:
<pre>
if ( list.findRef( item ) != -1 )
@ -624,7 +624,7 @@ item is removed, the new last item becomes the current item. The
current item is set to 0 if the list becomes empty.
<p> All list iterators that refer to the removed item will be set to
point to the new current item.
<p><p>See also <ahref="#remove">remove</a>(), <ahref="#clear">clear</a>(), <ahref="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>(), and <ahref="#current">current</a>().
<p><p>See also <ahref="#remove">remove</a>(), <ahref="#clear">clear</a>(), <ahref="tqptrcollection.html#setAutoDelete">setAutoDelete</a>(), and <ahref="#current">current</a>().
@ -649,7 +649,7 @@ with two collections deleting the same items.
in subclasses. For example, a subclass that has a <ahref="#remove">remove</a>()
function will remove the item from its data structure, and if
auto-delete is enabled, will also delete the item.
<p><p>See also <ahref="ntqptrcollection.html#autoDelete">autoDelete</a>().
<p><p>See also <ahref="tqptrcollection.html#autoDelete">autoDelete</a>().
<p>Examples: <ahref="grapher-nsplugin-example.html#x2769">grapher/grapher.cpp</a>, <ahref="scribble-example.html#x924">scribble/scribble.cpp</a>, and <ahref="bigtable-example.html#x1291">table/bigtable/main.cpp</a>.
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>Complete Member List for TQPtrListIterator</h1>
<p>This is the complete list of member functions for
<ahref="qptrlistiterator.html">TQPtrListIterator</a>, including inherited members.
<ahref="tqptrlistiterator.html">TQPtrListIterator</a>, including inherited members.
<p> Define a template instance TQPtrListIterator<X> to create a list
iterator that operates on TQPtrList<X> (list of X*).
<p> The following example is similar to the <ahref="ntqptrlist.html#example">example in the TQPtrList class documentation</a>, but it uses TQPtrListIterator. The class Employee is
<p> The following example is similar to the <ahref="tqptrlist.html#example">example in the TQPtrList class documentation</a>, but it uses TQPtrListIterator. The class Employee is
list.<ahref="ntqptrlist.html#append">append</a>( new Employee("John", "Doe", 50000) );
list.<ahref="ntqptrlist.html#append">append</a>( new Employee("Jane", "Williams", 80000) );
list.<ahref="ntqptrlist.html#append">append</a>( new Employee("Tom", "Jones", 60000) );
list.<ahref="tqptrlist.html#append">append</a>( new Employee("John", "Doe", 50000) );
list.<ahref="tqptrlist.html#append">append</a>( new Employee("Jane", "Williams", 80000) );
list.<ahref="tqptrlist.html#append">append</a>( new Employee("Tom", "Jones", 60000) );
TQPtrListIterator<Employee> it( list );
Employee *employee;
@ -93,17 +93,17 @@ defined there.
</pre>
<p> Using a list iterator is a more robust way of traversing the list
than using the <ahref="ntqptrlist.html">TQPtrList</a> member functions <ahref="ntqptrlist.html#first">first</a>(), <ahref="ntqptrlist.html#next">next</a>(), <ahref="ntqptrlist.html#current">current</a>(), etc., as many iterators can
than using the <ahref="tqptrlist.html">TQPtrList</a> member functions <ahref="tqptrlist.html#first">first</a>(), <ahref="tqptrlist.html#next">next</a>(), <ahref="tqptrlist.html#current">current</a>(), etc., as many iterators can
traverse the same list independently.
<p> An iterator has its own current list item and can get the next and
previous list items. It doesn't modify the list in any way.
<p> When an item is removed from the list, all iterators that point to
that item are updated to point to <ahref="ntqptrlist.html#current">TQPtrList::current</a>() instead to
that item are updated to point to <ahref="tqptrlist.html#current">TQPtrList::current</a>() instead to
avoid dangling references.
<p><p>See also <ahref="ntqptrlist.html">TQPtrList</a>, <ahref="collection.html">Collection Classes</a>, and <ahref="tools.html">Non-GUI Classes</a>.
<p><p>See also <ahref="tqptrlist.html">TQPtrList</a>, <ahref="collection.html">Collection Classes</a>, and <ahref="tools.html">Non-GUI Classes</a>.
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>Complete Member List for TQPtrQueue</h1>
<p>This is the complete list of member functions for
<ahref="ntqptrqueue.html">TQPtrQueue</a>, including inherited members.
<ahref="tqptrqueue.html">TQPtrQueue</a>, including inherited members.
@ -73,9 +73,9 @@ tail of the queue with <a href="#enqueue">enqueue</a>() and retrieved from the h
<ahref="#dequeue">dequeue</a>(). You can peek at the head item without dequeing it using
<ahref="#head">head</a>().
<p> You can control the queue's deletion policy with <ahref="#setAutoDelete">setAutoDelete</a>().
<p> For compatibility with the <ahref="ntqptrcollection.html">TQPtrCollection</a> classes, <ahref="#current">current</a>() and
<p> For compatibility with the <ahref="tqptrcollection.html">TQPtrCollection</a> classes, <ahref="#current">current</a>() and
<ahref="#remove">remove</a>() are provided; both operate on the head().
<p><p>See also <ahref="ntqptrlist.html">TQPtrList</a>, <ahref="ntqptrstack.html">TQPtrStack</a>, <ahref="collection.html">Collection Classes</a>, and <ahref="tools.html">Non-GUI Classes</a>.
<p><p>See also <ahref="tqptrlist.html">TQPtrList</a>, <ahref="tqptrstack.html">TQPtrStack</a>, <ahref="collection.html">Collection Classes</a>, and <ahref="tools.html">Non-GUI Classes</a>.
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>Complete Member List for TQPtrStack</h1>
<p>This is the complete list of member functions for
<ahref="ntqptrstack.html">TQPtrStack</a>, including inherited members.
<ahref="tqptrstack.html">TQPtrStack</a>, including inherited members.
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>Complete Member List for TQPtrVector</h1>
<p>This is the complete list of member functions for
<ahref="tqptrvector.html">TQPtrVector</a>, including inherited members.
<p> Reads a vector item, <em>item</em>, from the stream <em>s</em> and returns a
@ -342,7 +342,7 @@ with two collections deleting the same items.
in subclasses. For example, a subclass that has a <ahref="#remove">remove</a>()
function will remove the item from its data structure, and if
auto-delete is enabled, will also delete the item.
<p><p>See also <ahref="ntqptrcollection.html#autoDelete">autoDelete</a>().
<p><p>See also <ahref="tqptrcollection.html#autoDelete">autoDelete</a>().
<p>Examples: <ahref="grapher-nsplugin-example.html#x2769">grapher/grapher.cpp</a>, <ahref="scribble-example.html#x924">scribble/scribble.cpp</a>, and <ahref="bigtable-example.html#x1291">table/bigtable/main.cpp</a>.
\fBNote:\fR This function is reentrant when TQt is built with thread support.</p> Returns the translation text for \fIsourceText\fR, by querying the installed messages files. The message files are searched from the most recently installed message file back to the first installed message file.
@ -11,7 +11,7 @@ QAsciiCache \- Template class that provides a cache based on char* keys
.SH SYNOPSIS
\fC#include <ntqasciicache.h>\fR
.PP
Inherits QPtrCollection.
Inherits TQPtrCollection.
.PP
.SS "Public Members"
.in +1c
@ -74,9 +74,9 @@ Apart from insert(), by far the most important function is find() (which also ex
.PP
There are also methods to remove() or take() an object from the cache. Calling setAutoDelete(TRUE) tells the cache to delete items that are removed. The default is to not delete items when then are removed (i.e., remove() and take() are equivalent).
.PP
When inserting an item into the cache, only the pointer is copied, not the item itself. This is called a shallow copy. It is possible to make the cache copy all of the item's data (known as a deep copy) when an item is inserted. insert() calls the virtual function QPtrCollection::newItem() for the item to be inserted. Inherit a cache and reimplement newItem() if you want deep copies.
When inserting an item into the cache, only the pointer is copied, not the item itself. This is called a shallow copy. It is possible to make the cache copy all of the item's data (known as a deep copy) when an item is inserted. insert() calls the virtual function TQPtrCollection::newItem() for the item to be inserted. Inherit a cache and reimplement newItem() if you want deep copies.
.PP
When removing a cache item the virtual function QPtrCollection::deleteItem() is called. Its default implementation in QAsciiCache is to delete the item if auto-deletion is enabled.
When removing a cache item the virtual function TQPtrCollection::deleteItem() is called. Its default implementation in QAsciiCache is to delete the item if auto-deletion is enabled.
.PP
There is a QAsciiCacheIterator which may be used to traverse the items in the cache in arbitrary order.
.PP
@ -99,13 +99,13 @@ All cache iterators that operate on this cache are reset.
Returns the item with key \fIk\fR, or 0 if the key does not exist in the cache. If \fIref\fR is TRUE (the default), the item is moved to the front of the least recently used list.
cout << "forename is not in the dictionary" << endl;
.br
.fi
In this example we use a dictionary to keep track of the line edits we're using. We insert each line edit into the dictionary with a unique name and then access the line edits via the dictionary. See QPtrDict, QIntDict and QDict.
In this example we use a dictionary to keep track of the line edits we're using. We insert each line edit into the dictionary with a unique name and then access the line edits via the dictionary. See TQPtrDict, QIntDict and QDict.
.PP
See QDict for full details, including the choice of dictionary size, and how deletions are handled.
.PP
See also QAsciiDictIterator, QDict, QIntDict, QPtrDict, Collection Classes, Collection Classes, and Non-GUI Classes.
See also QAsciiDictIterator, QDict, QIntDict, TQPtrDict, Collection Classes, Collection Classes, and Non-GUI Classes.
Sets the collection to auto-delete its contents if \fIenable\fR is TRUE and to never delete them if \fIenable\fR is FALSE.
.PP
If auto-deleting is turned on, all the items in a collection are deleted when the collection itself is deleted. This is convenient if the collection has the only pointer to the items.
@ -286,7 +286,7 @@ Returns a pointer to the item taken out, or 0 if the key does not exist in the d
All dictionary iterators that refer to the taken item will be set to point to the next item in the dictionary traversal order.
@ -11,7 +11,7 @@ QCache \- Template class that provides a cache based on TQString keys
.SH SYNOPSIS
\fC#include <ntqcache.h>\fR
.PP
Inherits QPtrCollection.
Inherits TQPtrCollection.
.PP
.SS "Public Members"
.in +1c
@ -81,9 +81,9 @@ Apart from insert(), by far the most important function is find() (which also ex
.PP
There are also methods to remove() or take() an object from the cache. Calling setAutoDelete(TRUE) for a cache tells it to delete items that are removed. The default is to not delete items when they are removed (i.e., remove() and take() are equivalent).
.PP
When inserting an item into the cache, only the pointer is copied, not the item itself. This is called a shallow copy. It is possible to make the cache copy all of the item's data (known as a deep copy) when an item is inserted. insert() calls the virtual function QPtrCollection::newItem() for the item to be inserted. Inherit a cache and reimplement newItem() if you want deep copies.
When inserting an item into the cache, only the pointer is copied, not the item itself. This is called a shallow copy. It is possible to make the cache copy all of the item's data (known as a deep copy) when an item is inserted. insert() calls the virtual function TQPtrCollection::newItem() for the item to be inserted. Inherit a cache and reimplement newItem() if you want deep copies.
.PP
When removing a cache item, the virtual function QPtrCollection::deleteItem() is called. The default implementation deletes the item if auto-deletion is enabled, and does nothing otherwise.
When removing a cache item, the virtual function TQPtrCollection::deleteItem() is called. The default implementation deletes the item if auto-deletion is enabled, and does nothing otherwise.
.PP
There is a QCacheIterator that can be used to traverse the items in the cache in arbitrary order.
.PP
@ -101,7 +101,7 @@ Each inserted item has an associated cost. When inserting a new item, if the tot
If \fIcaseSensitive\fR is TRUE (the default), the cache keys are case sensitive; if it is FALSE, they are case-insensitive. Case-insensitive comparison considers all Unicode letters.
.SH "QCache::~QCache ()"
Removes all items from the cache and destroys it. All iterators that access this cache will be reset.
.SH "bool QPtrCollection::autoDelete () const"
.SH "bool TQPtrCollection::autoDelete () const"
Returns the setting of the auto-delete option. The default is FALSE.
.PP
See also setAutoDelete().
@ -112,13 +112,13 @@ All cache iterators that operate this on cache are reset.
Returns the item associated with key \fIk\fR, or 0 if the key does not exist in the cache. If \fIref\fR is TRUE (the default), the item is moved to the front of the least recently used list.
.PP
@ -155,7 +155,7 @@ If there are two or more items with equal keys, the one that was inserted last i
All iterators that refer to the removed item are set to point to the next item in the cache's traversal order.
Sets the collection to auto-delete its contents if \fIenable\fR is TRUE and to never delete them if \fIenable\fR is FALSE.
.PP
If auto-deleting is turned on, all the items in a collection are deleted when the collection itself is deleted. This is convenient if the collection has the only pointer to the items.
@ -75,7 +75,7 @@ If \fIfc\fR is not 0, \fIdatafilenamepattern\fR should contain "%1", e.g. "foo%1
If \fIfc\fR is 0, \fIdatafilenamepattern\fR is asssumed to be a filename, and the image contained in this file will be loaded as the first (and only) frame.
.PP
If \fIdatafilenamepattern\fR does not exist, is not readable, isn't an image, or some other error occurs, the array ends up empty and isValid() returns FALSE.
@ -105,9 +105,9 @@ Items with equal keys are allowed. When inserting two items with the same key, o
.PP
The QDictIterator class can traverse the dictionary, but only in an arbitrary order. Multiple iterators may independently traverse the same dictionary.
.PP
When inserting an item into a dictionary, only the pointer is copied, not the item itself, i.e. a shallow copy is made. It is possible to make the dictionary copy all of the item's data (a deep copy) when an item is inserted. insert() calls the virtual function QPtrCollection::newItem() for the item to be inserted. Inherit a dictionary and reimplement newItem() if you want deep copies.
When inserting an item into a dictionary, only the pointer is copied, not the item itself, i.e. a shallow copy is made. It is possible to make the dictionary copy all of the item's data (a deep copy) when an item is inserted. insert() calls the virtual function TQPtrCollection::newItem() for the item to be inserted. Inherit a dictionary and reimplement newItem() if you want deep copies.
.PP
When removing a dictionary item, the virtual function QPtrCollection::deleteItem() is called. QDict's default implementation is to delete the item if auto-deletion is enabled.
When removing a dictionary item, the virtual function TQPtrCollection::deleteItem() is called. QDict's default implementation is to delete the item if auto-deletion is enabled.
.PP
Example #1:
.PP
@ -200,7 +200,7 @@ In the example we are using the dictionary to provide fast random access to the
.PP
We first obtain the list of available styles, then sort them so that the menu items will be ordered alphabetically. Next we create a dictionary of int pointers. The keys in the dictionary are each one character long, representing letters that have been used for accelerators. We iterate through our list of style names. If the first letter of the style name is in the dictionary, i.e. has been used, we iterate over all the characters in the style name to see if we can find a letter that hasn't been used. If we find an unused letter we put the accelerator ampersand (&) in front of it and add that letter to the dictionary. If we can't find an unused letter the style will simply have no accelerator. If the first letter of the style name is not in the dictionary we use it for the accelerator and add it to the dictionary. Finally we create a QAction for each style.
.PP
See also QDictIterator, QAsciiDict, QIntDict, QPtrDict, Collection Classes, and Non-GUI Classes.
See also QDictIterator, QAsciiDict, QIntDict, TQPtrDict, Collection Classes, and Non-GUI Classes.
Constructs a dictionary optimized for less than \fIsize\fR entries.
@ -216,7 +216,7 @@ Each item in \fIdict\fR is inserted into this dictionary. Only the pointers are
Removes all items from the dictionary and destroys it. If setAutoDelete() is TRUE, each value is deleted. All iterators that access this dictionary will be reset.
.PP
See also setAutoDelete().
.SH "bool QPtrCollection::autoDelete () const"
.SH "bool TQPtrCollection::autoDelete () const"
Returns the setting of the auto-delete option. The default is FALSE.
.PP
See also setAutoDelete().
@ -229,13 +229,13 @@ All dictionary iterators that operate on the dictionary are reset.
Sets the collection to auto-delete its contents if \fIenable\fR is TRUE and to never delete them if \fIenable\fR is FALSE.
.PP
If auto-deleting is turned on, all the items in a collection are deleted when the collection itself is deleted. This is convenient if the collection has the only pointer to the items.
@ -343,7 +343,7 @@ Returns a pointer to the item taken out, or 0 if the key does not exist in the d
All dictionary iterators that refer to the taken item will be set to point to the next item in the dictionary traversal order.
@ -511,7 +511,7 @@ Returns 0 if the directory is unreadable or does not exist.
.PP
The returned pointer is a const pointer to a QFileInfoList. The list is owned by the QDir object and will be reused on the next call to entryInfoList() for the same QDir instance. If you want to keep the entries of the list after a subsequent call to this function you must copy them.
.PP
Note: QFileInfoList is really a QPtrList<QFileInfo>.
Note: QFileInfoList is really a TQPtrList<QFileInfo>.
.PP
See also entryList(), setNameFilter(), setSorting(), and setFilter().
.PP
@ -528,7 +528,7 @@ Returns 0 if the directory is unreadable or does not exist.
.PP
The returned pointer is a const pointer to a QFileInfoList. The list is owned by the QDir object and will be reused on the next call to entryInfoList() for the same QDir instance. If you want to keep the entries of the list after a subsequent call to this function you must copy them.
.PP
Note: QFileInfoList is really a QPtrList<QFileInfo>.
Note: QFileInfoList is really a TQPtrList<QFileInfo>.
.PP
See also entryList(), setNameFilter(), setSorting(), and setFilter().
.SH "QStringList QDir::entryList ( const TQString & nameFilter, int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const\fC [virtual]\fR"
@ -144,7 +144,7 @@ Destroys the dock area and all the dock windows docked in the dock area.
Does not affect any floating dock windows or dock windows in other dock areas, even if they first appeared in this dock area. Floating dock windows are effectively top level windows and are not child windows of the dock area. When a floating dock window is docked (dragged into a dock area) its parent becomes the dock area.
.SH "int QDockArea::count () const"
Returns the number of dock windows in the dock area. See the "count" property for details.
@ -11,7 +11,7 @@ QIntCache \- Template class that provides a cache based on long keys
.SH SYNOPSIS
\fC#include <ntqintcache.h>\fR
.PP
Inherits QPtrCollection.
Inherits TQPtrCollection.
.PP
.SS "Public Members"
.in +1c
@ -72,7 +72,7 @@ Apart from insert(), by far the most important function is find() (which also ex
.PP
There are also methods to remove() or take() an object from the cache. Calling setAutoDelete(TRUE) for a cache tells it to delete items that are removed. The default is to not delete items when they are removed (i.e. remove() and take() are equivalent).
.PP
When inserting an item into the cache, only the pointer is copied, not the item itself. This is called a shallow copy. It is possible to make the cache copy all of the item's data (known as a deep copy) when an item is inserted. insert() calls the virtual function QPtrCollection::newItem() for the item to be inserted. Inherit a dictionary and reimplement newItem() if you want deep copies.
When inserting an item into the cache, only the pointer is copied, not the item itself. This is called a shallow copy. It is possible to make the cache copy all of the item's data (known as a deep copy) when an item is inserted. insert() calls the virtual function TQPtrCollection::newItem() for the item to be inserted. Inherit a dictionary and reimplement newItem() if you want deep copies.
.PP
When removing a cache item, the item will be automatically deleted if auto-deletion is enabled.
.PP
@ -95,13 +95,13 @@ All cache iterators that operate this on cache are reset.
Returns the item associated with \fIk\fR, or 0 if the key does not exist in the cache. If \fIref\fR is TRUE (the default), the item is moved to the front of the least recently used list.
Sets the collection to auto-delete its contents if \fIenable\fR is TRUE and to never delete them if \fIenable\fR is FALSE.
.PP
If auto-deleting is turned on, all the items in a collection are deleted when the collection itself is deleted. This is convenient if the collection has the only pointer to the items.
@ -284,7 +284,7 @@ All dictionary iterators that refer to the taken item will be set to point to th
@ -72,11 +72,11 @@ Construct an instance of a QListViewItemIterator, with either a QListView* or a
.PP
A QListViewItemIterator iterates over all the items from its starting point. This means that it always makes the first child of the current item the new current item. If there is no child, the next sibling becomes the new current item; and if there is no next sibling, the next sibling of the parent becomes current.
.PP
The following example creates a list of all the items that have been selected by the user, storing pointers to the items in a QPtrList:
The following example creates a list of all the items that have been selected by the user, storing pointers to the items in a TQPtrList:
.PP
.nf
.br
QPtrList<QListViewItem> lst;
TQPtrList<QListViewItem> lst;
.br
QListViewItemIterator it( myListView );
.br
@ -96,7 +96,7 @@ An alternative approach is to use an IteratorFlag:
This signal is emitted when the \fIdockWindow\fR has changed its position. A change in position occurs when a dock window is moved within its dock area or moved to another dock area (including the Minimized and \fCTearOff\fR dock areas).
.PP
See also getLocation().
.SH "QPtrList<QDockWindow> QMainWindow::dockWindows ( Dock dock ) const"
.SH "TQPtrList<QDockWindow> QMainWindow::dockWindows ( Dock dock ) const"
Returns a list of all the dock windows which are in the \fIdock\fR dock area, regardless of their state.
.PP
For example, the DockTornOff dock area may contain closed dock windows but these are returned along with the visible dock windows.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Returns the list of dock windows which belong to this main window, regardless of which dock area they are in or what their state is, (e.g. irrespective of whether they are visible or not).
@ -720,7 +720,7 @@ See also menuBar() and toolTipGroup().
@ -172,7 +172,7 @@ The TQMap class is a value-based template class that provides a dictionary.
.PP
TQMap is a TQt implementation of an STL-like map container. It can be used in your application if the standard \fCmap\fR is not available on all your target platforms. TQMap is part of the TQt Template Library.
.PP
TQMap<Key, Data> defines a template instance to create a dictionary with keys of type Key and values of type Data. TQMap does not store pointers to the members of the map; instead, it holds a copy of every member. For this reason, TQMap is value-based, whereas QPtrList and QDict are pointer-based.
TQMap<Key, Data> defines a template instance to create a dictionary with keys of type Key and values of type Data. TQMap does not store pointers to the members of the map; instead, it holds a copy of every member. For this reason, TQMap is value-based, whereas TQPtrList and QDict are pointer-based.
.PP
TQMap contains and manages a collection of objects of type Data with associated key values of type Key and provides iterators that allow the contained objects to be addressed. TQMap owns the contained items.
@ -157,7 +157,7 @@ QMemArray is implemented as a template class. Define a template instance QMemArr
.PP
QMemArray stores the array elements directly in the array. It can only deal with simple types (i.e. C++ types, structs, and classes that have no constructors, destructors, or virtual functions). QMemArray uses bitwise operations to copy and compare array elements.
.PP
The QPtrVector collection class is also a kind of array. Like most collection classes, it uses pointers to the contained items.
The TQPtrVector collection class is also a kind of array. Like most collection classes, it uses pointers to the contained items.
.PP
QMemArray uses explicit sharing with a reference count. If more than one array shares common data and one of the arrays is modified, all the arrays are modified.
@ -213,7 +213,7 @@ Notice that the TQ_OBJECT macro is mandatory for any object that implements sign
.PP
All TQt widgets inherit TQObject. The convenience function isWidgetType() returns whether an object is actually a widget. It is much faster than inherits( "TQWidget" ).
.PP
Some TQObject functions, e.g. children(), objectTrees() and queryList() return a TQObjectList. A TQObjectList is a QPtrList of TQObjects. TQObjectLists support the same operations as QPtrLists and have an iterator class, TQObjectListIt.
Some TQObject functions, e.g. children(), objectTrees() and queryList() return a TQObjectList. A TQObjectList is a TQPtrList of TQObjects. TQObjectLists support the same operations as TQPtrLists and have an iterator class, TQObjectListIt.
The TQObjectList class is a QPtrList of TQObjects.
The TQObjectList class is a TQPtrList of TQObjects.
.PP
A TQObjectList is a QPtrList<TQObject>. The list can be traversed using inherited functions, e.g. getFirst(), next(), etc., or using a TQObjectListIterator iterator.
A TQObjectList is a TQPtrList<TQObject>. The list can be traversed using inherited functions, e.g. getFirst(), next(), etc., or using a TQObjectListIterator iterator.
@ -40,9 +40,9 @@ The TQPair class is a value-based template class that provides a pair of element
.PP
TQPair is a TQt implementation of an STL-like pair. It can be used in your application if the standard pair<> is not available on your target platforms.
.PP
TQPair<T1, T2> defines a template instance to create a pair of values that contains two values of type T1 and T2. Please note that TQPair does not store pointers to the two elements; it holds a copy of every member. This is why these kinds of classes are called \fIvalue based\fR. If you're interested in \fIpointer based\fR classes see, for example, QPtrList and QDict.
TQPair<T1, T2> defines a template instance to create a pair of values that contains two values of type T1 and T2. Please note that TQPair does not store pointers to the two elements; it holds a copy of every member. This is why these kinds of classes are called \fIvalue based\fR. If you're interested in \fIpointer based\fR classes see, for example, TQPtrList and QDict.
.PP
TQPair holds one copy of type T1 and one copy of type T2, but does not provide iterators to access these elements. Instead, the two elements (\fCfirst\fR and \fCsecond\fR) are public member variables of the pair. TQPair owns the contained elements. For more relaxed ownership semantics, see QPtrCollection and friends which are pointer-based containers.
TQPair holds one copy of type T1 and one copy of type T2, but does not provide iterators to access these elements. Instead, the two elements (\fCfirst\fR and \fCsecond\fR) are public member variables of the pair. TQPair owns the contained elements. For more relaxed ownership semantics, see TQPtrCollection and friends which are pointer-based containers.
.PP
Some classes cannot be used within a TQPair: for example, all classes derived from TQObject and thus all classes that implement widgets. Only "values" can be used in a TQPair. To qualify as a value the class must provide:
The QPtrCollection class is the base class of most pointer-based TQt collections.
The TQPtrCollection class is the base class of most pointer-based TQt collections.
.PP
The QPtrCollection class is an abstract base class for the TQt collection classes QDict, QPtrList, etc. TQt also includes value based collections, e.g. TQValueList, TQMap, etc.
The TQPtrCollection class is an abstract base class for the TQt collection classes QDict, TQPtrList, etc. TQt also includes value based collections, e.g. TQValueList, TQMap, etc.
.PP
A QPtrCollection only knows about the number of objects in the collection and the deletion strategy (see setAutoDelete()).
A TQPtrCollection only knows about the number of objects in the collection and the deletion strategy (see setAutoDelete()).
.PP
A collection is implemented using the Item (generic collection item) type, which is a \fCvoid*\fR. The template classes that create the real collections cast the Item to the required type.
.PP
See also Collection Classes and Non-GUI Classes.
.SS "Member Type Documentation"
.SH "QPtrCollection::Item"
This type is the generic "item" in a QPtrCollection.
.SH "TQPtrCollection::Item"
This type is the generic "item" in a TQPtrCollection.
Reimplemented in QAsciiCache, QAsciiDict, QCache, QDict, QIntCache, QIntDict, QPtrList, QPtrDict, and QPtrVector.
.SH "void QPtrCollection::deleteItem ( Item d )\fC [pure virtual protected]\fR"
Reimplemented in QAsciiCache, QAsciiDict, QCache, QDict, QIntCache, QIntDict, TQPtrList, TQPtrDict, and TQPtrVector.
.SH "void TQPtrCollection::deleteItem ( Item d )\fC [pure virtual protected]\fR"
Reimplement this function if you want to be able to delete items.
.PP
Deletes an item that is about to be removed from the collection.
@ -97,7 +97,7 @@ This function has to reimplemented in the collection template classes, and shoul
\fBWarning:\fR If you reimplement this function you must also reimplement the destructor and call the virtual function clear() from your destructor. This is due to the way virtual functions and destructors work in C++: Virtual functions in derived classes cannot be called from a destructor. If you do not do this, your deleteItem() function will not be called when the container is destroyed.
.PP
See also newItem() and setAutoDelete().
.SH "Item QPtrCollection::newItem ( Item d )\fC [virtual protected]\fR"
.SH "Item TQPtrCollection::newItem ( Item d )\fC [virtual protected]\fR"
Virtual function that creates a copy of an object that is about to be inserted into the collection.
.PP
The default implementation returns the \fId\fR pointer, i.e. no copy is made.
@ -105,7 +105,7 @@ The default implementation returns the \fId\fR pointer, i.e. no copy is made.
This function is seldom reimplemented in the collection template classes. It is not common practice to make a copy of something that is being inserted.
Sets the collection to auto-delete its contents if \fIenable\fR is TRUE and to never delete them if \fIenable\fR is FALSE.
.PP
If auto-deleting is turned on, all the items in a collection are deleted when the collection itself is deleted. This is convenient if the collection has the only pointer to the items.
@ -120,7 +120,7 @@ Examples:
.)l grapher/grapher.cpp, scribble/scribble.cpp, and table/bigtable/main.cpp.
The QPtrDict class is a template class that provides a dictionary based on void* keys.
The TQPtrDict class is a template class that provides a dictionary based on void* keys.
.PP
QPtrDict is implemented as a template class. Define a template instance QPtrDict<X> to create a dictionary that operates on pointers to X (X*).
TQPtrDict is implemented as a template class. Define a template instance TQPtrDict<X> to create a dictionary that operates on pointers to X (X*).
.PP
A dictionary is a collection of key-value pairs. The key is a void* used for insertion, removal and lookup. The value is a pointer. Dictionaries provide very fast insertion and lookup.
@ -145,27 +145,27 @@ In this example we use a dictionary to add an extra property (a char*) to the li
.PP
See QDict for full details, including the choice of dictionary size, and how deletions are handled.
.PP
See also QPtrDictIterator, QDict, QAsciiDict, QIntDict, Collection Classes, Collection Classes, and Non-GUI Classes.
See also TQPtrDictIterator, QDict, QAsciiDict, QIntDict, Collection Classes, Collection Classes, and Non-GUI Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QPtrDict::QPtrDict ( int size = 17 )"
.SH "TQPtrDict::TQPtrDict ( int size = 17 )"
Constructs a dictionary using an internal hash array with the size \fIsize\fR.
.PP
Setting \fIsize\fR to a suitably large prime number (equal to or greater than the expected number of entries) makes the hash distribution better and improves lookup performance.
Assigns \fIdict\fR to this dictionary and returns a reference to this dictionary.
.PP
This dictionary is first cleared and then each item in \fIdict\fR is inserted into the dictionary. Only the pointers are copied (shallow copy), unless newItem() has been reimplemented.
Reads a dictionary item from the stream \fIs\fR and returns a reference to the stream.
.PP
The default implementation sets \fIitem\fR to 0.
.PP
See also write().
.SH "bool QPtrDict::remove ( void * key )"
.SH "bool TQPtrDict::remove ( void * key )"
Removes the item associated with \fIkey\fR from the dictionary. Returns TRUE if successful, i.e. if \fIkey\fR is in the dictionary; otherwise returns FALSE.
.PP
If there are two or more items with equal keys, then the most recently inserted item will be removed.
@ -229,7 +229,7 @@ The removed item is deleted if auto-deletion is enabled.
All dictionary iterators that refer to the removed item will be set to point to the next item in the dictionary traversal order.
If the dictionary has key \fIkey\fR, this key's item is replaced with \fIitem\fR. If the dictionary doesn't contain key \fIkey\fR, \fIitem\fR is inserted into the dictionary using key \fIkey\fR.
.PP
\fIitem\fR may not be 0.
@ -238,7 +238,7 @@ Equivalent to
.PP
.nf
.br
QPtrDict<ItemType> dict;
TQPtrDict<ItemType> dict;
.br
...
.br
@ -253,9 +253,9 @@ Equivalent to
If there are two or more items with equal keys, then the most recently inserted item will be replaced.
.PP
See also insert().
.SH "void QPtrDict::resize ( uint newsize )"
.SH "void TQPtrDict::resize ( uint newsize )"
Changes the size of the hash table to \fInewsize\fR. The contents of the dictionary are preserved, but all iterators on the dictionary become invalid.
Sets the collection to auto-delete its contents if \fIenable\fR is TRUE and to never delete them if \fIenable\fR is FALSE.
.PP
If auto-deleting is turned on, all the items in a collection are deleted when the collection itself is deleted. This is convenient if the collection has the only pointer to the items.
@ -268,13 +268,13 @@ See also autoDelete().
.PP
Examples:
.)l grapher/grapher.cpp, scribble/scribble.cpp, and table/bigtable/main.cpp.
.SH "uint QPtrDict::size () const"
.SH "uint TQPtrDict::size () const"
Returns the size of the internal hash table (as specified in the constructor).
.PP
See also count().
.SH "void QPtrDict::statistics () const"
.SH "void TQPtrDict::statistics () const"
Debugging-only function that prints out the dictionary distribution using tqDebug().
.SH "type * QPtrDict::take ( void * key )"
.SH "type * TQPtrDict::take ( void * key )"
Takes the item associated with \fIkey\fR out of the dictionary without deleting it (even if auto-deletion is enabled).
.PP
If there are two or more items with equal keys, then the most recently inserted item will be removed.
@ -284,13 +284,13 @@ Returns a pointer to the item taken out, or 0 if the key does not exist in the d
All dictionary iterators that refer to the taken item will be set to point to the next item in the dictionary traversal order.
@ -48,15 +48,15 @@ QPtrDictIterator \- Iterator for QPtrDict collections
.br
.in -1c
.SH DESCRIPTION
The QPtrDictIterator class provides an iterator for QPtrDict collections.
The TQPtrDictIterator class provides an iterator for TQPtrDict collections.
.PP
QPtrDictIterator is implemented as a template class. Define a template instance QPtrDictIterator<X> to create a dictionary iterator that operates on QPtrDict<X> (dictionary of X*).
TQPtrDictIterator is implemented as a template class. Define a template instance TQPtrDictIterator<X> to create a dictionary iterator that operates on TQPtrDict<X> (dictionary of X*).
.PP
Example:
.PP
.nf
.br
QPtrDict<char> fields;
TQPtrDict<char> fields;
.br
.br
QLineEdit *le1 = new QLineEdit( this );
@ -79,7 +79,7 @@ Example:
fields.insert( le3, "Age" );
.br
.br
QPtrDictIterator<char> it( fields );
TQPtrDictIterator<char> it( fields );
.br
for( ; it.current(); ++it ) {
.br
@ -103,47 +103,47 @@ Example:
.fi
In the example we insert some line edits into a dictionary, associating a string with each. We then iterate over the dictionary printing the associated strings.
.PP
Multiple iterators may independently traverse the same dictionary. A QPtrDict knows about all the iterators that are operating on the dictionary. When an item is removed from the dictionary, QPtrDict updates all iterators that refer the removed item to point to the next item in the traversing order.
Multiple iterators may independently traverse the same dictionary. A TQPtrDict knows about all the iterators that are operating on the dictionary. When an item is removed from the dictionary, TQPtrDict updates all iterators that refer the removed item to point to the next item in the traversing order.
.PP
See also QPtrDict, Collection Classes, and Non-GUI Classes.
See also TQPtrDict, Collection Classes, and Non-GUI Classes.
The QPtrList class is a template class that provides a list.
The TQPtrList class is a template class that provides a list.
.PP
TQValueList is an STL-compatible alternative to this class.
.PP
Define a template instance QPtrList<X> to create a list that operates on pointers to X (X*).
Define a template instance TQPtrList<X> to create a list that operates on pointers to X (X*).
.PP
The list class is indexable and has a current index and a current item. The first item corresponds to index position 0. The current index is -1 if the current item is 0.
.PP
@ -216,7 +216,7 @@ Example:
};
.br
.br
QPtrList<Employee> list;
TQPtrList<Employee> list;
.br
list.setAutoDelete( TRUE ); // the list owns the objects
.br
@ -270,13 +270,13 @@ The output is
.br
.fi
.PP
QPtrList has several member functions for traversing the list, but using a QPtrListIterator can be more practical. Multiple list iterators may traverse the same list, independently of each other and of the current list item.
TQPtrList has several member functions for traversing the list, but using a TQPtrListIterator can be more practical. Multiple list iterators may traverse the same list, independently of each other and of the current list item.
.PP
In the example above we make the call setAutoDelete(TRUE). Enabling auto-deletion tells the list to delete items that are removed. The default is to not delete items when they are removed but this would cause a memory leak in the example because there are no other references to the list items.
.PP
When inserting an item into a list only the pointer is copied, not the item itself, i.e. a shallow copy. It is possible to make the list copy all of the item's data (deep copy) when an item is inserted. insert(), inSort() and append() call the virtual function QPtrCollection::newItem() for the item to be inserted. Inherit a list and reimplement newItem() to have deep copies.
When inserting an item into a list only the pointer is copied, not the item itself, i.e. a shallow copy. It is possible to make the list copy all of the item's data (deep copy) when an item is inserted. insert(), inSort() and append() call the virtual function TQPtrCollection::newItem() for the item to be inserted. Inherit a list and reimplement newItem() to have deep copies.
.PP
When removing an item from a list, the virtual function QPtrCollection::deleteItem() is called. QPtrList's default implementation is to delete the item if auto-deletion is enabled.
When removing an item from a list, the virtual function TQPtrCollection::deleteItem() is called. TQPtrList's default implementation is to delete the item if auto-deletion is enabled.
.PP
The virtual function compareItems() can be reimplemented to compare two list items. This function is called from all list functions that need to compare list items, for instance remove(const type*). If you only want to deal with pointers, there are functions that compare pointers instead, for instance removeRef(const type*). These functions are somewhat faster than those that call compareItems().
.PP
@ -284,21 +284,21 @@ List items are stored as \fCvoid*\fR in an internal QLNode, which also holds poi
.PP
The QStrList class defined in ntqstrlist.h is a list of \fCchar*\fR. It reimplements newItem(), deleteItem() and compareItems(). (But see QStringList for a list of Unicode QStrings.)
.PP
See also QPtrListIterator, Collection Classes, and Non-GUI Classes.
See also TQPtrListIterator, Collection Classes, and Non-GUI Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QPtrList::QPtrList ()"
.SH "TQPtrList::TQPtrList ()"
Constructs an empty list.
.SH "QPtrList::QPtrList ( const QPtrList<type> & list )"
.SH "TQPtrList::TQPtrList ( const TQPtrList<type> & list )"
Constructs a copy of \fIlist\fR.
.PP
Each item in \fIlist\fR is appended to this list. Only the pointers are copied (shallow copy).
.SH "QPtrList::~QPtrList ()"
.SH "TQPtrList::~TQPtrList ()"
Removes all items from the list and destroys the list.
.PP
All list iterators that access this list will be reset.
.PP
See also setAutoDelete().
.SH "void QPtrList::append ( const type * item )"
.SH "void TQPtrList::append ( const type * item )"
Inserts the \fIitem\fR at the end of the list.
.PP
The inserted item becomes the current list item. This is equivalent to \fCinsert( count(), item )\fR.
@ -309,7 +309,7 @@ See also insert(), current(), and prepend().
.PP
Examples:
.)l customlayout/border.cpp, customlayout/card.cpp, customlayout/flow.cpp, grapher/grapher.cpp, listviews/listviews.cpp, listviews/listviews.h, and qwerty/qwerty.cpp.
.SH "type * QPtrList::at ( uint index )"
.SH "type * TQPtrList::at ( uint index )"
Returns a pointer to the item at position \fIindex\fR in the list, or 0 if the index is out of range.
.PP
Sets the current list item to this item if \fIindex\fR is valid. The valid range is \fC0..(count() - 1)\fR inclusive.
@ -320,17 +320,17 @@ See also current().
.PP
Examples:
.)l customlayout/border.cpp, customlayout/card.cpp, customlayout/flow.cpp, dirview/dirview.cpp, mdi/application.cpp, and qwerty/qwerty.cpp.
.SH "int QPtrList::at () const"
.SH "int TQPtrList::at () const"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Returns the index of the current list item. The returned value is -1 if the current item is 0.
.PP
See also current().
.SH "bool QPtrCollection::autoDelete () const"
.SH "bool TQPtrCollection::autoDelete () const"
Returns the setting of the auto-delete option. The default is FALSE.
.PP
See also setAutoDelete().
.SH "void QPtrList::clear ()\fC [virtual]\fR"
.SH "void TQPtrList::clear ()\fC [virtual]\fR"
Removes all items from the list.
.PP
The removed items are deleted if auto-deletion is enabled.
@ -339,8 +339,8 @@ All list iterators that access this list will be reset.
@ -362,7 +362,7 @@ inSort() requires that compareItems() is implemented as described here.
This function should not modify the list because some const functions call compareItems().
.PP
The default implementation compares the pointers.
.SH "uint QPtrList::contains ( const type * item ) const"
.SH "uint TQPtrList::contains ( const type * item ) const"
Returns the number of occurrences of \fIitem\fR in the list.
.PP
The compareItems() function is called when looking for the \fIitem\fR in the list. If compareItems() is not reimplemented, it is more efficient to call containsRef().
@ -370,7 +370,7 @@ The compareItems() function is called when looking for the \fIitem\fR in the lis
This function does not affect the current list item.
.PP
See also containsRef() and compareItems().
.SH "uint QPtrList::containsRef ( const type * item ) const"
.SH "uint TQPtrList::containsRef ( const type * item ) const"
Returns the number of occurrences of \fIitem\fR in the list.
.PP
Calling this function is much faster than contains() because contains() compares \fIitem\fR with each list item using compareItems(), whereas his function only compares the pointers.
@ -378,7 +378,7 @@ Calling this function is much faster than contains() because contains() compares
This function does not affect the current list item.
.)l customlayout/border.cpp, customlayout/card.cpp, customlayout/flow.cpp, dirview/dirview.cpp, grapher/grapher.cpp, mdi/application.cpp, and qwerty/qwerty.cpp.
.PP
Reimplemented from QPtrCollection.
.SH "type * QPtrList::current () const"
Reimplemented from TQPtrCollection.
.SH "type * TQPtrList::current () const"
Returns a pointer to the current list item. The current item may be 0 (implies that the current index is -1).
.PP
See also at().
.SH "QLNode * QPtrList::currentNode () const"
.SH "QLNode * TQPtrList::currentNode () const"
Returns a pointer to the current list node.
.PP
The node can be kept and removed later using removeNode(). The advantage is that the item can be removed directly without searching the list.
@ -399,7 +399,7 @@ The node can be kept and removed later using removeNode(). The advantage is that
\fBWarning:\fR Do not call this function unless you are an expert.
.PP
See also removeNode(), takeNode(), and current().
.SH "int QPtrList::find ( const type * item )"
.SH "int TQPtrList::find ( const type * item )"
Finds the first occurrence of \fIitem\fR in the list.
.PP
If the item is found, the list sets the current item to point to the found item and returns the index of this item. If the item is not found, the list sets the current item to 0, the current index to -1, and returns -1.
@ -407,7 +407,7 @@ If the item is found, the list sets the current item to point to the found item
The compareItems() function is called when searching for the item in the list. If compareItems() is not reimplemented, it is more efficient to call findRef().
.PP
See also findNext(), findRef(), compareItems(), and current().
.SH "int QPtrList::findNext ( const type * item )"
.SH "int TQPtrList::findNext ( const type * item )"
Finds the next occurrence of \fIitem\fR in the list, starting from the current list item.
.PP
If the item is found, the list sets the current item to point to the found item and returns the index of this item. If the item is not found, the list sets the current item to 0, the current index to -1, and returns -1.
@ -415,7 +415,7 @@ If the item is found, the list sets the current item to point to the found item
The compareItems() function is called when searching for the item in the list. If compareItems() is not reimplemented, it is more efficient to call findNextRef().
.PP
See also find(), findNextRef(), compareItems(), and current().
.SH "int QPtrList::findNextRef ( const type * item )"
.SH "int TQPtrList::findNextRef ( const type * item )"
Finds the next occurrence of \fIitem\fR in the list, starting from the current list item.
.PP
If the item is found, the list sets the current item to point to the found item and returns the index of this item. If the item is not found, the list sets the current item to 0, the current index to -1, and returns -1.
@ -423,7 +423,7 @@ If the item is found, the list sets the current item to point to the found item
Calling this function is much faster than findNext() because findNext() compares \fIitem\fR with each list item using compareItems(), whereas this function only compares the pointers.
.PP
See also findRef(), findNext(), and current().
.SH "int QPtrList::findRef ( const type * item )"
.SH "int TQPtrList::findRef ( const type * item )"
Finds the first occurrence of \fIitem\fR in the list.
.PP
If the item is found, the list sets the current item to point to the found item and returns the index of this item. If the item is not found, the list sets the current item to 0, the current index to -1, and returns -1.
@ -431,26 +431,26 @@ If the item is found, the list sets the current item to point to the found item
Calling this function is much faster than find() because find() compares \fIitem\fR with each list item using compareItems(), whereas this function only compares the pointers.
.PP
See also findNextRef(), find(), and current().
.SH "type * QPtrList::first ()"
.SH "type * TQPtrList::first ()"
Returns a pointer to the first item in the list and makes this the current list item; returns 0 if the list is empty.
.PP
See also getFirst(), last(), next(), prev(), and current().
.PP
Examples:
.)l grapher/grapher.cpp, listviews/listviews.h, and showimg/showimg.cpp.
.SH "type * QPtrList::getFirst () const"
.SH "type * TQPtrList::getFirst () const"
Returns a pointer to the first item in the list, or 0 if the list is empty.
.PP
This function does not affect the current list item.
.PP
See also first() and getLast().
.SH "type * QPtrList::getLast () const"
.SH "type * TQPtrList::getLast () const"
Returns a pointer to the last item in the list, or 0 if the list is empty.
.PP
This function does not affect the current list item.
.PP
See also last() and getFirst().
.SH "void QPtrList::inSort ( const type * item )"
.SH "void TQPtrList::inSort ( const type * item )"
Inserts the \fIitem\fR at its sorted position in the list.
.PP
The sort order depends on the virtual compareItems() function. All items must be inserted with inSort() to maintain the sorting order.
@ -462,7 +462,7 @@ The inserted item becomes the current list item.
\fBWarning:\fR Using inSort() is slow. An alternative, especially if you have lots of items, is to simply append() or insert() them and then use sort(). inSort() takes up to O(n) compares. That means inserting n items in your list will need O(n^2) compares whereas sort() only needs O(n*log n) for the same task. So use inSort() only if you already have a presorted list and want to insert just a few additional items.
.PP
See also insert(), compareItems(), current(), and sort().
Inserts the \fIitem\fR at position \fIindex\fR in the list.
.PP
Returns TRUE if successful, i.e. if \fIindex\fR is in range; otherwise returns FALSE. The valid range is 0 to count() (inclusively). The item is appended if \fIindex\fR == count().
@ -472,15 +472,15 @@ The inserted item becomes the current list item.
\fIitem\fR must not be 0.
.PP
See also append(), current(), and replace().
.SH "bool QPtrList::isEmpty () const"
.SH "bool TQPtrList::isEmpty () const"
Returns TRUE if the list is empty; otherwise returns FALSE.
.PP
See also count().
.SH "type * QPtrList::last ()"
.SH "type * TQPtrList::last ()"
Returns a pointer to the last item in the list and makes this the current list item; returns 0 if the list is empty.
.PP
See also getLast(), first(), next(), prev(), and current().
.SH "type * QPtrList::next ()"
.SH "type * TQPtrList::next ()"
Returns a pointer to the item succeeding the current item. Returns 0 if the current item is 0 or equal to the last item.
.PP
Makes the succeeding item current. If the current item before this function call was the last item, the current item will be set to 0. If the current item was 0, this function does nothing.
@ -489,15 +489,15 @@ See also first(), last(), prev(), and current().
.PP
Examples:
.)l grapher/grapher.cpp, listviews/listviews.h, and showimg/showimg.cpp.
.SH "bool QPtrList::operator!= ( const QPtrList<type> & list ) const"
.SH "bool TQPtrList::operator!= ( const TQPtrList<type> & list ) const"
Compares this list with \fIlist\fR. Returns TRUE if the lists contain different data; otherwise returns FALSE.
.SH "QPtrList<type> & QPtrList::operator= ( const QPtrList<type> & list )"
.SH "TQPtrList<type> & TQPtrList::operator= ( const TQPtrList<type> & list )"
Assigns \fIlist\fR to this list and returns a reference to this list.
.PP
This list is first cleared and then each item in \fIlist\fR is appended to this list. Only the pointers are copied (shallow copy) unless newItem() has been reimplemented.
.SH "bool QPtrList::operator== ( const QPtrList<type> & list ) const"
.SH "bool TQPtrList::operator== ( const TQPtrList<type> & list ) const"
Compares this list with \fIlist\fR. Returns TRUE if the lists contain the same data; otherwise returns FALSE.
.SH "void QPtrList::prepend ( const type * item )"
.SH "void TQPtrList::prepend ( const type * item )"
Inserts the \fIitem\fR at the start of the list.
.PP
The inserted item becomes the current list item. This is equivalent to \fCinsert( 0, item )\fR.
@ -505,19 +505,19 @@ The inserted item becomes the current list item. This is equivalent to \fCinsert
\fIitem\fR must not be 0.
.PP
See also append(), insert(), and current().
.SH "type * QPtrList::prev ()"
.SH "type * TQPtrList::prev ()"
Returns a pointer to the item preceding the current item. Returns 0 if the current item is 0 or equal to the first item.
.PP
Makes the preceding item current. If the current item before this function call was the first item, the current item will be set to 0. If the current item was 0, this function does nothing.
Sets the collection to auto-delete its contents if \fIenable\fR is TRUE and to never delete them if \fIenable\fR is FALSE.
.PP
If auto-deleting is turned on, all the items in a collection are deleted when the collection itself is deleted. This is convenient if the collection has the only pointer to the items.
@ -636,13 +636,13 @@ See also autoDelete().
.PP
Examples:
.)l grapher/grapher.cpp, scribble/scribble.cpp, and table/bigtable/main.cpp.
.SH "void QPtrList::sort ()"
.SH "void TQPtrList::sort ()"
Sorts the list by the result of the virtual compareItems() function.
.PP
The heap sort algorithm is used for sorting. It sorts n items with O(n*log n) comparisons. This is the asymptotic optimal solution of the sorting problem.
.PP
See also inSort().
.SH "type * QPtrList::take ( uint index )"
.SH "type * TQPtrList::take ( uint index )"
Takes the item at position \fIindex\fR out of the list without deleting it (even if auto-deletion is enabled).
.PP
Returns a pointer to the item taken out of the list, or 0 if the index is out of range. The valid range is \fC0..(count() - 1)\fR inclusive.
@ -655,7 +655,7 @@ See also remove(), clear(), and current().
.PP
Examples:
.)l customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp.
.SH "type * QPtrList::take ()"
.SH "type * TQPtrList::take ()"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Takes the current item out of the list without deleting it (even if auto-deletion is enabled).
@ -667,7 +667,7 @@ The item after the removed item becomes the new current list item if the removed
All list iterators that refer to the taken item will be set to point to the new current item.
Takes the \fInode\fR out of the list without deleting its item (even if auto-deletion is enabled). Returns a pointer to the item taken out of the list.
.PP
This node must exist in the list, otherwise the program may crash.
@ -679,11 +679,11 @@ All list iterators that refer to the taken item will be set to point to the item
\fBWarning:\fR Do not call this function unless you are an expert.
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
@ -7,19 +7,19 @@
.ad l
.nh
.SH NAME
QPtrListIterator \- Iterator for QPtrList collections
TQPtrListIterator \- Iterator for TQPtrList collections
.SH SYNOPSIS
\fC#include <ntqptrlist.h>\fR
\fC#include <tqptrlist.h>\fR
.PP
Inherited by TQObjectListIterator and QStrListIterator.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBQPtrListIterator\fR ( const QPtrList<type> & list )"
.BI "\fBTQPtrListIterator\fR ( const TQPtrList<type> & list )"
.br
.ti -1c
.BI "\fB~QPtrListIterator\fR ()"
.BI "\fB~TQPtrListIterator\fR ()"
.br
.ti -1c
.BI "uint \fBcount\fR () const"
@ -64,19 +64,19 @@ Inherited by TQObjectListIterator and QStrListIterator.
.BI "type * \fBoperator-=\fR ( uint jump )"
.br
.ti -1c
.BI "QPtrListIterator<type> & \fBoperator=\fR ( const QPtrListIterator<type> & it )"
.BI "TQPtrListIterator<type> & \fBoperator=\fR ( const TQPtrListIterator<type> & it )"
.br
.in -1c
.SH DESCRIPTION
The QPtrListIterator class provides an iterator for QPtrList collections.
The TQPtrListIterator class provides an iterator for TQPtrList collections.
.PP
Define a template instance QPtrListIterator<X> to create a list iterator that operates on QPtrList<X> (list of X*).
Define a template instance TQPtrListIterator<X> to create a list iterator that operates on TQPtrList<X> (list of X*).
.PP
The following example is similar to the example in the QPtrList class documentation, but it uses QPtrListIterator. The class Employee is defined there.
The following example is similar to the example in the TQPtrList class documentation, but it uses TQPtrListIterator. The class Employee is defined there.
.PP
.nf
.br
QPtrList<Employee> list;
TQPtrList<Employee> list;
.br
.br
list.append( new Employee("John", "Doe", 50000) );
@ -86,7 +86,7 @@ The following example is similar to the example in the QPtrList class documentat
list.append( new Employee("Tom", "Jones", 60000) );
.br
.br
QPtrListIterator<Employee> it( list );
TQPtrListIterator<Employee> it( list );
.br
Employee *employee;
.br
@ -116,76 +116,76 @@ The output is
.br
.fi
.PP
Using a list iterator is a more robust way of traversing the list than using the QPtrList member functions first(), next(), current(), etc., as many iterators can traverse the same list independently.
Using a list iterator is a more robust way of traversing the list than using the TQPtrList member functions first(), next(), current(), etc., as many iterators can traverse the same list independently.
.PP
An iterator has its own current list item and can get the next and previous list items. It doesn't modify the list in any way.
.PP
When an item is removed from the list, all iterators that point to that item are updated to point to QPtrList::current() instead to avoid dangling references.
When an item is removed from the list, all iterators that point to that item are updated to point to TQPtrList::current() instead to avoid dangling references.
.PP
See also QPtrList, Collection Classes, and Non-GUI Classes.
See also TQPtrList, Collection Classes, and Non-GUI Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QPtrListIterator::QPtrListIterator ( const QPtrList<type> & list )"
.SH "TQPtrListIterator::TQPtrListIterator ( const TQPtrList<type> & list )"
Constructs an iterator for \fIlist\fR. The current iterator item is set to point on the first item in the \fIlist\fR.
.SH "QPtrListIterator::~QPtrListIterator ()"
.SH "TQPtrListIterator::~TQPtrListIterator ()"
Destroys the iterator.
.SH "bool QPtrListIterator::atFirst () const"
.SH "bool TQPtrListIterator::atFirst () const"
Returns TRUE if the current iterator item is the first list item; otherwise returns FALSE.
.PP
See also toFirst() and atLast().
.SH "bool QPtrListIterator::atLast () const"
.SH "bool TQPtrListIterator::atLast () const"
Returns TRUE if the current iterator item is the last list item; otherwise returns FALSE.
.PP
See also toLast() and atFirst().
.SH "uint QPtrListIterator::count () const"
.SH "uint TQPtrListIterator::count () const"
Returns the number of items in the list this iterator operates on.
.PP
See also isEmpty().
.PP
Example: customlayout/card.cpp.
.SH "type * QPtrListIterator::current () const"
.SH "type * TQPtrListIterator::current () const"
Returns a pointer to the current iterator item. If the iterator is positioned before the first item in the list or after the last item in the list, 0 is returned.
.PP
Examples:
.)l canvas/canvas.cpp, customlayout/card.cpp, and customlayout/flow.cpp.
.SH "bool QPtrListIterator::isEmpty () const"
.SH "bool TQPtrListIterator::isEmpty () const"
Returns TRUE if the list is empty; otherwise returns FALSE.
.PP
See also count().
.SH "QPtrListIterator::operator type * () const"
.SH "TQPtrListIterator::operator type * () const"
Cast operator. Returns a pointer to the current iterator item. Same as current().
.SH "type * QPtrListIterator::operator() ()"
.SH "type * TQPtrListIterator::operator() ()"
Makes the succeeding item current and returns the original current item.
.PP
If the current iterator item was the last item in the list or if it was 0, 0 is returned.
.SH "type * QPtrListIterator::operator* ()"
.SH "type * TQPtrListIterator::operator* ()"
Asterisk operator. Returns a pointer to the current iterator item. Same as current().
.SH "type * QPtrListIterator::operator++ ()"
.SH "type * TQPtrListIterator::operator++ ()"
Prefix ++ makes the succeeding item current and returns the new current item.
.PP
If the current iterator item was the last item in the list or if it was 0, 0 is returned.
Returns the item \fIjump\fR positions before the current item or 0 if it is beyond the first item. Makes this the current item.
.SH "QPtrListIterator<type> & QPtrListIterator::operator= ( const QPtrListIterator<type> & it )"
.SH "TQPtrListIterator<type> & TQPtrListIterator::operator= ( const TQPtrListIterator<type> & it )"
Assignment. Makes a copy of the iterator \fIit\fR and returns a reference to this iterator.
.SH "type * QPtrListIterator::toFirst ()"
.SH "type * TQPtrListIterator::toFirst ()"
Sets the current iterator item to point to the first list item and returns a pointer to the item. Sets the current item to 0 and returns 0 if the list is empty.
.PP
See also toLast() and atFirst().
.SH "type * QPtrListIterator::toLast ()"
.SH "type * TQPtrListIterator::toLast ()"
Sets the current iterator item to point to the last list item and returns a pointer to the item. Sets the current item to 0 and returns 0 if the list is empty.
The QPtrQueue class is a template class that provides a queue.
The TQPtrQueue class is a template class that provides a queue.
.PP
TQValueVector can be used as an STL-compatible alternative to this class.
.PP
A template instance QPtrQueue<X> is a queue that operates on pointers to X (X*).
A template instance TQPtrQueue<X> is a queue that operates on pointers to X (X*).
.PP
A queue is a first in, first out structure. Items are added to the tail of the queue with enqueue() and retrieved from the head with dequeue(). You can peek at the head item without dequeing it using head().
.PP
You can control the queue's deletion policy with setAutoDelete().
.PP
For compatibility with the QPtrCollection classes, current() and remove() are provided; both operate on the head().
For compatibility with the TQPtrCollection classes, current() and remove() are provided; both operate on the head().
.PP
See also QPtrList, QPtrStack, Collection Classes, and Non-GUI Classes.
See also TQPtrList, TQPtrStack, Collection Classes, and Non-GUI Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QPtrQueue::QPtrQueue ()"
.SH "TQPtrQueue::TQPtrQueue ()"
Creates an empty queue with autoDelete() set to FALSE.
Assigns \fIqueue\fR to this queue and returns a reference to this queue.
.PP
This queue is first cleared and then each item in \fIqueue\fR is enqueued to this queue. Only the pointers are copied.
.PP
\fBWarning:\fR The autoDelete() flag is not modified. If it it TRUE for both \fIqueue\fR and this queue, deleting the two lists will cause \fIdouble-deletion\fR of the items.
Sets the queue to auto-delete its contents if \fIenable\fR is TRUE and not to delete them if \fIenable\fR is FALSE.
.PP
If auto-deleting is turned on, all the items in a queue are deleted when the queue itself is deleted. This can be quite convenient if the queue has the only pointer to the items.
@ -153,7 +153,7 @@ If auto-deleting is turned on, all the items in a queue are deleted when the que
The default setting is FALSE, for safety. If you turn it on, be careful about copying the queue: you might find yourself with two queues deleting the same items.
The QPtrStack class is a template class that provides a stack.
The TQPtrStack class is a template class that provides a stack.
.PP
TQValueStack is an STL-compatible alternative to this class.
.PP
Define a template instance QPtrStack<X> to create a stack that operates on pointers to X, (X*).
Define a template instance TQPtrStack<X> to create a stack that operates on pointers to X, (X*).
.PP
A stack is a last in, first out (LIFO) structure. Items are added to the top of the stack with push() and retrieved from the top with pop(). Use top() to get a reference to the top element without changing the stack.
.PP
You can control the stack's deletion policy with setAutoDelete().
.PP
For compatibility with the QPtrCollection classes current() and remove() are provided; they both operate on the top().
For compatibility with the TQPtrCollection classes current() and remove() are provided; they both operate on the top().
.PP
See also QPtrList, QPtrQueue, and Non-GUI Classes.
See also TQPtrList, TQPtrQueue, and Non-GUI Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QPtrStack::QPtrStack ()"
.SH "TQPtrStack::TQPtrStack ()"
Creates an empty stack.
.SH "QPtrStack::QPtrStack ( const QPtrStack<type> & s )"
.SH "TQPtrStack::TQPtrStack ( const TQPtrStack<type> & s )"
Creates a stack by making a shallow copy of another stack \fIs\fR.
.SH "QPtrStack::~QPtrStack ()"
.SH "TQPtrStack::~TQPtrStack ()"
Destroys the stack. All items will be deleted if autoDelete() is TRUE.
.SH "bool QPtrStack::autoDelete () const"
The same as QPtrCollection::autoDelete().
.SH "bool TQPtrStack::autoDelete () const"
The same as TQPtrCollection::autoDelete().
.PP
See also setAutoDelete().
.SH "void QPtrStack::clear ()"
.SH "void TQPtrStack::clear ()"
Removes all items from the stack, deleting them if autoDelete() is TRUE.
.PP
See also remove().
.SH "uint QPtrStack::count () const"
.SH "uint TQPtrStack::count () const"
Returns the number of items in the stack.
.PP
See also isEmpty().
.SH "type * QPtrStack::current () const"
.SH "type * TQPtrStack::current () const"
Returns a pointer to the top item on the stack (most recently pushed). The stack is not changed. Returns 0 if the stack is empty.
.SH "bool QPtrStack::isEmpty () const"
.SH "bool TQPtrStack::isEmpty () const"
Returns TRUE if the stack contains no elements; otherwise returns FALSE.
.SH "QPtrStack::operator type * () const"
.SH "TQPtrStack::operator type * () const"
Returns a pointer to the top item on the stack (most recently pushed). The stack is not changed. Returns 0 if the stack is empty.
.SH "QPtrStack<type> & QPtrStack::operator= ( const QPtrStack<type> & s )"
.SH "TQPtrStack<type> & TQPtrStack::operator= ( const TQPtrStack<type> & s )"
Sets the contents of this stack by making a shallow copy of another stack \fIs\fR. Elements currently in this stack will be deleted if autoDelete() is TRUE.
.SH "type * QPtrStack::pop ()"
.SH "type * TQPtrStack::pop ()"
Removes the top item from the stack and returns it. The stack must not be empty.
.SH "void QPtrStack::push ( const type * d )"
.SH "void TQPtrStack::push ( const type * d )"
Adds an element \fId\fR to the top of the stack. Last in, first out.
The QPtrVector class is a template collection class that provides a vector (array).
The TQPtrVector class is a template collection class that provides a vector (array).
.PP
TQValueVector is an STL-compatible alternative to this class.
.PP
QPtrVector is implemented as a template class. Defines a template instance QPtrVector<X> to create a vector that contains pointers to X (X*).
TQPtrVector is implemented as a template class. Defines a template instance TQPtrVector<X> to create a vector that contains pointers to X (X*).
.PP
A vector is the same as an array. The main difference between QPtrVector and QMemArray is that QPtrVector stores pointers to the elements, whereas QMemArray stores the elements themselves (i.e. QMemArray is value-based and QPtrVector is pointer-based).
A vector is the same as an array. The main difference between TQPtrVector and QMemArray is that TQPtrVector stores pointers to the elements, whereas QMemArray stores the elements themselves (i.e. QMemArray is value-based and TQPtrVector is pointer-based).
.PP
Items are added to the vector using insert() or fill(). Items are removed with remove(). You can get a pointer to an item at a particular index position using at().
.PP
@ -129,29 +129,29 @@ Functions that compare items (find() and sort() for example) will do so using th
.PP
See also QMemArray and Non-GUI Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QPtrVector::QPtrVector ()"
.SH "TQPtrVector::TQPtrVector ()"
Constructs a null vector.
.PP
See also isNull().
.SH "QPtrVector::QPtrVector ( uint size )"
.SH "TQPtrVector::TQPtrVector ( uint size )"
Constructs an vector with room for \fIsize\fR items. Makes a null vector if \fIsize\fR == 0.
.PP
All \fIsize\fR positions in the vector are initialized to 0.
.PP
See also size(), resize(), and isNull().
.SH "QPtrVector::QPtrVector ( const QPtrVector<type> & v )"
.SH "TQPtrVector::TQPtrVector ( const TQPtrVector<type> & v )"
Constructs a copy of \fIv\fR. Only the pointers are copied (i.e. shallow copy).
.SH "QPtrVector::~QPtrVector ()"
.SH "TQPtrVector::~TQPtrVector ()"
Removes all items from the vector, and destroys the vector itself.
.PP
See also clear().
.SH "type * QPtrVector::at ( uint i ) const"
.SH "type * TQPtrVector::at ( uint i ) const"
Returns the item at position \fIi\fR, or 0 if there is no item at that position. \fIi\fR must be less than size().
.SH "bool QPtrCollection::autoDelete () const"
.SH "bool TQPtrCollection::autoDelete () const"
Returns the setting of the auto-delete option. The default is FALSE.
.PP
See also setAutoDelete().
.SH "int QPtrVector::bsearch ( const type * d ) const"
.SH "int TQPtrVector::bsearch ( const type * d ) const"
In a sorted array, finds the first occurrence of \fId\fR using a binary search. For a sorted array, this is generally much faster than find(), which performs a linear search.
.PP
Returns the position of \fId\fR, or -1 if \fId\fR could not be found. \fId\fR must not be 0.
@ -159,15 +159,15 @@ Returns the position of \fId\fR, or -1 if \fId\fR could not be found. \fId\fR mu
Compares items using the virtual function compareItems().
.PP
See also sort() and find().
.SH "void QPtrVector::clear ()\fC [virtual]\fR"
.SH "void TQPtrVector::clear ()\fC [virtual]\fR"
Removes all items from the vector, and destroys the vector itself.
Returns the number of items in the vector. The vector is empty if count() == 0.
.PP
See also isEmpty(), size(), and isNull().
.PP
Reimplemented from QPtrCollection.
.SH "type ** QPtrVector::data () const"
Reimplemented from TQPtrCollection.
.SH "type ** TQPtrVector::data () const"
Returns a pointer to the actual vector data, which is an array of type*.
.PP
The vector is a null vector if data() == 0 (null pointer).
.PP
See also isNull().
.SH "bool QPtrVector::fill ( const type * d, int size = -1 )"
.SH "bool TQPtrVector::fill ( const type * d, int size = -1 )"
Inserts item \fId\fR in all positions in the vector. Any existing items are removed. If \fId\fR is 0, the vector becomes empty.
.PP
If \fIsize\fR >= 0, the vector is first resized to \fIsize\fR. By default, \fIsize\fR is -1.
@ -219,7 +219,7 @@ If \fIsize\fR >= 0, the vector is first resized to \fIsize\fR. By default, \fIsi
Returns TRUE if successful, i.e. \fIsize\fR is the same as the current size, or \fIsize\fR is larger and the memory has successfully been allocated; otherwise returns FALSE.
.PP
See also resize(), insert(), and isEmpty().
.SH "int QPtrVector::find ( const type * d, uint i = 0 ) const"
.SH "int TQPtrVector::find ( const type * d, uint i = 0 ) const"
Finds the first occurrence of item \fId\fR in the vector using a linear search. The search starts at position \fIi\fR, which must be less than size(). \fIi\fR is by default 0; i.e. the search starts at the start of the vector.
.PP
Returns the position of \fId\fR, or -1 if \fId\fR could not be found.
@ -229,7 +229,7 @@ Compares items using the virtual function compareItems().
Use the much faster bsearch() to search a sorted vector.
.PP
See also findRef() and bsearch().
.SH "int QPtrVector::findRef ( const type * d, uint i = 0 ) const"
.SH "int TQPtrVector::findRef ( const type * d, uint i = 0 ) const"
Finds the first occurrence of the item pointer \fId\fR in the vector using a linear search. The search starts at position \fIi\fR, which must be less than size(). \fIi\fR is by default 0; i.e. the search starts at the start of the vector.
.PP
Returns the position of \fId\fR, or -1 if \fId\fR could not be found.
@ -239,47 +239,47 @@ This function does \fInot\fR use compareItems() to compare items.
Use the much faster bsearch() to search a sorted vector.
.PP
See also find() and bsearch().
.SH "bool QPtrVector::insert ( uint i, const type * d )"
.SH "bool TQPtrVector::insert ( uint i, const type * d )"
Sets position \fIi\fR in the vector to contain the item \fId\fR. \fIi\fR must be less than size(). Any previous element in position \fIi\fR is removed.
.PP
See also at().
.SH "bool QPtrVector::isEmpty () const"
.SH "bool TQPtrVector::isEmpty () const"
Returns TRUE if the vector is empty; otherwise returns FALSE.
.PP
See also count().
.SH "bool QPtrVector::isNull () const"
.SH "bool TQPtrVector::isNull () const"
Returns TRUE if the vector is null; otherwise returns FALSE.
.PP
A null vector has size() == 0 and data() == 0.
.PP
See also size().
.SH "QPtrVector<type> & QPtrVector::operator= ( const QPtrVector<type> & v )"
.SH "TQPtrVector<type> & TQPtrVector::operator= ( const TQPtrVector<type> & v )"
Assigns \fIv\fR to this vector and returns a reference to this vector.
.PP
This vector is first cleared and then all the items from \fIv\fR are copied into the vector. Only the pointers are copied (i.e. shallow copy).
.PP
See also clear().
.SH "bool QPtrVector::operator== ( const QPtrVector<type> & v ) const"
.SH "bool TQPtrVector::operator== ( const TQPtrVector<type> & v ) const"
Returns TRUE if this vector and \fIv\fR are equal; otherwise returns FALSE.
.SH "type * QPtrVector::operator[] ( int i ) const"
.SH "type * TQPtrVector::operator[] ( int i ) const"
Returns the item at position \fIi\fR, or 0 if there is no item at that position. \fIi\fR must be less than size().
Sets the collection to auto-delete its contents if \fIenable\fR is TRUE and to never delete them if \fIenable\fR is FALSE.
.PP
If auto-deleting is turned on, all the items in a collection are deleted when the collection itself is deleted. This is convenient if the collection has the only pointer to the items.
@ -300,25 +300,25 @@ See also autoDelete().
.PP
Examples:
.)l grapher/grapher.cpp, scribble/scribble.cpp, and table/bigtable/main.cpp.
.SH "uint QPtrVector::size () const"
.SH "uint TQPtrVector::size () const"
Returns the size of the vector, i.e. the number of vector positions. This is also the maximum number of items the vector can hold.
.PP
The vector is a null vector if size() == 0.
.PP
See also isNull(), resize(), and count().
.SH "void QPtrVector::sort ()"
.SH "void TQPtrVector::sort ()"
Sorts the items in ascending order. Any empty positions will be put last.
.PP
Compares items using the virtual function compareItems().
.PP
See also bsearch().
.SH "type * QPtrVector::take ( uint i )"
.SH "type * TQPtrVector::take ( uint i )"
Returns the item at position \fIi\fR in the vector, and removes that item from the vector. \fIi\fR must be less than size(). If there is no item at position \fIi\fR, 0 is returned.
.PP
Unlike remove(), this function does \fInot\fR call deleteItem() for the removed item.
The QStrIList class provides a doubly-linked list of char* with case-insensitive comparison.
.PP
This class is a QPtrList<char> instance (a list of char*).
This class is a TQPtrList<char> instance (a list of char*).
.PP
QStrIList is identical to QStrList except that the virtual compareItems() function is reimplemented to compare strings case-insensitively. The inSort() function inserts strings in a sorted order. In general it is fastest to insert the strings as they come and sort() at the end; inSort() is useful when you just have to add a few extra strings to an already sorted list.
.BI "void \fBconnectionStateChanged\fR ( int state, const TQString & data )"
@ -179,7 +179,7 @@ Clears the cache of children.
This signal is emitted whenever the URL operator's connection state changes. \fIstate\fR describes the new state, which is a QNetworkProtocol::ConnectionState value.
.PP
\fIdata\fR is a string that describes the change of the connection. This can be used to display a message to the user.
Copies the file \fIfrom\fR to \fIto\fR. If \fImove\fR is TRUE, the file is moved (copied and removed). \fIfrom\fR must point to a file and \fIto\fR must point to a directory (into which \fIfrom\fR is copied) unless \fItoPath\fR is set to FALSE. If \fItoPath\fR is set to FALSE then the \fIto\fR variable is assumed to be the absolute file path (destination file path + file name). The copying is done using the get() and put() operations. If you want to be notified about the progress of the operation, connect to the dataTransferProgress() signal. Bear in mind that the get() and put() operations emit this signal through the QUrlOperator. The number of transferred bytes and the total bytes that you receive as arguments in this signal do not relate to the the whole copy operation; they relate first to the get() and then to the put() operation. Always check what type of operation the signal comes from; this is given in the signal's last argument.
.PP
At the end, finished() (with success or failure) is emitted, so check the state of the network operation object to see whether or not the operation was successful.
@ -341,7 +341,7 @@ See also QDir::setNameFilter().
Some operations (such as listChildren()) emit this signal when they start processing the operation. \fIop\fR is a pointer to the operation object which contains all the information about the operation, including the state.
@ -230,9 +230,9 @@ The TQValueList class is a value-based template class that provides lists.
.PP
TQValueList is a TQt implementation of an STL-like list container. It can be used in your application if the standard \fClist\fR is not available for your target platform(s). TQValueList is part of the TQt Template Library.
.PP
TQValueList<T> defines a template instance to create a list of values that all have the class T. Note that TQValueList does not store pointers to the members of the list; it holds a copy of every member. This is why these kinds of classes are called "value based"; QPtrList and QDict are "pointer based".
TQValueList<T> defines a template instance to create a list of values that all have the class T. Note that TQValueList does not store pointers to the members of the list; it holds a copy of every member. This is why these kinds of classes are called "value based"; TQPtrList and QDict are "pointer based".
.PP
TQValueList contains and manages a collection of objects of type T and provides iterators that allow the contained objects to be addressed. TQValueList owns the contained items. For more relaxed ownership semantics, see QPtrCollection and friends which are pointer-based containers.
TQValueList contains and manages a collection of objects of type T and provides iterators that allow the contained objects to be addressed. TQValueList owns the contained items. For more relaxed ownership semantics, see TQPtrCollection and friends which are pointer-based containers.
.PP
Some classes cannot be used within a TQValueList, for example, all classes derived from TQObject and thus all classes that implement widgets. Only values can be used in a TQValueList. To qualify as a value the class must provide:
@ -41,7 +41,7 @@ The TQValueStack class is a value-based template class that provides a stack.
.PP
Define a template instance TQValueStack<X> to create a stack of values that all have the class X. TQValueStack is part of the TQt Template Library.
.PP
Note that TQValueStack does not store pointers to the members of the stack; it holds a copy of every member. That is why these kinds of classes are called "value based"; QPtrStack, QPtrList, QDict, etc., are "pointer based".
Note that TQValueStack does not store pointers to the members of the stack; it holds a copy of every member. That is why these kinds of classes are called "value based"; TQPtrStack, TQPtrList, QDict, etc., are "pointer based".
.PP
A stack is a last in, first out (LIFO) structure. Items are added to the top of the stack with push() and retrieved from the top with pop(). The top() function provides access to the topmost item without removing it.
.PP
@ -72,7 +72,7 @@ Example:
.br
.fi
.PP
TQValueStack is a specialized TQValueList provided for convenience. All of TQValueList's functionality also applies to QPtrStack, for example the facility to iterate over all elements using TQValueStack<T>::Iterator. See TQValueListIterator for further details.
TQValueStack is a specialized TQValueList provided for convenience. All of TQValueList's functionality also applies to TQPtrStack, for example the facility to iterate over all elements using TQValueStack<T>::Iterator. See TQValueListIterator for further details.
.PP
Some classes cannot be used within a TQValueStack, for example everything derived from TQObject and thus all classes that implement widgets. Only values can be used in a TQValueStack. To qualify as a value, the class must provide
@ -186,9 +186,9 @@ The TQValueVector class is a value-based template class that provides a dynamic
.PP
TQValueVector is a TQt implementation of an STL-like vector container. It can be used in your application if the standard \fCvector\fR is not available for your target platforms. TQValueVector is part of the TQt Template Library.
.PP
TQValueVector<T> defines a template instance to create a vector of values that all have the class T. TQValueVector does not store pointers to the members of the vector; it holds a copy of every member. TQValueVector is said to be value based; in contrast, QPtrList and QDict are pointer based.
TQValueVector<T> defines a template instance to create a vector of values that all have the class T. TQValueVector does not store pointers to the members of the vector; it holds a copy of every member. TQValueVector is said to be value based; in contrast, TQPtrList and QDict are pointer based.
.PP
TQValueVector contains and manages a collection of objects of type T and provides random access iterators that allow the contained objects to be addressed. TQValueVector owns the contained elements. For more relaxed ownership semantics, see QPtrCollection and friends, which are pointer-based containers.
TQValueVector contains and manages a collection of objects of type T and provides random access iterators that allow the contained objects to be addressed. TQValueVector owns the contained elements. For more relaxed ownership semantics, see TQPtrCollection and friends, which are pointer-based containers.
.PP
TQValueVector provides good performance if you append or remove elements from the end of the vector. If you insert or remove elements from anywhere but the end, performance is very bad. The reason for this is that elements must to be copied into new positions.
@ -152,9 +152,9 @@ See also activeWindow() and windowList().
.SH "TQWidgetList QWorkspace::windowList ( WindowOrder order ) const"
Returns a list of all windows. If \fIorder\fR is CreationOrder (the default) the windows are listed in the order in which they had been inserted into the workspace. If \fIorder\fR is StackingOrder the windows are listed in their stacking order, with the topmost window being the last window in the list.
Returns the list of top-level windows. This list will change as applications add and remove wigdets so it should not be stored for future use. The windows are sorted in stacking order from top-most to bottom-most.