<trbgcolor=#f0f0f0><td><b><ahref="ntqdatetimeedit.html">TQDateTimeEdit</a></b><td>Combines a TQDateEdit and TQTimeEdit widget into a single widget for editing datetimes
<trbgcolor=#f0f0f0><td><b><ahref="ntqdesktopwidget.html">TQDesktopWidget</a></b><td>Access to screen information on multi-head systems
<trbgcolor=#f0f0f0><td><b><ahref="ntqheader.html">TQHeader</a></b><td>Header row or column, e.g. for tables and listviews
<trbgcolor=#f0f0f0><td><b><ahref="qiconfactory.html">TQIconFactory</a></b><td>Used to create pixmaps for a TQIconSet
<trbgcolor=#f0f0f0><td><b><ahref="ntqiconview.html">TQIconView</a></b><td>Area with movable labelled icons
<trbgcolor=#f0f0f0><td><b><ahref="qiconviewitem.html">TQIconViewItem</a></b><td>Single item in a TQIconView
<trbgcolor=#f0f0f0><td><b><ahref="tqiconfactory.html">TQIconFactory</a></b><td>Used to create pixmaps for a TQIconSet
<trbgcolor=#f0f0f0><td><b><ahref="tqiconview.html">TQIconView</a></b><td>Area with movable labelled icons
<trbgcolor=#f0f0f0><td><b><ahref="tqiconviewitem.html">TQIconViewItem</a></b><td>Single item in a TQIconView
<trbgcolor=#f0f0f0><td><b><ahref="ntqlistbox.html">TQListBox</a></b><td>List of selectable, read-only items
<trbgcolor=#f0f0f0><td><b><ahref="qlistboxpixmap.html">TQListBoxPixmap</a></b><td>List box items with a pixmap and optional text
<trbgcolor=#f0f0f0><td><b><ahref="qlistboxtext.html">TQListBoxText</a></b><td>List box items that display text
<p>If the user wants to see if which colors are web colors we create a <ahref="qchecktableitem.html">TQCheckTableItem</a>, and check it if it is a web color. (We'll cover <tt>isWebColor()</tt> shortly.) We then insert this <ahref="qchecktableitem.html">TQCheckTableItem</a> into the "Web" column.</p>
<p>Having populated the table we call <tt>adjustColumn()</tt> to ensure that each column is just wide enough to show its widest entry, and show or hide the "Web" column depending on the user's preference.</p>
<p>Finally we set <tt>m_table_dirty</tt> to FALSE, since it is now up-to-date.</p>
<p>If the icon view is "dirty" we <tt>clear()</tt> it of any existing data. We then iterate over each color in our colors map. For each color we create a new <ahref="qiconviewitem.html">TQIconViewItem</a>; we label the item with the user's color name and provide a pixmap (generated by <tt>colorSwatch()</tt>, covered shortly) in the relevant color. Finally we set <tt>m_icons_dirty</tt> to "FALSE", since it is now up-to-date.</p>
<p>If the icon view is "dirty" we <tt>clear()</tt> it of any existing data. We then iterate over each color in our colors map. For each color we create a new <ahref="tqiconviewitem.html">TQIconViewItem</a>; we label the item with the user's color name and provide a pixmap (generated by <tt>colorSwatch()</tt>, covered shortly) in the relevant color. Finally we set <tt>m_icons_dirty</tt> to "FALSE", since it is now up-to-date.</p>
<h4><aname="6-10"></a>isWebColor()</h4>
<pre> bool MainForm::isWebColor( <ahref="ntqcolor.html">TQColor</a> color )
<p>We connected to this slot so that we'd know whenever the user moved or clicked in the table view. We call the <tt>changedColor()</tt> function (which we'll see in a moment) with the name of the current color. Note that we don't care about the column argument, so we could have left it out. Don't forget to name the changedTableColor parameter to "int row".</p>
<p>This slot is connected for the same purpose as <tt>changedTableColor()</tt>, above. It also calls <tt>changedColor()</tt> with the name of the current color. (If you're cutting and pasting the code don't forget to name the <ahref="qiconviewitem.html">TQIconViewItem</a> parameter "item".)</p>
<p>This slot is connected for the same purpose as <tt>changedTableColor()</tt>, above. It also calls <tt>changedColor()</tt> with the name of the current color. (If you're cutting and pasting the code don't forget to name the <ahref="tqiconviewitem.html">TQIconViewItem</a> parameter "item".)</p>
<h4><aname="6-18"></a>changedColor()</h4>
<p>This is a function that we need to write from scratch. Simply enter its code into <em>TQt Designer</em>'s code editor and it will automatically appear in Object Explorer's Members tab (under Functions, public).</p>
<p>By default any function that it typed directly into the code editor becomes a public function. To change this, right click the function's name in Object Explorer's Members list, and click <b>Properties</b> to invoke the <em>Edit Functions</em> dialog. This dialog can be used to change various attributes of the function, including changing it into a slot.</p>
<aname="x2821"></a> iv, TQ_SIGNAL(<ahref="ntqiconview.html#dropped">dropped</a>(TQDropEvent*, const <ahref="tqvaluelist.html">TQValueList</a><TQIconDragItem>&)),
<aname="x2821"></a> iv, TQ_SIGNAL(<ahref="tqiconview.html#dropped">dropped</a>(TQDropEvent*, const <ahref="tqvaluelist.html">TQValueList</a><TQIconDragItem>&)),
iv, TQ_SLOT(slotNewItem(TQDropEvent*, const <ahref="tqvaluelist.html">TQValueList</a><TQIconDragItem>&)));
// Populate the TQIconView with icons
DDIconViewItem *item;
item = new DDIconViewItem( iv, "Red", TQPixmap( red_icon ) );
<p>Inherits <ahref="tqobject.html">TQObject</a> and <ahref="qmimesource.html">TQMimeSource</a>.
<p>Inherited by <ahref="qstoreddrag.html">TQStoredDrag</a>, <ahref="tqtextdrag.html">TQTextDrag</a>, <ahref="tqimagedrag.html">TQImageDrag</a>, and <ahref="qicondrag.html">TQIconDrag</a>.
<p>Inherited by <ahref="qstoreddrag.html">TQStoredDrag</a>, <ahref="tqtextdrag.html">TQTextDrag</a>, <ahref="tqimagedrag.html">TQImageDrag</a>, and <ahref="tqicondrag.html">TQIconDrag</a>.
<p><ahref="qdragobject-members.html">List of all member functions.</a>
Returns the icon set for section <em>section</em>. If the section does
not exist, 0 is returned.
@ -465,7 +465,7 @@ unchanged.
<p> If the section does not exist, nothing happens.
<p>Examples: <ahref="tutorial2-08.html#x2605">chart/setdataform.cpp</a> and <ahref="small-table-example-example.html#x2798">table/small-table-demo/main.cpp</a>.
<p><p>See also <ahref="#setColumnText">setColumnText</a>(), <ahref="#setColumnWidth">setColumnWidth</a>(), and <ahref="#setColumnWidthMode">setColumnWidthMode</a>().
<p>Examples: <ahref="addressbook-example.html#x585">addressbook/centralwidget.cpp</a>, <ahref="checklists-example.html#x427">checklists/checklists.cpp</a>, <ahref="dirview-example.html#x1714">dirview/main.cpp</a>, <ahref="fileiconview-example.html#x886">fileiconview/mainwindow.cpp</a>, <ahref="listviews-example.html#x141">listviews/listviews.cpp</a>, and <ahref="qdir-example.html#x1827">qdir/qdir.cpp</a>.
@ -285,7 +285,7 @@ accelerator. (For translations use a string <a href="ntqkeysequence.html">key
<p> In the example above, pressing Ctrl+O or selecting "Open" from the
menu activates the myView->open() function.
<p> Some insert functions take a <ahref="ntqiconset.html">TQIconSet</a> parameter to specify the
<p> Some insert functions take a <ahref="tqiconset.html">TQIconSet</a> parameter to specify the
little menu item icon. Note that you can always pass a <ahref="ntqpixmap.html">TQPixmap</a>
object instead.
<p> The <em>id</em> specifies the identification number associated with the
@ -315,7 +315,7 @@ version.
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>(), <ahref="ntqmenudata.html#changeItem">changeItem</a>(), <ahref="ntqmenudata.html#setAccel">setAccel</a>(), <ahref="ntqmenudata.html#connectItem">connectItem</a>(), <ahref="ntqaccel.html">TQAccel</a>, and <ahref="qnamespace-h.html">ntqnamespace.h</a>.
<p>Examples: <ahref="addressbook-example.html#x569">addressbook/mainwindow.cpp</a>, <ahref="canvas-example.html#x2936">canvas/canvas.cpp</a>, <ahref="menu-example.html#x1869">menu/menu.cpp</a>, <ahref="qwerty-example.html#x371">qwerty/qwerty.cpp</a>, <ahref="scrollview-example.html#x634">scrollview/scrollview.cpp</a>, <ahref="showimg-example.html#x1327">showimg/showimg.cpp</a>, and <ahref="sound-example.html#x2810">sound/sound.cpp</a>.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, text <em>text</em>, accelerator
@ -337,7 +337,7 @@ should provide a mask (see <a href="ntqpixmap.html#mask">TQPixmap::mask</a>()).
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>(), <ahref="ntqmenudata.html#changeItem">changeItem</a>(), <ahref="ntqmenudata.html#setAccel">setAccel</a>(), and <ahref="ntqmenudata.html#connectItem">connectItem</a>().
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>(), <ahref="ntqmenudata.html#changeItem">changeItem</a>(), <ahref="ntqmenudata.html#setAccel">setAccel</a>(), and <ahref="ntqmenudata.html#connectItem">connectItem</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, text <em>text</em>, optional id
@ -377,7 +377,7 @@ the menu is deleted.
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>(), <ahref="ntqmenudata.html#changeItem">changeItem</a>(), <ahref="ntqmenudata.html#setAccel">setAccel</a>(), and <ahref="ntqmenudata.html#connectItem">connectItem</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, text <em>text</em>, submenu <em>popup</em>, optional id <em>id</em>, and optional <em>index</em> position. The icon
@ -398,7 +398,7 @@ should provide a mask (see <a href="ntqpixmap.html#mask">TQPixmap::mask</a>()).
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>(), <ahref="ntqmenudata.html#changeItem">changeItem</a>(), <ahref="ntqmenudata.html#setAccel">setAccel</a>(), and <ahref="ntqmenudata.html#connectItem">connectItem</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, pixmap <em>pixmap</em>, optional
@ -418,7 +418,7 @@ the menu is deleted.
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>(), <ahref="ntqmenudata.html#changeItem">changeItem</a>(), <ahref="ntqmenudata.html#setAccel">setAccel</a>(), and <ahref="ntqmenudata.html#connectItem">connectItem</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, pixmap <em>pixmap</em> submenu <em>popup</em>, optional id <em>id</em>, and optional <em>index</em> position. The icon
@ -463,7 +463,7 @@ safely by calling:
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>().
Returns the icon set that has been set for menu item <em>id</em>, or 0
if no icon set has been set.
@ -309,7 +309,7 @@ accelerator. (For translations use a string <a href="ntqkeysequence.html">key
<p> In the example above, pressing Ctrl+O or selecting "Open" from the
menu activates the myView->open() function.
<p> Some insert functions take a <ahref="ntqiconset.html">TQIconSet</a> parameter to specify the
<p> Some insert functions take a <ahref="tqiconset.html">TQIconSet</a> parameter to specify the
little menu item icon. Note that you can always pass a <ahref="ntqpixmap.html">TQPixmap</a>
object instead.
<p> The <em>id</em> specifies the identification number associated with the
@ -339,7 +339,7 @@ version.
<p><p>See also <ahref="#removeItem">removeItem</a>(), <ahref="#changeItem">changeItem</a>(), <ahref="#setAccel">setAccel</a>(), <ahref="#connectItem">connectItem</a>(), <ahref="ntqaccel.html">TQAccel</a>, and <ahref="qnamespace-h.html">ntqnamespace.h</a>.
<p>Examples: <ahref="addressbook-example.html#x569">addressbook/mainwindow.cpp</a>, <ahref="canvas-example.html#x2936">canvas/canvas.cpp</a>, <ahref="menu-example.html#x1869">menu/menu.cpp</a>, <ahref="qwerty-example.html#x371">qwerty/qwerty.cpp</a>, <ahref="scrollview-example.html#x634">scrollview/scrollview.cpp</a>, <ahref="showimg-example.html#x1327">showimg/showimg.cpp</a>, and <ahref="sound-example.html#x2810">sound/sound.cpp</a>.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, text <em>text</em>, accelerator
@ -361,7 +361,7 @@ should provide a mask (see <a href="ntqpixmap.html#mask">TQPixmap::mask</a>()).
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="#removeItem">removeItem</a>(), <ahref="#changeItem">changeItem</a>(), <ahref="#setAccel">setAccel</a>(), and <ahref="#connectItem">connectItem</a>().
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="#removeItem">removeItem</a>(), <ahref="#changeItem">changeItem</a>(), <ahref="#setAccel">setAccel</a>(), and <ahref="#connectItem">connectItem</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, text <em>text</em>, optional id
@ -401,7 +401,7 @@ the menu is deleted.
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="#removeItem">removeItem</a>(), <ahref="#changeItem">changeItem</a>(), <ahref="#setAccel">setAccel</a>(), and <ahref="#connectItem">connectItem</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, text <em>text</em>, submenu <em>popup</em>, optional id <em>id</em>, and optional <em>index</em> position. The icon
@ -422,7 +422,7 @@ should provide a mask (see <a href="ntqpixmap.html#mask">TQPixmap::mask</a>()).
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="#removeItem">removeItem</a>(), <ahref="#changeItem">changeItem</a>(), <ahref="#setAccel">setAccel</a>(), and <ahref="#connectItem">connectItem</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, pixmap <em>pixmap</em>, optional
@ -442,7 +442,7 @@ the menu is deleted.
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="#removeItem">removeItem</a>(), <ahref="#changeItem">changeItem</a>(), <ahref="#setAccel">setAccel</a>(), and <ahref="#connectItem">connectItem</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, pixmap <em>pixmap</em> submenu <em>popup</em>, optional id <em>id</em>, and optional <em>index</em> position. The icon
@ -487,7 +487,7 @@ safely by calling:
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="#removeItem">removeItem</a>().
Returns the icon set that has been set for menu item <em>id</em>, or 0
if no icon set has been set.
@ -411,7 +411,7 @@ accelerator. (For translations use a string <a href="ntqkeysequence.html">key
<p> In the example above, pressing Ctrl+O or selecting "Open" from the
menu activates the myView->open() function.
<p> Some insert functions take a <ahref="ntqiconset.html">TQIconSet</a> parameter to specify the
<p> Some insert functions take a <ahref="tqiconset.html">TQIconSet</a> parameter to specify the
little menu item icon. Note that you can always pass a <ahref="ntqpixmap.html">TQPixmap</a>
object instead.
<p> The <em>id</em> specifies the identification number associated with the
@ -441,7 +441,7 @@ version.
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>(), <ahref="ntqmenudata.html#changeItem">changeItem</a>(), <ahref="ntqmenudata.html#setAccel">setAccel</a>(), <ahref="ntqmenudata.html#connectItem">connectItem</a>(), <ahref="ntqaccel.html">TQAccel</a>, and <ahref="qnamespace-h.html">ntqnamespace.h</a>.
<p>Examples: <ahref="addressbook-example.html#x569">addressbook/mainwindow.cpp</a>, <ahref="canvas-example.html#x2936">canvas/canvas.cpp</a>, <ahref="menu-example.html#x1869">menu/menu.cpp</a>, <ahref="qwerty-example.html#x371">qwerty/qwerty.cpp</a>, <ahref="scrollview-example.html#x634">scrollview/scrollview.cpp</a>, <ahref="showimg-example.html#x1327">showimg/showimg.cpp</a>, and <ahref="sound-example.html#x2810">sound/sound.cpp</a>.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, text <em>text</em>, accelerator
@ -463,7 +463,7 @@ should provide a mask (see <a href="ntqpixmap.html#mask">TQPixmap::mask</a>()).
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>(), <ahref="ntqmenudata.html#changeItem">changeItem</a>(), <ahref="ntqmenudata.html#setAccel">setAccel</a>(), and <ahref="ntqmenudata.html#connectItem">connectItem</a>().
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>(), <ahref="ntqmenudata.html#changeItem">changeItem</a>(), <ahref="ntqmenudata.html#setAccel">setAccel</a>(), and <ahref="ntqmenudata.html#connectItem">connectItem</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, text <em>text</em>, optional id
@ -503,7 +503,7 @@ the menu is deleted.
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>(), <ahref="ntqmenudata.html#changeItem">changeItem</a>(), <ahref="ntqmenudata.html#setAccel">setAccel</a>(), and <ahref="ntqmenudata.html#connectItem">connectItem</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, text <em>text</em>, submenu <em>popup</em>, optional id <em>id</em>, and optional <em>index</em> position. The icon
@ -524,7 +524,7 @@ should provide a mask (see <a href="ntqpixmap.html#mask">TQPixmap::mask</a>()).
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>(), <ahref="ntqmenudata.html#changeItem">changeItem</a>(), <ahref="ntqmenudata.html#setAccel">setAccel</a>(), and <ahref="ntqmenudata.html#connectItem">connectItem</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, pixmap <em>pixmap</em>, optional
@ -544,7 +544,7 @@ the menu is deleted.
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>(), <ahref="ntqmenudata.html#changeItem">changeItem</a>(), <ahref="ntqmenudata.html#setAccel">setAccel</a>(), and <ahref="ntqmenudata.html#connectItem">connectItem</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts a menu item with icon <em>icon</em>, pixmap <em>pixmap</em> submenu <em>popup</em>, optional id <em>id</em>, and optional <em>index</em> position. The icon
@ -589,7 +589,7 @@ safely by calling:
<p> Returns the allocated <ahref="ntqmenudata.html#menu-identifier">menu identifier</a> number (<em>id</em> if <em>id</em> >= 0).
<p><p>See also <ahref="ntqmenudata.html#removeItem">removeItem</a>().
<p>Inherited by <ahref="tqcanvasview.html">TQCanvasView</a>, <ahref="ntqtable.html">TQTable</a>, <ahref="ntqgridview.html">TQGridView</a>, <ahref="ntqiconview.html">TQIconView</a>, <ahref="ntqlistbox.html">TQListBox</a>, <ahref="ntqlistview.html">TQListView</a>, and <ahref="tqtextedit.html">TQTextEdit</a>.
<p>Inherited by <ahref="tqcanvasview.html">TQCanvasView</a>, <ahref="ntqtable.html">TQTable</a>, <ahref="ntqgridview.html">TQGridView</a>, <ahref="tqiconview.html">TQIconView</a>, <ahref="ntqlistbox.html">TQListBox</a>, <ahref="ntqlistview.html">TQListView</a>, and <ahref="tqtextedit.html">TQTextEdit</a>.
<p><ahref="qscrollview-members.html">List of all member functions.</a>
</h3> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> This version of the function shows the <em>iconset</em> as well as the <em>label</em> on the tab of <em>child</em>.
@ -228,7 +228,7 @@ dialog.
so you should generally not need to connect it to any slot.
<p><p>See also <ahref="#applyButtonPressed">applyButtonPressed</a>(), <ahref="#defaultButtonPressed">defaultButtonPressed</a>(), and <ahref="#setCancelButton">setCancelButton</a>().
<p> Below we have three views seperated by <ahref="ntqsplitter.html">TQSplitter</a>s. At the
top-left there's a <ahref="ntqlistbox.html">TQListBox</a>, at the top-right there's a <ahref="ntqlistview.html">TQListView</a> with a <ahref="ntqheader.html">TQHeader</a> and two <ahref="ntqscrollbar.html">TQScrollBar</a>s. And at the
bottom there's a <ahref="ntqiconview.html">TQIconView</a>.
bottom there's a <ahref="tqiconview.html">TQIconView</a>.
respectively. Neither the arguments nor the resulting curve have changed.
<p><h2> Locale-aware String Comparisons in <ahref="ntqiconview.html">TQIconView</a>, <ahref="ntqlistbox.html">TQListBox</a>,
<p><h2> Locale-aware String Comparisons in <ahref="tqiconview.html">TQIconView</a>, <ahref="ntqlistbox.html">TQListBox</a>,
<ahref="ntqlistview.html">TQListView</a> and <ahref="ntqtable.html">TQTable</a>
</h2>
<aname="29"></a><p> In TQt 2.x, <ahref="tqstring.html">TQString</a> only provided string comparisons using the Unicode
@ -786,10 +786,10 @@ but it is not the appropriate order for most languages. For example,
French users expect 'é' (e acute) to be treated essentially as
'e' and not put after 'z'.
<p> In TQt 3.0, <ahref="tqstring.html#localeAwareCompare">TQString::localeAwareCompare</a>() implements locale aware
string comparisions on certain platforms. The classes <ahref="ntqiconview.html">TQIconView</a>, <ahref="ntqlistbox.html">TQListBox</a>, <ahref="ntqlistview.html">TQListView</a> and <ahref="ntqtable.html">TQTable</a> now use
string comparisions on certain platforms. The classes <ahref="tqiconview.html">TQIconView</a>, <ahref="ntqlistbox.html">TQListBox</a>, <ahref="ntqlistview.html">TQListView</a> and <ahref="ntqtable.html">TQTable</a> now use
TQString::localeAwareCompare() instead of <ahref="tqstring.html#compare">TQString::compare</a>(). If you
want to control the behaviour yourself you can always reimplement
@ -29,7 +29,7 @@ the <a href="ntqaction.html#whatsThis-prop">QAction::whatsThis</a> p
<p>This property holds the action's icon.
<p>The icon is used as the tool button icon and in the menu to the
left of the menu text. There is no default icon.
<p> If a null icon (<a href="ntqiconset.html#isNull">QIconSet::isNull</a>() is passed into this function,
<p> If a null icon (<a href="tqiconset.html#isNull">TQIconSet::isNull</a>() is passed into this function,
the icon of the action is cleared.
<p> (See the action/toggleaction/toggleaction.cpp example.)
<p>
@ -1618,175 +1618,175 @@ the end of resizing.
</doc>
</property>
<property>
<name>QIconView::arrangement</name>
<doc href="ntqiconview.html#arrangement-prop">
<name>TQIconView::arrangement</name>
<doc href="tqiconview.html#arrangement-prop">
<p>This property holds the arrangement mode of the icon view.
<p>This can be <a href="ntqiconview.html#Arrangement-enum">LeftToRight</a> or <a href="ntqiconview.html#Arrangement-enum">TopToBottom</a>. The default is <a href="ntqiconview.html#Arrangement-enum">LeftToRight</a>.
<p>This can be <a href="tqiconview.html#Arrangement-enum">LeftToRight</a> or <a href="tqiconview.html#Arrangement-enum">TopToBottom</a>. The default is <a href="tqiconview.html#Arrangement-enum">LeftToRight</a>.
<p>Set this property's value with <a href="ntqiconview.html#setArrangement">setArrangement</a>() and get this property's value with <a href="ntqiconview.html#arrangement">arrangement</a>().
<p>Set this property's value with <a href="tqiconview.html#setArrangement">setArrangement</a>() and get this property's value with <a href="tqiconview.html#arrangement">arrangement</a>().
</doc>
</property>
<property>
<name>QIconView::autoArrange</name>
<doc href="ntqiconview.html#autoArrange-prop">
<name>TQIconView::autoArrange</name>
<doc href="tqiconview.html#autoArrange-prop">
<p>This property holds whether the icon view rearranges its items when a new item is inserted.
<p>The default is TRUE.
<p> Note that if the icon view is not visible at the time of
insertion, QIconView defers all position-related work until it is
shown and then calls <a href="ntqiconview.html#arrangeItemsInGrid">arrangeItemsInGrid</a>().
insertion, TQIconView defers all position-related work until it is
shown and then calls <a href="tqiconview.html#arrangeItemsInGrid">arrangeItemsInGrid</a>().
<p>Set this property's value with <a href="ntqiconview.html#setAutoArrange">setAutoArrange</a>() and get this property's value with <a href="ntqiconview.html#autoArrange">autoArrange</a>().
<p>Set this property's value with <a href="tqiconview.html#setAutoArrange">setAutoArrange</a>() and get this property's value with <a href="tqiconview.html#autoArrange">autoArrange</a>().
</doc>
</property>
<property>
<name>QIconView::count</name>
<doc href="ntqiconview.html#count-prop">
<name>TQIconView::count</name>
<doc href="tqiconview.html#count-prop">
<p>This property holds the number of items in the icon view.
<p>
<p>Get this property's value with <a href="ntqiconview.html#count">count</a>().
<p>Get this property's value with <a href="tqiconview.html#count">count</a>().
</doc>
</property>
<property>
<name>QIconView::gridX</name>
<doc href="ntqiconview.html#gridX-prop">
<name>TQIconView::gridX</name>
<doc href="tqiconview.html#gridX-prop">
<p>This property holds the horizontal grid of the icon view.
<p>If the value is -1, (the default), QIconView computes suitable
<p>If the value is -1, (the default), TQIconView computes suitable
column widths based on the icon view's contents.
<p> Note that setting a grid width overrides <a href="ntqiconview.html#setMaxItemWidth">setMaxItemWidth</a>().
<p> Note that setting a grid width overrides <a href="tqiconview.html#setMaxItemWidth">setMaxItemWidth</a>().
<p>Set this property's value with <a href="ntqiconview.html#setGridX">setGridX</a>() and get this property's value with <a href="ntqiconview.html#gridX">gridX</a>().
<p>Set this property's value with <a href="tqiconview.html#setGridX">setGridX</a>() and get this property's value with <a href="tqiconview.html#gridX">gridX</a>().
</doc>
</property>
<property>
<name>QIconView::gridY</name>
<doc href="ntqiconview.html#gridY-prop">
<name>TQIconView::gridY</name>
<doc href="tqiconview.html#gridY-prop">
<p>This property holds the vertical grid of the icon view.
<p>If the value is -1, (the default), QIconView computes suitable
<p>If the value is -1, (the default), TQIconView computes suitable
column heights based on the icon view's contents.
<p>Set this property's value with <a href="ntqiconview.html#setGridY">setGridY</a>() and get this property's value with <a href="ntqiconview.html#gridY">gridY</a>().
<p>Set this property's value with <a href="tqiconview.html#setGridY">setGridY</a>() and get this property's value with <a href="tqiconview.html#gridY">gridY</a>().
<p>This property holds the brush to use when drawing the background of an item's text.
<p>By default this brush is set to NoBrush, meaning that only the
normal icon view background is used.
<p>Set this property's value with <a href="ntqiconview.html#setItemTextBackground">setItemTextBackground</a>() and get this property's value with <a href="ntqiconview.html#itemTextBackground">itemTextBackground</a>().
<p>Set this property's value with <a href="tqiconview.html#setItemTextBackground">setItemTextBackground</a>() and get this property's value with <a href="tqiconview.html#itemTextBackground">itemTextBackground</a>().
</doc>
</property>
<property>
<name>QIconView::itemTextPos</name>
<doc href="ntqiconview.html#itemTextPos-prop">
<name>TQIconView::itemTextPos</name>
<doc href="tqiconview.html#itemTextPos-prop">
<p>This property holds the position where the text of each item is drawn.
<p>Valid values are <a href="ntqiconview.html#ItemTextPos-enum">Bottom</a> or <a href="ntqiconview.html#ItemTextPos-enum">Right</a>. The default is <a href="ntqiconview.html#ItemTextPos-enum">Bottom</a>.
<p>Valid values are <a href="tqiconview.html#ItemTextPos-enum">Bottom</a> or <a href="tqiconview.html#ItemTextPos-enum">Right</a>. The default is <a href="tqiconview.html#ItemTextPos-enum">Bottom</a>.
<p>Set this property's value with <a href="ntqiconview.html#setItemTextPos">setItemTextPos</a>() and get this property's value with <a href="ntqiconview.html#itemTextPos">itemTextPos</a>().
<p>Set this property's value with <a href="tqiconview.html#setItemTextPos">setItemTextPos</a>() and get this property's value with <a href="tqiconview.html#itemTextPos">itemTextPos</a>().
</doc>
</property>
<property>
<name>QIconView::itemsMovable</name>
<doc href="ntqiconview.html#itemsMovable-prop">
<name>TQIconView::itemsMovable</name>
<doc href="tqiconview.html#itemsMovable-prop">
<p>This property holds whether the user is allowed to move items around in the icon view.
<p>The default is TRUE.
<p>Set this property's value with <a href="ntqiconview.html#setItemsMovable">setItemsMovable</a>() and get this property's value with <a href="ntqiconview.html#itemsMovable">itemsMovable</a>().
<p>Set this property's value with <a href="tqiconview.html#setItemsMovable">setItemsMovable</a>() and get this property's value with <a href="tqiconview.html#itemsMovable">itemsMovable</a>().
<p>This property holds the maximum length (in characters) that an item's text may have.
<p>The default is 255 characters.
<p>Set this property's value with <a href="ntqiconview.html#setMaxItemTextLength">setMaxItemTextLength</a>() and get this property's value with <a href="ntqiconview.html#maxItemTextLength">maxItemTextLength</a>().
<p>Set this property's value with <a href="tqiconview.html#setMaxItemTextLength">setMaxItemTextLength</a>() and get this property's value with <a href="tqiconview.html#maxItemTextLength">maxItemTextLength</a>().
</doc>
</property>
<property>
<name>QIconView::maxItemWidth</name>
<doc href="ntqiconview.html#maxItemWidth-prop">
<name>TQIconView::maxItemWidth</name>
<doc href="tqiconview.html#maxItemWidth-prop">
<p>This property holds the maximum width that an item may have.
<p>The default is 100 pixels.
<p> Note that if the <a href="ntqiconview.html#gridX">gridX</a>() value is set QIconView will ignore
<p> Note that if the <a href="tqiconview.html#gridX">gridX</a>() value is set TQIconView will ignore
this property.
<p>Set this property's value with <a href="ntqiconview.html#setMaxItemWidth">setMaxItemWidth</a>() and get this property's value with <a href="ntqiconview.html#maxItemWidth">maxItemWidth</a>().
<p>Set this property's value with <a href="tqiconview.html#setMaxItemWidth">setMaxItemWidth</a>() and get this property's value with <a href="tqiconview.html#maxItemWidth">maxItemWidth</a>().
</doc>
</property>
<property>
<name>QIconView::resizeMode</name>
<doc href="ntqiconview.html#resizeMode-prop">
<name>TQIconView::resizeMode</name>
<doc href="tqiconview.html#resizeMode-prop">
<p>This property holds the resize mode of the icon view.
<p>This can be <a href="ntqiconview.html#ResizeMode-enum">Fixed</a> or <a href="ntqiconview.html#ResizeMode-enum">Adjust</a>. The default is <a href="ntqiconview.html#ResizeMode-enum">Fixed</a>.
See <a href="ntqiconview.html#ResizeMode-enum">ResizeMode</a>.
<p>This can be <a href="tqiconview.html#ResizeMode-enum">Fixed</a> or <a href="tqiconview.html#ResizeMode-enum">Adjust</a>. The default is <a href="tqiconview.html#ResizeMode-enum">Fixed</a>.
See <a href="tqiconview.html#ResizeMode-enum">ResizeMode</a>.
<p>Set this property's value with <a href="ntqiconview.html#setResizeMode">setResizeMode</a>() and get this property's value with <a href="ntqiconview.html#resizeMode">resizeMode</a>().
<p>Set this property's value with <a href="tqiconview.html#setResizeMode">setResizeMode</a>() and get this property's value with <a href="tqiconview.html#resizeMode">resizeMode</a>().
</doc>
</property>
<property>
<name>QIconView::selectionMode</name>
<doc href="ntqiconview.html#selectionMode-prop">
<name>TQIconView::selectionMode</name>
<doc href="tqiconview.html#selectionMode-prop">
<p>This property holds the selection mode of the icon view.
<p>This can be <a href="ntqiconview.html#SelectionMode-enum">Single</a> (the default), <a href="ntqiconview.html#SelectionMode-enum">Extended</a>, <a href="ntqiconview.html#SelectionMode-enum">Multi</a> or <a href="ntqiconview.html#SelectionMode-enum">NoSelection</a>.
<p>This can be <a href="tqiconview.html#SelectionMode-enum">Single</a> (the default), <a href="tqiconview.html#SelectionMode-enum">Extended</a>, <a href="tqiconview.html#SelectionMode-enum">Multi</a> or <a href="tqiconview.html#SelectionMode-enum">NoSelection</a>.
<p>Set this property's value with <a href="ntqiconview.html#setSelectionMode">setSelectionMode</a>() and get this property's value with <a href="ntqiconview.html#selectionMode">selectionMode</a>().
<p>Set this property's value with <a href="tqiconview.html#setSelectionMode">setSelectionMode</a>() and get this property's value with <a href="tqiconview.html#selectionMode">selectionMode</a>().
</doc>
</property>
<property>
<name>QIconView::showToolTips</name>
<doc href="ntqiconview.html#showToolTips-prop">
<name>TQIconView::showToolTips</name>
<doc href="tqiconview.html#showToolTips-prop">
<p>This property holds whether the icon view will display a tool tip with the complete text for any truncated item text.
<p>The default is TRUE. Note that this has no effect if
<a href="ntqiconview.html#setWordWrapIconText">setWordWrapIconText</a>() is TRUE, as it is by default.
<a href="tqiconview.html#setWordWrapIconText">setWordWrapIconText</a>() is TRUE, as it is by default.
<p>Set this property's value with <a href="ntqiconview.html#setShowToolTips">setShowToolTips</a>() and get this property's value with <a href="ntqiconview.html#showToolTips">showToolTips</a>().
<p>Set this property's value with <a href="tqiconview.html#setShowToolTips">setShowToolTips</a>() and get this property's value with <a href="tqiconview.html#showToolTips">showToolTips</a>().
</doc>
</property>
<property>
<name>QIconView::sortDirection</name>
<doc href="ntqiconview.html#sortDirection-prop">
<name>TQIconView::sortDirection</name>
<doc href="tqiconview.html#sortDirection-prop">
<p>This property holds whether the sort direction for inserting new items is ascending;.
<p>The default is TRUE (i.e. ascending). This sort direction is only
meaningful if both <a href="ntqiconview.html#sorting">sorting</a>() and <a href="ntqiconview.html#autoArrange">autoArrange</a>() are TRUE.
<p> To set the sort direction, use <a href="ntqiconview.html#setSorting">setSorting</a>()
meaningful if both <a href="tqiconview.html#sorting">sorting</a>() and <a href="tqiconview.html#autoArrange">autoArrange</a>() are TRUE.
<p> To set the sort direction, use <a href="tqiconview.html#setSorting">setSorting</a>()
<p>Get this property's value with <a href="ntqiconview.html#sortDirection">sortDirection</a>().
<p>Get this property's value with <a href="tqiconview.html#sortDirection">sortDirection</a>().
</doc>
</property>
<property>
<name>QIconView::sorting</name>
<doc href="ntqiconview.html#sorting-prop">
<name>TQIconView::sorting</name>
<doc href="tqiconview.html#sorting-prop">
<p>This property holds whether the icon view sorts on insertion.
<p>The default is FALSE, i.e. no sorting on insertion.
<p> To set the sorting, use <a href="ntqiconview.html#setSorting">setSorting</a>().
<p> To set the sorting, use <a href="tqiconview.html#setSorting">setSorting</a>().
<p>Get this property's value with <a href="ntqiconview.html#sorting">sorting</a>().
<p>Get this property's value with <a href="tqiconview.html#sorting">sorting</a>().
</doc>
</property>
<property>
<name>QIconView::spacing</name>
<doc href="ntqiconview.html#spacing-prop">
<name>TQIconView::spacing</name>
<doc href="tqiconview.html#spacing-prop">
<p>This property holds the space in pixels between icon view items.
<p>The default is 5 pixels.
<p> Negative values for spacing are illegal.
<p>Set this property's value with <a href="ntqiconview.html#setSpacing">setSpacing</a>() and get this property's value with <a href="ntqiconview.html#spacing">spacing</a>().
<p>Set this property's value with <a href="tqiconview.html#setSpacing">setSpacing</a>() and get this property's value with <a href="tqiconview.html#spacing">spacing</a>().
<p>This property holds whether the item text will be word-wrapped if it is too long.
<p>The default is TRUE.
<p> If this property is FALSE, icon text that is too long is
truncated, and an ellipsis (...) appended to indicate that
truncation has occurred. The full text can still be seen by the
user if they hover the mouse because the full text is shown in a
tooltip; see <a href="ntqiconview.html#setShowToolTips">setShowToolTips</a>().
tooltip; see <a href="tqiconview.html#setShowToolTips">setShowToolTips</a>().
<p>Set this property's value with <a href="ntqiconview.html#setWordWrapIconText">setWordWrapIconText</a>() and get this property's value with <a href="ntqiconview.html#wordWrapIconText">wordWrapIconText</a>().
<p>Set this property's value with <a href="tqiconview.html#setWordWrapIconText">setWordWrapIconText</a>() and get this property's value with <a href="tqiconview.html#wordWrapIconText">wordWrapIconText</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 TQIconViewItem</h1>
<p>This is the complete list of member functions for
<ahref="qiconviewitem.html">TQIconViewItem</a>, including inherited members.
@ -75,7 +75,7 @@ Provided to ensure that subclasses destroy themselves correctly.
format.
<p> Subclasses must reimplement this function.
<p>Reimplemented in <ahref="qstoreddrag.html#encodedData">TQStoredDrag</a>, <ahref="qdropevent.html#encodedData">TQDropEvent</a>, and <ahref="qicondrag.html#encodedData">TQIconDrag</a>.
<p>Reimplemented in <ahref="qstoreddrag.html#encodedData">TQStoredDrag</a>, <ahref="qdropevent.html#encodedData">TQDropEvent</a>, and <ahref="tqicondrag.html#encodedData">TQIconDrag</a>.
<aname="x2821"></a> iv, TQ_SIGNAL(<ahref="ntqiconview.html#dropped">dropped</a>(TQDropEvent*, const <ahref="tqvaluelist.html">TQValueList</a><TQIconDragItem>&)),
<aname="x2821"></a> iv, TQ_SIGNAL(<ahref="tqiconview.html#dropped">dropped</a>(TQDropEvent*, const <ahref="tqvaluelist.html">TQValueList</a><TQIconDragItem>&)),
iv, TQ_SLOT(slotNewItem(TQDropEvent*, const <ahref="tqvaluelist.html">TQValueList</a><TQIconDragItem>&)));
// Populate the TQIconView with icons
DDIconViewItem *item;
item = new DDIconViewItem( iv, "Red", TQPixmap( red_icon ) );
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>Complete Member List for TQIconDrag</h1>
<p>This is the complete list of member functions for
<ahref="qicondrag.html">TQIconDrag</a>, including inherited members.
<ahref="tqicondrag.html">TQIconDrag</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 TQIconDragEvent</h1>
<p>This is the complete list of member functions for
<ahref="qicondragevent.html">TQIconDragEvent</a>, including inherited members.
<ahref="tqicondragevent.html">TQIconDragEvent</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 TQIconDragItem</h1>
<p>This is the complete list of member functions for
<ahref="qicondragitem.html">TQIconDragItem</a>, including inherited members.
<ahref="tqicondragitem.html">TQIconDragItem</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 TQIconFactory</h1>
<p>This is the complete list of member functions for
<ahref="qiconfactory.html">TQIconFactory</a>, including inherited members.
<ahref="tqiconfactory.html">TQIconFactory</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 TQIconSet</h1>
<p>This is the complete list of member functions for
<ahref="ntqiconset.html">TQIconSet</a>, including inherited members.
<ahref="tqiconset.html">TQIconSet</a>, including inherited members.
Sets this icon set to provide pixmap <em>pixmap</em> for size <em>size</em>, mode <em>mode</em> and state <em>state</em>. The icon set may also use <em>pixmap</em> for
generating other pixmaps if they are not explicitly set.
@ -310,7 +310,7 @@ size of a generated icon.
<p> This function does nothing if <em>pixmap</em> is a null pixmap.
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>Complete Member List for TQIconView</h1>
<p>This is the complete list of member functions for
<ahref="ntqiconview.html">TQIconView</a>, including inherited members.
<ahref="tqiconview.html">TQIconView</a>, including inherited members.
@ -304,28 +304,28 @@ which demonstrates drag and drop between a TQIconView and a
<ahref="ntqlistbox.html">TQListBox</a>.
<p> If you want to use extended drag-and-drop or have drag shapes drawn
you must take a more sophisticated approach.
<p> The first part is starting drags -- you should use a <ahref="qicondrag.html">TQIconDrag</a> (or a
<p> The first part is starting drags -- you should use a <ahref="tqicondrag.html">TQIconDrag</a> (or a
class derived from it) for the drag object. In <ahref="#dragObject">dragObject</a>() create the
drag object, populate it with TQIconDragItems and return it. Normally
such a drag should offer each selected item's data. So in dragObject()
you should iterate over all the items, and create a <ahref="qicondragitem.html">TQIconDragItem</a> for
each selected item, and append these items with <ahref="qicondrag.html#append">TQIconDrag::append</a>() to
the TQIconDrag object. You can use <ahref="qicondragitem.html#setData">TQIconDragItem::setData</a>() to set the
you should iterate over all the items, and create a <ahref="tqicondragitem.html">TQIconDragItem</a> for
each selected item, and append these items with <ahref="tqicondrag.html#append">TQIconDrag::append</a>() to
the TQIconDrag object. You can use <ahref="tqicondragitem.html#setData">TQIconDragItem::setData</a>() to set the
data of each item that should be dragged. If you want to offer the
data in additional mime-types, it's best to use a class derived from
TQIconDrag, which implements additional encoding and decoding
functions.
<p> When a drag enters the icon view, there is little to do. Simply
connect to the <ahref="#dropped">dropped</a>() signal and reimplement
<ahref="qiconviewitem.html#acceptDrop">TQIconViewItem::acceptDrop</a>() and <ahref="qiconviewitem.html#dropped">TQIconViewItem::dropped</a>(). If you've
used a <ahref="qicondrag.html">TQIconDrag</a> (or a subclass of it) the second argument to the
<ahref="tqiconviewitem.html#acceptDrop">TQIconViewItem::acceptDrop</a>() and <ahref="tqiconviewitem.html#dropped">TQIconViewItem::dropped</a>(). If you've
used a <ahref="tqicondrag.html">TQIconDrag</a> (or a subclass of it) the second argument to the
dropped signal contains a <ahref="tqvaluelist.html">TQValueList</a> of TQIconDragItems -- you can
access their data by calling <ahref="qicondragitem.html#data">TQIconDragItem::data</a>() on each one.
access their data by calling <ahref="tqicondragitem.html#data">TQIconDragItem::data</a>() on each one.
<p> For an example implementation of complex drag-and-drop look at the
fileiconview example (qt/examples/fileiconview).
<p><p>See also <ahref="qiconviewitem.html#setDragEnabled">TQIconViewItem::setDragEnabled</a>(), <ahref="qiconviewitem.html#setDropEnabled">TQIconViewItem::setDropEnabled</a>(), <ahref="qiconviewitem.html#acceptDrop">TQIconViewItem::acceptDrop</a>(), <ahref="qiconviewitem.html#dropped">TQIconViewItem::dropped</a>(), and <ahref="advanced.html">Advanced Widgets</a>.
<p><p>See also <ahref="tqiconviewitem.html#setDragEnabled">TQIconViewItem::setDragEnabled</a>(), <ahref="tqiconviewitem.html#setDropEnabled">TQIconViewItem::setDropEnabled</a>(), <ahref="tqiconviewitem.html#acceptDrop">TQIconViewItem::acceptDrop</a>(), <ahref="tqiconviewitem.html#dropped">TQIconViewItem::dropped</a>(), and <ahref="advanced.html">Advanced Widgets</a>.
<p> This signal is emitted when the user clicks any mouse button. If
@ -437,7 +437,7 @@ Unselects all the items.
the mouse cursor isn't on any item.
<p><p>See also <ahref="#mouseButtonClicked">mouseButtonClicked</a>(), <ahref="#rightButtonClicked">rightButtonClicked</a>(), and <ahref="#pressed">pressed</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> This signal is emitted when the user clicks any mouse button on an
@ -448,7 +448,7 @@ system (<a href="qmouseevent.html#globalPos">TQMouseEvent::globalPos</a>()). (If
differ by a pixel or two, <em>pos</em> is the position at release time.)
<p><p>See also <ahref="#mouseButtonClicked">mouseButtonClicked</a>(), <ahref="#rightButtonClicked">rightButtonClicked</a>(), and <ahref="#pressed">pressed</a>().
<p> This signal is emitted when the user double-clicks on <em>item</em>.
@ -490,7 +490,7 @@ Returns the <a href="ntqdragobject.html">TQDragObject</a> that should be used fo
This function is called by the icon view when starting a drag to
get the dragobject that should be used for the drag. Subclasses
may reimplement this.
<p><p>See also <ahref="qicondrag.html">TQIconDrag</a>.
<p><p>See also <ahref="tqicondrag.html">TQIconDrag</a>.
<p>Examples: <ahref="fileiconview-example.html#x834">fileiconview/qfileiconview.cpp</a> and <ahref="simple_dd-example.html#x2820">iconview/simple_dd/main.cpp</a>.
Inserts the <ahref="qiconviewitem.html">TQIconViewItem</a><em>item</em> in the icon view's grid. <em>You should never need to call this function.</em> Instead, insert
Inserts the <ahref="tqiconviewitem.html">TQIconViewItem</a><em>item</em> in the icon view's grid. <em>You should never need to call this function.</em> Instead, insert
TQIconViewItems by creating them with a pointer to the TQIconView
<p> This signal is emitted when <em>item</em> has been renamed to <em>name</em>,
usually by in-place renaming.
<p><p>See also <ahref="qiconviewitem.html#setRenameEnabled">TQIconViewItem::setRenameEnabled</a>() and <ahref="qiconviewitem.html#rename">TQIconViewItem::rename</a>().
<p><p>See also <ahref="tqiconviewitem.html#setRenameEnabled">TQIconViewItem::setRenameEnabled</a>() and <ahref="tqiconviewitem.html#rename">TQIconViewItem::rename</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> This signal is emitted when <em>item</em> has been renamed, usually by
in-place renaming.
<p><p>See also <ahref="qiconviewitem.html#setRenameEnabled">TQIconViewItem::setRenameEnabled</a>() and <ahref="qiconviewitem.html#rename">TQIconViewItem::rename</a>().
<p><p>See also <ahref="tqiconviewitem.html#setRenameEnabled">TQIconViewItem::setRenameEnabled</a>() and <ahref="tqiconviewitem.html#rename">TQIconViewItem::rename</a>().
<p> This signal is emitted when the user clicks mouse button <em>button</em>. If <em>item</em> is non-null, the cursor is on <em>item</em>. If <em>item</em> is null, the mouse cursor isn't on any item.
@ -661,7 +661,7 @@ press and release differ by a pixel or two, <em>pos</em> is the
position at release time.)
<p><p>See also <ahref="#mouseButtonPressed">mouseButtonPressed</a>(), <ahref="#rightButtonClicked">rightButtonClicked</a>(), and <ahref="#clicked">clicked</a>().
<p> This signal is emitted when the user presses mouse button <em>button</em>. If <em>item</em> is non-null, the cursor is on <em>item</em>. If <em>item</em> is null, the mouse cursor isn't on any item.
@ -677,7 +677,7 @@ items of the icon view. If the items should be removed, it's best
<p> This signal is emitted when the user presses any mouse button. If
@ -698,7 +698,7 @@ an item to an empty part of the icon view.
the mouse cursor isn't on any item.
<p><p>See also <ahref="#mouseButtonPressed">mouseButtonPressed</a>(), <ahref="#rightButtonPressed">rightButtonPressed</a>(), and <ahref="#clicked">clicked</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> This signal is emitted when the user presses any mouse button. If
@ -710,7 +710,7 @@ press and release differ by a pixel or two, <em>pos</em> is the
position at release time.)
<p><p>See also <ahref="#mouseButtonPressed">mouseButtonPressed</a>(), <ahref="#rightButtonPressed">rightButtonPressed</a>(), and <ahref="#clicked">clicked</a>().
<p> This signal is emitted when the user clicks the right mouse
@ -738,7 +738,7 @@ press and release differ by a pixel or two, <em>pos</em> is the
position at release time.)
<p><p>See also <ahref="#rightButtonPressed">rightButtonPressed</a>(), <ahref="#mouseButtonClicked">mouseButtonClicked</a>(), and <ahref="#clicked">clicked</a>().
If <em>sort</em> is TRUE, this function sets the icon view to sort items
@ -834,20 +834,20 @@ will not be sorted.
<p> If <em>ascending</em> is TRUE (the default), items are sorted in
ascending order. If <em>ascending</em> is FALSE, items are sorted in
descending order.
<p><ahref="qiconviewitem.html#compare">TQIconViewItem::compare</a>() is used to compare pairs of items. The
<p><ahref="tqiconviewitem.html#compare">TQIconViewItem::compare</a>() is used to compare pairs of items. The
sorting is based on the items' keys; these default to the items'
text unless specifically set to something else.
<p><p>See also <ahref="#autoArrange-prop">TQIconView::autoArrange</a>, <ahref="#autoArrange-prop">TQIconView::autoArrange</a>, <ahref="#sortDirection-prop">sortDirection</a>, <ahref="#sort">sort</a>(), and <ahref="qiconviewitem.html#setKey">TQIconViewItem::setKey</a>().
<p><p>See also <ahref="#autoArrange-prop">TQIconView::autoArrange</a>, <ahref="#autoArrange-prop">TQIconView::autoArrange</a>, <ahref="#sortDirection-prop">sortDirection</a>, <ahref="#sort">sort</a>(), and <ahref="tqiconviewitem.html#setKey">TQIconViewItem::setKey</a>().
Sorts and rearranges all the items in the icon view. If <em>ascending</em> is TRUE, the items are sorted in increasing order,
otherwise they are sorted in decreasing order.
<p><ahref="qiconviewitem.html#compare">TQIconViewItem::compare</a>() is used to compare pairs of items. The
<p><ahref="tqiconviewitem.html#compare">TQIconViewItem::compare</a>() is used to compare pairs of items. The
sorting is based on the items' keys; these default to the items'
text unless specifically set to something else.
<p> Note that this function sets the sort order to <em>ascending</em>.
<p><p>See also <ahref="qiconviewitem.html#key">TQIconViewItem::key</a>(), <ahref="qiconviewitem.html#setKey">TQIconViewItem::setKey</a>(), <ahref="qiconviewitem.html#compare">TQIconViewItem::compare</a>(), <ahref="#setSorting">TQIconView::setSorting</a>(), and <ahref="#sortDirection-prop">TQIconView::sortDirection</a>.
<p><p>See also <ahref="tqiconviewitem.html#key">TQIconViewItem::key</a>(), <ahref="tqiconviewitem.html#setKey">TQIconViewItem::setKey</a>(), <ahref="tqiconviewitem.html#compare">TQIconViewItem::compare</a>(), <ahref="#setSorting">TQIconView::setSorting</a>(), and <ahref="#sortDirection-prop">TQIconView::sortDirection</a>.
<p>This property holds the arrangement mode of the icon view.
<p>This can be <ahref="#Arrangement-enum">LeftToRight</a> or <ahref="#Arrangement-enum">TopToBottom</a>. The default is <ahref="#Arrangement-enum">LeftToRight</a>.
@ -928,7 +928,7 @@ column heights based on the icon view's contents.
normal icon view background is used.
<p>Set this property's value with <ahref="#setItemTextBackground">setItemTextBackground</a>() and get this property's value with <ahref="#itemTextBackground">itemTextBackground</a>().
<p>This property holds the position where the text of each item is drawn.
<p>Valid values are <ahref="#ItemTextPos-enum">Bottom</a> or <ahref="#ItemTextPos-enum">Right</a>. The default is <ahref="#ItemTextPos-enum">Bottom</a>.
@ -950,13 +950,13 @@ normal icon view background is used.
this property.
<p>Set this property's value with <ahref="#setMaxItemWidth">setMaxItemWidth</a>() and get this property's value with <ahref="#maxItemWidth">maxItemWidth</a>().
<p>This property holds the resize mode of the icon view.
<p>This can be <ahref="#ResizeMode-enum">Fixed</a> or <ahref="#ResizeMode-enum">Adjust</a>. The default is <ahref="#ResizeMode-enum">Fixed</a>.
See <ahref="#ResizeMode-enum">ResizeMode</a>.
<p>Set this property's value with <ahref="#setResizeMode">setResizeMode</a>() and get this property's value with <ahref="#resizeMode">resizeMode</a>().
<p>This property holds the selection mode of the icon view.
<p>This can be <ahref="#SelectionMode-enum">Single</a> (the default), <ahref="#SelectionMode-enum">Extended</a>, <ahref="#SelectionMode-enum">Multi</a> or <ahref="#SelectionMode-enum">NoSelection</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 TQIconViewItem</h1>
<p>This is the complete list of member functions for
<ahref="tqiconviewitem.html">TQIconViewItem</a>, including inherited members.
The TQIconViewItem class provides a single item in a <ahref="ntqiconview.html">TQIconView</a>.
The TQIconViewItem class provides a single item in a <ahref="tqiconview.html">TQIconView</a>.
<p>
<p> A TQIconViewItem contains an icon, a string and optionally a sort
@ -131,7 +131,7 @@ user but calling <a href="#setRenameEnabled">setRenameEnabled</a>(TRUE) will all
perform in-place editing of the item's text.
<p> When the icon view is deleted all items in it are deleted
automatically.
<p> The <ahref="ntqiconview.html#firstItem">TQIconView::firstItem</a>() and <ahref="#nextItem">TQIconViewItem::nextItem</a>() functions
<p> The <ahref="tqiconview.html#firstItem">TQIconView::firstItem</a>() and <ahref="#nextItem">TQIconViewItem::nextItem</a>() functions
provide a means of iterating over all the items in a TQIconView:
<p><pre>
TQIconViewItem *item;
@ -158,48 +158,48 @@ view item also has functions for drag-and-drop which may be
reimplemented.
<p><aname="pixmap-size-limit"></a>
<b>Note:</b> Pixmaps with individual dimensions larger than 300 pixels may
not be displayed properly, depending on the <ahref="ntqiconview.html#Arrangement-enum">arrangement in use</a>. For example, pixmaps wider than 300 pixels
not be displayed properly, depending on the <ahref="tqiconview.html#Arrangement-enum">arrangement in use</a>. For example, pixmaps wider than 300 pixels
will not be arranged correctly if the icon view uses a
<ahref="ntqiconview.html#Arrangement-enum">TQIconView::TopToBottom</a> arrangement, and pixmaps taller than 300 pixels
<ahref="tqiconview.html#Arrangement-enum">TQIconView::TopToBottom</a> arrangement, and pixmaps taller than 300 pixels
will not be arranged correctly if the icon view uses a
@ -431,7 +431,7 @@ Removes the editbox that is used for in-place renaming.
Starts in-place renaming of an icon, if allowed.
<p> This function sets up the icon view so that the user can edit the
item text, and then returns. When the user is done, <ahref="#setText">setText</a>() will
be called and <ahref="ntqiconview.html#itemRenamed">TQIconView::itemRenamed</a>() will be emitted (unless the
be called and <ahref="tqiconview.html#itemRenamed">TQIconView::itemRenamed</a>() will be emitted (unless the
user canceled, e.g. by pressing the Escape key).
<p><p>See also <ahref="#setRenameEnabled">setRenameEnabled</a>().
@ -492,7 +492,7 @@ might be a no-op if you reimplement <a href="#picture">picture</a>().
Sets <em>icon</em> as the item's icon in the icon view. This function
might be a no-op if you reimplement <ahref="#pixmap">pixmap</a>().
<p><b>Note:</b> Pixmaps with individual dimensions larger than 300 pixels may
not be displayed properly, depending on the <ahref="ntqiconview.html#Arrangement-enum">arrangement in use</a>. See the <ahref="#pixmap-size-limit">main class
not be displayed properly, depending on the <ahref="tqiconview.html#Arrangement-enum">arrangement in use</a>. See the <ahref="#pixmap-size-limit">main class
documentation</a> for details.
<p><p>See also <ahref="#pixmap">pixmap</a>().
@ -503,7 +503,7 @@ This is an overloaded member function, provided for convenience. It behaves esse
TRUE, the icon view's layout is recalculated. If <em>redraw</em> is TRUE
(the default), the icon view is repainted.
<p><b>Note:</b> Pixmaps with individual dimensions larger than 300 pixels may
not be displayed properly, depending on the <ahref="ntqiconview.html#Arrangement-enum">arrangement in use</a>. See the <ahref="#pixmap-size-limit">main class
not be displayed properly, depending on the <ahref="tqiconview.html#Arrangement-enum">arrangement in use</a>. See the <ahref="#pixmap-size-limit">main class
documentation</a> for details.
<p><p>See also <ahref="#pixmap">pixmap</a>().
@ -534,7 +534,7 @@ an item in code regardless of this setting.)
This constructor creates an action with the following properties: the icon or iconset \fIicon\fR, the menu text \fImenuText\fR and keyboard accelerator \fIaccel\fR. It is a child of \fIparent\fR and called \fIname\fR.
.PP
If \fIparent\fR is a QActionGroup, the action automatically becomes a member of it.
@ -263,7 +263,7 @@ The action uses a stripped version of \fImenuText\fR (e.g. "&Menu Option..." bec
Call setToggleAction(TRUE) to make the action a toggle action.
.PP
\fBWarning:\fR To prevent recursion, don't create an action as a child of a widget that the action is later added to.
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
This constructor creates an action with the following properties: the description \fItext\fR, the icon or iconset \fIicon\fR, the menu text \fImenuText\fR and keyboard accelerator \fIaccel\fR. It is a child of \fIparent\fR and called \fIname\fR. If \fItoggle\fR is TRUE the action will be a toggle action, otherwise it will be a command action.
@ -329,7 +329,7 @@ This function is called from the addTo() function when it has created a widget (
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
This function is called from the addTo() function when it has created a menu item at the index position \fIindex\fR in the popup menu \fImenu\fR.
.SH "QIconSet QAction::iconSet () const"
.SH "TQIconSet QAction::iconSet () const"
Returns the action's icon. See the "iconSet" property for details.
.SH "bool QAction::isEnabled () const"
Returns TRUE if the action is enabled; otherwise returns FALSE. See the "enabled" property for details.
@ -355,7 +355,7 @@ Disables the action if \fIdisable\fR is TRUE; otherwise enables the action.
See the enabled documentation for more information.
@ -338,7 +338,7 @@ If \fIautoPopulate\fR is TRUE (the default is FALSE), columns are automatically
If the \fIcursor\fR is read-only, the table also becomes read-only. In addition, the table adopts the cursor's driver's definition for representing NULL values as strings.
.SH "TQDataTable::~TQDataTable ()"
Destroys the object and frees any allocated resources.
Adds the next column to be displayed using the field \fIfieldName\fR, column label \fIlabel\fR, width \fIwidth\fR and iconset \fIiconset\fR.
.PP
If \fIlabel\fR is specified, it is used as the column's header label, otherwise the field's display label is used when setSqlCursor() is called. The \fIiconset\fR is used to set the icon used by the column header; by default there is no icon.
@ -472,7 +472,7 @@ See also setSqlCursor().
Sets the cursor auto-delete flag to \fIenable\fR. If \fIenable\fR is TRUE, the table will automatically delete the cursor specified by setSqlCursor(). If \fIenable\fR is FALSE (the default), the cursor will not be deleted.
Sets the \fIcol\fR column to display using the field \fIfieldName\fR, column label \fIlabel\fR, width \fIwidth\fR and iconset \fIiconset\fR.
.PP
If \fIlabel\fR is specified, it is used as the column's header label, otherwise the field's display label is used when setSqlCursor() is called. The \fIiconset\fR is used to set the icon used by the column header; by default there is no icon.
@ -110,7 +110,7 @@ If you need to monitor changes to the grid's dimensions (i.e. when numRows or nu
.PP
Note: the row and column indices are always given in the order, row (vertical offset) then column (horizontal offset). This order is the opposite of all pixel operations, which are given in the order x (horizontal offset), y (vertical offset).
.PP
QGridView is a very simple abstract class based on QScrollView. It is designed to simplify the task of drawing many cells of the same size in a potentially scrollable canvas. If you need rows and columns with different sizes, use a QTable instead. If you need a simple list of items, use a QListBox. If you need to present hierachical data use a QListView, and if you need random objects at random positions, consider using either a QIconView or a TQCanvas.
QGridView is a very simple abstract class based on QScrollView. It is designed to simplify the task of drawing many cells of the same size in a potentially scrollable canvas. If you need rows and columns with different sizes, use a QTable instead. If you need a simple list of items, use a QListBox. If you need to present hierachical data use a QListView, and if you need random objects at random positions, consider using either a TQIconView or a TQCanvas.
Adds a new section with label text \fIs\fR. Returns the index position where the section was added (at the right for horizontal headers, at the bottom for vertical headers). The section's width is set to \fIsize\fR. If \fIsize\fR < 0, an appropriate size for the text \fIs\fR is chosen.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Adds a new section with iconset \fIiconset\fR and label text \fIs\fR. Returns the index position where the section was added (at the right for horizontal headers, at the bottom for vertical headers). The section's width is set to \fIsize\fR, unless size is negative in which case the size is calculated taking account of the size of the text.
@ -307,7 +307,7 @@ See also pressed() and released().
Returns the number of sections in the header. See the "count" property for details.
.SH "int QHeader::headerWidth () const"
Returns the total width of all the header columns.
.SH "QIconSet * QHeader::iconSet ( int section ) const"
.SH "TQIconSet * QHeader::iconSet ( int section ) const"
Returns the icon set for section \fIsection\fR. If the section does not exist, 0 is returned.
.SH "void QHeader::indexChange ( int section, int fromIndex, int toIndex )\fC [signal]\fR"
This signal is emitted when the user moves section \fIsection\fR from index position \fIfromIndex\fR, to index position \fItoIndex\fR.
@ -452,7 +452,7 @@ If the section does not exist, nothing happens.
.PP
Examples:
.)l chart/setdataform.cpp and table/small-table-demo/main.cpp.
.SH "void QHeader::setLabel ( int section, const QIconSet & iconset, const TQString & s, int size = -1 )\fC [virtual]\fR"
.SH "void QHeader::setLabel ( int section, const TQIconSet & iconset, const TQString & s, int size = -1 )\fC [virtual]\fR"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Sets the icon for section \fIsection\fR to \fIiconset\fR and the text to \fIs\fR. The section's width is set to \fIsize\fR if \fIsize\fR >= 0; otherwise it is left unchanged.
The QIconDrag class supports drag and drop operations within a QIconView.
The TQIconDrag class supports drag and drop operations within a TQIconView.
.PP
A QIconDrag object is used to maintain information about the positions of dragged items and the data associated with the dragged items. QIconViews are able to use this information to paint the dragged items in the correct positions. Internally QIconDrag stores the data associated with drag items in QIconDragItem objects.
A TQIconDrag object is used to maintain information about the positions of dragged items and the data associated with the dragged items. TQIconViews are able to use this information to paint the dragged items in the correct positions. Internally TQIconDrag stores the data associated with drag items in TQIconDragItem objects.
.PP
If you want to use the extended drag-and-drop functionality of QIconView, create a QIconDrag object in a reimplementation of QIconView::dragObject(). Then create a QIconDragItem for each item which should be dragged, set the data it represents with QIconDragItem::setData(), and add each QIconDragItem to the drag object using append().
If you want to use the extended drag-and-drop functionality of TQIconView, create a TQIconDrag object in a reimplementation of TQIconView::dragObject(). Then create a TQIconDragItem for each item which should be dragged, set the data it represents with TQIconDragItem::setData(), and add each TQIconDragItem to the drag object using append().
.PP
The data in QIconDragItems is stored in a QByteArray and is mime-typed (see QMimeSource and the Drag and Drop overview). If you want to use your own mime-types derive a class from QIconDrag and reimplement format(), encodedData() and canDecode().
The data in TQIconDragItems is stored in a QByteArray and is mime-typed (see QMimeSource and the Drag and Drop overview). If you want to use your own mime-types derive a class from TQIconDrag and reimplement format(), encodedData() and canDecode().
.PP
The fileiconview example program demonstrates the use of the QIconDrag class including subclassing and reimplementing dragObject(), format(), encodedData() and canDecode(). See the files \fCqt/examples/fileiconview/qfileiconview.h\fR and \fCqt/examples/fileiconview/qfileiconview.cpp\fR.
The fileiconview example program demonstrates the use of the TQIconDrag class including subclassing and reimplementing dragObject(), format(), encodedData() and canDecode(). See the files \fCqt/examples/fileiconview/qfileiconview.h\fR and \fCqt/examples/fileiconview/qfileiconview.cpp\fR.
.PP
See also QMimeSource::format() and Drag And Drop Classes.
Append the QIconDragItem, \fIi\fR, to the QIconDrag object's list of items. You must also supply the geometry of the pixmap, \fIpr\fR, and the textual caption, \fItr\fR.
Append the TQIconDragItem, \fIi\fR, to the TQIconDrag object's list of items. You must also supply the geometry of the pixmap, \fIpr\fR, and the textual caption, \fItr\fR.
.PP
See also QIconDragItem.
See also TQIconDragItem.
.PP
Example: fileiconview/qfileiconview.cpp.
.SH "bool QIconDrag::canDecode ( QMimeSource * e )\fC [static]\fR"
Returns TRUE if \fIe\fR can be decoded by the QIconDrag, otherwise return FALSE.
.SH "bool TQIconDrag::canDecode ( QMimeSource * e )\fC [static]\fR"
Returns TRUE if \fIe\fR can be decoded by the TQIconDrag, otherwise return FALSE.
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
@ -7,7 +7,7 @@
.ad l
.nh
.SH NAME
QIconDragEvent \- Signals that a main icon drag has begun
TQIconDragEvent \- Signals that a main icon drag has begun
.SH SYNOPSIS
\fC#include <ntqevent.h>\fR
.PP
@ -16,7 +16,7 @@ Inherits QEvent.
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBQIconDragEvent\fR ()"
.BI "\fBTQIconDragEvent\fR ()"
.br
.ti -1c
.BI "bool \fBisAccepted\fR () const"
@ -29,17 +29,17 @@ Inherits QEvent.
.br
.in -1c
.SH DESCRIPTION
The QIconDragEvent class signals that a main icon drag has begun.
The TQIconDragEvent class signals that a main icon drag has begun.
.PP
Icon drag events are sent to widgets when the main icon of a window has been dragged away. On Mac OS X this is fired when the proxy icon of a window is dragged off titlebar, in response to this event is is normal to begin using drag and drop.
.PP
See also Event Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QIconDragEvent::QIconDragEvent ()"
.SH "TQIconDragEvent::TQIconDragEvent ()"
Constructs an icon drag event object with the accept parameter flag set to FALSE.
.PP
See also accept().
.SH "void QIconDragEvent::accept ()"
.SH "void TQIconDragEvent::accept ()"
Sets the accept flag of the icon drag event object.
.PP
Setting the accept flag indicates that the receiver of this event has started a drag and drop oeration.
@ -47,7 +47,7 @@ Setting the accept flag indicates that the receiver of this event has started a
The accept flag is \fInot\fR set by default.
.PP
See also ignore() and TQWidget::hide().
.SH "void QIconDragEvent::ignore ()"
.SH "void TQIconDragEvent::ignore ()"
Clears the accept flag of the icon drag object.
.PP
Clearing the accept flag indicates that the receiver of this event has not handled the icon drag as a result other events can be sent.
@ -55,13 +55,13 @@ Clearing the accept flag indicates that the receiver of this event has not handl
The icon drag event is constructed with the accept flag cleared.
.PP
See also accept().
.SH "bool QIconDragEvent::isAccepted () const"
.SH "bool TQIconDragEvent::isAccepted () const"
Returns TRUE if the receiver of the event has started a drag and drop operation; otherwise returns FALSE.
.PP
See also accept() and ignore().
.SH "SEE ALSO"
.BR http://doc.trolltech.com/qicondragevent.html
.BR http://doc.trolltech.com/tqicondragevent.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
@ -7,17 +7,17 @@
.ad l
.nh
.SH NAME
QIconDragItem \- Encapsulates a drag item
TQIconDragItem \- Encapsulates a drag item
.SH SYNOPSIS
\fC#include <ntqiconview.h>\fR
\fC#include <tqiconview.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBQIconDragItem\fR ()"
.BI "\fBTQIconDragItem\fR ()"
.br
.ti -1c
.BI "virtual \fB~QIconDragItem\fR ()"
.BI "virtual \fB~TQIconDragItem\fR ()"
.br
.ti -1c
.BI "virtual QByteArray \fBdata\fR () const"
@ -27,31 +27,31 @@ QIconDragItem \- Encapsulates a drag item
.br
.in -1c
.SH DESCRIPTION
The QIconDragItem class encapsulates a drag item.
The TQIconDragItem class encapsulates a drag item.
.PP
The QIconDrag class uses a list of QIconDragItems to support drag and drop operations.
The TQIconDrag class uses a list of TQIconDragItems to support drag and drop operations.
.PP
In practice a QIconDragItem object (or an object of a class derived from QIconDragItem) is created for each icon view item which is dragged. Each of these QIconDragItems is stored in a QIconDrag object.
In practice a TQIconDragItem object (or an object of a class derived from TQIconDragItem) is created for each icon view item which is dragged. Each of these TQIconDragItems is stored in a TQIconDrag object.
.PP
See QIconView::dragObject() for more information.
See TQIconView::dragObject() for more information.
.PP
See the fileiconview/qfileiconview.cpp and iconview/simple_dd/main.cpp examples.
Ceates a pixmap for \fIiconSet\fR with a certain \fIsize\fR, \fImode\fR, and \fIstate\fR. Returns 0 if the default QIconSet algorithm should be used to create a pixmap that wasn't supplied by the user.
Ceates a pixmap for \fIiconSet\fR with a certain \fIsize\fR, \fImode\fR, and \fIstate\fR. Returns 0 if the default TQIconSet algorithm should be used to create a pixmap that wasn't supplied by the user.
.PP
It is the caller's responsibility to delete the returned pixmap.
If \fIautoDelete\fR is TRUE, sets the icon factory to automatically delete itself when it is no longer referenced by any QIconSet and isn't the default factory. If \fIautoDelete\fR is FALSE (the default) auto-deletion is disabled.
If \fIautoDelete\fR is TRUE, sets the icon factory to automatically delete itself when it is no longer referenced by any TQIconSet and isn't the default factory. If \fIautoDelete\fR is FALSE (the default) auto-deletion is disabled.
.PP
See also autoDelete() and defaultFactory().
.SH "SEE ALSO"
.BR http://doc.trolltech.com/qiconfactory.html
.BR http://doc.trolltech.com/tqiconfactory.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
@ -71,7 +71,7 @@ QIconSet \- Set of icons with different styles and sizes
.BI "void \fBdetach\fR ()"
.br
.ti -1c
.BI "QIconSet & \fBoperator=\fR ( const QIconSet & other )"
.BI "TQIconSet & \fBoperator=\fR ( const TQIconSet & other )"
.br
.in -1c
.SS "Static Public Members"
@ -84,37 +84,37 @@ QIconSet \- Set of icons with different styles and sizes
.br
.in -1c
.SH DESCRIPTION
The QIconSet class provides a set of icons with different styles and sizes.
The TQIconSet class provides a set of icons with different styles and sizes.
.PP
A QIconSet can generate smaller, larger, active, and disabled pixmaps from the set of icons it is given. Such pixmaps are used by QToolButton, QHeader, QPopupMenu, etc. to show an icon representing a particular action.
A TQIconSet can generate smaller, larger, active, and disabled pixmaps from the set of icons it is given. Such pixmaps are used by QToolButton, QHeader, QPopupMenu, etc. to show an icon representing a particular action.
.PP
The simplest use of QIconSet is to create one from a QPixmap and then use it, allowing TQt to work out all the required icon styles and sizes. For example:
The simplest use of TQIconSet is to create one from a QPixmap and then use it, allowing TQt to work out all the required icon styles and sizes. For example:
.PP
.nf
.br
QToolButton *but = new QToolButton( QIconSet( QPixmap("open.xpm") ), ... );
QToolButton *but = new QToolButton( TQIconSet( QPixmap("open.xpm") ), ... );
.br
.fi
.PP
Using whichever pixmaps you specify as a base, QIconSet provides a set of six icons, each with a Size and a Mode: Small Normal, Small Disabled, Small Active, Large Normal, Large Disabled, and Large Active.
Using whichever pixmaps you specify as a base, TQIconSet provides a set of six icons, each with a Size and a Mode: Small Normal, Small Disabled, Small Active, Large Normal, Large Disabled, and Large Active.
.PP
An additional set of six icons can be provided for widgets that have an "On" or "Off" state, like checkable menu items or toggleable toolbuttons. If you provide pixmaps for the "On" state, but not for the "Off" state, the QIconSet will provide the "Off" pixmaps. You may specify icons for both states in you wish.
An additional set of six icons can be provided for widgets that have an "On" or "Off" state, like checkable menu items or toggleable toolbuttons. If you provide pixmaps for the "On" state, but not for the "Off" state, the TQIconSet will provide the "Off" pixmaps. You may specify icons for both states in you wish.
.PP
You can set any of the icons using setPixmap().
.PP
When you retrieve a pixmap using pixmap(Size, Mode, State), QIconSet will return the icon that has been set or previously generated for that size, mode and state combination. If none is available, QIconSet will ask the icon factory. If the icon factory cannot provide any (the default), QIconSet generates a pixmap based on the pixmaps it has been given and returns it.
When you retrieve a pixmap using pixmap(Size, Mode, State), TQIconSet will return the icon that has been set or previously generated for that size, mode and state combination. If none is available, TQIconSet will ask the icon factory. If the icon factory cannot provide any (the default), TQIconSet generates a pixmap based on the pixmaps it has been given and returns it.
.PP
The Disabled appearance is computed using an algorithm that produces results very similar to those used in Microsoft Windows 95. The Active appearance is identical to the Normal appearance unless you use setPixmap() to set it to something special.
.PP
When scaling icons, QIconSet uses smooth scaling, which can partially blend the color component of pixmaps. If the results look poor, the best solution is to supply pixmaps in both large and small sizes.
When scaling icons, TQIconSet uses smooth scaling, which can partially blend the color component of pixmaps. If the results look poor, the best solution is to supply pixmaps in both large and small sizes.
.PP
You can use the static function setIconSize() to set the preferred size of the generated large/small icons. The default small size is 22 x 22, while the default large size is 32 x 32. These sizes only affect generated icons.
.PP
The isGenerated() function returns TRUE if an icon was generated by QIconSet or by a factory; clearGenerated() clears all cached pixmaps.
.SH "Making Classes that Use QIconSet"
If you write your own widgets that have an option to set a small pixmap, consider allowing a QIconSet to be set for that pixmap. The TQt class QToolButton is an example of such a widget.
The isGenerated() function returns TRUE if an icon was generated by TQIconSet or by a factory; clearGenerated() clears all cached pixmaps.
.SH "Making Classes that Use TQIconSet"
If you write your own widgets that have an option to set a small pixmap, consider allowing a TQIconSet to be set for that pixmap. The TQt class QToolButton is an example of such a widget.
.PP
Provide a method to set a QIconSet, and when you draw the icon, choose whichever icon is appropriate for the current state of your widget. For example:
Provide a method to set a TQIconSet, and when you draw the icon, choose whichever icon is appropriate for the current state of your widget. For example:
.PP
.nf
.br
@ -124,15 +124,15 @@ Provide a method to set a QIconSet, and when you draw the icon, choose whichever
.br
p->drawPixmap( pos, icons->pixmap(
.br
QIconSet::Small,
TQIconSet::Small,
.br
isEnabled() ? QIconSet::Normal :
isEnabled() ? TQIconSet::Normal :
.br
QIconSet::Disabled,
TQIconSet::Disabled,
.br
isEnabled() ? QIconSet::On :
isEnabled() ? TQIconSet::On :
.br
QIconSet::Off));
TQIconSet::Off));
.br
}
.br
@ -146,120 +146,120 @@ You might also make use of the Active mode, perhaps making your widget Active wh
.PP
</center>
.PP
See also QIconFactory, QPixmap, QMainWindow::usesBigPixmaps, GUI Design Handbook: Iconic Label, Graphics Classes, Image Processing Classes, and Implicitly and Explicitly Shared Classes.
See also TQIconFactory, QPixmap, QMainWindow::usesBigPixmaps, GUI Design Handbook: Iconic Label, Graphics Classes, Image Processing Classes, and Implicitly and Explicitly Shared Classes.
.SS "Member Type Documentation"
.SH "QIconSet::Mode"
.SH "TQIconSet::Mode"
This enum type describes the mode for which a pixmap is intended to be used. The currently defined modes are:
.TP
\fCQIconSet::Normal\fR - Display the pixmap when the user is not interacting with the icon, but the functionality represented by the icon is available.
\fCTQIconSet::Normal\fR - Display the pixmap when the user is not interacting with the icon, but the functionality represented by the icon is available.
.TP
\fCQIconSet::Disabled\fR - Display the pixmap when the functionality represented by the icon is not available.
\fCTQIconSet::Disabled\fR - Display the pixmap when the functionality represented by the icon is not available.
.TP
\fCQIconSet::Active\fR - Display the pixmap when the functionality represented by the icon is available and the user is interacting with the icon, for example, moving the mouse over it or clicking it.
.SH "QIconSet::Size"
\fCTQIconSet::Active\fR - Display the pixmap when the functionality represented by the icon is available and the user is interacting with the icon, for example, moving the mouse over it or clicking it.
.SH "TQIconSet::Size"
This enum type describes the size at which a pixmap is intended to be used. The currently defined sizes are:
.TP
\fCQIconSet::Automatic\fR - The size of the pixmap is determined from its pixel size. This is a useful default.
\fCTQIconSet::Automatic\fR - The size of the pixmap is determined from its pixel size. This is a useful default.
.TP
\fCQIconSet::Small\fR - The pixmap is the smaller of two.
\fCTQIconSet::Small\fR - The pixmap is the smaller of two.
.TP
\fCQIconSet::Large\fR - The pixmap is the larger of two.
\fCTQIconSet::Large\fR - The pixmap is the larger of two.
.PP
If a Small pixmap is not set by QIconSet::setPixmap(), the Large pixmap will be automatically scaled down to the size of a small pixmap to generate the Small pixmap when required. Similarly, a Small pixmap will be automatically scaled up to generate a Large pixmap. The preferred sizes for large/small generated icons can be set using setIconSize().
If a Small pixmap is not set by TQIconSet::setPixmap(), the Large pixmap will be automatically scaled down to the size of a small pixmap to generate the Small pixmap when required. Similarly, a Small pixmap will be automatically scaled up to generate a Large pixmap. The preferred sizes for large/small generated icons can be set using setIconSize().
.PP
See also setIconSize(), iconSize(), setPixmap(), pixmap(), and QMainWindow::usesBigPixmaps.
.SH "QIconSet::State"
.SH "TQIconSet::State"
This enum describes the state for which a pixmap is intended to be used. The \fIstate\fR can be:
.TP
\fCQIconSet::Off\fR - Display the pixmap when the widget is in an "off" state
\fCTQIconSet::Off\fR - Display the pixmap when the widget is in an "off" state
.TP
\fCQIconSet::On\fR - Display the pixmap when the widget is in an "on" state
\fCTQIconSet::On\fR - Display the pixmap when the widget is in an "on" state
Constructs an icon set for which the Normal pixmap is \fIpixmap\fR, which is assumed to be of size \fIsize\fR.
.PP
The default for \fIsize\fR is Automatic, which means that QIconSet will determine whether the pixmap is Small or Large from its pixel size. Pixmaps less than the width of a small generated icon are considered to be Small. You can use setIconSize() to set the preferred size of a generated icon.
The default for \fIsize\fR is Automatic, which means that TQIconSet will determine whether the pixmap is Small or Large from its pixel size. Pixmaps less than the width of a small generated icon are considered to be Small. You can use setIconSize() to set the preferred size of a generated icon.
Creates an iconset which uses the pixmap \fIsmallPix\fR for for displaying a small icon, and the pixmap \fIlargePix\fR for displaying a large icon.
.SH "QIconSet::QIconSet ( const QIconSet & other )"
.SH "TQIconSet::TQIconSet ( const TQIconSet & other )"
Constructs a copy of \fIother\fR. This is very fast.
.SH "QIconSet::~QIconSet ()\fC [virtual]\fR"
.SH "TQIconSet::~TQIconSet ()\fC [virtual]\fR"
Destroys the icon set and frees any allocated resources.
.SH "void QIconSet::clearGenerated ()"
Clears all cached pixmaps, including those obtained from an eventual QIconFactory.
.SH "void QIconSet::detach ()"
.SH "void TQIconSet::clearGenerated ()"
Clears all cached pixmaps, including those obtained from an eventual TQIconFactory.
.SH "void TQIconSet::detach ()"
Detaches this icon set from others with which it may share data.
.PP
You will never need to call this function; other QIconSet functions call it as necessary.
.SH "const QSize & QIconSet::iconSize ( Size which )\fC [static]\fR"
You will never need to call this function; other TQIconSet functions call it as necessary.
.SH "const QSize & TQIconSet::iconSize ( Size which )\fC [static]\fR"
If \fIwhich\fR is Small, returns the preferred size of a small generated icon; if \fIwhich\fR is Large, returns the preferred size of a large generated icon.
Set the preferred size for all small or large icons that are generated after this call. If \fIwhich\fR is Small, sets the preferred size of small generated icons to \fIsize\fR. Similarly, if \fIwhich\fR is Large, sets the preferred size of large generated icons to \fIsize\fR.
.PP
Note that cached icons will not be regenerated, so it is recommended that you set the preferred icon sizes before generating any icon sets. Also note that the preferred icon sizes will be ignored for icon sets that have been created using both small and large pixmaps.
.PP
See also iconSize().
.SH "void QIconSet::setPixmap ( const QPixmap & pixmap, Size size, Mode mode = Normal, State state = Off )\fC [virtual]\fR"
.SH "void TQIconSet::setPixmap ( const QPixmap & pixmap, Size size, Mode mode = Normal, State state = Off )\fC [virtual]\fR"
Sets this icon set to provide pixmap \fIpixmap\fR for size \fIsize\fR, mode \fImode\fR and state \fIstate\fR. The icon set may also use \fIpixmap\fR for generating other pixmaps if they are not explicitly set.
.PP
The \fIsize\fR can be one of Automatic, Large or Small. If Automatic is used, QIconSet will determine if the pixmap is Small or Large from its pixel size.
The \fIsize\fR can be one of Automatic, Large or Small. If Automatic is used, TQIconSet will determine if the pixmap is Small or Large from its pixel size.
.PP
Pixmaps less than the width of a small generated icon are considered to be Small. You can use setIconSize() to set the preferred size of a generated icon.
.PP
This function does nothing if \fIpixmap\fR is a null pixmap.
.PP
See also reset().
.SH "void QIconSet::setPixmap ( const TQString & fileName, Size size, Mode mode = Normal, State state = Off )\fC [virtual]\fR"
.SH "void TQIconSet::setPixmap ( const TQString & fileName, Size size, Mode mode = Normal, State state = Off )\fC [virtual]\fR"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
The pixmap is loaded from \fIfileName\fR when it becomes necessary.
.SH "SEE ALSO"
.BR http://doc.trolltech.com/ntqiconset.html
.BR http://doc.trolltech.com/tqiconset.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
.BI "void \fBemitSelectionChanged\fR ( QIconViewItem * i = 0 )"
.BI "void \fBemitSelectionChanged\fR ( TQIconViewItem * i = 0 )"
.br
.ti -1c
.BI "QIconViewItem * \fBmakeRowLayout\fR ( QIconViewItem * begin, int & y, bool & changed )"
.BI "TQIconViewItem * \fBmakeRowLayout\fR ( TQIconViewItem * begin, int & y, bool & changed )"
.br
.in -1c
.SS "Protected Slots"
@ -356,23 +356,23 @@ Inherits QScrollView.
.br
.in -1c
.SH DESCRIPTION
The QIconView class provides an area with movable labelled icons.
The TQIconView class provides an area with movable labelled icons.
.PP
A QIconView can display and manage a grid or other 2D layout of labelled icons. Each labelled icon is a QIconViewItem. Items (QIconViewItems) can be added or deleted at any time; items can be moved within the QIconView. Single or multiple items can be selected. Items can be renamed in-place. QIconView also supports drag and drop.
A TQIconView can display and manage a grid or other 2D layout of labelled icons. Each labelled icon is a TQIconViewItem. Items (TQIconViewItems) can be added or deleted at any time; items can be moved within the TQIconView. Single or multiple items can be selected. Items can be renamed in-place. TQIconView also supports drag and drop.
.PP
Each item contains a label string, a pixmap or picture (the icon itself) and optionally a sort key. The sort key is used for sorting the items and defaults to the label string. The label string can be displayed below or to the right of the icon (see ItemTextPos).
.PP
The simplest way to create a QIconView is to create a QIconView object and create some QIconViewItems with the QIconView as their parent, set the icon view's geometry and show it. For example:
The simplest way to create a TQIconView is to create a TQIconView object and create some TQIconViewItems with the TQIconView as their parent, set the icon view's geometry and show it. For example:
.PP
.nf
.br
QIconView *iv = new QIconView( this );
TQIconView *iv = new TQIconView( this );
.br
QDir dir( path, "*.xpm" );
.br
for ( uint i = 0; i < dir.count(); i++ ) {
.br
(void) new QIconViewItem( iv, dir[i], QPixmap( path + dir[i] ) );
(void) new TQIconViewItem( iv, dir[i], QPixmap( path + dir[i] ) );
.br
}
.br
@ -382,40 +382,40 @@ The simplest way to create a QIconView is to create a QIconView object and creat
.br
.fi
.PP
The QIconViewItem call passes a pointer to the QIconView we wish to populate, along with the label text and a QPixmap.
The TQIconViewItem call passes a pointer to the TQIconView we wish to populate, along with the label text and a QPixmap.
.PP
When an item is inserted the QIconView allocates a position for it. Existing items are rearranged if autoArrange() is TRUE. The default arrangement is LeftToRight -- the QIconView fills up the \fIleft-most\fR column from top to bottom, then moves one column \fIright\fR and fills that from top to bottom and so on. The arrangement can be modified with any of the following approaches:
When an item is inserted the TQIconView allocates a position for it. Existing items are rearranged if autoArrange() is TRUE. The default arrangement is LeftToRight -- the TQIconView fills up the \fIleft-most\fR column from top to bottom, then moves one column \fIright\fR and fills that from top to bottom and so on. The arrangement can be modified with any of the following approaches:
.TP
Call setArrangement(), e.g. with TopToBottom which will fill the \fItop-most\fR row from left to right, then moves one row \fIdown\fR and fills that row from left to right and so on.
.TP
Construct each QIconViewItem using a constructor which allows you to specify which item the new one is to follow.
Construct each TQIconViewItem using a constructor which allows you to specify which item the new one is to follow.
.TP
Call setSorting() or sort() to sort the items.
.PP
The spacing between items is set with setSpacing(). Items can be laid out using a fixed grid using setGridX() and setGridY(); by default the QIconView calculates a grid dynamically. The position of items' label text is set with setItemTextPos(). The text's background can be set with setItemTextBackground(). The maximum width of an item and of its text are set with setMaxItemWidth() and setMaxItemTextLength(). The label text will be word-wrapped if it is too long; this is controlled by setWordWrapIconText(). If the label text is truncated, the user can still see the entire text in a tool tip if they hover the mouse over the item. This is controlled with setShowToolTips().
The spacing between items is set with setSpacing(). Items can be laid out using a fixed grid using setGridX() and setGridY(); by default the TQIconView calculates a grid dynamically. The position of items' label text is set with setItemTextPos(). The text's background can be set with setItemTextBackground(). The maximum width of an item and of its text are set with setMaxItemWidth() and setMaxItemTextLength(). The label text will be word-wrapped if it is too long; this is controlled by setWordWrapIconText(). If the label text is truncated, the user can still see the entire text in a tool tip if they hover the mouse over the item. This is controlled with setShowToolTips().
.PP
Items which are selectable may be selected depending on the SelectionMode; the default is Single. Because QIconView offers multiple selection it must display keyboard focus and selection state separately. Therefore there are functions to set the selection state of an item (setSelected()) and to select which item displays keyboard focus (setCurrentItem()). When multiple items may be selected the icon view provides a rubberband, too.
Items which are selectable may be selected depending on the SelectionMode; the default is Single. Because TQIconView offers multiple selection it must display keyboard focus and selection state separately. Therefore there are functions to set the selection state of an item (setSelected()) and to select which item displays keyboard focus (setCurrentItem()). When multiple items may be selected the icon view provides a rubberband, too.
.PP
When in-place renaming is enabled (it is disabled by default), the user may change the item's label. They do this by selecting the item (single clicking it or navigating to it with the arrow keys), then single clicking it (or pressing F2), and entering their text. If no key has been set with QIconViewItem::setKey() the new text will also serve as the key. (See QIconViewItem::setRenameEnabled().)
When in-place renaming is enabled (it is disabled by default), the user may change the item's label. They do this by selecting the item (single clicking it or navigating to it with the arrow keys), then single clicking it (or pressing F2), and entering their text. If no key has been set with TQIconViewItem::setKey() the new text will also serve as the key. (See TQIconViewItem::setRenameEnabled().)
.PP
You can control whether users can move items themselves with setItemsMovable().
.PP
Because the internal structure used to store the icon view items is linear, no iterator class is needed to iterate over all the items. Instead we iterate by getting the first item from the \fIicon view\fR and then each subsequent (QIconViewItem::nextItem()) from each \fIitem\fR in turn:
Because the internal structure used to store the icon view items is linear, no iterator class is needed to iterate over all the items. Instead we iterate by getting the first item from the \fIicon view\fR and then each subsequent (TQIconViewItem::nextItem()) from each \fIitem\fR in turn:
QIconView also provides currentItem(). You can search for an item using findItem() (searching by position or for label text) and with findFirstVisibleItem() and findLastVisibleItem(). The number of items is returned by count(). An item can be removed from an icon view using takeItem(); to delete an item use \fCdelete\fR. All the items can be deleted with clear().
TQIconView also provides currentItem(). You can search for an item using findItem() (searching by position or for label text) and with findFirstVisibleItem() and findLastVisibleItem(). The number of items is returned by count(). An item can be removed from an icon view using takeItem(); to delete an item use \fCdelete\fR. All the items can be deleted with clear().
.PP
The QIconView emits a wide range of useful signals, including selectionChanged(), currentChanged(), clicked(), moved() and itemRenamed().
The TQIconView emits a wide range of useful signals, including selectionChanged(), currentChanged(), clicked(), moved() and itemRenamed().
.SH "Drag and Drop"
QIconView supports the drag and drop of items within the QIconView itself. It also supports the drag and drop of items out of or into the QIconView and drag and drop onto items themselves. The drag and drop of items outside the QIconView can be achieved in a simple way with basic functionality, or in a more sophisticated way which provides more power and control.
TQIconView supports the drag and drop of items within the TQIconView itself. It also supports the drag and drop of items out of or into the TQIconView and drag and drop onto items themselves. The drag and drop of items outside the TQIconView can be achieved in a simple way with basic functionality, or in a more sophisticated way which provides more power and control.
.PP
The simple approach to dragging items out of the icon view is to subclass QIconView and reimplement QIconView::dragObject().
The simple approach to dragging items out of the icon view is to subclass TQIconView and reimplement TQIconView::dragObject().
.PP
.nf
.br
@ -431,7 +431,7 @@ The simple approach to dragging items out of the icon view is to subclass QIconV
.PP
In this example we create a TQTextDrag object, (derived from QDragObject), containing the item's label and return it as the drag object. We could just as easily have created a TQImageDrag from the item's pixmap and returned that instead.
.PP
QIconViews and their QIconViewItems can also be the targets of drag and drops. To make the QIconView itself able to accept drops connect to the dropped() signal. When a drop occurs this signal will be emitted with a QDragEvent and a TQValueList of QIconDragItems. To make a QIconViewItem into a drop target subclass QIconViewItem and reimplement QIconViewItem::acceptDrop() and QIconViewItem::dropped().
TQIconViews and their TQIconViewItems can also be the targets of drag and drops. To make the TQIconView itself able to accept drops connect to the dropped() signal. When a drop occurs this signal will be emitted with a QDragEvent and a TQValueList of TQIconDragItems. To make a TQIconViewItem into a drop target subclass TQIconViewItem and reimplement TQIconViewItem::acceptDrop() and TQIconViewItem::dropped().
.PP
.nf
.br
@ -448,7 +448,7 @@ QIconViews and their QIconViewItems can also be the targets of drag and drops. T
@ -462,17 +462,17 @@ QIconViews and their QIconViewItems can also be the targets of drag and drops. T
.br
.fi
.PP
See iconview/simple_dd/main.h and iconview/simple_dd/main.cpp for a simple drag and drop example which demonstrates drag and drop between a QIconView and a QListBox.
See iconview/simple_dd/main.h and iconview/simple_dd/main.cpp for a simple drag and drop example which demonstrates drag and drop between a TQIconView and a QListBox.
.PP
If you want to use extended drag-and-drop or have drag shapes drawn you must take a more sophisticated approach.
.PP
The first part is starting drags -- you should use a QIconDrag (or a class derived from it) for the drag object. In dragObject() create the drag object, populate it with QIconDragItems and return it. Normally such a drag should offer each selected item's data. So in dragObject() you should iterate over all the items, and create a QIconDragItem for each selected item, and append these items with QIconDrag::append() to the QIconDrag object. You can use QIconDragItem::setData() to set the data of each item that should be dragged. If you want to offer the data in additional mime-types, it's best to use a class derived from QIconDrag, which implements additional encoding and decoding functions.
The first part is starting drags -- you should use a TQIconDrag (or a class derived from it) for the drag object. In dragObject() create the drag object, populate it with TQIconDragItems and return it. Normally such a drag should offer each selected item's data. So in dragObject() you should iterate over all the items, and create a TQIconDragItem for each selected item, and append these items with TQIconDrag::append() to the TQIconDrag object. You can use TQIconDragItem::setData() to set the data of each item that should be dragged. If you want to offer the data in additional mime-types, it's best to use a class derived from TQIconDrag, which implements additional encoding and decoding functions.
.PP
When a drag enters the icon view, there is little to do. Simply connect to the dropped() signal and reimplement QIconViewItem::acceptDrop() and QIconViewItem::dropped(). If you've used a QIconDrag (or a subclass of it) the second argument to the dropped signal contains a TQValueList of QIconDragItems -- you can access their data by calling QIconDragItem::data() on each one.
When a drag enters the icon view, there is little to do. Simply connect to the dropped() signal and reimplement TQIconViewItem::acceptDrop() and TQIconViewItem::dropped(). If you've used a TQIconDrag (or a subclass of it) the second argument to the dropped signal contains a TQValueList of TQIconDragItems -- you can access their data by calling TQIconDragItem::data() on each one.
.PP
For an example implementation of complex drag-and-drop look at the fileiconview example (qt/examples/fileiconview).
.PP
See also QIconViewItem::setDragEnabled(), QIconViewItem::setDropEnabled(), QIconViewItem::acceptDrop(), QIconViewItem::dropped(), and Advanced Widgets.
See also TQIconViewItem::setDragEnabled(), TQIconViewItem::setDropEnabled(), TQIconViewItem::acceptDrop(), TQIconViewItem::dropped(), and Advanced Widgets.
.PP
.ce 1
.B "[Image Omitted]"
@ -482,50 +482,50 @@ See also QIconViewItem::setDragEnabled(), QIconViewItem::setDropEnabled(), QIcon
.B "[Image Omitted]"
.PP
.SS "Member Type Documentation"
.SH "QIconView::Arrangement"
.SH "TQIconView::Arrangement"
This enum type determines in which direction the items flow when the view runs out of space.
.TP
\fCQIconView::LeftToRight\fR - Items which don't fit into the view cause the viewport to extend vertically (you get a vertical scrollbar).
\fCTQIconView::LeftToRight\fR - Items which don't fit into the view cause the viewport to extend vertically (you get a vertical scrollbar).
.TP
\fCQIconView::TopToBottom\fR - Items which don't fit into the view cause the viewport to extend horizontally (you get a horizontal scrollbar).
.SH "QIconView::ItemTextPos"
\fCTQIconView::TopToBottom\fR - Items which don't fit into the view cause the viewport to extend horizontally (you get a horizontal scrollbar).
.SH "TQIconView::ItemTextPos"
This enum type specifies the position of the item text in relation to the icon.
.TP
\fCQIconView::Bottom\fR - The text is drawn below the icon.
\fCTQIconView::Bottom\fR - The text is drawn below the icon.
.TP
\fCQIconView::Right\fR - The text is drawn to the right of the icon.
.SH "QIconView::ResizeMode"
This enum type is used to tell QIconView how it should treat the positions of its icons when the widget is resized. The modes are:
\fCTQIconView::Right\fR - The text is drawn to the right of the icon.
.SH "TQIconView::ResizeMode"
This enum type is used to tell TQIconView how it should treat the positions of its icons when the widget is resized. The modes are:
.TP
\fCQIconView::Fixed\fR - The icons' positions are not changed.
\fCTQIconView::Fixed\fR - The icons' positions are not changed.
.TP
\fCQIconView::Adjust\fR - The icons' positions are adjusted to be within the new geometry, if possible.
.SH "QIconView::SelectionMode"
This enumerated type is used by QIconView to indicate how it reacts to selection by the user. It has four values:
\fCTQIconView::Adjust\fR - The icons' positions are adjusted to be within the new geometry, if possible.
.SH "TQIconView::SelectionMode"
This enumerated type is used by TQIconView to indicate how it reacts to selection by the user. It has four values:
.TP
\fCQIconView::Single\fR - When the user selects an item, any already-selected item becomes unselected and the user cannot unselect the selected item. This means that the user can never clear the selection. (The application programmer can, using QIconView::clearSelection().)
\fCTQIconView::Single\fR - When the user selects an item, any already-selected item becomes unselected and the user cannot unselect the selected item. This means that the user can never clear the selection. (The application programmer can, using TQIconView::clearSelection().)
.TP
\fCQIconView::Multi\fR - When the user selects an item, e.g. by navigating to it with the keyboard arrow keys or by clicking it, the selection status of that item is toggled and the other items are left alone. Also, multiple items can be selected by dragging the mouse while the left mouse button stays pressed.
\fCTQIconView::Multi\fR - When the user selects an item, e.g. by navigating to it with the keyboard arrow keys or by clicking it, the selection status of that item is toggled and the other items are left alone. Also, multiple items can be selected by dragging the mouse while the left mouse button stays pressed.
.TP
\fCQIconView::Extended\fR - When the user selects an item the selection is cleared and the new item selected. However, if the user presses the Ctrl key when clicking on an item, the clicked item gets toggled and all other items are left untouched. If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item get selected or unselected, depending on the state of the clicked item. Also, multiple items can be selected by dragging the mouse while the left mouse button stays pressed.
\fCTQIconView::Extended\fR - When the user selects an item the selection is cleared and the new item selected. However, if the user presses the Ctrl key when clicking on an item, the clicked item gets toggled and all other items are left untouched. If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item get selected or unselected, depending on the state of the clicked item. Also, multiple items can be selected by dragging the mouse while the left mouse button stays pressed.
.TP
\fCQIconView::NoSelection\fR - Items cannot be selected.
\fCTQIconView::NoSelection\fR - Items cannot be selected.
.PP
To summarise: Single is a real single-selection icon view; Multi a real multi-selection icon view; Extended is an icon view in which users can select multiple items but usually want to select either just one or a range of contiguous items; and NoSelection mode is for an icon view where the user can look but not touch.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QIconView::QIconView ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )"
.SH "TQIconView::TQIconView ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )"
Constructs an empty icon view called \fIname\fR, with parent \fIparent\fR and using the widget flags \fIf\fR.
This variant uses \fIgrid\fR instead of (gridX(), gridY()). If \fIgrid\fR is invalid (see QSize::isValid()), arrangeItemsInGrid() calculates a valid grid itself and uses that.
.PP
If \fIupdate\fR is TRUE (the default) the viewport is repainted.
This signal is emitted when the user clicks any mouse button. If \fIitem\fR is non-null, the cursor is on \fIitem\fR. If \fIitem\fR is null, the mouse cursor isn't on any item.
.PP
See also mouseButtonClicked(), rightButtonClicked(), and pressed().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
This signal is emitted when the user clicks any mouse button on an icon view item. \fIitem\fR is a pointer to the item that has been clicked.
@ -555,153 +555,153 @@ This signal is emitted when the user clicks any mouse button on an icon view ite
\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differ by a pixel or two, \fIpos\fR is the position at release time.)
.PP
See also mouseButtonClicked(), rightButtonClicked(), and pressed().
This signal is emitted when the user invokes a context menu with the right mouse button or with special system keys, with \fIitem\fR being the item under the mouse cursor or the current item, respectively.
.PP
\fIpos\fR is the position for the context menu in the global coordinate system.
.SH "uint QIconView::count () const"
.SH "uint TQIconView::count () const"
Returns the number of items in the icon view. See the "count" property for details.
Returns the QDragObject that should be used for drag-and-drop. This function is called by the icon view when starting a drag to get the dragobject that should be used for the drag. Subclasses may reimplement this.
.PP
See also QIconDrag.
See also TQIconDrag.
.PP
Examples:
.)l fileiconview/qfileiconview.cpp and iconview/simple_dd/main.cpp.
This signal is emitted when a drop event occurs in the viewport (but not on any icon) which the icon view itself can't handle.
.PP
\fIe\fR provides all the information about the drop. If the drag object of the drop was a QIconDrag, \fIlst\fR contains the list of the dropped items. You can get the data using QIconDragItem::data() on each item. If the \fIlst\fR is empty, i.e. the drag was not a QIconDrag, you have to decode the data in \fIe\fR and work with that.
\fIe\fR provides all the information about the drop. If the drag object of the drop was a TQIconDrag, \fIlst\fR contains the list of the dropped items. You can get the data using TQIconDragItem::data() on each item. If the \fIlst\fR is empty, i.e. the drag was not a TQIconDrag, you have to decode the data in \fIe\fR and work with that.
.PP
Note QIconViewItems may be drop targets; if a drop event occurs on an item the item handles the drop.
Note TQIconViewItems may be drop targets; if a drop event occurs on an item the item handles the drop.
.PP
Examples:
.)l iconview/main.cpp and iconview/simple_dd/main.cpp.
Finds the first item whose bounding rectangle overlaps \fIr\fR and returns a pointer to that item. \fIr\fR is given in content coordinates. Returns 0 if no item overlaps \fIr\fR.
.PP
If you want to find all items that touch \fIr\fR, you will need to use this function and nextItem() in a loop ending at findLastVisibleItem() and test QIconViewItem::rect() for each of these items.
If you want to find all items that touch \fIr\fR, you will need to use this function and nextItem() in a loop ending at findLastVisibleItem() and test TQIconViewItem::rect() for each of these items.
.PP
See also findLastVisibleItem() and QIconViewItem::rect().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Returns a pointer to the first item whose text begins with \fItext\fR, or 0 if no such item could be found. Use the \fIcompare\fR flag to control the comparison behaviour. (See TQt::StringComparisonMode.)
Finds the last item whose bounding rectangle overlaps \fIr\fR and returns a pointer to that item. \fIr\fR is given in content coordinates. Returns 0 if no item overlaps \fIr\fR.
Inserts the QIconViewItem \fIitem\fR in the icon view's grid. \fIYou should never need to call this function.\fR Instead, insert QIconViewItems by creating them with a pointer to the QIconView that they are to be inserted into.
Inserts the TQIconViewItem \fIitem\fR in the icon view's grid. \fIYou should never need to call this function.\fR Instead, insert TQIconViewItems by creating them with a pointer to the TQIconView that they are to be inserted into.
Returns a pointer to the last item of the icon view, or 0 if there are no items in the icon view.
.PP
See also firstItem() and currentItem().
.SH "QIconViewItem * QIconView::makeRowLayout ( QIconViewItem * begin, int & y, bool & changed )\fC [protected]\fR"
.SH "TQIconViewItem * TQIconView::makeRowLayout ( TQIconViewItem * begin, int & y, bool & changed )\fC [protected]\fR"
Lays out a row of icons (if Arrangement == TopToBottom this is a column). Starts laying out with the item \fIbegin\fR. \fIy\fR is the starting coordinate. Returns the last item of the row (column) and sets the new starting coordinate to \fIy\fR. The \fIchanged\fR parameter is used internally.
.PP
\fBWarning:\fR This function may be made private in a future version of Qt. We do not recommend calling it.
.SH "int QIconView::maxItemTextLength () const"
.SH "int TQIconView::maxItemTextLength () const"
Returns the maximum length (in characters) that an item's text may have. See the "maxItemTextLength" property for details.
.SH "int QIconView::maxItemWidth () const"
.SH "int TQIconView::maxItemWidth () const"
Returns the maximum width that an item may have. See the "maxItemWidth" property for details.
This signal is emitted when the user clicks mouse button \fIbutton\fR. If \fIitem\fR is non-null, the cursor is on \fIitem\fR. If \fIitem\fR is null, the mouse cursor isn't on any item.
.PP
\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differ by a pixel or two, \fIpos\fR is the position at release time.)
.PP
See also mouseButtonPressed(), rightButtonClicked(), and clicked().
This signal is emitted when the user presses mouse button \fIbutton\fR. If \fIitem\fR is non-null, the cursor is on \fIitem\fR. If \fIitem\fR is null, the mouse cursor isn't on any item.
.PP
\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()).
.PP
See also rightButtonClicked() and pressed().
.SH "void QIconView::moved ()\fC [signal]\fR"
.SH "void TQIconView::moved ()\fC [signal]\fR"
This signal is emitted after successfully dropping one (or more) items of the icon view. If the items should be removed, it's best to do so in a slot connected to this signal.
This signal is emitted when the user presses any mouse button. If \fIitem\fR is non-null, the cursor is on \fIitem\fR. If \fIitem\fR is null, the mouse cursor isn't on any item.
.PP
See also mouseButtonPressed(), rightButtonPressed(), and clicked().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
This signal is emitted when the user presses any mouse button. If \fIitem\fR is non-null, the cursor is on \fIitem\fR. If \fIitem\fR is null, the mouse cursor isn't on any item.
@ -709,115 +709,115 @@ This signal is emitted when the user presses any mouse button. If \fIitem\fR is
\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differ by a pixel or two, \fIpos\fR is the position at release time.)
.PP
See also mouseButtonPressed(), rightButtonPressed(), and clicked().
This signal is emitted when the user clicks the right mouse button. If \fIitem\fR is non-null, the cursor is on \fIitem\fR. If \fIitem\fR is null, the mouse cursor isn't on any item.
.PP
\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differ by a pixel or two, \fIpos\fR is the position at release time.)
.PP
See also rightButtonPressed(), mouseButtonClicked(), and clicked().
This signal is emitted when the user presses the right mouse button. If \fIitem\fR is non-null, the cursor is on \fIitem\fR. If \fIitem\fR is null, the mouse cursor isn't on any item.
.PP
\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()).
Selects or unselects \fIitem\fR depending on \fIs\fR, and may also unselect other items, depending on TQIconView::selectionMode() and \fIcb\fR.
.PP
If \fIs\fR is FALSE, \fIitem\fR is unselected.
.PP
If \fIs\fR is TRUE and QIconView::selectionMode() is Single, \fIitem\fR is selected, and the item which was selected is unselected.
If \fIs\fR is TRUE and TQIconView::selectionMode() is Single, \fIitem\fR is selected, and the item which was selected is unselected.
.PP
If \fIs\fR is TRUE and QIconView::selectionMode() is Extended, \fIitem\fR is selected. If \fIcb\fR is TRUE, the selection state of the icon view's other items is left unchanged. If \fIcb\fR is FALSE (the default) all other items are unselected.
If \fIs\fR is TRUE and TQIconView::selectionMode() is Extended, \fIitem\fR is selected. If \fIcb\fR is TRUE, the selection state of the icon view's other items is left unchanged. If \fIcb\fR is FALSE (the default) all other items are unselected.
.PP
If \fIs\fR is TRUE and QIconView::selectionMode() is Multi \fIitem\fR is selected.
If \fIs\fR is TRUE and TQIconView::selectionMode() is Multi \fIitem\fR is selected.
.PP
Note that \fIcb\fR is used only if QIconView::selectionMode() is Extended. \fIcb\fR defaults to FALSE.
Note that \fIcb\fR is used only if TQIconView::selectionMode() is Extended. \fIcb\fR defaults to FALSE.
.PP
All items whose selection status is changed repaint themselves.
.SH "void QIconView::setSelectionMode ( SelectionMode m )\fC [virtual]\fR"
.SH "void TQIconView::setSelectionMode ( SelectionMode m )\fC [virtual]\fR"
Sets the selection mode of the icon view to \fIm\fR. See the "selectionMode" property for details.
.SH "void QIconView::setShowToolTips ( bool b )\fC [virtual]\fR"
.SH "void TQIconView::setShowToolTips ( bool b )\fC [virtual]\fR"
Sets whether the icon view will display a tool tip with the complete text for any truncated item text to \fIb\fR. See the "showToolTips" property for details.
If \fIsort\fR is TRUE, this function sets the icon view to sort items when a new item is inserted. If \fIsort\fR is FALSE, the icon view will not be sorted.
.PP
Note that autoArrange() must be TRUE for sorting to take place.
.PP
If \fIascending\fR is TRUE (the default), items are sorted in ascending order. If \fIascending\fR is FALSE, items are sorted in descending order.
.PP
QIconViewItem::compare() is used to compare pairs of items. The sorting is based on the items' keys; these default to the items' text unless specifically set to something else.
TQIconViewItem::compare() is used to compare pairs of items. The sorting is based on the items' keys; these default to the items' text unless specifically set to something else.
.PP
See also QIconView::autoArrange, QIconView::autoArrange, sortDirection, sort(), and QIconViewItem::setKey().
.SH "void QIconView::setSpacing ( int sp )\fC [virtual]\fR"
See also TQIconView::autoArrange, TQIconView::autoArrange, sortDirection, sort(), and TQIconViewItem::setKey().
.SH "void TQIconView::setSpacing ( int sp )\fC [virtual]\fR"
Sets the space in pixels between icon view items to \fIsp\fR. See the "spacing" property for details.
.SH "void QIconView::setWordWrapIconText ( bool b )\fC [virtual]\fR"
.SH "void TQIconView::setWordWrapIconText ( bool b )\fC [virtual]\fR"
Sets whether the item text will be word-wrapped if it is too long to \fIb\fR. See the "wordWrapIconText" property for details.
.SH "bool QIconView::showToolTips () const"
.SH "bool TQIconView::showToolTips () const"
Returns TRUE if the icon view will display a tool tip with the complete text for any truncated item text; otherwise returns FALSE. See the "showToolTips" property for details.
The icon view is not redrawn immediately after inserting a new item but after a very small delay using a QTimer. This means that when many items are inserted in a loop the icon view is probably redrawn only once at the end of the loop. This makes the insertions both flicker-free and faster.
Sorts and rearranges all the items in the icon view. If \fIascending\fR is TRUE, the items are sorted in increasing order, otherwise they are sorted in decreasing order.
.PP
QIconViewItem::compare() is used to compare pairs of items. The sorting is based on the items' keys; these default to the items' text unless specifically set to something else.
TQIconViewItem::compare() is used to compare pairs of items. The sorting is based on the items' keys; these default to the items' text unless specifically set to something else.
.PP
Note that this function sets the sort order to \fIascending\fR.
.PP
See also QIconViewItem::key(), QIconViewItem::setKey(), QIconViewItem::compare(), QIconView::setSorting(), and QIconView::sortDirection.
.SH "bool QIconView::sortDirection () const"
See also TQIconViewItem::key(), TQIconViewItem::setKey(), TQIconViewItem::compare(), TQIconView::setSorting(), and TQIconView::sortDirection.
.SH "bool TQIconView::sortDirection () const"
Returns TRUE if the sort direction for inserting new items is ascending;; otherwise returns FALSE. See the "sortDirection" property for details.
.SH "bool QIconView::sorting () const"
.SH "bool TQIconView::sorting () const"
Returns TRUE if the icon view sorts on insertion; otherwise returns FALSE. See the "sorting" property for details.
.SH "int QIconView::spacing () const"
.SH "int TQIconView::spacing () const"
Returns the space in pixels between icon view items. See the "spacing" property for details.
Takes the icon view item \fIitem\fR out of the icon view and causes an update of the screen display. The item is not deleted. You should normally not need to call this function because QIconViewItem::~QIconViewItem() calls it. The normal way to delete an item is to delete it.
Takes the icon view item \fIitem\fR out of the icon view and causes an update of the screen display. The item is not deleted. You should normally not need to call this function because TQIconViewItem::~TQIconViewItem() calls it. The normal way to delete an item is to delete it.
.SH "bool TQIconView::wordWrapIconText () const"
Returns TRUE if the item text will be word-wrapped if it is too long; otherwise returns FALSE. See the "wordWrapIconText" property for details.
.SS "Property Documentation"
.SH "Arrangement arrangement"
@ -831,7 +831,7 @@ This property holds whether the icon view rearranges its items when a new item i
.PP
The default is TRUE.
.PP
Note that if the icon view is not visible at the time of insertion, QIconView defers all position-related work until it is shown and then calls arrangeItemsInGrid().
Note that if the icon view is not visible at the time of insertion, TQIconView defers all position-related work until it is shown and then calls arrangeItemsInGrid().
.PP
Set this property's value with setAutoArrange() and get this property's value with autoArrange().
.SH "uint count"
@ -841,7 +841,7 @@ Get this property's value with count().
.SH "int gridX"
This property holds the horizontal grid of the icon view.
.PP
If the value is -1, (the default), QIconView computes suitable column widths based on the icon view's contents.
If the value is -1, (the default), TQIconView computes suitable column widths based on the icon view's contents.
.PP
Note that setting a grid width overrides setMaxItemWidth().
.PP
@ -849,7 +849,7 @@ Set this property's value with setGridX() and get this property's value with gri
.SH "int gridY"
This property holds the vertical grid of the icon view.
.PP
If the value is -1, (the default), QIconView computes suitable column heights based on the icon view's contents.
If the value is -1, (the default), TQIconView computes suitable column heights based on the icon view's contents.
.PP
Set this property's value with setGridY() and get this property's value with gridY().
.SH "QBrush itemTextBackground"
@ -881,7 +881,7 @@ This property holds the maximum width that an item may have.
.PP
The default is 100 pixels.
.PP
Note that if the gridX() value is set QIconView will ignore this property.
Note that if the gridX() value is set TQIconView will ignore this property.
.PP
Set this property's value with setMaxItemWidth() and get this property's value with maxItemWidth().
.SH "ResizeMode resizeMode"
@ -936,7 +936,7 @@ If this property is FALSE, icon text that is too long is truncated, and an ellip
Set this property's value with setWordWrapIconText() and get this property's value with wordWrapIconText().
.SH "SEE ALSO"
.BR http://doc.trolltech.com/ntqiconview.html
.BR http://doc.trolltech.com/tqiconview.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
The QIconViewItem class provides a single item in a QIconView.
The TQIconViewItem class provides a single item in a TQIconView.
.PP
A QIconViewItem contains an icon, a string and optionally a sort key, and can display itself in a QIconView. The class is designed to be very similar to QListView and QListBox in use, both via instantiation and subclassing.
A TQIconViewItem contains an icon, a string and optionally a sort key, and can display itself in a TQIconView. The class is designed to be very similar to QListView and QListBox in use, both via instantiation and subclassing.
.PP
The simplest way to create a QIconViewItem and insert it into a QIconView is to construct the item passing the constructor a pointer to the icon view, a string and an icon:
The simplest way to create a TQIconViewItem and insert it into a TQIconView is to construct the item passing the constructor a pointer to the icon view, a string and an icon:
.PP
.nf
.br
(void) new QIconViewItem(
(void) new TQIconViewItem(
.br
iconView, // A pointer to a QIconView
iconView, // A pointer to a TQIconView
.br
"This is the text of the item",
.br
@ -234,11 +234,11 @@ By default the text of an icon view item may not be edited by the user but calli
.PP
When the icon view is deleted all items in it are deleted automatically.
.PP
The QIconView::firstItem() and QIconViewItem::nextItem() functions provide a means of iterating over all the items in a QIconView:
The TQIconView::firstItem() and TQIconViewItem::nextItem() functions provide a means of iterating over all the items in a TQIconView:
.PP
.nf
.br
QIconViewItem *item;
TQIconViewItem *item;
.br
for ( item = iconView->firstItem(); item; item = item->nextItem() )
.br
@ -254,53 +254,53 @@ The text and icon can be set with setText() and setPixmap() and retrieved with t
.PP
Items may be repositioned with move() and moveBy(). An item's geometry is available from rect(), x(), y(), width(), height(), size(), pos(), textRect() and pixmapRect(). You can also test against the position of a point with contains() and intersects().
.PP
To remove an item from an icon view, just delete the item. The QIconViewItem destructor removes it cleanly from its icon view.
To remove an item from an icon view, just delete the item. The TQIconViewItem destructor removes it cleanly from its icon view.
.PP
Because the icon view is designed to use drag-and-drop, the icon view item also has functions for drag-and-drop which may be reimplemented.
.PP
\fBNote:\fR Pixmaps with individual dimensions larger than 300 pixels may not be displayed properly, depending on the arrangement in use. For example, pixmaps wider than 300 pixels will not be arranged correctly if the icon view uses a QIconView::TopToBottom arrangement, and pixmaps taller than 300 pixels will not be arranged correctly if the icon view uses a QIconView::LeftToRight arrangement.
\fBNote:\fR Pixmaps with individual dimensions larger than 300 pixels may not be displayed properly, depending on the arrangement in use. For example, pixmaps wider than 300 pixels will not be arranged correctly if the icon view uses a TQIconView::TopToBottom arrangement, and pixmaps taller than 300 pixels will not be arranged correctly if the icon view uses a TQIconView::LeftToRight arrangement.
Constructs an icon view item and inserts it into the icon view \fIparent\fR using \fItext\fR as the text and a default icon, after the icon view item \fIafter\fR.
Constructs an icon view item and inserts it into the icon view \fIparent\fR using \fItext\fR as the text and \fIicon\fR as the icon, after the icon view item \fIafter\fR.
Constructs an icon view item and inserts it into the icon view \fIparent\fR using \fItext\fR as the text and \fIpicture\fR as the icon, after the icon view item \fIafter\fR.
This virtual function is responsible for calculating the rectangles returned by rect(), textRect() and pixmapRect(). setRect(), setTextRect() and setPixmapRect() are provided mainly for reimplementations of this function.
.PP
\fItext_\fR is an internal parameter which defaults to TQString::null.
.SH "int QIconViewItem::compare ( QIconViewItem * i ) const\fC [virtual]\fR"
.SH "int TQIconViewItem::compare ( TQIconViewItem * i ) const\fC [virtual]\fR"
Compares this icon view item to \fIi\fR. Returns -1 if this item is less than \fIi\fR, 0 if they are equal, and 1 if this icon view item is greater than \fIi\fR.
.PP
The default implementation compares the item keys (key()) using TQString::localeAwareCompare(). A reimplementation may use different values and a different comparison function. Here is a reimplementation that uses plain Unicode comparison:
.PP
.nf
.br
int MyIconViewItem::compare( QIconViewItem *i ) const
int MyIconViewItem::compare( TQIconViewItem *i ) const
.br
{
.br
@ -311,79 +311,79 @@ The default implementation compares the item keys (key()) using TQString::locale
.fi
.PP
See also key(), TQString::localeAwareCompare(), and TQString::compare().
This function is called when something is dropped on the item. \fIe\fR provides all the information about the drop. If the drag object of the drop was a QIconDrag, \fIlst\fR contains the list of the dropped items. You can get the data by calling QIconDragItem::data() on each item. If the \fIlst\fR is empty, i.e. the drag was not a QIconDrag, you must decode the data in \fIe\fR and work with that.
This function is called when something is dropped on the item. \fIe\fR provides all the information about the drop. If the drag object of the drop was a TQIconDrag, \fIlst\fR contains the list of the dropped items. You can get the data by calling TQIconDragItem::data() on each item. If the \fIlst\fR is empty, i.e. the drag was not a TQIconDrag, you must decode the data in \fIe\fR and work with that.
.PP
The default implementation does nothing; subclasses may reimplement this function.
.PP
Examples:
.)l fileiconview/qfileiconview.cpp and iconview/simple_dd/main.cpp.
Paints the item using the painter \fIp\fR and the color group \fIcg\fR. If you want the item to be drawn with a different font or color, reimplement this function, change the values of the color group or the painter's font, and then call the QIconViewItem::paintItem() with the changed values.
Paints the item using the painter \fIp\fR and the color group \fIcg\fR. If you want the item to be drawn with a different font or color, reimplement this function, change the values of the color group or the painter's font, and then call the TQIconViewItem::paintItem() with the changed values.
Returns the icon of the icon view item if it is a picture, or 0 if it is a pixmap. In the latter case use pixmap() instead. Normally you set the picture of the item with setPicture(), but sometimes it's inconvenient to call setPicture() for every item. So you can subclass QIconViewItem, reimplement this function and return a pointer to the item's picture. If you do this, you \fImust\fR call calcRect() manually each time the size of this picture changes.
Returns the icon of the icon view item if it is a picture, or 0 if it is a pixmap. In the latter case use pixmap() instead. Normally you set the picture of the item with setPicture(), but sometimes it's inconvenient to call setPicture() for every item. So you can subclass TQIconViewItem, reimplement this function and return a pointer to the item's picture. If you do this, you \fImust\fR call calcRect() manually each time the size of this picture changes.
Returns the icon of the icon view item if it is a pixmap, or 0 if it is a picture. In the latter case use picture() instead. Normally you set the pixmap of the item with setPixmap(), but sometimes it's inconvenient to call setPixmap() for every item. So you can subclass QIconViewItem, reimplement this function and return a pointer to the item's pixmap. If you do this, you \fImust\fR call calcRect() manually each time the size of this pixmap changes.
Returns the icon of the icon view item if it is a pixmap, or 0 if it is a picture. In the latter case use picture() instead. Normally you set the pixmap of the item with setPixmap(), but sometimes it's inconvenient to call setPixmap() for every item. So you can subclass TQIconViewItem, reimplement this function and return a pointer to the item's pixmap. If you do this, you \fImust\fR call calcRect() manually each time the size of this pixmap changes.
Returns the bounding rectangle of the item's icon.
.PP
If \fIrelative\fR is TRUE, (the default), the rectangle is relative to the origin of the item's rectangle. If \fIrelative\fR is FALSE, the returned rectangle is relative to the origin of the icon view's contents coordinate system.
.PP
Example: fileiconview/qfileiconview.cpp.
.SH "QPoint QIconViewItem::pos () const"
.SH "QPoint TQIconViewItem::pos () const"
Returns the position of the item (in contents coordinates).
Removes the editbox that is used for in-place renaming.
.SH "void QIconViewItem::rename ()"
.SH "void TQIconViewItem::rename ()"
Starts in-place renaming of an icon, if allowed.
.PP
This function sets up the icon view so that the user can edit the item text, and then returns. When the user is done, setText() will be called and QIconView::itemRenamed() will be emitted (unless the user canceled, e.g. by pressing the Escape key).
This function sets up the icon view so that the user can edit the item text, and then returns. When the user is done, setText() will be called and TQIconView::itemRenamed() will be emitted (unless the user canceled, e.g. by pressing the Escape key).
.PP
See also setRenameEnabled().
.PP
Example: fileiconview/qfileiconview.cpp.
.SH "bool QIconViewItem::renameEnabled () const"
.SH "bool TQIconViewItem::renameEnabled () const"
Returns TRUE if the item can be renamed by the user with in-place renaming; otherwise returns FALSE.
Make your derived classes return their own values for rtti(), so that you can distinguish between icon view item types. You should use values greater than 1000, preferably a large random number, to allow for extensions to this class.
If \fIallow\fR is TRUE, the icon view permits the user to drag the icon view item either to another position within the icon view or to somewhere outside of it. If \fIallow\fR is FALSE, the item cannot be dragged.
If \fIallow\fR is TRUE, the icon view lets the user drop something on this icon view item.
.SH "void QIconViewItem::setItemRect ( const QRect & r )\fC [protected]\fR"
.SH "void TQIconViewItem::setItemRect ( const QRect & r )\fC [protected]\fR"
Sets the bounding rectangle of the whole item to \fIr\fR. This function is provided for subclasses which reimplement calcRect(), so that they can set the calculated rectangle. \fIAny other use is discouraged.\fR
.PP
See also calcRect(), textRect(), setTextRect(), pixmapRect(), and setPixmapRect().
.SH "void QIconViewItem::setKey ( const TQString & k )\fC [virtual]\fR"
.SH "void TQIconViewItem::setKey ( const TQString & k )\fC [virtual]\fR"
Sets \fIk\fR as the sort key of the icon view item. By default text() is used for sorting.
Sets \fIicon\fR as the item's icon in the icon view. This function might be a no-op if you reimplement pixmap().
.PP
\fBNote:\fR Pixmaps with individual dimensions larger than 300 pixels may not be displayed properly, depending on the arrangement in use. See the main class documentation for details.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Sets \fIicon\fR as the item's icon in the icon view. If \fIrecalc\fR is TRUE, the icon view's layout is recalculated. If \fIredraw\fR is TRUE (the default), the icon view is repainted.
@ -478,80 +478,80 @@ Sets \fIicon\fR as the item's icon in the icon view. If \fIrecalc\fR is TRUE, th
\fBNote:\fR Pixmaps with individual dimensions larger than 300 pixels may not be displayed properly, depending on the arrangement in use. See the main class documentation for details.
.PP
See also pixmap().
.SH "void QIconViewItem::setPixmapRect ( const QRect & r )\fC [protected]\fR"
.SH "void TQIconViewItem::setPixmapRect ( const QRect & r )\fC [protected]\fR"
Sets the bounding rectangle of the item's icon to \fIr\fR. This function is provided for subclasses which reimplement calcRect(), so that they can set the calculated rectangle. \fIAny other use is discouraged.\fR
.PP
See also calcRect(), pixmapRect(), setItemRect(), and setTextRect().
If \fIallow\fR is TRUE, the user can rename the icon view item by clicking on the text (or pressing F2) while the item is selected (in-place renaming). If \fIallow\fR is FALSE, in-place renaming is not possible.
.PP
Examples:
.)l fileiconview/qfileiconview.cpp, iconview/main.cpp, and iconview/simple_dd/main.cpp.
Sets this item to be selectable if \fIenable\fR is TRUE (the default) or unselectable if \fIenable\fR is FALSE.
.PP
The user is unable to select a non-selectable item using either the keyboard or the mouse. (The application programmer can select an item in code regardless of this setting.)
Selects or unselects the item, depending on \fIs\fR; it may also unselect other items, depending on TQIconView::selectionMode() and \fIcb\fR.
.PP
If \fIs\fR is FALSE, the item is unselected.
.PP
If \fIs\fR is TRUE and QIconView::selectionMode() is \fCSingle\fR, the item is selected and the item previously selected is unselected.
If \fIs\fR is TRUE and TQIconView::selectionMode() is \fCSingle\fR, the item is selected and the item previously selected is unselected.
.PP
If \fIs\fR is TRUE and QIconView::selectionMode() is \fCExtended\fR, the item is selected. If \fIcb\fR is TRUE, the selection state of the other items is left unchanged. If \fIcb\fR is FALSE (the default) all other items are unselected.
If \fIs\fR is TRUE and TQIconView::selectionMode() is \fCExtended\fR, the item is selected. If \fIcb\fR is TRUE, the selection state of the other items is left unchanged. If \fIcb\fR is FALSE (the default) all other items are unselected.
.PP
If \fIs\fR is TRUE and QIconView::selectionMode() is \fCMulti\fR, the item is selected.
If \fIs\fR is TRUE and TQIconView::selectionMode() is \fCMulti\fR, the item is selected.
.PP
Note that \fIcb\fR is used only if QIconView::selectionMode() is \fCExtended\fR; cb defaults to FALSE.
Note that \fIcb\fR is used only if TQIconView::selectionMode() is \fCExtended\fR; cb defaults to FALSE.
.PP
All items whose selection status changes repaint themselves.
.PP
Example: fileiconview/qfileiconview.cpp.
.SH "void QIconViewItem::setSelected ( bool s )\fC [virtual]\fR"
.SH "void TQIconViewItem::setSelected ( bool s )\fC [virtual]\fR"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
This variant is equivalent to calling the other variant with \fIcb\fR set to FALSE.
.SH "void QIconViewItem::setText ( const TQString & text )\fC [virtual]\fR"
.SH "void TQIconViewItem::setText ( const TQString & text )\fC [virtual]\fR"
Sets \fItext\fR as the text of the icon view item. This function might be a no-op if you reimplement text().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Sets \fItext\fR as the text of the icon view item. If \fIrecalc\fR is TRUE, the icon view's layout is recalculated. If \fIredraw\fR is TRUE (the default), the icon view is repainted.
.PP
See also text().
.SH "void QIconViewItem::setTextRect ( const QRect & r )\fC [protected]\fR"
.SH "void TQIconViewItem::setTextRect ( const QRect & r )\fC [protected]\fR"
Sets the bounding rectangle of the item's text to \fIr\fR. This function is provided for subclasses which reimplement calcRect(), so that they can set the calculated rectangle. \fIAny other use is discouraged.\fR
.PP
See also calcRect(), textRect(), setItemRect(), and setPixmapRect().
Returns the text of the icon view item. Normally you set the text of the item with setText(), but sometimes it's inconvenient to call setText() for every item; so you can subclass QIconViewItem, reimplement this function, and return the text of the item. If you do this, you must call calcRect() manually each time the text (and therefore its size) changes.
Returns the text of the icon view item. Normally you set the text of the item with setText(), but sometimes it's inconvenient to call setText() for every item; so you can subclass TQIconViewItem, reimplement this function, and return the text of the item. If you do this, you must call calcRect() manually each time the text (and therefore its size) changes.
Returns the bounding rectangle of the item's text.
.PP
If \fIrelative\fR is TRUE, (the default), the returned rectangle is relative to the origin of the item's rectangle. If \fIrelative\fR is FALSE, the returned rectangle is relative to the origin of the icon view's contents coordinate system.
.PP
Example: fileiconview/qfileiconview.cpp.
.SH "int QIconViewItem::width () const"
.SH "int TQIconViewItem::width () const"
Returns the width of the item.
.SH "int QIconViewItem::x () const"
.SH "int TQIconViewItem::x () const"
Returns the x-coordinate of the item (in contents coordinates).
.SH "int QIconViewItem::y () const"
.SH "int TQIconViewItem::y () const"
Returns the y-coordinate of the item (in contents coordinates).
.SH "SEE ALSO"
.BR http://doc.trolltech.com/qiconviewitem.html
.BR http://doc.trolltech.com/tqiconviewitem.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
.BI "int \fBinsertItem\fR ( const TQString & text, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( const QIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
.BI "int \fBinsertItem\fR ( const TQIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( const QPixmap & pixmap, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( const QIconSet & icon, const QPixmap & pixmap, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
.BI "int \fBinsertItem\fR ( const TQIconSet & icon, const QPixmap & pixmap, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( const TQString & text, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( const QIconSet & icon, const TQString & text, int id = -1, int index = -1 )"
.BI "int \fBinsertItem\fR ( const TQIconSet & icon, const TQString & text, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( const TQString & text, QPopupMenu * popup, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( const QIconSet & icon, const TQString & text, QPopupMenu * popup, int id = -1, int index = -1 )"
.BI "int \fBinsertItem\fR ( const TQIconSet & icon, const TQString & text, QPopupMenu * popup, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( const QPixmap & pixmap, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( const QIconSet & icon, const QPixmap & pixmap, int id = -1, int index = -1 )"
.BI "int \fBinsertItem\fR ( const TQIconSet & icon, const QPixmap & pixmap, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( const QIconSet & icon, const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 )"
.BI "int \fBinsertItem\fR ( const TQIconSet & icon, const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( TQWidget * widget, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( const QIconSet & icon, QCustomMenuItem * custom, int id = -1, int index = -1 )"
.BI "int \fBinsertItem\fR ( const TQIconSet & icon, QCustomMenuItem * custom, int id = -1, int index = -1 )"
.br
.ti -1c
.BI "int \fBinsertItem\fR ( QCustomMenuItem * custom, int id = -1, int index = -1 )"
@ -316,7 +316,7 @@ If you need to translate accelerators, use tr() with the text and accelerator. (
.PP
In the example above, pressing Ctrl+O or selecting "Open" from the menu activates the myView->open() function.
.PP
Some insert functions take a QIconSet parameter to specify the little menu item icon. Note that you can always pass a QPixmap object instead.
Some insert functions take a TQIconSet parameter to specify the little menu item icon. Note that you can always pass a QPixmap object instead.
.PP
The \fIid\fR specifies the identification number associated with the menu item. Note that only positive values are valid, as a negative value will make TQt select a unique id for the item.
.PP
@ -334,7 +334,7 @@ See also removeItem(), changeItem(), setAccel(), connectItem(), QAccel, and ntqn
.PP
Examples:
.)l addressbook/mainwindow.cpp, canvas/canvas.cpp, menu/menu.cpp, qwerty/qwerty.cpp, scrollview/scrollview.cpp, showimg/showimg.cpp, and sound/sound.cpp.
.SH "int QMenuData::insertItem ( const QIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, text \fItext\fR, accelerator \fIaccel\fR, optional id \fIid\fR, and optional \fIindex\fR position. The menu item is connected it to the \fIreceiver\fR's \fImember\fR slot. The icon will be displayed to the left of the text in the item.
@ -352,7 +352,7 @@ To look best when being highlighted as a menu item, the pixmap should provide a
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const QPixmap & pixmap, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const QPixmap & pixmap, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, pixmap \fIpixmap\fR, accelerator \fIaccel\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the pixmap in the item. The item is connected to the \fImember\fR slot in the \fIreceiver\fR object.
@ -370,7 +370,7 @@ Inserts a menu item with text \fItext\fR, optional id \fIid\fR, and optional \fI
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const TQString & text, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const TQString & text, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, text \fItext\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the text in the item.
@ -388,7 +388,7 @@ The \fIpopup\fR must be deleted by the programmer or by its parent widget. It is
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const TQString & text, QPopupMenu * popup, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const TQString & text, QPopupMenu * popup, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, text \fItext\fR, submenu \fIpopup\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the text in the item.
@ -408,7 +408,7 @@ To look best when being highlighted as a menu item, the pixmap should provide a
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const QPixmap & pixmap, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const QPixmap & pixmap, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, pixmap \fIpixmap\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the pixmap in the item.
@ -426,7 +426,7 @@ The \fIpopup\fR must be deleted by the programmer or by its parent widget. It is
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, pixmap \fIpixmap\fR submenu \fIpopup\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the pixmap in the item.
@ -464,7 +464,7 @@ If the widget is focus-enabled it will get focus when the user traverses the pop
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, QCustomMenuItem * custom, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, QCustomMenuItem * custom, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a custom menu item \fIcustom\fR with an \fIicon\fR and with optional id \fIid\fR, and optional \fIindex\fR position.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Changes the iconset and pixmap of the menu item \fIid\fR to \fIicon\fR and \fIpixmap\fR respectively.
@ -256,7 +256,7 @@ See also text().
Changes the pixmap of the menu item \fIid\fR. If the item has an icon, the icon remains unchanged.
.PP
See also pixmap().
.SH "void QMenuData::changeItem ( const QIconSet & icon, const TQString & text, int id )"
.SH "void QMenuData::changeItem ( const TQIconSet & icon, const TQString & text, int id )"
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
Changes the icon and text of the menu item \fIid\fR.
@ -301,7 +301,7 @@ Returns the menu item with identifier \fIid\fR, or 0 if there is no item with th
Note that QMenuItem is an internal class, and that you should not need to call this function. Use the higher level functions like text(), pixmap() and changeItem() to get and modify menu item attributes instead.
.PP
See also indexOf().
.SH "QIconSet * QMenuData::iconSet ( int id ) const"
.SH "TQIconSet * QMenuData::iconSet ( int id ) const"
Returns the icon set that has been set for menu item \fIid\fR, or 0 if no icon set has been set.
.PP
See also changeItem(), text(), and pixmap().
@ -356,7 +356,7 @@ If you need to translate accelerators, use tr() with the text and accelerator. (
.PP
In the example above, pressing Ctrl+O or selecting "Open" from the menu activates the myView->open() function.
.PP
Some insert functions take a QIconSet parameter to specify the little menu item icon. Note that you can always pass a QPixmap object instead.
Some insert functions take a TQIconSet parameter to specify the little menu item icon. Note that you can always pass a QPixmap object instead.
.PP
The \fIid\fR specifies the identification number associated with the menu item. Note that only positive values are valid, as a negative value will make TQt select a unique id for the item.
.PP
@ -374,7 +374,7 @@ See also removeItem(), changeItem(), setAccel(), connectItem(), QAccel, and ntqn
.PP
Examples:
.)l addressbook/mainwindow.cpp, canvas/canvas.cpp, menu/menu.cpp, qwerty/qwerty.cpp, scrollview/scrollview.cpp, showimg/showimg.cpp, and sound/sound.cpp.
.SH "int QMenuData::insertItem ( const QIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, text \fItext\fR, accelerator \fIaccel\fR, optional id \fIid\fR, and optional \fIindex\fR position. The menu item is connected it to the \fIreceiver\fR's \fImember\fR slot. The icon will be displayed to the left of the text in the item.
@ -392,7 +392,7 @@ To look best when being highlighted as a menu item, the pixmap should provide a
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const QPixmap & pixmap, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const QPixmap & pixmap, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, pixmap \fIpixmap\fR, accelerator \fIaccel\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the pixmap in the item. The item is connected to the \fImember\fR slot in the \fIreceiver\fR object.
@ -410,7 +410,7 @@ Inserts a menu item with text \fItext\fR, optional id \fIid\fR, and optional \fI
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const TQString & text, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const TQString & text, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, text \fItext\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the text in the item.
@ -428,7 +428,7 @@ The \fIpopup\fR must be deleted by the programmer or by its parent widget. It is
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const TQString & text, QPopupMenu * popup, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const TQString & text, QPopupMenu * popup, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, text \fItext\fR, submenu \fIpopup\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the text in the item.
@ -448,7 +448,7 @@ To look best when being highlighted as a menu item, the pixmap should provide a
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const QPixmap & pixmap, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const QPixmap & pixmap, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, pixmap \fIpixmap\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the pixmap in the item.
@ -466,7 +466,7 @@ The \fIpopup\fR must be deleted by the programmer or by its parent widget. It is
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, pixmap \fIpixmap\fR submenu \fIpopup\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the pixmap in the item.
@ -504,7 +504,7 @@ If the widget is focus-enabled it will get focus when the user traverses the pop
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, QCustomMenuItem * custom, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, QCustomMenuItem * custom, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a custom menu item \fIcustom\fR with an \fIicon\fR and with optional id \fIid\fR, and optional \fIindex\fR position.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Changes the iconset and pixmap of the menu item \fIid\fR to \fIicon\fR and \fIpixmap\fR respectively.
@ -389,7 +389,7 @@ See also popup() and sizeHint.
This signal is emitted when a menu item is highlighted; \fIid\fR is the id of the highlighted item.
.PP
See also activated() and QMenuData::insertItem().
.SH "QIconSet * QMenuData::iconSet ( int id ) const"
.SH "TQIconSet * QMenuData::iconSet ( int id ) const"
Returns the icon set that has been set for menu item \fIid\fR, or 0 if no icon set has been set.
.PP
See also changeItem(), text(), and pixmap().
@ -444,7 +444,7 @@ If you need to translate accelerators, use tr() with the text and accelerator. (
.PP
In the example above, pressing Ctrl+O or selecting "Open" from the menu activates the myView->open() function.
.PP
Some insert functions take a QIconSet parameter to specify the little menu item icon. Note that you can always pass a QPixmap object instead.
Some insert functions take a TQIconSet parameter to specify the little menu item icon. Note that you can always pass a QPixmap object instead.
.PP
The \fIid\fR specifies the identification number associated with the menu item. Note that only positive values are valid, as a negative value will make TQt select a unique id for the item.
.PP
@ -462,7 +462,7 @@ See also removeItem(), changeItem(), setAccel(), connectItem(), QAccel, and ntqn
.PP
Examples:
.)l addressbook/mainwindow.cpp, canvas/canvas.cpp, menu/menu.cpp, qwerty/qwerty.cpp, scrollview/scrollview.cpp, showimg/showimg.cpp, and sound/sound.cpp.
.SH "int QMenuData::insertItem ( const QIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, text \fItext\fR, accelerator \fIaccel\fR, optional id \fIid\fR, and optional \fIindex\fR position. The menu item is connected it to the \fIreceiver\fR's \fImember\fR slot. The icon will be displayed to the left of the text in the item.
@ -480,7 +480,7 @@ To look best when being highlighted as a menu item, the pixmap should provide a
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const QPixmap & pixmap, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const QPixmap & pixmap, const TQObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, pixmap \fIpixmap\fR, accelerator \fIaccel\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the pixmap in the item. The item is connected to the \fImember\fR slot in the \fIreceiver\fR object.
@ -498,7 +498,7 @@ Inserts a menu item with text \fItext\fR, optional id \fIid\fR, and optional \fI
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const TQString & text, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const TQString & text, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, text \fItext\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the text in the item.
@ -516,7 +516,7 @@ The \fIpopup\fR must be deleted by the programmer or by its parent widget. It is
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const TQString & text, QPopupMenu * popup, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const TQString & text, QPopupMenu * popup, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, text \fItext\fR, submenu \fIpopup\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the text in the item.
@ -536,7 +536,7 @@ To look best when being highlighted as a menu item, the pixmap should provide a
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const QPixmap & pixmap, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const QPixmap & pixmap, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, pixmap \fIpixmap\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the pixmap in the item.
@ -554,7 +554,7 @@ The \fIpopup\fR must be deleted by the programmer or by its parent widget. It is
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem(), changeItem(), setAccel(), and connectItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a menu item with icon \fIicon\fR, pixmap \fIpixmap\fR submenu \fIpopup\fR, optional id \fIid\fR, and optional \fIindex\fR position. The icon will be displayed to the left of the pixmap in the item.
@ -592,7 +592,7 @@ If the widget is focus-enabled it will get focus when the user traverses the pop
Returns the allocated menu identifier number (\fIid\fR if \fIid\fR >= 0).
.PP
See also removeItem().
.SH "int QMenuData::insertItem ( const QIconSet & icon, QCustomMenuItem * custom, int id = -1, int index = -1 )"
.SH "int QMenuData::insertItem ( const TQIconSet & icon, QCustomMenuItem * custom, int id = -1, int index = -1 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts a custom menu item \fIcustom\fR with an \fIicon\fR and with optional id \fIid\fR, and optional \fIindex\fR position.
@ -1176,7 +1176,7 @@ This enum describes how the items in a widget are sorted.
.TP
\fCQt::Descending\fR - The items are sorted descending e.g. starts with 'ZZZ' ends with 'AAA' in Latin-1 locales
.SH "TQt::StringComparisonMode"
This enum type is used to set the string comparison mode when searching for an item. It is used by QListBox, QListView and QIconView, for example. We'll refer to the string being searched as the 'target' string.
This enum type is used to set the string comparison mode when searching for an item. It is used by QListBox, QListView and TQIconView, for example. We'll refer to the string being searched as the 'target' string.
.TP
\fCQt::CaseSensitive\fR - The strings must match case sensitively.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Adds another tab and page to the tab view.
@ -246,7 +246,7 @@ This is an overloaded member function, provided for convenience. It behaves esse
This is a low-level function for adding tabs. It is useful if you are using setTabBar() to set a QTabBar subclass with an overridden QTabBar::paint() function for a subclass of QTab. The \fIchild\fR is the new page and \fItab\fR is the tab to put the \fIchild\fR on.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts another tab and page to the tab view.
@ -326,7 +326,7 @@ QTabWidget uses TQWidget::setEnabled() internally, rather than keeping a separat
Note that even a disabled tab/page may be visible. If the page is visible already, QTabWidget will not hide it; if all the pages are disabled, QTabWidget will show one of them.
Adds the widget \fIitem\fR in a new tab at bottom of the toolbox. The new tab's label is set to \fIlabel\fR, and the \fIiconSet\fR is displayed to the left of the \fIlabel\fR. Returns the new tab's index.
Inserts the widget \fIitem\fR at position \fIindex\fR, or at the bottom of the toolbox if \fIindex\fR is out of range. The new item's label is set to \fIlabel\fR, and the \fIiconSet\fR is displayed to the left of the \fIlabel\fR. Returns the new item's index.
.BI "QIconSet \fBiconSet\fR - the icon set providing the icon shown on the button"
.BI "TQIconSet \fBiconSet\fR - the icon set providing the icon shown on the button"
.br
.ti -1c
.BI "bool \fBon\fR - whether this tool button is on"
@ -146,7 +146,7 @@ A tool button is a special button that provides quick-access to specific command
.PP
QToolButton supports auto-raising. In auto-raise mode, the button draws a 3D frame only when the mouse points at it. The feature is automatically turned on when a button is used inside a QToolBar. Change it with setAutoRaise().
.PP
A tool button's icon is set as QIconSet. This makes it possible to specify different pixmaps for the disabled and active state. The disabled pixmap is used when the button's functionality is not available. The active pixmap is displayed when the button is auto-raised because the mouse pointer is hovering over it.
A tool button's icon is set as TQIconSet. This makes it possible to specify different pixmaps for the disabled and active state. The disabled pixmap is used when the button's functionality is not available. The active pixmap is displayed when the button is auto-raised because the mouse pointer is hovering over it.
.PP
The button's look and dimension is adjustable with setUsesBigPixmap() and setUsesTextLabel(). When used inside a QToolBar in a QMainWindow, the button automatically adjusts to QMainWindow's settings (see QMainWindow::setUsesTextLabel() and QMainWindow::setUsesBigPixmaps()). The pixmap set on a QToolButton will be set to 22x22 if it is bigger than this size. If usesBigPixmap() is TRUE, then the pixmap will be set to 32x32.
.PP
@ -169,7 +169,7 @@ The position of the tool button's textLabel in relation to the tool button's ico
Constructs a tool button called \fIname\fR, that is a child of \fIparent\fR (which must be a QToolBar).
.PP
The tool button will display \fIiconSet\fR, with its text label and tool tip set to \fItextLabel\fR and its status bar message set to \fIgrouptext\fR. It will be connected to the \fIslot\fR in object \fIreceiver\fR.
@ -183,7 +183,7 @@ The \fIparent\fR and \fIname\fR arguments are sent to the TQWidget constructor.
Destroys the object and frees any allocated resources.
.SH "bool QToolButton::autoRaise () const"
Returns TRUE if auto-raising is enabled; otherwise returns FALSE. See the "autoRaise" property for details.
.SH "QIconSet QToolButton::iconSet () const"
.SH "TQIconSet QToolButton::iconSet () const"
Returns the icon set providing the icon shown on the button. See the "iconSet" property for details.
.SH "void QToolButton::openPopup ()"
Opens (pops up) the associated popup menu. If there is no such menu, this function does nothing. This function does not return until the popup menu has been closed by the user.
@ -195,7 +195,7 @@ See also setPopup().
Returns the time delay between pressing the button and the appearance of the associated popup menu in milliseconds. See the "popupDelay" property for details.