Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 4595

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- q3listview.cpp -->
  <title>Qt 4.8: Q3ListViewItem Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li>Qt3SupportLight</li>
<li>Q3ListViewItem</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3ListViewItem Class Reference</h1>
<!-- $$$Q3ListViewItem-brief -->
<p>The Q3ListViewItem class implements a list view item. <a href="#details">More...</a></p>
<!-- @@@Q3ListViewItem -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3ListViewItem&gt;</span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html">Porting to Qt 4</a> for more information.</p>
<p><b>Inherited by: </b><a href="q3checklistitem.html">Q3CheckListItem</a>.</p>
<ul>
<li><a href="q3listviewitem-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#Q3ListViewItem">Q3ListViewItem</a></b> ( Q3ListView * <i>parent</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#Q3ListViewItem-2">Q3ListViewItem</a></b> ( Q3ListViewItem * <i>parent</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#Q3ListViewItem-3">Q3ListViewItem</a></b> ( Q3ListView * <i>parent</i>, Q3ListViewItem * <i>after</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#Q3ListViewItem-4">Q3ListViewItem</a></b> ( Q3ListViewItem * <i>parent</i>, Q3ListViewItem * <i>after</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#Q3ListViewItem-5">Q3ListViewItem</a></b> ( Q3ListView * <i>parent</i>, const QString &amp; <i>label1</i>, const QString &amp; <i>label2</i> = QString(), const QString &amp; <i>label3</i> = QString(), const QString &amp; <i>label4</i> = QString(), const QString &amp; <i>label5</i> = QString(), const QString &amp; <i>label6</i> = QString(), const QString &amp; <i>label7</i> = QString(), const QString &amp; <i>label8</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#Q3ListViewItem-6">Q3ListViewItem</a></b> ( Q3ListViewItem * <i>parent</i>, const QString &amp; <i>label1</i>, const QString &amp; <i>label2</i> = QString(), const QString &amp; <i>label3</i> = QString(), const QString &amp; <i>label4</i> = QString(), const QString &amp; <i>label5</i> = QString(), const QString &amp; <i>label6</i> = QString(), const QString &amp; <i>label7</i> = QString(), const QString &amp; <i>label8</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#Q3ListViewItem-7">Q3ListViewItem</a></b> ( Q3ListView * <i>parent</i>, Q3ListViewItem * <i>after</i>, const QString &amp; <i>label1</i>, const QString &amp; <i>label2</i> = QString(), const QString &amp; <i>label3</i> = QString(), const QString &amp; <i>label4</i> = QString(), const QString &amp; <i>label5</i> = QString(), const QString &amp; <i>label6</i> = QString(), const QString &amp; <i>label7</i> = QString(), const QString &amp; <i>label8</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#Q3ListViewItem-8">Q3ListViewItem</a></b> ( Q3ListViewItem * <i>parent</i>, Q3ListViewItem * <i>after</i>, const QString &amp; <i>label1</i>, const QString &amp; <i>label2</i> = QString(), const QString &amp; <i>label3</i> = QString(), const QString &amp; <i>label4</i> = QString(), const QString &amp; <i>label5</i> = QString(), const QString &amp; <i>label6</i> = QString(), const QString &amp; <i>label7</i> = QString(), const QString &amp; <i>label8</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#dtor.Q3ListViewItem">~Q3ListViewItem</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#acceptDrop">acceptDrop</a></b> ( const QMimeSource * <i>mime</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#childCount">childCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#compare">compare</a></b> ( Q3ListViewItem * <i>i</i>, int <i>col</i>, bool <i>ascending</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#depth">depth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#dragEnabled">dragEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#dropEnabled">dropEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ListViewItem * </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#firstChild">firstChild</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#height">height</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#insertItem">insertItem</a></b> ( Q3ListViewItem * <i>newChild</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#invalidateHeight">invalidateHeight</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#isEnabled">isEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#isExpandable">isExpandable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#isOpen">isOpen</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#isSelectable">isSelectable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#isSelected">isSelected</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#isVisible">isVisible</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ListViewItem * </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#itemAbove">itemAbove</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ListViewItem * </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#itemBelow">itemBelow</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#itemPos">itemPos</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#key">key</a></b> ( int <i>column</i>, bool <i>ascending</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ListView * </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#listView">listView</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#moveItem">moveItem</a></b> ( Q3ListViewItem * <i>after</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#multiLinesEnabled">multiLinesEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ListViewItem * </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#nextSibling">nextSibling</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#paintBranches">paintBranches</a></b> ( QPainter * <i>p</i>, const QColorGroup &amp; <i>cg</i>, int <i>w</i>, int <i>y</i>, int <i>h</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#paintCell">paintCell</a></b> ( QPainter * <i>painter</i>, const QColorGroup &amp; <i>cg</i>, int <i>column</i>, int <i>width</i>, int <i>align</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#paintFocus">paintFocus</a></b> ( QPainter * <i>p</i>, const QColorGroup &amp; <i>cg</i>, const QRect &amp; <i>r</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ListViewItem * </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#parent">parent</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual const QPixmap * </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#pixmap">pixmap</a></b> ( int <i>column</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#removeItem">removeItem</a></b> ( Q3ListViewItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#renameEnabled">renameEnabled</a></b> ( int <i>col</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#repaint">repaint</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#rtti">rtti</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setDragEnabled">setDragEnabled</a></b> ( bool <i>allow</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setDropEnabled">setDropEnabled</a></b> ( bool <i>allow</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setEnabled">setEnabled</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setExpandable">setExpandable</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setMultiLinesEnabled">setMultiLinesEnabled</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setOpen">setOpen</a></b> ( bool <i>o</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setPixmap">setPixmap</a></b> ( int <i>column</i>, const QPixmap &amp; <i>pm</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setRenameEnabled">setRenameEnabled</a></b> ( int <i>col</i>, bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setSelectable">setSelectable</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setSelected">setSelected</a></b> ( bool <i>s</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setText">setText</a></b> ( int <i>column</i>, const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setVisible">setVisible</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setup">setup</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#sort">sort</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#sortChildItems">sortChildItems</a></b> ( int <i>column</i>, bool <i>ascending</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#startRename">startRename</a></b> ( int <i>col</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#takeItem">takeItem</a></b> ( Q3ListViewItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#text">text</a></b> ( int <i>column</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#totalHeight">totalHeight</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#width">width</a></b> ( const QFontMetrics &amp; <i>fm</i>, const Q3ListView * <i>lv</i>, int <i>c</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#widthChanged">widthChanged</a></b> ( int <i>c</i> = -1 ) const</td></tr>
</table>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#activate">activate</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#activatedPos">activatedPos</a></b> ( QPoint &amp; <i>pos</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#cancelRename">cancelRename</a></b> ( int <i>col</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#dragEntered">dragEntered</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#dragLeft">dragLeft</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#dropped">dropped</a></b> ( QDropEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#enforceSortOrder">enforceSortOrder</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#okRename">okRename</a></b> ( int <i>col</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listviewitem.html#setHeight">setHeight</a></b> ( int <i>height</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$Q3ListViewItem-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3ListViewItem class implements a list view item.</p>
<p>A list view item is a multi-column object capable of displaying itself in a <a href="q3listview.html">Q3ListView</a>.</p>
<p>The easiest way to use Q3ListViewItem is to construct one with a few constant strings, and either a <a href="q3listview.html">Q3ListView</a> or another Q3ListViewItem as parent.</p>
<pre class="cpp"> (<span class="type">void</span>) <span class="keyword">new</span> <span class="type">Q3ListViewItem</span>(listView<span class="operator">,</span> <span class="string">&quot;Column 1&quot;</span><span class="operator">,</span> <span class="string">&quot;Column 2&quot;</span>);
 (<span class="type">void</span>) <span class="keyword">new</span> <span class="type">Q3ListViewItem</span>(listView<span class="operator">-</span><span class="operator">&gt;</span>firstChild()<span class="operator">,</span> <span class="string">&quot;A&quot;</span><span class="operator">,</span> <span class="string">&quot;B&quot;</span><span class="operator">,</span> <span class="string">&quot;C&quot;</span>);</pre>
<p>We've discarded the pointers to the items since we can still access them via their parent <i>listView</i>. By default, <a href="q3listview.html">Q3ListView</a> sorts its items; this can be switched off with Q3ListView::setSorting(-1).</p>
<p>The parent must be another Q3ListViewItem or a <a href="q3listview.html">Q3ListView</a>. If the parent is a <a href="q3listview.html">Q3ListView</a>, the item becomes a top-level item within that <a href="q3listview.html">Q3ListView</a>. If the parent is another Q3ListViewItem, the item becomes a child of that list view item.</p>
<p>If you keep the pointer, you can set or change the texts using <a href="q3listviewitem.html#setText">setText</a>(), add pixmaps using <a href="q3listviewitem.html#setPixmap">setPixmap</a>(), change its mode using <a href="q3listviewitem.html#setSelectable">setSelectable</a>(), <a href="q3listviewitem.html#setSelected">setSelected</a>(), <a href="q3listviewitem.html#setOpen">setOpen</a>() and <a href="q3listviewitem.html#setExpandable">setExpandable</a>(). You'll also be able to change its height using <a href="q3listviewitem.html#setHeight">setHeight</a>(), and traverse its sub-items. You don't have to keep the pointer since you can get a pointer to any Q3ListViewItem in a <a href="q3listview.html">Q3ListView</a> using <a href="q3listview.html#selectedItem">Q3ListView::selectedItem</a>(), <a href="q3listview.html#currentItem">Q3ListView::currentItem</a>(), <a href="q3listview.html#firstChild">Q3ListView::firstChild</a>(), <a href="q3listview.html#lastItem">Q3ListView::lastItem</a>() and <a href="q3listview.html#findItem">Q3ListView::findItem</a>().</p>
<p>If you call <tt>delete</tt> on a list view item, it will be deleted as expected, and as usual for <a href="qobject.html">QObject</a>s, if it has any child items (to any depth), all these will be deleted too.</p>
<p><a href="q3checklistitem.html">Q3CheckListItem</a>s are list view items that have a checkbox or radio button and can be used in place of plain Q3ListViewItems.</p>
<p>You can traverse the tree as if it were a doubly-linked list using <a href="q3listviewitem.html#itemAbove">itemAbove</a>() and <a href="q3listviewitem.html#itemBelow">itemBelow</a>(); they return pointers to the items directly above and below this item on the screen (even if none of them are actually visible at the moment).</p>
<p>Here's how to traverse all of an item's children (but not its children's children, etc.): Example:</p>
<pre class="cpp"> <span class="type">Q3ListViewItem</span> <span class="operator">*</span> myChild <span class="operator">=</span> myItem<span class="operator">-</span><span class="operator">&gt;</span><a href="q3listviewitem.html#firstChild">firstChild</a>();
 <span class="keyword">while</span>(myChild) {
     doSomething(myChild);
     myChild <span class="operator">=</span> myChild<span class="operator">-</span><span class="operator">&gt;</span>nextSibling();
 }</pre>
<p>If you want to iterate over every item, to any level of depth use an iterator. To iterate over the entire tree, initialize the iterator with the list view itself; to iterate over an item's children (and children's children to any depth), initialize the iterator with the item:</p>
<pre class="cpp"> <span class="type"><a href="q3listviewitemiterator.html">Q3ListViewItemIterator</a></span> it(listview);
 <span class="keyword">while</span> (it<span class="operator">.</span>current()) {
     <span class="type">Q3ListViewItem</span> <span class="operator">*</span>item <span class="operator">=</span> it<span class="operator">.</span>current();
     doSomething(item);
     <span class="operator">+</span><span class="operator">+</span>it;
 }</pre>
<p>Note that the order of the children will change when the sorting order changes and is undefined if the items are not visible. You can, however, call <a href="q3listviewitem.html#enforceSortOrder">enforceSortOrder</a>() at any time; <a href="q3listview.html">Q3ListView</a> will always call it before it needs to show an item.</p>
<p>Many programs will need to reimplement Q3ListViewItem. The most commonly reimplemented functions are:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Function</th><th >Description</th></tr></thead>
<tr valign="top" class="odd"><td ><a href="q3listviewitem.html#text">text</a>()</td><td >Returns the text in a column. Many subclasses will compute this on the fly.</td></tr>
<tr valign="top" class="even"><td ><a href="q3listviewitem.html#key">key</a>()</td><td >Used for sorting. The default <a href="q3listviewitem.html#key">key</a>() simply calls <a href="q3listviewitem.html#text">text</a>(), but judicious use of <a href="q3listviewitem.html#key">key</a>() can give you fine control over sorting; for example, <a href="qfiledialog.html">QFileDialog</a> reimplements <a href="q3listviewitem.html#key">key</a>() to sort by date.</td></tr>
<tr valign="top" class="odd"><td ><a href="q3listviewitem.html#setup">setup</a>()</td><td >Called before showing the item and whenever the list view's font changes, for example.</td></tr>
<tr valign="top" class="even"><td ><a href="q3listviewitem.html#activate">activate</a>()</td><td >Called whenever the user clicks on the item or presses Space when the item is the current item.</td></tr>
</table>
<p>Some subclasses call setExpandable(true) even when they have no children, and populate themselves when <a href="q3listviewitem.html#setup">setup</a>() or setOpen(true) is called. The <tt>dirview/dirview.cpp</tt> example program uses this technique to start up quickly: The files and subdirectories in a directory aren't inserted into the tree until they're actually needed.</p>
<p class="centerAlign"><img src="images/qlistviewitems.png" alt="List View Items" /></p></div>
<p><b>See also </b><a href="q3checklistitem.html">Q3CheckListItem</a> and <a href="q3listview.html">Q3ListView</a>.</p>
<!-- @@@Q3ListViewItem -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3ListViewItem[overload1]$$$Q3ListViewItemQ3ListView* -->
<h3 class="fn"><a name="Q3ListViewItem"></a>Q3ListViewItem::<span class="name">Q3ListViewItem</span> ( <span class="type"><a href="q3listview.html">Q3ListView</a></span> * <i>parent</i> )</h3>
<p>Constructs a new top-level list view item in the <a href="q3listview.html" class="compat">Q3ListView</a> <i>parent</i>.</p>
<!-- @@@Q3ListViewItem -->
<!-- $$$Q3ListViewItem$$$Q3ListViewItemQ3ListViewItem* -->
<h3 class="fn"><a name="Q3ListViewItem-2"></a>Q3ListViewItem::<span class="name">Q3ListViewItem</span> ( <span class="type">Q3ListViewItem</span> * <i>parent</i> )</h3>
<p>Constructs a new list view item that is a child of <i>parent</i> and first in the parent's list of children.</p>
<!-- @@@Q3ListViewItem -->
<!-- $$$Q3ListViewItem$$$Q3ListViewItemQ3ListView*Q3ListViewItem* -->
<h3 class="fn"><a name="Q3ListViewItem-3"></a>Q3ListViewItem::<span class="name">Q3ListViewItem</span> ( <span class="type"><a href="q3listview.html">Q3ListView</a></span> * <i>parent</i>, <span class="type">Q3ListViewItem</span> * <i>after</i> )</h3>
<p>Constructs an empty list view item that is a child of <i>parent</i> and is after item <i>after</i> in the parent's list of children. Since <i>parent</i> is a <a href="q3listview.html" class="compat">Q3ListView</a> the item will be a top-level item.</p>
<!-- @@@Q3ListViewItem -->
<!-- $$$Q3ListViewItem$$$Q3ListViewItemQ3ListViewItem*Q3ListViewItem* -->
<h3 class="fn"><a name="Q3ListViewItem-4"></a>Q3ListViewItem::<span class="name">Q3ListViewItem</span> ( <span class="type">Q3ListViewItem</span> * <i>parent</i>, <span class="type">Q3ListViewItem</span> * <i>after</i> )</h3>
<p>Constructs an empty list view item that is a child of <i>parent</i> and is after item <i>after</i> in the parent's list of children.</p>
<!-- @@@Q3ListViewItem -->
<!-- $$$Q3ListViewItem$$$Q3ListViewItemQ3ListView*constQString&constQString&constQString&constQString&constQString&constQString&constQString&constQString& -->
<h3 class="fn"><a name="Q3ListViewItem-5"></a>Q3ListViewItem::<span class="name">Q3ListViewItem</span> ( <span class="type"><a href="q3listview.html">Q3ListView</a></span> * <i>parent</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label1</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label2</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label3</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label4</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label5</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label6</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label7</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label8</i> = QString() )</h3>
<p>Constructs a new top-level list view item in the <a href="q3listview.html" class="compat">Q3ListView</a> <i>parent</i>, with up to eight constant strings, <i>label1</i>, <i>label2</i>, <i>label3</i>, <i>label4</i>, <i>label5</i>, <i>label6</i>, <i>label7</i> and <i>label8</i> defining its columns' contents.</p>
<p><b>See also </b><a href="q3listviewitem.html#setText">setText</a>().</p>
<!-- @@@Q3ListViewItem -->
<!-- $$$Q3ListViewItem$$$Q3ListViewItemQ3ListViewItem*constQString&constQString&constQString&constQString&constQString&constQString&constQString&constQString& -->
<h3 class="fn"><a name="Q3ListViewItem-6"></a>Q3ListViewItem::<span class="name">Q3ListViewItem</span> ( <span class="type">Q3ListViewItem</span> * <i>parent</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label1</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label2</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label3</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label4</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label5</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label6</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label7</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label8</i> = QString() )</h3>
<p>Constructs a new list view item as a child of the <a href="q3listviewitem.html" class="compat">Q3ListViewItem</a> <i>parent</i> with up to eight constant strings, <i>label1</i>, <i>label2</i>, <i>label3</i>, <i>label4</i>, <i>label5</i>, <i>label6</i>, <i>label7</i> and <i>label8</i> as columns' contents.</p>
<p><b>See also </b><a href="q3listviewitem.html#setText">setText</a>().</p>
<!-- @@@Q3ListViewItem -->
<!-- $$$Q3ListViewItem$$$Q3ListViewItemQ3ListView*Q3ListViewItem*constQString&constQString&constQString&constQString&constQString&constQString&constQString&constQString& -->
<h3 class="fn"><a name="Q3ListViewItem-7"></a>Q3ListViewItem::<span class="name">Q3ListViewItem</span> ( <span class="type"><a href="q3listview.html">Q3ListView</a></span> * <i>parent</i>, <span class="type">Q3ListViewItem</span> * <i>after</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label1</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label2</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label3</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label4</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label5</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label6</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label7</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label8</i> = QString() )</h3>
<p>Constructs a new list view item in the <a href="q3listview.html" class="compat">Q3ListView</a> <i>parent</i> that is included after item <i>after</i> and that has up to eight column texts, <i>label1</i>, <i>label2</i>, <i>label3</i>, <i>label4</i>, <i>label5</i>, <i>label6</i>, <i>label7</i> and<i>label8</i>.</p>
<p>Note that the order is changed according to <a href="q3listviewitem.html#key">Q3ListViewItem::key</a>() unless the list view's sorting is disabled using Q3ListView::setSorting(-1).</p>
<p><b>See also </b><a href="q3listviewitem.html#setText">setText</a>().</p>
<!-- @@@Q3ListViewItem -->
<!-- $$$Q3ListViewItem$$$Q3ListViewItemQ3ListViewItem*Q3ListViewItem*constQString&constQString&constQString&constQString&constQString&constQString&constQString&constQString& -->
<h3 class="fn"><a name="Q3ListViewItem-8"></a>Q3ListViewItem::<span class="name">Q3ListViewItem</span> ( <span class="type">Q3ListViewItem</span> * <i>parent</i>, <span class="type">Q3ListViewItem</span> * <i>after</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label1</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label2</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label3</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label4</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label5</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label6</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label7</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label8</i> = QString() )</h3>
<p>Constructs a new list view item as a child of the <a href="q3listviewitem.html" class="compat">Q3ListViewItem</a> <i>parent</i>. It is inserted after item <i>after</i> and may contain up to eight strings, <i>label1</i>, <i>label2</i>, <i>label3</i>, <i>label4</i>, <i>label5</i>, <i>label6</i>, <i>label7</i> and <i>label8</i> as column entries.</p>
<p>Note that the order is changed according to <a href="q3listviewitem.html#key">Q3ListViewItem::key</a>() unless the list view's sorting is disabled using Q3ListView::setSorting(-1).</p>
<p><b>See also </b><a href="q3listviewitem.html#setText">setText</a>().</p>
<!-- @@@Q3ListViewItem -->
<!-- $$$~Q3ListViewItem[overload1]$$$~Q3ListViewItem -->
<h3 class="fn"><a name="dtor.Q3ListViewItem"></a>Q3ListViewItem::<span class="name">~Q3ListViewItem</span> ()<tt> [virtual]</tt></h3>
<p>Destroys the item, deleting all its children and freeing up all allocated resources.</p>
<!-- @@@~Q3ListViewItem -->
<!-- $$$acceptDrop[overload1]$$$acceptDropconstQMimeSource* -->
<h3 class="fn"><a name="acceptDrop"></a><span class="type">bool</span> Q3ListViewItem::<span class="name">acceptDrop</span> ( const <span class="type"><a href="qmimesource.html">QMimeSource</a></span> * <i>mime</i> ) const<tt> [virtual]</tt></h3>
<p>Returns true if the item can accept drops of type <a href="qmimesource.html" class="obsolete">QMimeSource</a> <i>mime</i>; otherwise returns false.</p>
<p>The default implementation does nothing and returns false. A subclass must reimplement this to accept drops.</p>
<!-- @@@acceptDrop -->
<!-- $$$activate[overload1]$$$activate -->
<h3 class="fn"><a name="activate"></a><span class="type">void</span> Q3ListViewItem::<span class="name">activate</span> ()<tt> [virtual protected]</tt></h3>
<p>This virtual function is called whenever the user presses the mouse on this item or presses Space on it.</p>
<p><b>See also </b><a href="q3listviewitem.html#activatedPos">activatedPos</a>().</p>
<!-- @@@activate -->
<!-- $$$activatedPos[overload1]$$$activatedPosQPoint& -->
<h3 class="fn"><a name="activatedPos"></a><span class="type">bool</span> Q3ListViewItem::<span class="name">activatedPos</span> ( <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pos</i> )<tt> [protected]</tt></h3>
<p>When called from a reimplementation of <a href="q3listviewitem.html#activate">activate</a>(), this function gives information on how the item was activated. Otherwise the behavior is undefined.</p>
<p>If <a href="q3listviewitem.html#activate">activate</a>() was caused by a mouse press, the function sets <i>pos</i> to where the user clicked and returns true; otherwise it returns false and does not change <i>pos</i>.</p>
<p><i>pos</i> is relative to the top-left corner of this item.</p>
<p><b>See also </b><a href="q3listviewitem.html#activate">activate</a>().</p>
<!-- @@@activatedPos -->
<!-- $$$cancelRename[overload1]$$$cancelRenameint -->
<h3 class="fn"><a name="cancelRename"></a><span class="type">void</span> Q3ListViewItem::<span class="name">cancelRename</span> ( <span class="type">int</span> <i>col</i> )<tt> [virtual protected]</tt></h3>
<p>This function is called if the user cancels in-place renaming of this item in column <i>col</i> (e.g&#x2e; by pressing Esc).</p>
<p><b>See also </b><a href="q3listviewitem.html#okRename">okRename</a>().</p>
<!-- @@@cancelRename -->
<!-- $$$childCount[overload1]$$$childCount -->
<h3 class="fn"><a name="childCount"></a><span class="type">int</span> Q3ListViewItem::<span class="name">childCount</span> () const</h3>
<p>Returns how many children this item has. The count only includes the item's immediate children.</p>
<!-- @@@childCount -->
<!-- $$$compare[overload1]$$$compareQ3ListViewItem*intbool -->
<h3 class="fn"><a name="compare"></a><span class="type">int</span> Q3ListViewItem::<span class="name">compare</span> ( <span class="type">Q3ListViewItem</span> * <i>i</i>, <span class="type">int</span> <i>col</i>, <span class="type">bool</span> <i>ascending</i> ) const<tt> [virtual]</tt></h3>
<p>Compares this list view item to <i>i</i> using the column <i>col</i> in <i>ascending</i> order. Returns &lt; 0 if this item is less than <i>i</i>, 0 if they are equal and &gt; 0 if this item is greater than <i>i</i>.</p>
<p>This function is used for sorting.</p>
<p>The default implementation compares the item keys (<a href="q3listviewitem.html#key">key</a>()) using <a href="qstring.html#localeAwareCompare">QString::localeAwareCompare</a>(). A reimplementation can use different values and a different comparison function. Here is a reimplementation that uses plain Unicode comparison:</p>
<pre class="cpp"> <span class="type">int</span> MyListViewItem<span class="operator">::</span>compare(<span class="type"><a href="q3listviewitem.html">Q3ListViewItem</a></span> <span class="operator">*</span>i<span class="operator">,</span> <span class="type">int</span> col<span class="operator">,</span>
                              <span class="type">bool</span> ascending) <span class="keyword">const</span>
 {
     <span class="keyword">return</span> key(col<span class="operator">,</span> ascending)<span class="operator">.</span>compare(i<span class="operator">-</span><span class="operator">&gt;</span>key(col<span class="operator">,</span> ascending));
 }</pre>
<p>We don't recommend using <i>ascending</i> so your code can safely ignore it.</p>
<p><b>See also </b><a href="q3listviewitem.html#key">key</a>(), <a href="qstring.html#localeAwareCompare">QString::localeAwareCompare</a>(), and <a href="qstring.html#compare">QString::compare</a>().</p>
<!-- @@@compare -->
<!-- $$$depth[overload1]$$$depth -->
<h3 class="fn"><a name="depth"></a><span class="type">int</span> Q3ListViewItem::<span class="name">depth</span> () const</h3>
<p>Returns the depth of this item.</p>
<!-- @@@depth -->
<!-- $$$dragEnabled[overload1]$$$dragEnabled -->
<h3 class="fn"><a name="dragEnabled"></a><span class="type">bool</span> Q3ListViewItem::<span class="name">dragEnabled</span> () const</h3>
<p>Returns true if this item can be dragged; otherwise returns false.</p>
<p><b>See also </b><a href="q3listviewitem.html#setDragEnabled">setDragEnabled</a>().</p>
<!-- @@@dragEnabled -->
<!-- $$$dragEntered[overload1]$$$dragEntered -->
<h3 class="fn"><a name="dragEntered"></a><span class="type">void</span> Q3ListViewItem::<span class="name">dragEntered</span> ()<tt> [virtual protected]</tt></h3>
<p>This function is called when a drag enters the item's bounding rectangle.</p>
<p>The default implementation does nothing, subclasses may need to reimplement this function.</p>
<!-- @@@dragEntered -->
<!-- $$$dragLeft[overload1]$$$dragLeft -->
<h3 class="fn"><a name="dragLeft"></a><span class="type">void</span> Q3ListViewItem::<span class="name">dragLeft</span> ()<tt> [virtual protected]</tt></h3>
<p>This function is called when a drag leaves the item's bounding rectangle.</p>
<p>The default implementation does nothing, subclasses may need to reimplement this function.</p>
<!-- @@@dragLeft -->
<!-- $$$dropEnabled[overload1]$$$dropEnabled -->
<h3 class="fn"><a name="dropEnabled"></a><span class="type">bool</span> Q3ListViewItem::<span class="name">dropEnabled</span> () const</h3>
<p>Returns true if this item accepts drops; otherwise returns false.</p>
<p><b>See also </b><a href="q3listviewitem.html#setDropEnabled">setDropEnabled</a>() and <a href="q3listviewitem.html#acceptDrop">acceptDrop</a>().</p>
<!-- @@@dropEnabled -->
<!-- $$$dropped[overload1]$$$droppedQDropEvent* -->
<h3 class="fn"><a name="dropped"></a><span class="type">void</span> Q3ListViewItem::<span class="name">dropped</span> ( <span class="type"><a href="qdropevent.html">QDropEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>This function is called when something was dropped on the item. <i>e</i> contains all the information about the drop.</p>
<p>The default implementation does nothing, subclasses may need to reimplement this function.</p>
<!-- @@@dropped -->
<!-- $$$enforceSortOrder[overload1]$$$enforceSortOrder -->
<h3 class="fn"><a name="enforceSortOrder"></a><span class="type">void</span> Q3ListViewItem::<span class="name">enforceSortOrder</span> () const<tt> [virtual protected]</tt></h3>
<p>Makes sure that this object's children are sorted appropriately.</p>
<p>This only works if every item from the root item down to this item is already sorted.</p>
<p><b>See also </b><a href="q3listviewitem.html#sortChildItems">sortChildItems</a>().</p>
<!-- @@@enforceSortOrder -->
<!-- $$$firstChild[overload1]$$$firstChild -->
<h3 class="fn"><a name="firstChild"></a><span class="type">Q3ListViewItem</span> * Q3ListViewItem::<span class="name">firstChild</span> () const</h3>
<p>Returns the first (top) child of this item, or 0 if this item has no children.</p>
<p>Note that the children are not guaranteed to be sorted properly. <a href="q3listview.html" class="compat">Q3ListView</a> and <a href="q3listviewitem.html" class="compat">Q3ListViewItem</a> try to postpone or avoid sorting to the greatest degree possible, in order to keep the user interface snappy.</p>
<p><b>See also </b><a href="q3listviewitem.html#nextSibling">nextSibling</a>() and <a href="q3listviewitem.html#sortChildItems">sortChildItems</a>().</p>
<!-- @@@firstChild -->
<!-- $$$height[overload1]$$$height -->
<h3 class="fn"><a name="height"></a><span class="type">int</span> Q3ListViewItem::<span class="name">height</span> () const</h3>
<p>Returns the height of this item in pixels. This does not include the height of any children; <a href="q3listviewitem.html#totalHeight">totalHeight</a>() returns that.</p>
<p><b>See also </b><a href="q3listviewitem.html#setHeight">setHeight</a>().</p>
<!-- @@@height -->
<!-- $$$insertItem[overload1]$$$insertItemQ3ListViewItem* -->
<h3 class="fn"><a name="insertItem"></a><span class="type">void</span> Q3ListViewItem::<span class="name">insertItem</span> ( <span class="type">Q3ListViewItem</span> * <i>newChild</i> )<tt> [virtual]</tt></h3>
<p>Inserts <i>newChild</i> into this list view item's list of children. You should not need to call this function; it is called automatically by the constructor of <i>newChild</i>.</p>
<p><b>Warning:</b> If you are using <tt>Single</tt> selection mode, then you should only insert unselected items.</p>
<!-- @@@insertItem -->
<!-- $$$invalidateHeight[overload1]$$$invalidateHeight -->
<h3 class="fn"><a name="invalidateHeight"></a><span class="type">void</span> Q3ListViewItem::<span class="name">invalidateHeight</span> ()<tt> [virtual]</tt></h3>
<p>Invalidates the cached total height of this item, including all open children.</p>
<p><b>See also </b><a href="q3listviewitem.html#setHeight">setHeight</a>(), <a href="q3listviewitem.html#height">height</a>(), and <a href="q3listviewitem.html#totalHeight">totalHeight</a>().</p>
<!-- @@@invalidateHeight -->
<!-- $$$isEnabled[overload1]$$$isEnabled -->
<h3 class="fn"><a name="isEnabled"></a><span class="type">bool</span> Q3ListViewItem::<span class="name">isEnabled</span> () const</h3>
<p>Returns true if this item is enabled; otherwise returns false.</p>
<p><b>See also </b><a href="q3listviewitem.html#setEnabled">setEnabled</a>().</p>
<!-- @@@isEnabled -->
<!-- $$$isExpandable[overload1]$$$isExpandable -->
<h3 class="fn"><a name="isExpandable"></a><span class="type">bool</span> Q3ListViewItem::<span class="name">isExpandable</span> () const</h3>
<p>Returns true if this item is expandable even when it has no children; otherwise returns false.</p>
<!-- @@@isExpandable -->
<!-- $$$isOpen[overload1]$$$isOpen -->
<h3 class="fn"><a name="isOpen"></a><span class="type">bool</span> Q3ListViewItem::<span class="name">isOpen</span> () const</h3>
<p>Returns true if this list view item has children <i>and</i> they are not explicitly hidden; otherwise returns false.</p>
<p><b>See also </b><a href="q3listviewitem.html#setOpen">setOpen</a>().</p>
<!-- @@@isOpen -->
<!-- $$$isSelectable[overload1]$$$isSelectable -->
<h3 class="fn"><a name="isSelectable"></a><span class="type">bool</span> Q3ListViewItem::<span class="name">isSelectable</span> () const</h3>
<p>Returns true if the item is selectable (as it is by default); otherwise returns false</p>
<p><b>See also </b><a href="q3listviewitem.html#setSelectable">setSelectable</a>().</p>
<!-- @@@isSelectable -->
<!-- $$$isSelected[overload1]$$$isSelected -->
<h3 class="fn"><a name="isSelected"></a><span class="type">bool</span> Q3ListViewItem::<span class="name">isSelected</span> () const</h3>
<p>Returns true if this item is selected; otherwise returns false.</p>
<p><b>See also </b><a href="q3listviewitem.html#setSelected">setSelected</a>(), <a href="q3listview.html#setSelected">Q3ListView::setSelected</a>(), and <a href="q3listview.html#selectionChanged">Q3ListView::selectionChanged</a>().</p>
<!-- @@@isSelected -->
<!-- $$$isVisible[overload1]$$$isVisible -->
<h3 class="fn"><a name="isVisible"></a><span class="type">bool</span> Q3ListViewItem::<span class="name">isVisible</span> () const</h3>
<p>Returns true if the item is visible; otherwise returns false.</p>
<p><b>See also </b><a href="q3listviewitem.html#setVisible">setVisible</a>().</p>
<!-- @@@isVisible -->
<!-- $$$itemAbove[overload1]$$$itemAbove -->
<h3 class="fn"><a name="itemAbove"></a><span class="type">Q3ListViewItem</span> * Q3ListViewItem::<span class="name">itemAbove</span> () const</h3>
<p>Returns a pointer to the item immediately above this item on the screen. This is usually the item's closest older sibling, but it may also be its parent or its next older sibling's youngest child, or something else if anyoftheabove-&gt;<a href="q3listviewitem.html#height">height</a>() returns 0. Returns 0 if there is no item immediately above this item.</p>
<p>This function assumes that all parents of this item are open (i.e&#x2e; that this item is visible, or can be made visible by scrolling).</p>
<p>This function might be relatively slow because of the tree traversions needed to find the correct item.</p>
<p><b>See also </b><a href="q3listviewitem.html#itemBelow">itemBelow</a>() and <a href="q3listview.html#itemRect">Q3ListView::itemRect</a>().</p>
<!-- @@@itemAbove -->
<!-- $$$itemBelow[overload1]$$$itemBelow -->
<h3 class="fn"><a name="itemBelow"></a><span class="type">Q3ListViewItem</span> * Q3ListViewItem::<span class="name">itemBelow</span> () const</h3>
<p>Returns a pointer to the item immediately below this item on the screen. This is usually the item's eldest child, but it may also be its next younger sibling, its parent's next younger sibling, grandparent's, etc., or something else if anyoftheabove-&gt;<a href="q3listviewitem.html#height">height</a>() returns 0. Returns 0 if there is no item immediately below this item.</p>
<p>This function assumes that all parents of this item are open (i.e&#x2e; that this item is visible or can be made visible by scrolling).</p>
<p><b>See also </b><a href="q3listviewitem.html#itemAbove">itemAbove</a>() and <a href="q3listview.html#itemRect">Q3ListView::itemRect</a>().</p>
<!-- @@@itemBelow -->
<!-- $$$itemPos[overload1]$$$itemPos -->
<h3 class="fn"><a name="itemPos"></a><span class="type">int</span> Q3ListViewItem::<span class="name">itemPos</span> () const</h3>
<p>Returns the y coordinate of this item in the list view's coordinate system. This function is normally much slower than <a href="q3listview.html#itemAt">Q3ListView::itemAt</a>(), but it works for all items whereas <a href="q3listview.html#itemAt">Q3ListView::itemAt</a>() normally only works for items on the screen.</p>
<p><b>See also </b><a href="q3listview.html#itemAt">Q3ListView::itemAt</a>(), <a href="q3listview.html#itemRect">Q3ListView::itemRect</a>(), and <a href="q3listview.html#itemPos">Q3ListView::itemPos</a>().</p>
<!-- @@@itemPos -->
<!-- $$$key[overload1]$$$keyintbool -->
<h3 class="fn"><a name="key"></a><span class="type"><a href="qstring.html">QString</a></span> Q3ListViewItem::<span class="name">key</span> ( <span class="type">int</span> <i>column</i>, <span class="type">bool</span> <i>ascending</i> ) const<tt> [virtual]</tt></h3>
<p>Returns a key that can be used for sorting by column <i>column</i>. The default implementation returns <a href="q3listviewitem.html#text">text</a>(). Derived classes may also incorporate the order indicated by <i>ascending</i> into this key, although this is not recommended.</p>
<p>If you want to sort on non-alphabetical data, e.g&#x2e; dates, numbers, etc., it is more efficient to reimplement <a href="q3listviewitem.html#compare">compare</a>().</p>
<p><b>See also </b><a href="q3listviewitem.html#compare">compare</a>() and <a href="q3listviewitem.html#sortChildItems">sortChildItems</a>().</p>
<!-- @@@key -->
<!-- $$$listView[overload1]$$$listView -->
<h3 class="fn"><a name="listView"></a><span class="type"><a href="q3listview.html">Q3ListView</a></span> * Q3ListViewItem::<span class="name">listView</span> () const</h3>
<p>Returns a pointer to the list view containing this item.</p>
<p>Note that this function traverses the items to the root to find the listview. This function will return 0 for taken items - see <a href="q3listviewitem.html#takeItem">Q3ListViewItem::takeItem</a>()</p>
<!-- @@@listView -->
<!-- $$$moveItem[overload1]$$$moveItemQ3ListViewItem* -->
<h3 class="fn"><a name="moveItem"></a><span class="type">void</span> Q3ListViewItem::<span class="name">moveItem</span> ( <span class="type">Q3ListViewItem</span> * <i>after</i> )</h3>
<p>Move the item to be after item <i>after</i>, which must be one of the item's siblings. To move an item in the hierarchy, use <a href="q3listviewitem.html#takeItem">takeItem</a>() and <a href="q3listviewitem.html#insertItem">insertItem</a>().</p>
<p>Note that this function will have no effect if sorting is enabled in the list view.</p>
<!-- @@@moveItem -->
<!-- $$$multiLinesEnabled[overload1]$$$multiLinesEnabled -->
<h3 class="fn"><a name="multiLinesEnabled"></a><span class="type">bool</span> Q3ListViewItem::<span class="name">multiLinesEnabled</span> () const</h3>
<p>Returns true if the item can display multiple lines of text in its columns; otherwise returns false.</p>
<p><b>See also </b><a href="q3listviewitem.html#setMultiLinesEnabled">setMultiLinesEnabled</a>().</p>
<!-- @@@multiLinesEnabled -->
<!-- $$$nextSibling[overload1]$$$nextSibling -->
<h3 class="fn"><a name="nextSibling"></a><span class="type">Q3ListViewItem</span> * Q3ListViewItem::<span class="name">nextSibling</span> () const</h3>
<p>Returns the sibling item below this item, or 0 if there is no sibling item after this item.</p>
<p>Note that the siblings are not guaranteed to be sorted properly. <a href="q3listview.html" class="compat">Q3ListView</a> and <a href="q3listviewitem.html" class="compat">Q3ListViewItem</a> try to postpone or avoid sorting to the greatest degree possible, in order to keep the user interface snappy.</p>
<p><b>See also </b><a href="q3listviewitem.html#firstChild">firstChild</a>() and <a href="q3listviewitem.html#sortChildItems">sortChildItems</a>().</p>
<!-- @@@nextSibling -->
<!-- $$$okRename[overload1]$$$okRenameint -->
<h3 class="fn"><a name="okRename"></a><span class="type">void</span> Q3ListViewItem::<span class="name">okRename</span> ( <span class="type">int</span> <i>col</i> )<tt> [virtual protected]</tt></h3>
<p>This function is called if the user presses Enter during in-place renaming of the item in column <i>col</i>.</p>
<p><b>See also </b><a href="q3listviewitem.html#cancelRename">cancelRename</a>().</p>
<!-- @@@okRename -->
<!-- $$$paintBranches[overload1]$$$paintBranchesQPainter*constQColorGroup&intintint -->
<h3 class="fn"><a name="paintBranches"></a><span class="type">void</span> Q3ListViewItem::<span class="name">paintBranches</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, const <span class="type"><a href="qcolorgroup.html">QColorGroup</a></span> &amp; <i>cg</i>, <span class="type">int</span> <i>w</i>, <span class="type">int</span> <i>y</i>, <span class="type">int</span> <i>h</i> )<tt> [virtual]</tt></h3>
<p>Paints a set of branches from this item to (some of) its children.</p>
<p>Painter <i>p</i> is set up with clipping and translation so that you can only draw in the rectangle that needs redrawing; <i>cg</i> is the color group to use; the update rectangle is at (0, 0) and has size width <i>w</i> by height <i>h</i>. The top of the rectangle you own is at <i>y</i> (which is never greater than 0 but can be outside the window system's allowed coordinate range).</p>
<p>The update rectangle is in an undefined state when this function is called; this function must draw on <i>all</i> of the pixels.</p>
<p><b>See also </b><a href="q3listviewitem.html#paintCell">paintCell</a>() and <a href="q3listview.html#drawContentsOffset">Q3ListView::drawContentsOffset</a>().</p>
<!-- @@@paintBranches -->
<!-- $$$paintCell[overload1]$$$paintCellQPainter*constQColorGroup&intintint -->
<h3 class="fn"><a name="paintCell"></a><span class="type">void</span> Q3ListViewItem::<span class="name">paintCell</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, const <span class="type"><a href="qcolorgroup.html">QColorGroup</a></span> &amp; <i>cg</i>, <span class="type">int</span> <i>column</i>, <span class="type">int</span> <i>width</i>, <span class="type">int</span> <i>align</i> )<tt> [virtual]</tt></h3>
<p>This virtual function paints the contents of one column of an item and aligns it as described by <i>align</i>.</p>
<p>The <i>painter</i> is a <a href="q3painter.html" class="compat">Q3Painter</a> open on the relevant paint device. It is translated so (0, 0) is the top-left pixel in the cell and <i>width</i> - 1, <a href="q3listviewitem.html#height">height</a>() - 1 is the bottom-right pixel <i>in</i> the cell. The other properties of the <i>painter</i> (pen, brush, etc) are undefined. <i>cg</i> is the color group to use. <i>column</i> is the logical column number within the item that is to be painted; 0 is the column which may contain a tree.</p>
<p>This function may use <a href="q3listview.html#itemMargin-prop">Q3ListView::itemMargin</a>() for readability spacing on the left and right sides of data such as text, and should honor <a href="q3listviewitem.html#isSelected">isSelected</a>() and <a href="q3listview.html#allColumnsShowFocus-prop">Q3ListView::allColumnsShowFocus</a>().</p>
<p>If you reimplement this function, you should also reimplement <a href="q3listviewitem.html#width">width</a>().</p>
<p>The rectangle to be painted is in an undefined state when this function is called, so you <i>must</i> draw on all the pixels. The <i>painter</i> has the right font on entry.</p>
<p><b>See also </b><a href="q3listviewitem.html#paintBranches">paintBranches</a>() and <a href="q3listview.html#drawContentsOffset">Q3ListView::drawContentsOffset</a>().</p>
<!-- @@@paintCell -->
<!-- $$$paintFocus[overload1]$$$paintFocusQPainter*constQColorGroup&constQRect& -->
<h3 class="fn"><a name="paintFocus"></a><span class="type">void</span> Q3ListViewItem::<span class="name">paintFocus</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, const <span class="type"><a href="qcolorgroup.html">QColorGroup</a></span> &amp; <i>cg</i>, const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>r</i> )<tt> [virtual]</tt></h3>
<p>Paints a focus indicator on the rectangle <i>r</i> using painter <i>p</i> and colors <i>cg</i>.</p>
<p><i>p</i> is already clipped.</p>
<p><b>See also </b><a href="q3listviewitem.html#paintCell">paintCell</a>(), <a href="q3listviewitem.html#paintBranches">paintBranches</a>(), and <a href="q3listview.html#allColumnsShowFocus-prop">Q3ListView::setAllColumnsShowFocus</a>().</p>
<!-- @@@paintFocus -->
<!-- $$$parent[overload1]$$$parent -->
<h3 class="fn"><a name="parent"></a><span class="type">Q3ListViewItem</span> * Q3ListViewItem::<span class="name">parent</span> () const</h3>
<p>Returns the parent of this item, or 0 if this item has no parent.</p>
<p><b>See also </b><a href="q3listviewitem.html#firstChild">firstChild</a>() and <a href="q3listviewitem.html#nextSibling">nextSibling</a>().</p>
<!-- @@@parent -->
<!-- $$$pixmap[overload1]$$$pixmapint -->
<h3 class="fn"><a name="pixmap"></a>const <span class="type"><a href="qpixmap.html">QPixmap</a></span> * Q3ListViewItem::<span class="name">pixmap</span> ( <span class="type">int</span> <i>column</i> ) const<tt> [virtual]</tt></h3>
<p>Returns the pixmap for <i>column</i>, or 0 if there is no pixmap for <i>column</i>.</p>
<p><b>See also </b><a href="q3listviewitem.html#setText">setText</a>() and <a href="q3listviewitem.html#setPixmap">setPixmap</a>().</p>
<!-- @@@pixmap -->
<!-- $$$removeItem[overload1]$$$removeItemQ3ListViewItem* -->
<h3 class="fn"><a name="removeItem"></a><span class="type">void</span> Q3ListViewItem::<span class="name">removeItem</span> ( <span class="type">Q3ListViewItem</span> * <i>item</i> )<tt> [virtual]</tt></h3>
<p>Removes the given <i>item</i>. Use <a href="q3listviewitem.html#takeItem">takeItem</a>() instead.</p>
<!-- @@@removeItem -->
<!-- $$$renameEnabled[overload1]$$$renameEnabledint -->
<h3 class="fn"><a name="renameEnabled"></a><span class="type">bool</span> Q3ListViewItem::<span class="name">renameEnabled</span> ( <span class="type">int</span> <i>col</i> ) const</h3>
<p>Returns true if this item can be in-place renamed in column <i>col</i>; otherwise returns false.</p>
<p><b>See also </b><a href="q3listviewitem.html#setRenameEnabled">setRenameEnabled</a>().</p>
<!-- @@@renameEnabled -->
<!-- $$$repaint[overload1]$$$repaint -->
<h3 class="fn"><a name="repaint"></a><span class="type">void</span> Q3ListViewItem::<span class="name">repaint</span> () const</h3>
<p>Repaints this item on the screen if it is currently visible.</p>
<!-- @@@repaint -->
<!-- $$$rtti[overload1]$$$rtti -->
<h3 class="fn"><a name="rtti"></a><span class="type">int</span> Q3ListViewItem::<span class="name">rtti</span> () const<tt> [virtual]</tt></h3>
<p>Returns 0.</p>
<p>Make your derived classes return their own values for rtti(), so that you can distinguish between different kinds of list view items. You should use values greater than 1000 to allow for extensions to this class.</p>
<!-- @@@rtti -->
<!-- $$$setDragEnabled[overload1]$$$setDragEnabledbool -->
<h3 class="fn"><a name="setDragEnabled"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setDragEnabled</span> ( <span class="type">bool</span> <i>allow</i> )<tt> [virtual]</tt></h3>
<p>If <i>allow</i> is true, the list view starts a drag (see <a href="q3listview.html#dragObject">Q3ListView::dragObject</a>()) when the user presses and moves the mouse on this item.</p>
<p><b>See also </b><a href="q3listviewitem.html#dragEnabled">dragEnabled</a>().</p>
<!-- @@@setDragEnabled -->
<!-- $$$setDropEnabled[overload1]$$$setDropEnabledbool -->
<h3 class="fn"><a name="setDropEnabled"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setDropEnabled</span> ( <span class="type">bool</span> <i>allow</i> )<tt> [virtual]</tt></h3>
<p>If <i>allow</i> is true, the list view accepts drops onto the item; otherwise drops are not allowed.</p>
<p><b>See also </b><a href="q3listviewitem.html#dropEnabled">dropEnabled</a>().</p>
<!-- @@@setDropEnabled -->
<!-- $$$setEnabled[overload1]$$$setEnabledbool -->
<h3 class="fn"><a name="setEnabled"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setEnabled</span> ( <span class="type">bool</span> <i>b</i> )<tt> [virtual]</tt></h3>
<p>If <i>b</i> is true the item is enabled; otherwise it is disabled. Disabled items are drawn differently (e.g&#x2e; grayed-out) and are not accessible by the user.</p>
<p><b>See also </b><a href="q3listviewitem.html#isEnabled">isEnabled</a>().</p>
<!-- @@@setEnabled -->
<!-- $$$setExpandable[overload1]$$$setExpandablebool -->
<h3 class="fn"><a name="setExpandable"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setExpandable</span> ( <span class="type">bool</span> <i>enable</i> )<tt> [virtual]</tt></h3>
<p>Sets this item to be expandable even if it has no children if <i>enable</i> is true, and to be expandable only if it has children if <i>enable</i> is false (the default).</p>
<p>The dirview example uses this in the canonical fashion. It checks whether the directory is empty in <a href="q3listviewitem.html#setup">setup</a>() and calls setExpandable(true) if not; in <a href="q3listviewitem.html#setOpen">setOpen</a>() it reads the contents of the directory and inserts items accordingly. This strategy means that dirview can display the entire file system without reading very much at startup.</p>
<p>Note that root items are not expandable by the user unless <a href="q3listview.html#rootIsDecorated-prop">Q3ListView::setRootIsDecorated</a>() is set to true.</p>
<p><b>See also </b><a href="q3listviewitem.html#isExpandable">isExpandable</a>() and <a href="q3listviewitem.html#setSelectable">setSelectable</a>().</p>
<!-- @@@setExpandable -->
<!-- $$$setHeight[overload1]$$$setHeightint -->
<h3 class="fn"><a name="setHeight"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setHeight</span> ( <span class="type">int</span> <i>height</i> )<tt> [virtual protected]</tt></h3>
<p>Sets this item's height to <i>height</i> pixels. This implicitly changes <a href="q3listviewitem.html#totalHeight">totalHeight</a>(), too.</p>
<p>Note that a font change causes this height to be overwritten unless you reimplement <a href="q3listviewitem.html#setup">setup</a>().</p>
<p>For best results in Windows style we suggest using an even number of pixels.</p>
<p><b>See also </b><a href="q3listviewitem.html#height">height</a>(), <a href="q3listviewitem.html#totalHeight">totalHeight</a>(), and <a href="q3listviewitem.html#isOpen">isOpen</a>().</p>
<!-- @@@setHeight -->
<!-- $$$setMultiLinesEnabled[overload1]$$$setMultiLinesEnabledbool -->
<h3 class="fn"><a name="setMultiLinesEnabled"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setMultiLinesEnabled</span> ( <span class="type">bool</span> <i>b</i> )<tt> [virtual]</tt></h3>
<p>If <i>b</i> is true each of the item's columns may contain multiple lines of text; otherwise each of them may only contain a single line.</p>
<p><b>See also </b><a href="q3listviewitem.html#multiLinesEnabled">multiLinesEnabled</a>().</p>
<!-- @@@setMultiLinesEnabled -->
<!-- $$$setOpen[overload1]$$$setOpenbool -->
<h3 class="fn"><a name="setOpen"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setOpen</span> ( <span class="type">bool</span> <i>o</i> )<tt> [virtual]</tt></h3>
<p>Opens or closes an item, i.e&#x2e; shows or hides an item's children.</p>
<p>If <i>o</i> is true all child items are shown initially. The user can hide them by clicking the <b>-</b> icon to the left of the item. If <i>o</i> is false, the children of this item are initially hidden. The user can show them by clicking the <b>+</b> icon to the left of the item.</p>
<p><b>See also </b><a href="q3listviewitem.html#height">height</a>(), <a href="q3listviewitem.html#totalHeight">totalHeight</a>(), and <a href="q3listviewitem.html#isOpen">isOpen</a>().</p>
<!-- @@@setOpen -->
<!-- $$$setPixmap[overload1]$$$setPixmapintconstQPixmap& -->
<h3 class="fn"><a name="setPixmap"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setPixmap</span> ( <span class="type">int</span> <i>column</i>, const <span class="type"><a href="qpixmap.html">QPixmap</a></span> &amp; <i>pm</i> )<tt> [virtual]</tt></h3>
<p>Sets the pixmap in column <i>column</i> to <i>pm</i>, if <i>pm</i> is non-null and different from the current pixmap, and if <i>column</i> is non-negative.</p>
<p><b>See also </b><a href="q3listviewitem.html#pixmap">pixmap</a>() and <a href="q3listviewitem.html#setText">setText</a>().</p>
<!-- @@@setPixmap -->
<!-- $$$setRenameEnabled[overload1]$$$setRenameEnabledintbool -->
<h3 class="fn"><a name="setRenameEnabled"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setRenameEnabled</span> ( <span class="type">int</span> <i>col</i>, <span class="type">bool</span> <i>b</i> )<tt> [virtual]</tt></h3>
<p>If <i>b</i> is true, this item can be in-place renamed in the column <i>col</i> by the user; otherwise it cannot be renamed in-place.</p>
<p><b>See also </b><a href="q3listviewitem.html#renameEnabled">renameEnabled</a>().</p>
<!-- @@@setRenameEnabled -->
<!-- $$$setSelectable[overload1]$$$setSelectablebool -->
<h3 class="fn"><a name="setSelectable"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setSelectable</span> ( <span class="type">bool</span> <i>enable</i> )<tt> [virtual]</tt></h3>
<p>Sets this items to be selectable if <i>enable</i> is true (the default) or not to be selectable if <i>enable</i> is false.</p>
<p>The user is not able to select a non-selectable item using either the keyboard or the mouse. The application programmer still can though, e.g&#x2e; using <a href="q3listviewitem.html#setSelected">setSelected</a>().</p>
<p><b>See also </b><a href="q3listviewitem.html#isSelectable">isSelectable</a>().</p>
<!-- @@@setSelectable -->
<!-- $$$setSelected[overload1]$$$setSelectedbool -->
<h3 class="fn"><a name="setSelected"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setSelected</span> ( <span class="type">bool</span> <i>s</i> )<tt> [virtual]</tt></h3>
<p>If <i>s</i> is true this item is selected; otherwise it is deselected.</p>
<p>This function does not maintain any invariants or repaint anything -- <a href="q3listview.html#setSelected">Q3ListView::setSelected</a>() does that.</p>
<p><b>See also </b><a href="q3listviewitem.html#isSelected">isSelected</a>(), <a href="q3listviewitem.html#height">height</a>(), and <a href="q3listviewitem.html#totalHeight">totalHeight</a>().</p>
<!-- @@@setSelected -->
<!-- $$$setText[overload1]$$$setTextintconstQString& -->
<h3 class="fn"><a name="setText"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setText</span> ( <span class="type">int</span> <i>column</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )<tt> [virtual]</tt></h3>
<p>Sets the text in column <i>column</i> to <i>text</i>, if <i>column</i> is a valid column number and <i>text</i> is different from the existing text.</p>
<p>If the <a href="q3listviewitem.html#text">text</a>() function has been reimplemented, this function may be a no-op.</p>
<p><b>See also </b><a href="q3listviewitem.html#text">text</a>() and <a href="q3listviewitem.html#key">key</a>().</p>
<!-- @@@setText -->
<!-- $$$setVisible[overload1]$$$setVisiblebool -->
<h3 class="fn"><a name="setVisible"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setVisible</span> ( <span class="type">bool</span> <i>b</i> )</h3>
<p>If <i>b</i> is true, the item is made visible; otherwise it is hidden.</p>
<p>If the item is not visible, <a href="q3listviewitem.html#itemAbove">itemAbove</a>() and <a href="q3listviewitem.html#itemBelow">itemBelow</a>() will never return this item, although you still can reach it by using e.g&#x2e; <a href="q3listviewitemiterator.html" class="compat">Q3ListViewItemIterator</a>.</p>
<p><b>See also </b><a href="q3listviewitem.html#isVisible">isVisible</a>().</p>
<!-- @@@setVisible -->
<!-- $$$setup[overload1]$$$setup -->
<h3 class="fn"><a name="setup"></a><span class="type">void</span> Q3ListViewItem::<span class="name">setup</span> ()<tt> [virtual]</tt></h3>
<p>This virtual function is called before the first time <a href="q3listview.html" class="compat">Q3ListView</a> needs to know the height or any other graphical attribute of this object, and whenever the font, GUI style, or colors of the list view change.</p>
<p>The default calls <a href="q3listviewitem.html#widthChanged">widthChanged</a>() and sets the item's height to the height of a single line of text in the list view's font. (If you use icons, multi-line text, etc., you will probably need to call <a href="q3listviewitem.html#setHeight">setHeight</a>() yourself or reimplement it.)</p>
<!-- @@@setup -->
<!-- $$$sort[overload1]$$$sort -->
<h3 class="fn"><a name="sort"></a><span class="type">void</span> Q3ListViewItem::<span class="name">sort</span> ()<tt> [virtual]</tt></h3>
<p>Sorts all this item's child items using the current sorting configuration (sort column and direction).</p>
<p><b>See also </b><a href="q3listviewitem.html#enforceSortOrder">enforceSortOrder</a>().</p>
<!-- @@@sort -->
<!-- $$$sortChildItems[overload1]$$$sortChildItemsintbool -->
<h3 class="fn"><a name="sortChildItems"></a><span class="type">void</span> Q3ListViewItem::<span class="name">sortChildItems</span> ( <span class="type">int</span> <i>column</i>, <span class="type">bool</span> <i>ascending</i> )<tt> [virtual]</tt></h3>
<p>Sorts this item's children using column <i>column</i>. This is done in ascending order if <i>ascending</i> is true and in descending order if <i>ascending</i> is false.</p>
<p>Asks some of the children to sort their children. (<a href="q3listview.html" class="compat">Q3ListView</a> and <a href="q3listviewitem.html" class="compat">Q3ListViewItem</a> ensure that all on-screen objects are properly sorted but may avoid or defer sorting other objects in order to be more responsive.)</p>
<p><b>See also </b><a href="q3listviewitem.html#key">key</a>() and <a href="q3listviewitem.html#compare">compare</a>().</p>
<!-- @@@sortChildItems -->
<!-- $$$startRename[overload1]$$$startRenameint -->
<h3 class="fn"><a name="startRename"></a><span class="type">void</span> Q3ListViewItem::<span class="name">startRename</span> ( <span class="type">int</span> <i>col</i> )<tt> [virtual]</tt></h3>
<p>If in-place renaming of this item is enabled (see <a href="q3listviewitem.html#renameEnabled">renameEnabled</a>()), this function starts renaming the item in column <i>col</i>, by creating and initializing an edit box.</p>
<!-- @@@startRename -->
<!-- $$$takeItem[overload1]$$$takeItemQ3ListViewItem* -->
<h3 class="fn"><a name="takeItem"></a><span class="type">void</span> Q3ListViewItem::<span class="name">takeItem</span> ( <span class="type">Q3ListViewItem</span> * <i>item</i> )<tt> [virtual]</tt></h3>
<p>Removes <i>item</i> from this object's list of children and causes an update of the screen display. The item is not deleted. You should not normally need to call this function because Q3ListViewItem::~<a href="q3listviewitem.html#Q3ListViewItem">Q3ListViewItem</a>() calls it.</p>
<p>The normal way to delete an item is to use <tt>delete</tt>.</p>
<p>If you need to move an item from one place in the hierarchy to another you can use takeItem() to remove the item from the list view and then <a href="q3listviewitem.html#insertItem">insertItem</a>() to put the item back in its new position.</p>
<p>If a taken item is part of a selection in <tt>Single</tt> selection mode, it is unselected and selectionChanged() is emitted. If a taken item is part of a selection in <tt>Multi</tt> or <tt>Extended</tt> selection mode, it remains selected.</p>
<p><b>Warning:</b> This function leaves <i>item</i> and its children in a state where most member functions are unsafe. Only a few functions work correctly on an item in this state, most notably <a href="q3listviewitem.html#insertItem">insertItem</a>(). The functions that work on taken items are explicitly documented as such.</p>
<p><b>See also </b><a href="q3listviewitem.html#insertItem">Q3ListViewItem::insertItem</a>().</p>
<!-- @@@takeItem -->
<!-- $$$text[overload1]$$$textint -->
<h3 class="fn"><a name="text"></a><span class="type"><a href="qstring.html">QString</a></span> Q3ListViewItem::<span class="name">text</span> ( <span class="type">int</span> <i>column</i> ) const<tt> [virtual]</tt></h3>
<p>Returns the text in column <i>column</i>, or an empty string if there is no text in that column.</p>
<p><b>See also </b><a href="q3listviewitem.html#setText">setText</a>(), <a href="q3listviewitem.html#key">key</a>(), and <a href="q3listviewitem.html#paintCell">paintCell</a>().</p>
<!-- @@@text -->
<!-- $$$totalHeight[overload1]$$$totalHeight -->
<h3 class="fn"><a name="totalHeight"></a><span class="type">int</span> Q3ListViewItem::<span class="name">totalHeight</span> () const</h3>
<p>Returns the total height of this object, including any visible children. This height is recomputed lazily and cached for as long as possible.</p>
<p>Functions which can affect the total height are, <a href="q3listviewitem.html#setHeight">setHeight</a>() which is used to set an item's height, <a href="q3listviewitem.html#setOpen">setOpen</a>() to show or hide an item's children, and <a href="q3listviewitem.html#invalidateHeight">invalidateHeight</a>() to invalidate the cached height.</p>
<p><b>See also </b><a href="q3listviewitem.html#height">height</a>().</p>
<!-- @@@totalHeight -->
<!-- $$$width[overload1]$$$widthconstQFontMetrics&constQ3ListView*int -->
<h3 class="fn"><a name="width"></a><span class="type">int</span> Q3ListViewItem::<span class="name">width</span> ( const <span class="type"><a href="qfontmetrics.html">QFontMetrics</a></span> &amp; <i>fm</i>, const <span class="type"><a href="q3listview.html">Q3ListView</a></span> * <i>lv</i>, <span class="type">int</span> <i>c</i> ) const<tt> [virtual]</tt></h3>
<p>Returns the number of pixels of width required to draw column <i>c</i> of list view <i>lv</i>, using the metrics <i>fm</i> without cropping. The list view containing this item may use this information depending on the <a href="q3listview.html#WidthMode-enum">Q3ListView::WidthMode</a> settings for the column.</p>
<p>The default implementation returns the width of the bounding rectangle of the text of column <i>c</i>.</p>
<p><a href="q3listview.html#itemMargin-prop">Q3ListView::itemMargin</a>()</p>
<p><b>See also </b><a href="q3listviewitem.html#listView">listView</a>(), <a href="q3listviewitem.html#widthChanged">widthChanged</a>(), and <a href="q3listview.html#setColumnWidthMode">Q3ListView::setColumnWidthMode</a>().</p>
<!-- @@@width -->
<!-- $$$widthChanged[overload1]$$$widthChangedint -->
<h3 class="fn"><a name="widthChanged"></a><span class="type">void</span> Q3ListViewItem::<span class="name">widthChanged</span> ( <span class="type">int</span> <i>c</i> = -1 ) const</h3>
<p>Call this function when the value of <a href="q3listviewitem.html#width">width</a>() may have changed for column <i>c</i>. Normally, you should call this if text(c) changes. Passing -1 for <i>c</i> indicates that all columns may have changed. It is more efficient to pass -1 if two or more columns have changed than to call widthChanged() separately for each one.</p>
<p><b>See also </b><a href="q3listviewitem.html#width">width</a>().</p>
<!-- @@@widthChanged -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>