Sophie

Sophie

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

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" />
<!-- q3datatable.cpp -->
  <title>Qt 4.8: Q3DataTable 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><a href="qt3support.html">Qt3Support</a></li>
<li>Q3DataTable</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-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</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">Q3DataTable Class Reference</h1>
<!-- $$$Q3DataTable-brief -->
<p>The Q3DataTable class provides a flexible SQL table widget that supports browsing and editing. <a href="#details">More...</a></p>
<!-- @@@Q3DataTable -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3DataTable&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#qdatatable">Porting to Qt 4</a> for more information.</p>
<p><b>Inherits: </b><a href="q3table.html">Q3Table</a>.</p>
<ul>
<li><a href="q3datatable-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#Refresh-enum">Refresh</a></b> { RefreshData, RefreshColumns, RefreshAll }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="q3datatable.html#autoEdit-prop">autoEdit</a></b> : bool</li>
<li class="fn"><b><a href="q3datatable.html#confirmCancels-prop">confirmCancels</a></b> : bool</li>
<li class="fn"><b><a href="q3datatable.html#confirmDelete-prop">confirmDelete</a></b> : bool</li>
<li class="fn"><b><a href="q3datatable.html#confirmEdits-prop">confirmEdits</a></b> : bool</li>
<li class="fn"><b><a href="q3datatable.html#confirmInsert-prop">confirmInsert</a></b> : bool</li>
<li class="fn"><b><a href="q3datatable.html#confirmUpdate-prop">confirmUpdate</a></b> : bool</li>
<li class="fn"><b><a href="q3datatable.html#dateFormat-prop">dateFormat</a></b> : Qt::DateFormat</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="q3datatable.html#falseText-prop">falseText</a></b> : QString</li>
<li class="fn"><b><a href="q3datatable.html#filter-prop">filter</a></b> : QString</li>
<li class="fn"><b><a href="q3datatable.html#nullText-prop">nullText</a></b> : QString</li>
<li class="fn"><b><a href="q3datatable.html#numCols-prop">numCols</a></b> : int</li>
<li class="fn"><b><a href="q3datatable.html#numRows-prop">numRows</a></b> : int</li>
<li class="fn"><b><a href="q3datatable.html#sort-prop">sort</a></b> : QStringList</li>
<li class="fn"><b><a href="q3datatable.html#trueText-prop">trueText</a></b> : QString</li>
</ul>
</td></tr>
</table>
<ul>
<li class="fn">10 properties inherited from <a href="q3table.html#properties">Q3Table</a></li>
<li class="fn">10 properties inherited from <a href="q3scrollview.html#properties">Q3ScrollView</a></li>
<li class="fn">2 properties inherited from <a href="q3frame.html#properties">Q3Frame</a></li>
<li class="fn">6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</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="q3datatable.html#Q3DataTable">Q3DataTable</a></b> ( QWidget * <i>parent</i> = 0, const char * <i>name</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#Q3DataTable-2">Q3DataTable</a></b> ( Q3SqlCursor * <i>cursor</i>, bool <i>autoPopulate</i> = false, QWidget * <i>parent</i> = 0, const char * <i>name</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#dtor.Q3DataTable">~Q3DataTable</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#addColumn">addColumn</a></b> ( const QString &amp; <i>fieldName</i>, const QString &amp; <i>label</i> = QString(), int <i>width</i> = -1, const QIconSet &amp; <i>iconset</i> = QIconSet() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#autoDelete">autoDelete</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#autoEdit-prop">autoEdit</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#confirmCancels-prop">confirmCancels</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#confirmDelete-prop">confirmDelete</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#confirmEdits-prop">confirmEdits</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#confirmInsert-prop">confirmInsert</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#confirmUpdate-prop">confirmUpdate</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSqlRecord * </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#currentRecord">currentRecord</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::DateFormat </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#dateFormat-prop">dateFormat</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#falseText-prop">falseText</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#filter-prop">filter</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#indexOf">indexOf</a></b> ( uint <i>i</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#installEditorFactory">installEditorFactory</a></b> ( Q3SqlEditorFactory * <i>f</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#installPropertyMap">installPropertyMap</a></b> ( Q3SqlPropertyMap * <i>m</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#nullText-prop">nullText</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#refresh">refresh</a></b> ( Refresh <i>mode</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#setAutoDelete">setAutoDelete</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#autoEdit-prop">setAutoEdit</a></b> ( bool <i>autoEdit</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#setColumn">setColumn</a></b> ( uint <i>col</i>, const QString &amp; <i>fieldName</i>, const QString &amp; <i>label</i> = QString(), int <i>width</i> = -1, const QIconSet &amp; <i>iconset</i> = QIconSet() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#confirmCancels-prop">setConfirmCancels</a></b> ( bool <i>confirm</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#confirmDelete-prop">setConfirmDelete</a></b> ( bool <i>confirm</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#confirmEdits-prop">setConfirmEdits</a></b> ( bool <i>confirm</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#confirmInsert-prop">setConfirmInsert</a></b> ( bool <i>confirm</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#confirmUpdate-prop">setConfirmUpdate</a></b> ( bool <i>confirm</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#dateFormat-prop">setDateFormat</a></b> ( const Qt::DateFormat <i>f</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#falseText-prop">setFalseText</a></b> ( const QString &amp; <i>falseText</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#filter-prop">setFilter</a></b> ( const QString &amp; <i>filter</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#nullText-prop">setNullText</a></b> ( const QString &amp; <i>nullText</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#sort-prop">setSort</a></b> ( const QStringList &amp; <i>sort</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#sort-prop">setSort</a></b> ( const QSqlIndex &amp; <i>sort</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#setSqlCursor">setSqlCursor</a></b> ( Q3SqlCursor * <i>cursor</i> = 0, bool <i>autoPopulate</i> = false, bool <i>autoDelete</i> = false )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#trueText-prop">setTrueText</a></b> ( const QString &amp; <i>trueText</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#sort-prop">sort</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3SqlCursor * </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#sqlCursor">sqlCursor</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#trueText-prop">trueText</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#value">value</a></b> ( int <i>row</i>, int <i>col</i> ) const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#hideColumn">hideColumn</a></b> ( int <i>col</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#numCols-prop">numCols</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#numRows-prop">numRows</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#removeColumn">removeColumn</a></b> ( int <i>col</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#selectRow">selectRow</a></b> ( int <i>row</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#setNumCols">setNumCols</a></b> ( int <i>r</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#setNumRows">setNumRows</a></b> ( int <i>r</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#showColumn">showColumn</a></b> ( int <i>col</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#sortColumn">sortColumn</a></b> ( int <i>col</i>, bool <i>ascending</i> = true, bool <i>wholeRows</i> = false )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#text">text</a></b> ( int <i>row</i>, int <i>col</i> ) const</td></tr>
</table>
<ul>
<li class="fn">64 public functions inherited from <a href="q3table.html#public-functions">Q3Table</a></li>
<li class="fn">49 public functions inherited from <a href="q3scrollview.html#public-functions">Q3ScrollView</a></li>
<li class="fn">4 public functions inherited from <a href="q3frame.html#public-functions">Q3Frame</a></li>
<li class="fn">14 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#adjustColumn">adjustColumn</a></b> ( int <i>col</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#find">find</a></b> ( const QString &amp; <i>str</i>, bool <i>caseSensitive</i>, bool <i>backwards</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#refresh-2">refresh</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#setColumnStretchable">setColumnStretchable</a></b> ( int <i>col</i>, bool <i>s</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#setColumnWidth">setColumnWidth</a></b> ( int <i>col</i>, int <i>w</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#sortAscending">sortAscending</a></b> ( int <i>col</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#sortDescending">sortDescending</a></b> ( int <i>col</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#swapColumns">swapColumns</a></b> ( int <i>col1</i>, int <i>col2</i>, bool <i>swapHeaders</i> = false )</td></tr>
</table>
<ul>
<li class="fn">36 public slots inherited from <a href="q3table.html#public-slots">Q3Table</a></li>
<li class="fn">8 public slots inherited from <a href="q3scrollview.html#public-slots">Q3ScrollView</a></li>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#beforeDelete">beforeDelete</a></b> ( QSqlRecord * <i>buf</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#beforeInsert">beforeInsert</a></b> ( QSqlRecord * <i>buf</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#beforeUpdate">beforeUpdate</a></b> ( QSqlRecord * <i>buf</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#currentChanged">currentChanged</a></b> ( QSqlRecord * <i>record</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#cursorChanged">cursorChanged</a></b> ( QSql::Op <i>mode</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#primeDelete">primeDelete</a></b> ( QSqlRecord * <i>buf</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#primeInsert">primeInsert</a></b> ( QSqlRecord * <i>buf</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#primeUpdate">primeUpdate</a></b> ( QSqlRecord * <i>buf</i> )</td></tr>
</table>
<ul>
<li class="fn">8 signals inherited from <a href="q3table.html#signals">Q3Table</a></li>
<li class="fn">5 signals inherited from <a href="q3scrollview.html#signals">Q3ScrollView</a></li>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#beginInsert">beginInsert</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QWidget * </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#beginUpdate">beginUpdate</a></b> ( int <i>row</i>, int <i>col</i>, bool <i>replace</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSql::Confirm </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#confirmCancel">confirmCancel</a></b> ( QSql::Op <i>m</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSql::Confirm </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#confirmEdit">confirmEdit</a></b> ( QSql::Op <i>m</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#deleteCurrent">deleteCurrent</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#fieldAlignment">fieldAlignment</a></b> ( const QSqlField * <i>field</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#handleError">handleError</a></b> ( const QSqlError &amp; <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#insertCurrent">insertCurrent</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#paintField">paintField</a></b> ( QPainter * <i>p</i>, const QSqlField * <i>field</i>, const QRect &amp; <i>cr</i>, bool <i>selected</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#repaintCell">repaintCell</a></b> ( int <i>row</i>, int <i>col</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#reset">reset</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#setSize">setSize</a></b> ( Q3SqlCursor * <i>sql</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#updateCurrent">updateCurrent</a></b> ()</td></tr>
</table>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#activateNextCell">activateNextCell</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#clearCell">clearCell</a></b> ( int <i>row</i>, int <i>col</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#columnClicked">columnClicked</a></b> ( int <i>col</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#contentsContextMenuEvent">contentsContextMenuEvent</a></b> ( QContextMenuEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#contentsMousePressEvent">contentsMousePressEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QWidget * </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#createEditor">createEditor</a></b> ( int <i>row</i>, int <i>col</i>, bool <i>initFromCell</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#drawContents">drawContents</a></b> ( QPainter * <i>p</i>, int <i>cx</i>, int <i>cy</i>, int <i>cw</i>, int <i>ch</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#endEdit">endEdit</a></b> ( int <i>row</i>, int <i>col</i>, bool <i>accept</i>, bool <i>replace</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#eventFilter">eventFilter</a></b> ( QObject * <i>o</i>, QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual Q3TableItem * </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#item">item</a></b> ( int <i>row</i>, int <i>col</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#paintCell">paintCell</a></b> ( QPainter * <i>p</i>, int <i>row</i>, int <i>col</i>, const QRect &amp; <i>cr</i>, bool <i>selected</i>, const QColorGroup &amp; <i>cg</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#resizeData">resizeData</a></b> ( int <i>len</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#setItem">setItem</a></b> ( int <i>row</i>, int <i>col</i>, Q3TableItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#setPixmap">setPixmap</a></b> ( int <i>row</i>, int <i>col</i>, const QPixmap &amp; <i>pix</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3datatable.html#takeItem">takeItem</a></b> ( Q3TableItem * <i>i</i> )</td></tr>
</table>
<ul>
<li class="fn">32 protected functions inherited from <a href="q3table.html#protected-functions">Q3Table</a></li>
<li class="fn">26 protected functions inherited from <a href="q3scrollview.html#protected-functions">Q3ScrollView</a></li>
<li class="fn">5 protected functions inherited from <a href="q3frame.html#protected-functions">Q3Frame</a></li>
<li class="fn">3 protected functions inherited from <a href="qframe.html#protected-functions">QFrame</a></li>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">5 protected slots inherited from <a href="q3table.html#protected-slots">Q3Table</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3DataTable-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3DataTable class provides a flexible SQL table widget that supports browsing and editing.</p>
<p>Q3DataTable supports various functions for presenting and editing SQL data from a <a href="q3sqlcursor.html">Q3SqlCursor</a> in a table.</p>
<p>If you want a to present your data in a form use <a href="porting4.html#qdatabrowser">QDataBrowser</a>, or for read-only forms, use <a href="porting4.html#qdataview">QDataView</a> instead.</p>
<p>When displaying data, Q3DataTable only retrieves data for visible rows. If the driver supports the 'query size' property the Q3DataTable will have the correct number of rows and the vertical scroll bar will accurately reflect the number of rows displayed in proportion to the number of rows in the dataset. If the driver does not support the 'query size' property, rows are dynamically fetched from the database on an as-needed basis with the scroll bar becoming more accurate as the user scrolls down through the records. This allows extremely large queries to be displayed as quickly as possible, with minimum memory usage.</p>
<p>Q3DataTable inherits <a href="q3table.html">Q3Table</a>'s API and extends it with functions to sort and filter the data and sort columns. See <a href="q3datatable.html#setSqlCursor">setSqlCursor</a>(), <a href="q3datatable.html#filter-prop">setFilter</a>(), <a href="q3datatable.html#sort-prop">setSort</a>(), <a href="q3table.html#sorting-prop">setSorting</a>(), <a href="q3datatable.html#sortColumn">sortColumn</a>() and <a href="q3datatable.html#refresh">refresh</a>().</p>
<p>When displaying editable cursors, cell editing will be enabled. (For more information on editable cursors, see <a href="q3sqlcursor.html">Q3SqlCursor</a>). Q3DataTable can be used to modify existing data and to add new records. When a user makes changes to a field in the table, the cursor's edit buffer is used. The table will not send changes in the edit buffer to the database until the user moves to a different record in the grid or presses Enter. Cell editing is initiated by pressing F2 (or right clicking and then clicking the appropriate popup menu item) and canceled by pressing Esc. If there is a problem updating or adding data, errors are handled automatically (see <a href="q3datatable.html#handleError">handleError</a>() to change this behavior). Note that if <a href="q3datatable.html#autoEdit-prop">autoEdit</a>() is false navigating to another record will cancel the insert or update.</p>
<p>The user can be asked to confirm all edits with <a href="q3datatable.html#confirmEdits-prop">setConfirmEdits</a>(). For more precise control use <a href="q3datatable.html#confirmInsert-prop">setConfirmInsert</a>(), <a href="q3datatable.html#confirmUpdate-prop">setConfirmUpdate</a>(), <a href="q3datatable.html#confirmDelete-prop">setConfirmDelete</a>() and <a href="q3datatable.html#confirmCancels-prop">setConfirmCancels</a>(). Use <a href="q3datatable.html#autoEdit-prop">setAutoEdit</a>() to control the behavior of the table when the user edits a record and then navigates. (Note that <a href="q3datatable.html#setAutoDelete">setAutoDelete</a>() is unrelated; it is used to set whether the <a href="q3sqlcursor.html">Q3SqlCursor</a> is deleted when the table is deleted.)</p>
<p>Since the data table can perform edits, it must be able to uniquely identify every record so that edits are correctly applied. Because of this the underlying cursor must have a valid primary index to ensure that a unique record is inserted, updated or deleted within the database otherwise the database may be changed to an inconsistent state.</p>
<p>Q3DataTable creates editors using the default <a href="q3sqleditorfactory.html">Q3SqlEditorFactory</a>. Different editor factories can be used by calling <a href="q3datatable.html#installEditorFactory">installEditorFactory</a>(). A property map is used to map between the cell's value and the editor. You can use your own property map with <a href="q3datatable.html#installPropertyMap">installPropertyMap</a>().</p>
<p>The contents of a cell is available as a <a href="qstring.html">QString</a> with <a href="q3datatable.html#text">text</a>() or as a <a href="qvariant.html">QVariant</a> with <a href="q3datatable.html#value">value</a>(). The current record is returned by <a href="q3datatable.html#currentRecord">currentRecord</a>(). Use the <a href="q3datatable.html#find">find</a>() function to search for a string in the table.</p>
<p>Editing actions can be applied programmatically. For example, the <a href="q3datatable.html#insertCurrent">insertCurrent</a>() function reads the fields from the current record into the cursor and performs the insert. The <a href="q3datatable.html#updateCurrent">updateCurrent</a>() and <a href="q3datatable.html#deleteCurrent">deleteCurrent</a>() functions perform similarly to update and delete the current record respectively.</p>
<p>Columns in the table can be created automatically based on the cursor (see <a href="q3datatable.html#setSqlCursor">setSqlCursor</a>()). Columns can be manipulated manually using <a href="q3datatable.html#addColumn">addColumn</a>(), <a href="q3datatable.html#removeColumn">removeColumn</a>() and <a href="q3datatable.html#setColumn">setColumn</a>().</p>
<p>The table automatically copies many of the properties of the cursor to format the display of data within cells (alignment, visibility, etc.)&#x2e; The cursor can be changed with <a href="q3datatable.html#setSqlCursor">setSqlCursor</a>(). The filter (see <a href="q3datatable.html#filter-prop">setFilter</a>()) and sort defined within the table are used instead of the filter and sort set on the cursor. For sorting options see <a href="q3datatable.html#sort-prop">setSort</a>(), <a href="q3datatable.html#sortColumn">sortColumn</a>(), <a href="q3datatable.html#sortAscending">sortAscending</a>() and <a href="q3datatable.html#sortDescending">sortDescending</a>(). Note that sorting operations will not behave as expected if you are using a <a href="porting4.html#qsqlselectcursor">QSqlSelectCursor</a> because it uses user-defined SQL queries to obtain data.</p>
<p>The text used to represent NULL, true and false values can be changed with <a href="q3datatable.html#nullText-prop">setNullText</a>(), <a href="q3datatable.html#trueText-prop">setTrueText</a>() and <a href="q3datatable.html#falseText-prop">setFalseText</a>() respectively. You can change the appearance of cells by reimplementing <a href="q3datatable.html#paintField">paintField</a>().</p>
<p>Whenever a new row is selected in the table the <a href="q3datatable.html#currentChanged">currentChanged</a>() signal is emitted. The <a href="q3datatable.html#primeInsert">primeInsert</a>() signal is emitted when an insert is initiated. The <a href="q3datatable.html#primeUpdate">primeUpdate</a>() and <a href="q3datatable.html#primeDelete">primeDelete</a>() signals are emitted when update and deletion are initiated respectively. Just before the database is updated a signal is emitted; <a href="q3datatable.html#beforeInsert">beforeInsert</a>(), <a href="q3datatable.html#beforeUpdate">beforeUpdate</a>() or <a href="q3datatable.html#beforeDelete">beforeDelete</a>() as appropriate.</p>
</div>
<!-- @@@Q3DataTable -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Refresh$$$RefreshData$$$RefreshColumns$$$RefreshAll -->
<h3 class="fn"><a name="Refresh-enum"></a>enum Q3DataTable::<span class="name">Refresh</span></h3>
<p>This enum describes the refresh options.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3DataTable::RefreshData</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">refresh the data, i.e&#x2e; read it from the database</td></tr>
<tr><td class="topAlign"><tt>Q3DataTable::RefreshColumns</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">refresh the list of fields, e.g&#x2e; the column headings</td></tr>
<tr><td class="topAlign"><tt>Q3DataTable::RefreshAll</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">refresh both the data and the list of fields</td></tr>
</table>
<!-- @@@Refresh -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$autoEdit-prop$$$autoEdit$$$setAutoEditbool -->
<h3 class="fn"><a name="autoEdit-prop"></a><span class="name">autoEdit</span> : <span class="type">bool</span></h3>
<p>This property holds whether the data table automatically applies edits.</p>
<p>The default value for this property is true. When the user begins an insert or update in the table there are two possible outcomes when they navigate to another record:</p>
<ol class="1">
<li>the insert or update is is performed -- this occurs if autoEdit is true</li>
<li>the insert or update is abandoned -- this occurs if autoEdit is false</li>
</ol>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>autoEdit</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAutoEdit</b></span> ( bool <i>autoEdit</i> )</td></tr>
</table>
<!-- @@@autoEdit -->
<!-- $$$confirmCancels-prop$$$confirmCancels$$$setConfirmCancelsbool -->
<h3 class="fn"><a name="confirmCancels-prop"></a><span class="name">confirmCancels</span> : <span class="type">bool</span></h3>
<p>This property holds whether the data table confirms cancel operations.</p>
<p>If the confirmCancel property is true, all cancels must be confirmed by the user through a message box (this behavior can be changed by overriding the <a href="q3datatable.html#confirmCancel">confirmCancel</a>() function), otherwise all cancels occur immediately. The default is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>confirmCancels</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setConfirmCancels</b></span> ( bool <i>confirm</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3datatable.html#confirmEdits-prop">confirmEdits</a>() and <a href="q3datatable.html#confirmCancel">confirmCancel</a>().</p>
<!-- @@@confirmCancels -->
<!-- $$$confirmDelete-prop$$$confirmDelete$$$setConfirmDeletebool -->
<h3 class="fn"><a name="confirmDelete-prop"></a><span class="name">confirmDelete</span> : <span class="type">bool</span></h3>
<p>This property holds whether the data table confirms delete operations.</p>
<p>If the confirmDelete property is true, all deletions must be confirmed by the user through a message box (this behavior can be changed by overriding the <a href="q3datatable.html#confirmEdit">confirmEdit</a>() function), otherwise all delete operations occur immediately.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>confirmDelete</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setConfirmDelete</b></span> ( bool <i>confirm</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3datatable.html#confirmCancels-prop">confirmCancels</a>(), <a href="q3datatable.html#confirmEdits-prop">confirmEdits</a>(), <a href="q3datatable.html#confirmUpdate-prop">confirmUpdate</a>(), and <a href="q3datatable.html#confirmInsert-prop">confirmInsert</a>().</p>
<!-- @@@confirmDelete -->
<!-- $$$confirmEdits-prop$$$confirmEdits$$$setConfirmEditsbool -->
<h3 class="fn"><a name="confirmEdits-prop"></a><span class="name">confirmEdits</span> : <span class="type">bool</span></h3>
<p>This property holds whether the data table confirms edit operations.</p>
<p>If the confirmEdits property is true, the data table confirms all edit operations (inserts, updates and deletes). Finer control of edit confirmation can be achieved using <a href="q3datatable.html#confirmCancels-prop">confirmCancels</a>, <a href="q3datatable.html#confirmInsert-prop">confirmInsert</a>, <a href="q3datatable.html#confirmUpdate-prop">confirmUpdate</a> and <a href="q3datatable.html#confirmDelete-prop">confirmDelete</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>confirmEdits</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setConfirmEdits</b></span> ( bool <i>confirm</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3datatable.html#confirmCancels-prop">confirmCancels</a>(), <a href="q3datatable.html#confirmInsert-prop">confirmInsert</a>(), <a href="q3datatable.html#confirmUpdate-prop">confirmUpdate</a>(), and <a href="q3datatable.html#confirmDelete-prop">confirmDelete</a>().</p>
<!-- @@@confirmEdits -->
<!-- $$$confirmInsert-prop$$$confirmInsert$$$setConfirmInsertbool -->
<h3 class="fn"><a name="confirmInsert-prop"></a><span class="name">confirmInsert</span> : <span class="type">bool</span></h3>
<p>This property holds whether the data table confirms insert operations.</p>
<p>If the confirmInsert property is true, all insertions must be confirmed by the user through a message box (this behavior can be changed by overriding the <a href="q3datatable.html#confirmEdit">confirmEdit</a>() function), otherwise all insert operations occur immediately.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>confirmInsert</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setConfirmInsert</b></span> ( bool <i>confirm</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3datatable.html#confirmCancels-prop">confirmCancels</a>(), <a href="q3datatable.html#confirmEdits-prop">confirmEdits</a>(), <a href="q3datatable.html#confirmUpdate-prop">confirmUpdate</a>(), and <a href="q3datatable.html#confirmDelete-prop">confirmDelete</a>().</p>
<!-- @@@confirmInsert -->
<!-- $$$confirmUpdate-prop$$$confirmUpdate$$$setConfirmUpdatebool -->
<h3 class="fn"><a name="confirmUpdate-prop"></a><span class="name">confirmUpdate</span> : <span class="type">bool</span></h3>
<p>This property holds whether the data table confirms update operations.</p>
<p>If the confirmUpdate property is true, all updates must be confirmed by the user through a message box (this behavior can be changed by overriding the <a href="q3datatable.html#confirmEdit">confirmEdit</a>() function), otherwise all update operations occur immediately.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>confirmUpdate</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setConfirmUpdate</b></span> ( bool <i>confirm</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3datatable.html#confirmCancels-prop">confirmCancels</a>(), <a href="q3datatable.html#confirmEdits-prop">confirmEdits</a>(), <a href="q3datatable.html#confirmInsert-prop">confirmInsert</a>(), and <a href="q3datatable.html#confirmDelete-prop">confirmDelete</a>().</p>
<!-- @@@confirmUpdate -->
<!-- $$$dateFormat-prop$$$dateFormat$$$setDateFormatconstQt::DateFormat -->
<h3 class="fn"><a name="dateFormat-prop"></a><span class="name">dateFormat</span> : <span class="type"><a href="qt.html#DateFormat-enum">Qt::DateFormat</a></span></h3>
<p>This property holds the format used for displaying date/time values.</p>
<p>The dateFormat property is used for displaying date/time values in the table. The default value is <a href="qt.html#DateFormat-enum">Qt::LocalDate</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::DateFormat </td><td class="memItemRight bottomAlign"><span class="name"><b>dateFormat</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDateFormat</b></span> ( const Qt::DateFormat <i>f</i> )</td></tr>
</table>
<!-- @@@dateFormat -->
<!-- $$$falseText-prop$$$falseText$$$setFalseTextconstQString& -->
<h3 class="fn"><a name="falseText-prop"></a><span class="name">falseText</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the text used to represent false values.</p>
<p>The falseText property will be used to represent NULL values in the table. The default value is &quot;False&quot;.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>falseText</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFalseText</b></span> ( const QString &amp; <i>falseText</i> )</td></tr>
</table>
<!-- @@@falseText -->
<!-- $$$filter-prop$$$filter$$$setFilterconstQString& -->
<h3 class="fn"><a name="filter-prop"></a><span class="name">filter</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the data filter for the data table.</p>
<p>The filter applies to the data shown in the table. To view data with a new filter, use <a href="q3datatable.html#refresh">refresh</a>(). A filter string is an SQL WHERE clause without the WHERE keyword.</p>
<p>There is no default filter.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>filter</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFilter</b></span> ( const QString &amp; <i>filter</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3datatable.html#sort-prop">sort</a>().</p>
<!-- @@@filter -->
<!-- $$$nullText-prop$$$nullText$$$setNullTextconstQString& -->
<h3 class="fn"><a name="nullText-prop"></a><span class="name">nullText</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the text used to represent NULL values.</p>
<p>The nullText property will be used to represent NULL values in the table. The default value is provided by the cursor's driver.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>nullText</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setNullText</b></span> ( const QString &amp; <i>nullText</i> )</td></tr>
</table>
<!-- @@@nullText -->
<!-- $$$numCols-prop$$$numCols$$$setNumColsint -->
<h3 class="fn"><a name="numCols-prop"></a><span class="name">numCols</span> : <span class="type">int</span></h3>
<p>This property holds the number of columns in the table.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> virtual int </td><td class="memItemRight bottomAlign"><span class="name"><b>numCols</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="q3table.html#numCols-prop">setNumCols</a></b></span> ( int <i>r</i> )</td></tr>
</table>
<!-- @@@numCols -->
<!-- $$$numRows-prop$$$numRows$$$setNumRowsint -->
<h3 class="fn"><a name="numRows-prop"></a><span class="name">numRows</span> : <span class="type">int</span></h3>
<p>This property holds the number of rows in the table.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> virtual int </td><td class="memItemRight bottomAlign"><span class="name"><b>numRows</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="q3table.html#numRows-prop">setNumRows</a></b></span> ( int <i>r</i> )</td></tr>
</table>
<!-- @@@numRows -->
<!-- $$$sort-prop$$$sort$$$setSortconstQStringList&$$$setSortconstQSqlIndex& -->
<h3 class="fn"><a name="sort-prop"></a><span class="name">sort</span> : <span class="type"><a href="qstringlist.html">QStringList</a></span></h3>
<p>This property holds the data table's sort.</p>
<p>The table's sort affects the order in which data records are displayed in the table. To apply a sort, use <a href="q3datatable.html#refresh">refresh</a>().</p>
<p>When examining the sort property, a string list is returned with each item having the form 'fieldname order' (e.g&#x2e;, 'id ASC', 'surname DESC').</p>
<p>There is no default sort.</p>
<p>Note that if you want to iterate over the sort list, you should iterate over a copy, e.g&#x2e;</p>
<pre class="cpp"> <span class="type"><a href="qstringlist.html">QStringList</a></span> list <span class="operator">=</span> myDataTable<span class="operator">.</span>sort();
 <span class="type"><a href="qstringlist.html">QStringList</a></span><span class="operator">::</span>Iterator it <span class="operator">=</span> list<span class="operator">.</span>begin();
 <span class="keyword">while</span>( it <span class="operator">!</span><span class="operator">=</span> list<span class="operator">.</span>end() ) {
     myProcessing( <span class="operator">*</span>it );
     <span class="operator">+</span><span class="operator">+</span>it;
 }</pre>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QStringList </td><td class="memItemRight bottomAlign"><span class="name"><b>sort</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSort</b></span> ( const QStringList &amp; <i>sort</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSort</b></span> ( const QSqlIndex &amp; <i>sort</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3datatable.html#filter-prop">filter</a>() and <a href="q3datatable.html#refresh">refresh</a>().</p>
<!-- @@@sort -->
<!-- $$$trueText-prop$$$trueText$$$setTrueTextconstQString& -->
<h3 class="fn"><a name="trueText-prop"></a><span class="name">trueText</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the text used to represent true values.</p>
<p>The trueText property will be used to represent NULL values in the table. The default value is &quot;True&quot;.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>trueText</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTrueText</b></span> ( const QString &amp; <i>trueText</i> )</td></tr>
</table>
<!-- @@@trueText -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3DataTable[overload1]$$$Q3DataTableQWidget*constchar* -->
<h3 class="fn"><a name="Q3DataTable"></a>Q3DataTable::<span class="name">Q3DataTable</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0, const <span class="type">char</span> * <i>name</i> = 0 )</h3>
<p>Constructs a data table which is a child of <i>parent</i>, called name <i>name</i>.</p>
<!-- @@@Q3DataTable -->
<!-- $$$Q3DataTable$$$Q3DataTableQ3SqlCursor*boolQWidget*constchar* -->
<h3 class="fn"><a name="Q3DataTable-2"></a>Q3DataTable::<span class="name">Q3DataTable</span> ( <span class="type"><a href="q3sqlcursor.html">Q3SqlCursor</a></span> * <i>cursor</i>, <span class="type">bool</span> <i>autoPopulate</i> = false, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0, const <span class="type">char</span> * <i>name</i> = 0 )</h3>
<p>Constructs a data table which is a child of <i>parent</i>, called name <i>name</i> using the cursor <i>cursor</i>.</p>
<p>If <i>autoPopulate</i> is true (the default is false), columns are automatically created based upon the fields in the <i>cursor</i> record. Note that <i>autoPopulate</i> only governs the creation of columns; to load the cursor's data into the table use <a href="q3datatable.html#refresh">refresh</a>().</p>
<p>If the <i>cursor</i> 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.</p>
<!-- @@@Q3DataTable -->
<!-- $$$~Q3DataTable[overload1]$$$~Q3DataTable -->
<h3 class="fn"><a name="dtor.Q3DataTable"></a>Q3DataTable::<span class="name">~Q3DataTable</span> ()</h3>
<p>Destroys the object and frees any allocated resources.</p>
<!-- @@@~Q3DataTable -->
<!-- $$$activateNextCell[overload1]$$$activateNextCell -->
<h3 class="fn"><a name="activateNextCell"></a><span class="type">void</span> Q3DataTable::<span class="name">activateNextCell</span> ()<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3table.html#activateNextCell">Q3Table::activateNextCell</a>().</p>
<!-- @@@activateNextCell -->
<!-- $$$addColumn[overload1]$$$addColumnconstQString&constQString&intconstQIconSet& -->
<h3 class="fn"><a name="addColumn"></a><span class="type">void</span> Q3DataTable::<span class="name">addColumn</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>fieldName</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label</i> = QString(), <span class="type">int</span> <i>width</i> = -1, const <span class="type">QIconSet</span> &amp; <i>iconset</i> = QIconSet() )<tt> [virtual]</tt></h3>
<p>Adds the next column to be displayed using the field <i>fieldName</i>, column label <i>label</i>, width <i>width</i> and iconset <i>iconset</i>.</p>
<p>If <i>label</i> is specified, it is used as the column's header label, otherwise the field's display label is used when <a href="q3datatable.html#setSqlCursor">setSqlCursor</a>() is called. The <i>iconset</i> is used to set the icon used by the column header; by default there is no icon.</p>
<p><b>See also </b><a href="q3datatable.html#setSqlCursor">setSqlCursor</a>() and <a href="q3datatable.html#refresh">refresh</a>().</p>
<!-- @@@addColumn -->
<!-- $$$adjustColumn[overload1]$$$adjustColumnint -->
<h3 class="fn"><a name="adjustColumn"></a><span class="type">void</span> Q3DataTable::<span class="name">adjustColumn</span> ( <span class="type">int</span> <i>col</i> )<tt> [virtual slot]</tt></h3>
<p>Reimplemented from <a href="q3table.html#adjustColumn">Q3Table::adjustColumn</a>().</p>
<p>Resizes column <i>col</i> so that the column width is wide enough to display the widest item the column contains (including the column label). If the table's <a href="q3sqlcursor.html" class="compat">Q3SqlCursor</a> is not currently active, the cursor will be refreshed before the column width is calculated. Be aware that this function may be slow on tables that contain large result sets.</p>
<!-- @@@adjustColumn -->
<!-- $$$autoDelete[overload1]$$$autoDelete -->
<h3 class="fn"><a name="autoDelete"></a><span class="type">bool</span> Q3DataTable::<span class="name">autoDelete</span> () const</h3>
<p>Returns true if the table will automatically delete the cursor specified by <a href="q3datatable.html#setSqlCursor">setSqlCursor</a>(); otherwise returns false.</p>
<p><b>See also </b><a href="q3datatable.html#setAutoDelete">setAutoDelete</a>().</p>
<!-- @@@autoDelete -->
<!-- $$$beforeDelete[overload1]$$$beforeDeleteQSqlRecord* -->
<h3 class="fn"><a name="beforeDelete"></a><span class="type">void</span> Q3DataTable::<span class="name">beforeDelete</span> ( <span class="type"><a href="qsqlrecord.html">QSqlRecord</a></span> * <i>buf</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted just before the currently selected record is deleted from the database. The <i>buf</i> parameter points to the edit buffer being deleted. Connect to this signal to, for example, copy some of the fields for later use.</p>
<!-- @@@beforeDelete -->
<!-- $$$beforeInsert[overload1]$$$beforeInsertQSqlRecord* -->
<h3 class="fn"><a name="beforeInsert"></a><span class="type">void</span> Q3DataTable::<span class="name">beforeInsert</span> ( <span class="type"><a href="qsqlrecord.html">QSqlRecord</a></span> * <i>buf</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted just before the cursor's edit buffer is inserted into the database. The <i>buf</i> parameter points to the edit buffer being inserted. Connect to this signal to, for example, populate a key field with a unique sequence number.</p>
<!-- @@@beforeInsert -->
<!-- $$$beforeUpdate[overload1]$$$beforeUpdateQSqlRecord* -->
<h3 class="fn"><a name="beforeUpdate"></a><span class="type">void</span> Q3DataTable::<span class="name">beforeUpdate</span> ( <span class="type"><a href="qsqlrecord.html">QSqlRecord</a></span> * <i>buf</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted just before the cursor's edit buffer is updated in the database. The <i>buf</i> parameter points to the edit buffer being updated. Connect to this signal when you want to transform the user's data behind-the-scenes.</p>
<!-- @@@beforeUpdate -->
<!-- $$$beginInsert[overload1]$$$beginInsert -->
<h3 class="fn"><a name="beginInsert"></a><span class="type">bool</span> Q3DataTable::<span class="name">beginInsert</span> ()<tt> [virtual protected]</tt></h3>
<p>Protected virtual function called when editing is about to begin on a new record. If the table is read-only, or if there's no cursor or the cursor does not allow inserts, nothing happens and false is returned. Otherwise returns true.</p>
<p>Editing takes place using the cursor's edit buffer(see <a href="q3sqlcursor.html#editBuffer">Q3SqlCursor::editBuffer</a>()).</p>
<p>When editing begins, a new row is created in the table marked with an asterisk '*' in the row's vertical header column, i.e&#x2e; at the left of the row.</p>
<!-- @@@beginInsert -->
<!-- $$$beginUpdate[overload1]$$$beginUpdateintintbool -->
<h3 class="fn"><a name="beginUpdate"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * Q3DataTable::<span class="name">beginUpdate</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i>, <span class="type">bool</span> <i>replace</i> )<tt> [virtual protected]</tt></h3>
<p>Protected virtual function called when editing is about to begin on an existing row. If the table is read-only, or if there's no cursor, nothing happens.</p>
<p>Editing takes place using the cursor's edit buffer (see <a href="q3sqlcursor.html#editBuffer">Q3SqlCursor::editBuffer</a>()).</p>
<p><i>row</i> and <i>col</i> refer to the row and column in the <a href="q3datatable.html" class="compat">Q3DataTable</a>.</p>
<p>(<i>replace</i> is provided for reimplementors and reflects the API of <a href="q3table.html#beginEdit">Q3Table::beginEdit</a>().)</p>
<!-- @@@beginUpdate -->
<!-- $$$clearCell[overload1]$$$clearCellintint -->
<h3 class="fn"><a name="clearCell"></a><span class="type">void</span> Q3DataTable::<span class="name">clearCell</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3table.html#clearCell">Q3Table::clearCell</a>().</p>
<!-- @@@clearCell -->
<!-- $$$columnClicked[overload1]$$$columnClickedint -->
<h3 class="fn"><a name="columnClicked"></a><span class="type">void</span> Q3DataTable::<span class="name">columnClicked</span> ( <span class="type">int</span> <i>col</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3table.html#columnClicked">Q3Table::columnClicked</a>().</p>
<!-- @@@columnClicked -->
<!-- $$$confirmCancel[overload1]$$$confirmCancelQSql::Op -->
<h3 class="fn"><a name="confirmCancel"></a><span class="type"><a href="qsql-qt3.html#Confirm-enum">QSql::Confirm</a></span> Q3DataTable::<span class="name">confirmCancel</span> ( <span class="type"><a href="qsql-qt3.html#Op-enum">QSql::Op</a></span> <i>m</i> )<tt> [virtual protected]</tt></h3>
<p>Protected virtual function which returns a confirmation for canceling an edit mode of <i>m</i>. Derived classes can reimplement this function to provide their own cancel dialog. The default implementation uses a message box which prompts the user to confirm the cancel.</p>
<!-- @@@confirmCancel -->
<!-- $$$confirmEdit[overload1]$$$confirmEditQSql::Op -->
<h3 class="fn"><a name="confirmEdit"></a><span class="type"><a href="qsql-qt3.html#Confirm-enum">QSql::Confirm</a></span> Q3DataTable::<span class="name">confirmEdit</span> ( <span class="type"><a href="qsql-qt3.html#Op-enum">QSql::Op</a></span> <i>m</i> )<tt> [virtual protected]</tt></h3>
<p>Protected virtual function which returns a confirmation for an edit of mode <i>m</i>. Derived classes can reimplement this function to provide their own confirmation dialog. The default implementation uses a message box which prompts the user to confirm the edit action.</p>
<!-- @@@confirmEdit -->
<!-- $$$contentsContextMenuEvent[overload1]$$$contentsContextMenuEventQContextMenuEvent* -->
<h3 class="fn"><a name="contentsContextMenuEvent"></a><span class="type">void</span> Q3DataTable::<span class="name">contentsContextMenuEvent</span> ( <span class="type"><a href="qcontextmenuevent.html">QContextMenuEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#contentsContextMenuEvent">Q3ScrollView::contentsContextMenuEvent</a>().</p>
<!-- @@@contentsContextMenuEvent -->
<!-- $$$contentsMousePressEvent[overload1]$$$contentsMousePressEventQMouseEvent* -->
<h3 class="fn"><a name="contentsMousePressEvent"></a><span class="type">void</span> Q3DataTable::<span class="name">contentsMousePressEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#contentsMousePressEvent">Q3ScrollView::contentsMousePressEvent</a>().</p>
<!-- @@@contentsMousePressEvent -->
<!-- $$$createEditor[overload1]$$$createEditorintintbool -->
<h3 class="fn"><a name="createEditor"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * Q3DataTable::<span class="name">createEditor</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i>, <span class="type">bool</span> <i>initFromCell</i> ) const<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3table.html#createEditor">Q3Table::createEditor</a>().</p>
<p>For an editable table, creates an editor suitable for the field in column <i>col</i>. The editor is created using the default editor factory, unless a different editor factory was installed with <a href="q3datatable.html#installEditorFactory">installEditorFactory</a>(). The editor is primed with the value of the field in <i>col</i> using a property map. The property map used is the default property map, unless a new property map was installed with installPropertMap(). If <i>initFromCell</i> is true then the editor is primed with the value in the <a href="q3datatable.html" class="compat">Q3DataTable</a> cell.</p>
<!-- @@@createEditor -->
<!-- $$$currentChanged[overload1]$$$currentChangedQSqlRecord* -->
<h3 class="fn"><a name="currentChanged"></a><span class="type">void</span> Q3DataTable::<span class="name">currentChanged</span> ( <span class="type"><a href="qsqlrecord.html">QSqlRecord</a></span> * <i>record</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever a new row is selected in the table. The <i>record</i> parameter points to the contents of the newly selected record.</p>
<!-- @@@currentChanged -->
<!-- $$$currentRecord[overload1]$$$currentRecord -->
<h3 class="fn"><a name="currentRecord"></a><span class="type"><a href="qsqlrecord.html">QSqlRecord</a></span> * Q3DataTable::<span class="name">currentRecord</span> () const</h3>
<p>Returns the currently selected record, or 0 if there is no current selection. The table owns the pointer, so do <i>not</i> delete it or otherwise modify it or the cursor it points to.</p>
<!-- @@@currentRecord -->
<!-- $$$cursorChanged[overload1]$$$cursorChangedQSql::Op -->
<h3 class="fn"><a name="cursorChanged"></a><span class="type">void</span> Q3DataTable::<span class="name">cursorChanged</span> ( <span class="type"><a href="qsql-qt3.html#Op-enum">QSql::Op</a></span> <i>mode</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the cursor record was changed due to an edit. The <i>mode</i> parameter is the type of edit that just took place.</p>
<!-- @@@cursorChanged -->
<!-- $$$deleteCurrent[overload1]$$$deleteCurrent -->
<h3 class="fn"><a name="deleteCurrent"></a><span class="type">bool</span> Q3DataTable::<span class="name">deleteCurrent</span> ()<tt> [virtual protected]</tt></h3>
<p>For an editable table, issues a delete on the current cursor's primary index using the values of the currently selected row. If there is no current cursor or there is no current selection, nothing happens. If <a href="q3datatable.html#confirmEdits-prop">confirmEdits</a>() or <a href="q3datatable.html#confirmDelete-prop">confirmDelete</a>() is true, <a href="q3datatable.html#confirmEdit">confirmEdit</a>() is called to confirm the delete. Returns true if the delete succeeded; otherwise false.</p>
<p>The underlying cursor must have a valid primary index to ensure that a unique record is deleted within the database otherwise the database may be changed to an inconsistent state.</p>
<!-- @@@deleteCurrent -->
<!-- $$$drawContents[overload1]$$$drawContentsQPainter*intintintint -->
<h3 class="fn"><a name="drawContents"></a><span class="type">void</span> Q3DataTable::<span class="name">drawContents</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, <span class="type">int</span> <i>cx</i>, <span class="type">int</span> <i>cy</i>, <span class="type">int</span> <i>cw</i>, <span class="type">int</span> <i>ch</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#drawContents">Q3ScrollView::drawContents</a>().</p>
<!-- @@@drawContents -->
<!-- $$$endEdit[overload1]$$$endEditintintboolbool -->
<h3 class="fn"><a name="endEdit"></a><span class="type">void</span> Q3DataTable::<span class="name">endEdit</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i>, <span class="type">bool</span> <i>accept</i>, <span class="type">bool</span> <i>replace</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3table.html#endEdit">Q3Table::endEdit</a>().</p>
<!-- @@@endEdit -->
<!-- $$$eventFilter[overload1]$$$eventFilterQObject*QEvent* -->
<h3 class="fn"><a name="eventFilter"></a><span class="type">bool</span> Q3DataTable::<span class="name">eventFilter</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>o</i>, <span class="type"><a href="qevent.html">QEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#eventFilter">QObject::eventFilter</a>().</p>
<!-- @@@eventFilter -->
<!-- $$$fieldAlignment[overload1]$$$fieldAlignmentconstQSqlField* -->
<h3 class="fn"><a name="fieldAlignment"></a><span class="type">int</span> Q3DataTable::<span class="name">fieldAlignment</span> ( const <span class="type"><a href="qsqlfield.html">QSqlField</a></span> * <i>field</i> )<tt> [virtual protected]</tt></h3>
<p>Returns the alignment for <i>field</i>.</p>
<!-- @@@fieldAlignment -->
<!-- $$$find[overload1]$$$findconstQString&boolbool -->
<h3 class="fn"><a name="find"></a><span class="type">void</span> Q3DataTable::<span class="name">find</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>str</i>, <span class="type">bool</span> <i>caseSensitive</i>, <span class="type">bool</span> <i>backwards</i> )<tt> [virtual slot]</tt></h3>
<p>Searches the current cursor for a cell containing the string <i>str</i> starting at the current cell and working forwards (or backwards if <i>backwards</i> is true). If the string is found, the cell containing the string is set as the current cell. If <i>caseSensitive</i> is false the case of <i>str</i> will be ignored.</p>
<p>The search will wrap, i.e&#x2e; if the first (or if backwards is true, last) cell is reached without finding <i>str</i> the search will continue until it reaches the starting cell. If <i>str</i> is not found the search will fail and the current cell will remain unchanged.</p>
<!-- @@@find -->
<!-- $$$handleError[overload1]$$$handleErrorconstQSqlError& -->
<h3 class="fn"><a name="handleError"></a><span class="type">void</span> Q3DataTable::<span class="name">handleError</span> ( const <span class="type"><a href="qsqlerror.html">QSqlError</a></span> &amp; <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Protected virtual function which is called when an error <i>e</i> has occurred on the current <a href="qwidget.html#cursor-prop">cursor</a>(). The default implementation displays a warning message to the user with information about the error.</p>
<!-- @@@handleError -->
<!-- $$$hideColumn[overload1]$$$hideColumnint -->
<h3 class="fn"><a name="hideColumn"></a><span class="type">void</span> Q3DataTable::<span class="name">hideColumn</span> ( <span class="type">int</span> <i>col</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3table.html#hideColumn">Q3Table::hideColumn</a>().</p>
<!-- @@@hideColumn -->
<!-- $$$indexOf[overload1]$$$indexOfuint -->
<h3 class="fn"><a name="indexOf"></a><span class="type">int</span> Q3DataTable::<span class="name">indexOf</span> ( <span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> <i>i</i> ) const</h3>
<p>Returns the index of the field within the current SQL query that is displayed in column <i>i</i>.</p>
<!-- @@@indexOf -->
<!-- $$$insertCurrent[overload1]$$$insertCurrent -->
<h3 class="fn"><a name="insertCurrent"></a><span class="type">bool</span> Q3DataTable::<span class="name">insertCurrent</span> ()<tt> [virtual protected]</tt></h3>
<p>For an editable table, issues an insert on the current cursor using the values in the cursor's edit buffer. If there is no current cursor or there is no current &quot;insert&quot; row, nothing happens. If <a href="q3datatable.html#confirmEdits-prop">confirmEdits</a>() or <a href="q3datatable.html#confirmInsert-prop">confirmInsert</a>() is true, <a href="q3datatable.html#confirmEdit">confirmEdit</a>() is called to confirm the insert. Returns true if the insert succeeded; otherwise returns false.</p>
<p>The underlying cursor must have a valid primary index to ensure that a unique record is inserted within the database otherwise the database may be changed to an inconsistent state.</p>
<!-- @@@insertCurrent -->
<!-- $$$installEditorFactory[overload1]$$$installEditorFactoryQ3SqlEditorFactory* -->
<h3 class="fn"><a name="installEditorFactory"></a><span class="type">void</span> Q3DataTable::<span class="name">installEditorFactory</span> ( <span class="type"><a href="q3sqleditorfactory.html">Q3SqlEditorFactory</a></span> * <i>f</i> )</h3>
<p>Installs a new SQL editor factory <i>f</i>. This enables the user to create and instantiate their own editors for use in cell editing. Note that <a href="q3datatable.html" class="compat">Q3DataTable</a> takes ownership of this pointer, and will delete it when it is no longer needed or when installEditorFactory() is called again.</p>
<p><b>See also </b><a href="q3sqleditorfactory.html" class="compat">Q3SqlEditorFactory</a>.</p>
<!-- @@@installEditorFactory -->
<!-- $$$installPropertyMap[overload1]$$$installPropertyMapQ3SqlPropertyMap* -->
<h3 class="fn"><a name="installPropertyMap"></a><span class="type">void</span> Q3DataTable::<span class="name">installPropertyMap</span> ( <span class="type"><a href="q3sqlpropertymap.html">Q3SqlPropertyMap</a></span> * <i>m</i> )</h3>
<p>Installs a new property map <i>m</i>. This enables the user to create and instantiate their own property maps for use in cell editing. Note that <a href="q3datatable.html" class="compat">Q3DataTable</a> takes ownership of this pointer, and will delete it when it is no longer needed or when installPropertMap() is called again.</p>
<p><b>See also </b><a href="q3sqlpropertymap.html" class="compat">Q3SqlPropertyMap</a>.</p>
<!-- @@@installPropertyMap -->
<!-- $$$item[overload1]$$$itemintint -->
<h3 class="fn"><a name="item"></a><span class="type"><a href="q3tableitem.html">Q3TableItem</a></span> * Q3DataTable::<span class="name">item</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i> ) const<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3table.html#item">Q3Table::item</a>().</p>
<p><b>See also </b><a href="q3datatable.html#setItem">setItem</a>().</p>
<!-- @@@item -->
<!-- $$$keyPressEvent[overload1]$$$keyPressEventQKeyEvent* -->
<h3 class="fn"><a name="keyPressEvent"></a><span class="type">void</span> Q3DataTable::<span class="name">keyPressEvent</span> ( <span class="type"><a href="qkeyevent.html">QKeyEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget::keyPressEvent</a>().</p>
<!-- @@@keyPressEvent -->
<!-- $$$paintCell[overload1]$$$paintCellQPainter*intintconstQRect&boolconstQColorGroup& -->
<h3 class="fn"><a name="paintCell"></a><span class="type">void</span> Q3DataTable::<span class="name">paintCell</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i>, const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>cr</i>, <span class="type">bool</span> <i>selected</i>, const <span class="type"><a href="qcolorgroup.html">QColorGroup</a></span> &amp; <i>cg</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3table.html#paintCell">Q3Table::paintCell</a>().</p>
<p>This function renders the cell at <i>row</i>, <i>col</i> with the value of the corresponding cursor field on the painter <i>p</i>. Depending on the table's current edit mode, <a href="q3datatable.html#paintField">paintField</a>() is called for the appropriate cursor field. <i>cr</i> describes the cell coordinates in the content coordinate system. If <i>selected</i> is true the cell has been selected and would normally be rendered differently than an unselected cell.</p>
<!-- @@@paintCell -->
<!-- $$$paintField[overload1]$$$paintFieldQPainter*constQSqlField*constQRect&bool -->
<h3 class="fn"><a name="paintField"></a><span class="type">void</span> Q3DataTable::<span class="name">paintField</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, const <span class="type"><a href="qsqlfield.html">QSqlField</a></span> * <i>field</i>, const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>cr</i>, <span class="type">bool</span> <i>selected</i> )<tt> [virtual protected]</tt></h3>
<p>Paints the <i>field</i> on the painter <i>p</i>. The painter has already been translated to the appropriate cell's origin where the <i>field</i> is to be rendered. <i>cr</i> describes the cell coordinates in the content coordinate system. The <i>selected</i> parameter is ignored.</p>
<p>If you want to draw custom field content you must reimplement paintField() to do the custom drawing. The default implementation renders the <i>field</i> value as text. If the field is NULL, <a href="q3datatable.html#nullText-prop">nullText</a>() is displayed in the cell. If the field is Boolean, <a href="q3datatable.html#trueText-prop">trueText</a>() or <a href="q3datatable.html#falseText-prop">falseText</a>() is displayed as appropriate.</p>
<!-- @@@paintField -->
<!-- $$$primeDelete[overload1]$$$primeDeleteQSqlRecord* -->
<h3 class="fn"><a name="primeDelete"></a><span class="type">void</span> Q3DataTable::<span class="name">primeDelete</span> ( <span class="type"><a href="qsqlrecord.html">QSqlRecord</a></span> * <i>buf</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted after the cursor is primed for delete by the table, when a delete action is beginning on the table. The <i>buf</i> parameter points to the edit buffer being deleted. Connect to this signal in order to, for example, record auditing information on deletions.</p>
<!-- @@@primeDelete -->
<!-- $$$primeInsert[overload1]$$$primeInsertQSqlRecord* -->
<h3 class="fn"><a name="primeInsert"></a><span class="type">void</span> Q3DataTable::<span class="name">primeInsert</span> ( <span class="type"><a href="qsqlrecord.html">QSqlRecord</a></span> * <i>buf</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted after the cursor is primed for insert by the table, when an insert action is beginning on the table. The <i>buf</i> parameter points to the edit buffer being inserted. Connect to this signal in order to, for example, prime the record buffer with default data values.</p>
<!-- @@@primeInsert -->
<!-- $$$primeUpdate[overload1]$$$primeUpdateQSqlRecord* -->
<h3 class="fn"><a name="primeUpdate"></a><span class="type">void</span> Q3DataTable::<span class="name">primeUpdate</span> ( <span class="type"><a href="qsqlrecord.html">QSqlRecord</a></span> * <i>buf</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted after the cursor is primed for update by the table, when an update action is beginning on the table. The <i>buf</i> parameter points to the edit buffer being updated. Connect to this signal in order to, for example, provide some visual feedback that the user is in 'edit mode'.</p>
<!-- @@@primeUpdate -->
<!-- $$$refresh[overload1]$$$refreshRefresh -->
<h3 class="fn"><a name="refresh"></a><span class="type">void</span> Q3DataTable::<span class="name">refresh</span> ( <span class="type"><a href="q3datatable.html#Refresh-enum">Refresh</a></span> <i>mode</i> )</h3>
<p>Refreshes the table. If there is no currently defined cursor (see <a href="q3datatable.html#setSqlCursor">setSqlCursor</a>()), nothing happens. The <i>mode</i> parameter determines which type of refresh will take place.</p>
<p><b>See also </b><a href="q3datatable.html#Refresh-enum">Refresh</a>, <a href="q3datatable.html#setSqlCursor">setSqlCursor</a>(), and <a href="q3datatable.html#addColumn">addColumn</a>().</p>
<!-- @@@refresh -->
<!-- $$$refresh$$$refresh -->
<h3 class="fn"><a name="refresh-2"></a><span class="type">void</span> Q3DataTable::<span class="name">refresh</span> ()<tt> [virtual slot]</tt></h3>
<p>Refreshes the table. The cursor is refreshed using the current filter, the current sort, and the currently defined columns. Equivalent to calling refresh( <a href="q3datatable.html#Refresh-enum">Q3DataTable::RefreshData</a> ).</p>
<!-- @@@refresh -->
<!-- $$$removeColumn[overload1]$$$removeColumnint -->
<h3 class="fn"><a name="removeColumn"></a><span class="type">void</span> Q3DataTable::<span class="name">removeColumn</span> ( <span class="type">int</span> <i>col</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3table.html#removeColumn">Q3Table::removeColumn</a>().</p>
<p>Removes column <i>col</i> from the list of columns to be displayed. If <i>col</i> does not exist, nothing happens.</p>
<p><b>See also </b><a href="qsqlfield.html">QSqlField</a>.</p>
<!-- @@@removeColumn -->
<!-- $$$repaintCell[overload1]$$$repaintCellintint -->
<h3 class="fn"><a name="repaintCell"></a><span class="type">void</span> Q3DataTable::<span class="name">repaintCell</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i> )<tt> [protected]</tt></h3>
<p>Repaints the cell at <i>row</i>, <i>col</i>.</p>
<!-- @@@repaintCell -->
<!-- $$$reset[overload1]$$$reset -->
<h3 class="fn"><a name="reset"></a><span class="type">void</span> Q3DataTable::<span class="name">reset</span> ()<tt> [protected]</tt></h3>
<p>Resets the table so that it displays no data.</p>
<p><b>See also </b><a href="q3datatable.html#setSqlCursor">setSqlCursor</a>().</p>
<!-- @@@reset -->
<!-- $$$resizeData[overload1]$$$resizeDataint -->
<h3 class="fn"><a name="resizeData"></a><span class="type">void</span> Q3DataTable::<span class="name">resizeData</span> ( <span class="type">int</span> <i>len</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3table.html#resizeData">Q3Table::resizeData</a>().</p>
<!-- @@@resizeData -->
<!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* -->
<h3 class="fn"><a name="resizeEvent"></a><span class="type">void</span> Q3DataTable::<span class="name">resizeEvent</span> ( <span class="type"><a href="qresizeevent.html">QResizeEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<!-- @@@resizeEvent -->
<!-- $$$selectRow[overload1]$$$selectRowint -->
<h3 class="fn"><a name="selectRow"></a><span class="type">void</span> Q3DataTable::<span class="name">selectRow</span> ( <span class="type">int</span> <i>row</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3table.html#selectRow">Q3Table::selectRow</a>().</p>
<!-- @@@selectRow -->
<!-- $$$setAutoDelete[overload1]$$$setAutoDeletebool -->
<h3 class="fn"><a name="setAutoDelete"></a><span class="type">void</span> Q3DataTable::<span class="name">setAutoDelete</span> ( <span class="type">bool</span> <i>enable</i> )<tt> [virtual]</tt></h3>
<p>Sets the cursor auto-delete flag to <i>enable</i>. If <i>enable</i> is true, the table will automatically delete the cursor specified by <a href="q3datatable.html#setSqlCursor">setSqlCursor</a>(). If <i>enable</i> is false (the default), the cursor will not be deleted.</p>
<p><b>See also </b><a href="q3datatable.html#autoDelete">autoDelete</a>().</p>
<!-- @@@setAutoDelete -->
<!-- $$$setColumn[overload1]$$$setColumnuintconstQString&constQString&intconstQIconSet& -->
<h3 class="fn"><a name="setColumn"></a><span class="type">void</span> Q3DataTable::<span class="name">setColumn</span> ( <span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> <i>col</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>fieldName</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label</i> = QString(), <span class="type">int</span> <i>width</i> = -1, const <span class="type">QIconSet</span> &amp; <i>iconset</i> = QIconSet() )<tt> [virtual]</tt></h3>
<p>Sets the <i>col</i> column to display using the field <i>fieldName</i>, column label <i>label</i>, width <i>width</i> and iconset <i>iconset</i>.</p>
<p>If <i>label</i> is specified, it is used as the column's header label, otherwise the field's display label is used when <a href="q3datatable.html#setSqlCursor">setSqlCursor</a>() is called. The <i>iconset</i> is used to set the icon used by the column header; by default there is no icon.</p>
<p><b>See also </b><a href="q3datatable.html#setSqlCursor">setSqlCursor</a>() and <a href="q3datatable.html#refresh">refresh</a>().</p>
<!-- @@@setColumn -->
<!-- $$$setColumnStretchable[overload1]$$$setColumnStretchableintbool -->
<h3 class="fn"><a name="setColumnStretchable"></a><span class="type">void</span> Q3DataTable::<span class="name">setColumnStretchable</span> ( <span class="type">int</span> <i>col</i>, <span class="type">bool</span> <i>s</i> )<tt> [virtual slot]</tt></h3>
<p>Reimplemented from <a href="q3table.html#setColumnStretchable">Q3Table::setColumnStretchable</a>().</p>
<!-- @@@setColumnStretchable -->
<!-- $$$setColumnWidth[overload1]$$$setColumnWidthintint -->
<h3 class="fn"><a name="setColumnWidth"></a><span class="type">void</span> Q3DataTable::<span class="name">setColumnWidth</span> ( <span class="type">int</span> <i>col</i>, <span class="type">int</span> <i>w</i> )<tt> [virtual slot]</tt></h3>
<p>Reimplemented from <a href="q3table.html#setColumnWidth">Q3Table::setColumnWidth</a>().</p>
<p>Sets the column <i>col</i> to the width <i>w</i>. Note that unlike <a href="q3table.html" class="compat">Q3Table</a> the <a href="q3datatable.html" class="compat">Q3DataTable</a> is not immediately redrawn, you must call refresh(<a href="q3datatable.html#Refresh-enum">Q3DataTable::RefreshColumns</a>) yourself.</p>
<p><b>See also </b><a href="q3datatable.html#refresh">refresh</a>().</p>
<!-- @@@setColumnWidth -->
<!-- $$$setItem[overload1]$$$setItemintintQ3TableItem* -->
<h3 class="fn"><a name="setItem"></a><span class="type">void</span> Q3DataTable::<span class="name">setItem</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i>, <span class="type"><a href="q3tableitem.html">Q3TableItem</a></span> * <i>item</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3table.html#setItem">Q3Table::setItem</a>().</p>
<p><b>See also </b><a href="q3datatable.html#item">item</a>().</p>
<!-- @@@setItem -->
<!-- $$$setNumCols[overload1]$$$setNumColsint -->
<h3 class="fn"><a name="setNumCols"></a><span class="type">void</span> Q3DataTable::<span class="name">setNumCols</span> ( <span class="type">int</span> <i>r</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3table.html#numCols-prop">Q3Table::setNumCols</a>().</p>
<p>The number of columns in the table will be determined automatically (see <a href="q3datatable.html#addColumn">addColumn</a>()), so normally this function should never be called. It is included for completeness.</p>
<p><b>See also </b><a href="q3datatable.html#numCols-prop">numCols</a>().</p>
<!-- @@@setNumCols -->
<!-- $$$setNumRows[overload1]$$$setNumRowsint -->
<h3 class="fn"><a name="setNumRows"></a><span class="type">void</span> Q3DataTable::<span class="name">setNumRows</span> ( <span class="type">int</span> <i>r</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3table.html#numRows-prop">Q3Table::setNumRows</a>().</p>
<p>The number of rows in the table will be determined by the cursor (see <a href="q3datatable.html#setSqlCursor">setSqlCursor</a>()), so normally this function should never be called. It is included for completeness.</p>
<p><b>See also </b><a href="q3datatable.html#numRows-prop">numRows</a>().</p>
<!-- @@@setNumRows -->
<!-- $$$setPixmap[overload1]$$$setPixmapintintconstQPixmap& -->
<h3 class="fn"><a name="setPixmap"></a><span class="type">void</span> Q3DataTable::<span class="name">setPixmap</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i>, const <span class="type"><a href="qpixmap.html">QPixmap</a></span> &amp; <i>pix</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3table.html#setPixmap">Q3Table::setPixmap</a>().</p>
<!-- @@@setPixmap -->
<!-- $$$setSize[overload1]$$$setSizeQ3SqlCursor* -->
<h3 class="fn"><a name="setSize"></a><span class="type">void</span> Q3DataTable::<span class="name">setSize</span> ( <span class="type"><a href="q3sqlcursor.html">Q3SqlCursor</a></span> * <i>sql</i> )<tt> [protected]</tt></h3>
<p>If the cursor's <i>sql</i> driver supports query sizes, the number of rows in the table is set to the size of the query. Otherwise, the table dynamically resizes itself as it is scrolled. If <i>sql</i> is not active, it is made active by issuing a select() on the cursor using the <i>sql</i> cursor's current filter and current sort.</p>
<!-- @@@setSize -->
<!-- $$$setSqlCursor[overload1]$$$setSqlCursorQ3SqlCursor*boolbool -->
<h3 class="fn"><a name="setSqlCursor"></a><span class="type">void</span> Q3DataTable::<span class="name">setSqlCursor</span> ( <span class="type"><a href="q3sqlcursor.html">Q3SqlCursor</a></span> * <i>cursor</i> = 0, <span class="type">bool</span> <i>autoPopulate</i> = false, <span class="type">bool</span> <i>autoDelete</i> = false )<tt> [virtual]</tt></h3>
<p>Sets <i>cursor</i> as the data source for the table. To force the display of the data from <i>cursor</i>, use <a href="q3datatable.html#refresh">refresh</a>(). If <i>autoPopulate</i> is true, columns are automatically created based upon the fields in the <i>cursor</i> record. If <i>autoDelete</i> is true (the default is false), the table will take ownership of the <i>cursor</i> and delete it when appropriate. If the <i>cursor</i> is read-only, the table becomes read-only. The table adopts the cursor's driver's definition for representing NULL values as strings.</p>
<p><b>See also </b><a href="q3datatable.html#sqlCursor">sqlCursor</a>(), <a href="q3datatable.html#refresh">refresh</a>(), <a href="q3table.html#readOnly-prop">setReadOnly</a>(), <a href="q3datatable.html#setAutoDelete">setAutoDelete</a>(), and <a href="qsqldriver-qt3.html#nullText" class="compat">QSqlDriver::nullText</a>().</p>
<!-- @@@setSqlCursor -->
<!-- $$$showColumn[overload1]$$$showColumnint -->
<h3 class="fn"><a name="showColumn"></a><span class="type">void</span> Q3DataTable::<span class="name">showColumn</span> ( <span class="type">int</span> <i>col</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3table.html#showColumn">Q3Table::showColumn</a>().</p>
<!-- @@@showColumn -->
<!-- $$$sortAscending[overload1]$$$sortAscendingint -->
<h3 class="fn"><a name="sortAscending"></a><span class="type">void</span> Q3DataTable::<span class="name">sortAscending</span> ( <span class="type">int</span> <i>col</i> )<tt> [virtual slot]</tt></h3>
<p>Sorts column <i>col</i> in ascending order.</p>
<p><b>See also </b><a href="q3table.html#sorting-prop">setSorting</a>().</p>
<!-- @@@sortAscending -->
<!-- $$$sortColumn[overload1]$$$sortColumnintboolbool -->
<h3 class="fn"><a name="sortColumn"></a><span class="type">void</span> Q3DataTable::<span class="name">sortColumn</span> ( <span class="type">int</span> <i>col</i>, <span class="type">bool</span> <i>ascending</i> = true, <span class="type">bool</span> <i>wholeRows</i> = false )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3table.html#sortColumn">Q3Table::sortColumn</a>().</p>
<p>Sorts column <i>col</i> in ascending order if <i>ascending</i> is true (the default); otherwise sorts in descending order.</p>
<p>The <i>wholeRows</i> parameter is ignored; <a href="q3datatable.html" class="compat">Q3DataTable</a> always sorts whole rows by the specified column.</p>
<!-- @@@sortColumn -->
<!-- $$$sortDescending[overload1]$$$sortDescendingint -->
<h3 class="fn"><a name="sortDescending"></a><span class="type">void</span> Q3DataTable::<span class="name">sortDescending</span> ( <span class="type">int</span> <i>col</i> )<tt> [virtual slot]</tt></h3>
<p>Sorts column <i>col</i> in descending order.</p>
<p><b>See also </b><a href="q3table.html#sorting-prop">setSorting</a>().</p>
<!-- @@@sortDescending -->
<!-- $$$sqlCursor[overload1]$$$sqlCursor -->
<h3 class="fn"><a name="sqlCursor"></a><span class="type"><a href="q3sqlcursor.html">Q3SqlCursor</a></span> * Q3DataTable::<span class="name">sqlCursor</span> () const</h3>
<p>Returns the cursor used by the data table.</p>
<p><b>See also </b><a href="q3datatable.html#setSqlCursor">setSqlCursor</a>().</p>
<!-- @@@sqlCursor -->
<!-- $$$swapColumns[overload1]$$$swapColumnsintintbool -->
<h3 class="fn"><a name="swapColumns"></a><span class="type">void</span> Q3DataTable::<span class="name">swapColumns</span> ( <span class="type">int</span> <i>col1</i>, <span class="type">int</span> <i>col2</i>, <span class="type">bool</span> <i>swapHeaders</i> = false )<tt> [virtual slot]</tt></h3>
<p>Reimplemented from <a href="q3table.html#swapColumns">Q3Table::swapColumns</a>().</p>
<!-- @@@swapColumns -->
<!-- $$$takeItem[overload1]$$$takeItemQ3TableItem* -->
<h3 class="fn"><a name="takeItem"></a><span class="type">void</span> Q3DataTable::<span class="name">takeItem</span> ( <span class="type"><a href="q3tableitem.html">Q3TableItem</a></span> * <i>i</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3table.html#takeItem">Q3Table::takeItem</a>().</p>
<!-- @@@takeItem -->
<!-- $$$text[overload1]$$$textintint -->
<h3 class="fn"><a name="text"></a><span class="type"><a href="qstring.html">QString</a></span> Q3DataTable::<span class="name">text</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i> ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3table.html#text">Q3Table::text</a>().</p>
<p>Returns the text in cell <i>row</i>, <i>col</i>, or an empty string if the cell is empty. If the cell's value is NULL then <a href="q3datatable.html#nullText-prop">nullText</a>() will be returned. If the cell does not exist then an empty string is returned.</p>
<!-- @@@text -->
<!-- $$$updateCurrent[overload1]$$$updateCurrent -->
<h3 class="fn"><a name="updateCurrent"></a><span class="type">bool</span> Q3DataTable::<span class="name">updateCurrent</span> ()<tt> [virtual protected]</tt></h3>
<p>For an editable table, issues an update using the cursor's edit buffer. If there is no current cursor or there is no current selection, nothing happens. If <a href="q3datatable.html#confirmEdits-prop">confirmEdits</a>() or <a href="q3datatable.html#confirmUpdate-prop">confirmUpdate</a>() is true, <a href="q3datatable.html#confirmEdit">confirmEdit</a>() is called to confirm the update. Returns true if the update succeeded; otherwise returns false.</p>
<p>The underlying cursor must have a valid primary index to ensure that a unique record is updated within the database otherwise the database may be changed to an inconsistent state.</p>
<!-- @@@updateCurrent -->
<!-- $$$value[overload1]$$$valueintint -->
<h3 class="fn"><a name="value"></a><span class="type"><a href="qvariant.html">QVariant</a></span> Q3DataTable::<span class="name">value</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i> ) const</h3>
<p>Returns the value in cell <i>row</i>, <i>col</i>, or an invalid value if the cell does not exist or has no value.</p>
<!-- @@@value -->
</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>