Sophie

Sophie

distrib > * > 2009.0 > i586 > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 2524

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_09) on Tue Aug 07 17:07:16 CEST 2007 -->
<TITLE>
QSqlTableModel
</TITLE>

<META NAME="keywords" CONTENT="com.trolltech.qt.sql.QSqlTableModel class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="QSqlTableModel";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlResult.VirtualHookOperation.html" title="enum in com.trolltech.qt.sql"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.EditStrategy.html" title="enum in com.trolltech.qt.sql"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/trolltech/qt/sql/QSqlTableModel.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="QSqlTableModel.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.trolltech.qt.sql</FONT>
<BR>
Class QSqlTableModel</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">com.trolltech.qt.QSignalEmitter</A>
      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">com.trolltech.qt.QtJambiObject</A>
          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">com.trolltech.qt.core.QObject</A>
              <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html" title="class in com.trolltech.qt.core">com.trolltech.qt.core.QAbstractItemModel</A>
                  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/gui/QAbstractTableModel.html" title="class in com.trolltech.qt.gui">com.trolltech.qt.gui.QAbstractTableModel</A>
                      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html" title="class in com.trolltech.qt.sql">com.trolltech.qt.sql.QSqlQueryModel</A>
                          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.trolltech.qt.sql.QSqlTableModel</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../com/trolltech/qt/sql/QSqlRelationalTableModel.html" title="class in com.trolltech.qt.sql">QSqlRelationalTableModel</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>QSqlTableModel</B><DT>extends <A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html" title="class in com.trolltech.qt.sql">QSqlQueryModel</A></DL>
</PRE>

<P>
<p>The <a href="QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><tt>QSqlTableModel</tt></a> class provides an editable data model for a single database table.</p>
<p><a href="QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><tt>QSqlTableModel</tt></a> is a high-level interface for reading and writing database records from a single table. It is build on top of the lower-level <a href="QSqlQuery.html"><tt>QSqlQuery</tt></a> and can be used to provide data to view classes such as <a href="%2E%2E/gui/QTableView.html"><tt>QTableView</tt></a>. For example:</p>
<pre>        QSqlTableModel *model = new QSqlTableModel;
        model-&gt;setTable(&quot;employee&quot;);
        model-&gt;setEditStrategy(QSqlTableModel::OnManualSubmit);
        model-&gt;select();
        model-&gt;removeColumn(0); <span class="comment">// don't show the ID</span>
        model-&gt;setHeaderData(0, Qt::Horizontal, tr(&quot;Name&quot;));
        model-&gt;setHeaderData(1, Qt::Horizontal, tr(&quot;Salary&quot;));

        QTableView *view = new QTableView;
        view-&gt;setModel(model);
        view-&gt;show();</pre>
<p>We set the SQL table's name and the edit strategy, then we set up the labels displayed in the view header. The edit strategy dictates when the changes done by the user in the view are actually applied to the database. The possible values are <a href="QSqlTableModel.html#EditStrategy-enum"><tt>OnFieldChange</tt></a>, <a href="QSqlTableModel.html#EditStrategy-enum"><tt>OnRowChange</tt></a>, and <a href="QSqlTableModel.html#EditStrategy-enum"><tt>OnManualSubmit</tt></a>.</p>
<p><a href="QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><tt>QSqlTableModel</tt></a> can also be used to access a database programmatically, without binding it to a view:</p>
<pre>        QSqlTableModel model;
        model.setTable(&quot;employee&quot;);
        QString name = model.record(4).value(&quot;name&quot;).toString();</pre>
<p>The code snippet above extracts the <tt>salary</tt> field from record 4 in the result set of the query <tt>SELECT * from employee</tt>.</p>
<p>It is possible to set filters using <a href="QSqlTableModel.html#setFilter(java.lang.String)"><tt>setFilter</tt></a>, or modify the sort order using <a href="QSqlTableModel.html#setSort(int, com.trolltech.qt.core.Qt.SortOrder)"><tt>setSort</tt></a>. At the end, you must call <a href="QSqlTableModel.html#select()"><tt>select</tt></a> to populate the model with data.</p>
<p>The sql/tablemodel</tt> example illustrates how to use <a href="QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><tt>QSqlTableModel</tt></a> as the data source for a <a href="%2E%2E/gui/QTableView.html"><tt>QTableView</tt></a>.</p>
<p><a href="QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><tt>QSqlTableModel</tt></a> provides no direct support for foreign keys. Use the <a href="QSqlRelationalTableModel.html"><tt>QSqlRelationalTableModel</tt></a> and QSqlRelationalDelegate if you want to resolve foreign keys.</p>
<p>The <a href="%2E%2E/sql-driver.html#qsqlite">QSQLITE</tt></a> driver locks for updates until a select is finished. <a href="QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><tt>QSqlTableModel</tt></a> fetches data (QSqlQuery::fetchMore()) as needed; this may cause the updates to time out.</p>
<P>

<P>
<DL>
<DT><B>See Also:</B><DD><a href="QSqlRelationalTableModel.html"><tt>QSqlRelationalTableModel</tt></a>, 
<a href="QSqlQuery.html"><tt>QSqlQuery</tt></a>, 
<a href="%2E%2E/model-view-programming.html">Model/View Programming</tt></a>, 
<CODE>Model Example</tt></CODE>, 
<a href="%2E%2E/qtjambi-cachedtable.html">Cached Table Example</tt></a></DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->

<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.EditStrategy.html" title="enum in com.trolltech.qt.sql">QSqlTableModel.EditStrategy</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This enum type describes which strategy to choose when editing values in the database.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="nested_classes_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Nested classes/interfaces inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal0.html" title="class in com.trolltech.qt">QSignalEmitter.Signal0</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="class in com.trolltech.qt">QSignalEmitter.Signal1</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="type parameter in QSignalEmitter.Signal1">A</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="class in com.trolltech.qt">QSignalEmitter.Signal2</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">B</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="class in com.trolltech.qt">QSignalEmitter.Signal3</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">C</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="class in com.trolltech.qt">QSignalEmitter.Signal4</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">D</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="class in com.trolltech.qt">QSignalEmitter.Signal5</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">E</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="class in com.trolltech.qt">QSignalEmitter.Signal6</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">F</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="class in com.trolltech.qt">QSignalEmitter.Signal7</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">G</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="class in com.trolltech.qt">QSignalEmitter.Signal8</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">H</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="class in com.trolltech.qt">QSignalEmitter.Signal9</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">H</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">I</A>&gt;</CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="class in com.trolltech.qt">QSignalEmitter.Signal1</A>&lt;java.lang.Integer&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#beforeDelete">beforeDelete</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This signal is emitted before the <tt>row</tt> is deleted.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="class in com.trolltech.qt">QSignalEmitter.Signal1</A>&lt;<A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#beforeInsert">beforeInsert</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This signal is emitted before a new row is inserted.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="class in com.trolltech.qt">QSignalEmitter.Signal2</A>&lt;java.lang.Integer,<A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#beforeUpdate">beforeUpdate</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This signal is emitted before the <tt>row</tt> is updated with the values from <tt>record</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="class in com.trolltech.qt">QSignalEmitter.Signal2</A>&lt;java.lang.Integer,<A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#primeInsert">primeInsert</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This signal is emitted when an insertion is initiated in the given <tt>row</tt>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_com.trolltech.qt.core.QAbstractItemModel"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class com.trolltech.qt.core.<A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html" title="class in com.trolltech.qt.core">QAbstractItemModel</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#dataChanged">dataChanged</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#headerDataChanged">headerDataChanged</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#layoutAboutToBeChanged">layoutAboutToBeChanged</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#layoutChanged">layoutChanged</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#QSqlTableModel()">QSqlTableModel</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><tt>QSqlTableModel</tt></a>(0, QSqlDatabase()).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject)">QSqlTableModel</A></B>(<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><tt>QSqlTableModel</tt></a>(<tt>parent</tt>, QSqlDatabase()).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)">QSqlTableModel</A></B>(<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent,
               <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A>&nbsp;db)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an empty <a href="QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><tt>QSqlTableModel</tt></a> and sets the parent to <tt>parent</tt> and the database connection to <tt>db</tt>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#clear()">clear</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function is reimplemented for internal reasons.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#data(com.trolltech.qt.core.QModelIndex, int)">data</A></B>(<A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;idx,
     int&nbsp;role)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function is reimplemented for internal reasons.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#database()">database</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a pointer to the used <a href="QSqlDatabase.html"><tt>QSqlDatabase</tt></a> or 0 if no database was set.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#deleteRowFromTable(int)">deleteRowFromTable</A></B>(int&nbsp;row)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deletes the given <tt>row</tt> from the currently active database table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.EditStrategy.html" title="enum in com.trolltech.qt.sql">QSqlTableModel.EditStrategy</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#editStrategy()">editStrategy</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current edit strategy.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#fieldIndex(java.lang.String)">fieldIndex</A></B>(java.lang.String&nbsp;fieldName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the index of the field <tt>fieldName</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#filter()">filter</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the currently set filter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/core/Qt.ItemFlags.html" title="class in com.trolltech.qt.core">Qt.ItemFlags</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#flags(com.trolltech.qt.core.QModelIndex)">flags</A></B>(<A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;index)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function is reimplemented for internal reasons.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html" title="class in com.trolltech.qt.sql">QSqlTableModel</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#fromNativePointer(com.trolltech.qt.QNativePointer)">fromNativePointer</A></B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A>&nbsp;nativePointer)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function returns the QSqlTableModel instance pointed to by nativePointer</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#headerData(int, com.trolltech.qt.core.Qt.Orientation, int)">headerData</A></B>(int&nbsp;section,
           <A HREF="../../../../com/trolltech/qt/core/Qt.Orientation.html" title="enum in com.trolltech.qt.core">Qt.Orientation</A>&nbsp;orientation,
           int&nbsp;role)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function is reimplemented for internal reasons.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#indexInQuery(com.trolltech.qt.core.QModelIndex)">indexInQuery</A></B>(<A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;item)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the index of the value in the database result set for the given <tt>item</tt> in the model.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#insertRecord(int, com.trolltech.qt.sql.QSqlRecord)">insertRecord</A></B>(int&nbsp;row,
             <A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&nbsp;record)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inserts the <tt>record</tt> after <tt>row</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#insertRowIntoTable(com.trolltech.qt.sql.QSqlRecord)">insertRowIntoTable</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&nbsp;values)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inserts the values <tt>values</tt> into the currently active database table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#insertRows(int, int, com.trolltech.qt.core.QModelIndex)">insertRows</A></B>(int&nbsp;row,
           int&nbsp;count,
           <A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;parent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inserts <tt>count</tt> empty rows at position <tt>row</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#isDirty(com.trolltech.qt.core.QModelIndex)">isDirty</A></B>(<A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;index)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the value at the index <tt>index</tt> is dirty, otherwise false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#orderByClause()">orderByClause</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an SQL <tt>ORDER BY</tt> clause based on the currently set sort order.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlIndex.html" title="class in com.trolltech.qt.sql">QSqlIndex</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#primaryKey()">primaryKey</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the primary key for the current table, or an empty <a href="QSqlIndex.html"><tt>QSqlIndex</tt></a> if the table is not set or has no primary key.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#removeColumns(int, int, com.trolltech.qt.core.QModelIndex)">removeColumns</A></B>(int&nbsp;column,
              int&nbsp;count,
              <A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;parent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes <tt>count</tt> columns from the <tt>parent</tt> model, starting at index <tt>column</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#removeRows(int, int, com.trolltech.qt.core.QModelIndex)">removeRows</A></B>(int&nbsp;row,
           int&nbsp;count,
           <A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;parent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes <tt>count</tt> rows starting at <tt>row</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#revert()">revert</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This reimplemented slot is called by the item delegates when the user canceled editing the current row.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#revertAll()">revertAll</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reverts all pending changes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#revertRow(int)">revertRow</A></B>(int&nbsp;row)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reverts all changes for the specified <tt>row</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#rowCount(com.trolltech.qt.core.QModelIndex)">rowCount</A></B>(<A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;parent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function is reimplemented for internal reasons.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#select()">select</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Populates the model with data from the table that was set via <a href="QSqlTableModel.html#setTable(java.lang.String)"><tt>setTable</tt></a>, using the specified filter and sort condition, and returns true if successful; otherwise returns false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#selectStatement()">selectStatement</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the SQL <tt>SELECT</tt> statement used internally to populate the model.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)">setData</A></B>(<A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;index,
        java.lang.Object&nbsp;value,
        int&nbsp;role)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the data for the item <tt>index</tt> for the role <tt>role</tt> to <tt>value</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#setEditStrategy(com.trolltech.qt.sql.QSqlTableModel.EditStrategy)">setEditStrategy</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.EditStrategy.html" title="enum in com.trolltech.qt.sql">QSqlTableModel.EditStrategy</A>&nbsp;strategy)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the strategy for editing values in the database to <tt>strategy</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#setFilter(java.lang.String)">setFilter</A></B>(java.lang.String&nbsp;filter)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the current filter to <tt>filter</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#setPrimaryKey(com.trolltech.qt.sql.QSqlIndex)">setPrimaryKey</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlIndex.html" title="class in com.trolltech.qt.sql">QSqlIndex</A>&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Protected method that allows subclasses to set the primary key to <tt>key</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#setQuery(com.trolltech.qt.sql.QSqlQuery)">setQuery</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlQuery.html" title="class in com.trolltech.qt.sql">QSqlQuery</A>&nbsp;query)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function simply calls QSqlQueryModel::setQuery(<tt>query</tt>).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#setRecord(int, com.trolltech.qt.sql.QSqlRecord)">setRecord</A></B>(int&nbsp;row,
          <A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&nbsp;record)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the values at the specified <tt>row</tt> to the values of <tt>record</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#setSort(int, com.trolltech.qt.core.Qt.SortOrder)">setSort</A></B>(int&nbsp;column,
        <A HREF="../../../../com/trolltech/qt/core/Qt.SortOrder.html" title="enum in com.trolltech.qt.core">Qt.SortOrder</A>&nbsp;order)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the sort order for <tt>column</tt> to <tt>order</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#setTable(java.lang.String)">setTable</A></B>(java.lang.String&nbsp;tableName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the database table on which the model operates to <tt>tableName</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#sort(int, com.trolltech.qt.core.Qt.SortOrder)">sort</A></B>(int&nbsp;column,
     <A HREF="../../../../com/trolltech/qt/core/Qt.SortOrder.html" title="enum in com.trolltech.qt.core">Qt.SortOrder</A>&nbsp;order)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sorts the data by <tt>column</tt> with the sort order <tt>order</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#submit()">submit</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This reimplemented slot is called by the item delegates when the user stopped editing the current row.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#submitAll()">submitAll</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Submits all pending changes and returns true on success.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#tableName()">tableName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of the currently selected table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html#updateRowInTable(int, com.trolltech.qt.sql.QSqlRecord)">updateRowInTable</A></B>(int&nbsp;row,
                 <A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&nbsp;values)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updates the given <tt>row</tt> in the currently active database table with the specified <tt>values</tt>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.sql.QSqlQueryModel"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.sql.<A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html" title="class in com.trolltech.qt.sql">QSqlQueryModel</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#canFetchMore(com.trolltech.qt.core.QModelIndex)">canFetchMore</A>, <A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#columnCount(com.trolltech.qt.core.QModelIndex)">columnCount</A>, <A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#fetchMore(com.trolltech.qt.core.QModelIndex)">fetchMore</A>, <A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#insertColumns(int, int, com.trolltech.qt.core.QModelIndex)">insertColumns</A>, <A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#lastError()">lastError</A>, <A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#query()">query</A>, <A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#queryChange()">queryChange</A>, <A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#record()">record</A>, <A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#record(int)">record</A>, <A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#setHeaderData(int, com.trolltech.qt.core.Qt.Orientation, java.lang.Object, int)">setHeaderData</A>, <A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#setLastError(com.trolltech.qt.sql.QSqlError)">setLastError</A>, <A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#setQuery(java.lang.String)">setQuery</A>, <A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#setQuery(java.lang.String, com.trolltech.qt.sql.QSqlDatabase)">setQuery</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.gui.QAbstractTableModel"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.gui.<A HREF="../../../../com/trolltech/qt/gui/QAbstractTableModel.html" title="class in com.trolltech.qt.gui">QAbstractTableModel</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/gui/QAbstractTableModel.html#dropMimeData(com.trolltech.qt.gui.QMimeData, com.trolltech.qt.core.Qt.DropAction, int, int, com.trolltech.qt.core.QModelIndex)">dropMimeData</A>, <A HREF="../../../../com/trolltech/qt/gui/QAbstractTableModel.html#hasChildren(com.trolltech.qt.core.QModelIndex)">hasChildren</A>, <A HREF="../../../../com/trolltech/qt/gui/QAbstractTableModel.html#index(int, int, com.trolltech.qt.core.QModelIndex)">index</A>, <A HREF="../../../../com/trolltech/qt/gui/QAbstractTableModel.html#parent(com.trolltech.qt.core.QModelIndex)">parent</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.core.QAbstractItemModel"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.core.<A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html" title="class in com.trolltech.qt.core">QAbstractItemModel</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#beginInsertColumns(com.trolltech.qt.core.QModelIndex, int, int)">beginInsertColumns</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#beginInsertRows(com.trolltech.qt.core.QModelIndex, int, int)">beginInsertRows</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#beginRemoveColumns(com.trolltech.qt.core.QModelIndex, int, int)">beginRemoveColumns</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#beginRemoveRows(com.trolltech.qt.core.QModelIndex, int, int)">beginRemoveRows</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#buddy(com.trolltech.qt.core.QModelIndex)">buddy</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#changePersistentIndex(com.trolltech.qt.core.QModelIndex, com.trolltech.qt.core.QModelIndex)">changePersistentIndex</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#changePersistentIndexList(java.util.List, java.util.List)">changePersistentIndexList</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#columnCount()">columnCount</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#createIndex(int, int)">createIndex</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#createIndex(int, int, int)">createIndex</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#createIndex(int, int, com.trolltech.qt.QNativePointer)">createIndex</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#data(int, int)">data</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#data(int, int, int)">data</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#data(com.trolltech.qt.core.QModelIndex)">data</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#decodeData(int, int, com.trolltech.qt.core.QModelIndex, com.trolltech.qt.core.QDataStream)">decodeData</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#encodeData(java.util.List, com.trolltech.qt.core.QDataStream)">encodeData</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#endInsertColumns()">endInsertColumns</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#endInsertRows()">endInsertRows</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#endRemoveColumns()">endRemoveColumns</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#endRemoveRows()">endRemoveRows</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#hasChildren()">hasChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#hasIndex(int, int)">hasIndex</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#hasIndex(int, int, com.trolltech.qt.core.QModelIndex)">hasIndex</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#headerData(int, com.trolltech.qt.core.Qt.Orientation)">headerData</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#index(int, int)">index</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#insertColumn(int)">insertColumn</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#insertColumn(int, com.trolltech.qt.core.QModelIndex)">insertColumn</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#insertColumns(int, int)">insertColumns</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#insertRow(int)">insertRow</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#insertRow(int, com.trolltech.qt.core.QModelIndex)">insertRow</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#insertRows(int, int)">insertRows</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#itemData(com.trolltech.qt.core.QModelIndex)">itemData</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#match(com.trolltech.qt.core.QModelIndex, int, java.lang.Object)">match</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#match(com.trolltech.qt.core.QModelIndex, int, java.lang.Object, int)">match</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#match(com.trolltech.qt.core.QModelIndex, int, java.lang.Object, int, com.trolltech.qt.core.Qt.MatchFlag...)">match</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#match(com.trolltech.qt.core.QModelIndex, int, java.lang.Object, int, com.trolltech.qt.core.Qt.MatchFlags)">match</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#mimeData(java.util.List)">mimeData</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#mimeTypes()">mimeTypes</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#persistentIndexList()">persistentIndexList</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#removeColumn(int)">removeColumn</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#removeColumn(int, com.trolltech.qt.core.QModelIndex)">removeColumn</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#removeColumns(int, int)">removeColumns</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#removeRow(int)">removeRow</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#removeRow(int, com.trolltech.qt.core.QModelIndex)">removeRow</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#removeRows(int, int)">removeRows</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#reset()">reset</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#rowCount()">rowCount</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#setData(int, int, java.lang.Object)">setData</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#setData(int, int, java.lang.Object, int)">setData</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object)">setData</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#setHeaderData(int, com.trolltech.qt.core.Qt.Orientation, java.lang.Object)">setHeaderData</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#setItemData(com.trolltech.qt.core.QModelIndex, java.util.SortedMap)">setItemData</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#setSupportedDragActions(com.trolltech.qt.core.Qt.DropAction...)">setSupportedDragActions</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#setSupportedDragActions(com.trolltech.qt.core.Qt.DropActions)">setSupportedDragActions</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#sibling(int, int, com.trolltech.qt.core.QModelIndex)">sibling</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#sort(int)">sort</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#span(com.trolltech.qt.core.QModelIndex)">span</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#supportedDragActions()">supportedDragActions</A>, <A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#supportedDropActions()">supportedDropActions</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.core.QObject"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.core.<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/core/QObject.html#blockSignals(boolean)">blockSignals</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#childEvent(com.trolltech.qt.core.QChildEvent)">childEvent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#children()">children</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#connectSlotsByName()">connectSlotsByName</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#customEvent(com.trolltech.qt.core.QEvent)">customEvent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#disposeLater()">disposeLater</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#dumpObjectInfo()">dumpObjectInfo</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#dumpObjectTree()">dumpObjectTree</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#dynamicPropertyNames()">dynamicPropertyNames</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#event(com.trolltech.qt.core.QEvent)">event</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#eventFilter(com.trolltech.qt.core.QObject, com.trolltech.qt.core.QEvent)">eventFilter</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChild()">findChild</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChild(java.lang.Class)">findChild</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChild(java.lang.Class, java.lang.String)">findChild</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren()">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren(java.lang.Class)">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren(java.lang.Class, com.trolltech.qt.core.QRegExp)">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren(java.lang.Class, java.lang.String)">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#installEventFilter(com.trolltech.qt.core.QObject)">installEventFilter</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#isWidgetType()">isWidgetType</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#killTimer(int)">killTimer</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#moveToThread(java.lang.Thread)">moveToThread</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#objectName()">objectName</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#parent()">parent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#property(java.lang.String)">property</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#removeEventFilter(com.trolltech.qt.core.QObject)">removeEventFilter</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#setObjectName(java.lang.String)">setObjectName</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#setParent(com.trolltech.qt.core.QObject)">setParent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#signalsBlocked()">signalsBlocked</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#startTimer(int)">startTimer</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#thread()">thread</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#timerEvent(com.trolltech.qt.core.QTimerEvent)">timerEvent</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiObject"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">QtJambiObject</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiObject.html#dispose()">dispose</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#disposed()">disposed</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#finalize()">finalize</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#reassignNativeResources(com.trolltech.qt.QtJambiObject, java.lang.Class)">reassignNativeResources</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String, int)">tr</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect()">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect(java.lang.Object)">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#signalSender()">signalSender</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiInterface"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#disableGarbageCollection()">disableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativeId()">nativeId</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativePointer()">nativePointer</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#reenableGarbageCollection()">reenableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#setJavaOwnership()">setJavaOwnership</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="beforeDelete"><!-- --></A><H3>
beforeDelete</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="class in com.trolltech.qt">QSignalEmitter.Signal1</A>&lt;java.lang.Integer&gt; <B>beforeDelete</B></PRE>
<DL>
<DD><p>This signal is emitted before the <tt>row</tt> is deleted.</p>
<dl>
<dt><b>Compatible Slot Signatures:</b></dt>
<dd><tt>void mySlot(int row)</tt></dd>
<dd><tt>void mySlot()</tt></dd>
</dl>
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="beforeInsert"><!-- --></A><H3>
beforeInsert</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="class in com.trolltech.qt">QSignalEmitter.Signal1</A>&lt;<A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&gt; <B>beforeInsert</B></PRE>
<DL>
<DD><p>This signal is emitted before a new row is inserted. The values that are about to be inserted are stored in <tt>record</tt> and can be modified before they will be inserted.</p>
<dl>
<dt><b>Compatible Slot Signatures:</b></dt>
<dd><tt>void mySlot(com.trolltech.qt.sql.QSqlRecord record)</tt></dd>
<dd><tt>void mySlot()</tt></dd>
</dl>
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="beforeUpdate"><!-- --></A><H3>
beforeUpdate</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="class in com.trolltech.qt">QSignalEmitter.Signal2</A>&lt;java.lang.Integer,<A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&gt; <B>beforeUpdate</B></PRE>
<DL>
<DD><p>This signal is emitted before the <tt>row</tt> is updated with the values from <tt>record</tt>.</p>
<p>Note that only values that are marked as generated will be updated. The generated flag can be set with <tt>QSqlRecord::setGenerated</tt> and checked with <tt>QSqlRecord::isGenerated</tt>.</p>
<dl>
<dt><b>Compatible Slot Signatures:</b></dt>
<dd><tt>void mySlot(int row, com.trolltech.qt.sql.QSqlRecord record)</tt></dd>
<dd><tt>void mySlot(int row)</tt></dd>
<dd><tt>void mySlot()</tt></dd>
</dl>
<dl>
<dt><b>See Also:</b></dt>
<dd><tt>QSqlRecord::isGenerated</tt></dd>
</dl>
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="primeInsert"><!-- --></A><H3>
primeInsert</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="class in com.trolltech.qt">QSignalEmitter.Signal2</A>&lt;java.lang.Integer,<A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&gt; <B>primeInsert</B></PRE>
<DL>
<DD><p>This signal is emitted when an insertion is initiated in the given <tt>row</tt>. The <tt>record</tt> parameter can be written to (since it is a reference), for example to populate some fields with default values.</p>
<dl>
<dt><b>Compatible Slot Signatures:</b></dt>
<dd><tt>void mySlot(int row, com.trolltech.qt.sql.QSqlRecord record)</tt></dd>
<dd><tt>void mySlot(int row)</tt></dd>
<dd><tt>void mySlot()</tt></dd>
</dl>
<P>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="QSqlTableModel(com.trolltech.qt.core.QObject)"><!-- --></A><H3>
QSqlTableModel</H3>
<PRE>
public <B>QSqlTableModel</B>(<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</PRE>
<DL>
<DD><p>Equivalent to <a href="QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><tt>QSqlTableModel</tt></a>(<tt>parent</tt>, QSqlDatabase()).
<P>
</DL>
<HR>

<A NAME="QSqlTableModel()"><!-- --></A><H3>
QSqlTableModel</H3>
<PRE>
public <B>QSqlTableModel</B>()</PRE>
<DL>
<DD><p>Equivalent to <a href="QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><tt>QSqlTableModel</tt></a>(0, QSqlDatabase()).
<P>
</DL>
<HR>

<A NAME="QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><!-- --></A><H3>
QSqlTableModel</H3>
<PRE>
public <B>QSqlTableModel</B>(<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent,
                      <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A>&nbsp;db)</PRE>
<DL>
<DD><p>Creates an empty <a href="QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><tt>QSqlTableModel</tt></a> and sets the parent to <tt>parent</tt> and the database connection to <tt>db</tt>. If <tt>db</tt> is not valid, the default database connection will be used.</p>
<p>The default edit strategy is <a href="QSqlTableModel.html#EditStrategy-enum"><tt>OnRowChange</tt></a>.</p>
<P>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="database()"><!-- --></A><H3>
database</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A> <B>database</B>()</PRE>
<DL>
<DD><p>Returns a pointer to the used <a href="QSqlDatabase.html"><tt>QSqlDatabase</tt></a> or 0 if no database was set.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="editStrategy()"><!-- --></A><H3>
editStrategy</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.EditStrategy.html" title="enum in com.trolltech.qt.sql">QSqlTableModel.EditStrategy</A> <B>editStrategy</B>()</PRE>
<DL>
<DD><p>Returns the current edit strategy.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#setEditStrategy(com.trolltech.qt.sql.QSqlTableModel.EditStrategy)"><tt>setEditStrategy</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="fieldIndex(java.lang.String)"><!-- --></A><H3>
fieldIndex</H3>
<PRE>
public final int <B>fieldIndex</B>(java.lang.String&nbsp;fieldName)</PRE>
<DL>
<DD><p>Returns the index of the field <tt>fieldName</tt>.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="filter()"><!-- --></A><H3>
filter</H3>
<PRE>
public final java.lang.String <B>filter</B>()</PRE>
<DL>
<DD><p>Returns the currently set filter.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#setFilter(java.lang.String)"><tt>setFilter</tt></a>, 
<a href="QSqlTableModel.html#select()"><tt>select</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="indexInQuery(com.trolltech.qt.core.QModelIndex)"><!-- --></A><H3>
indexInQuery</H3>
<PRE>
protected final <A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A> <B>indexInQuery</B>(<A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;item)</PRE>
<DL>
<DD><p>Returns the index of the value in the database result set for the given <tt>item</tt> in the model.</p>
<p>The return value is identical to <tt>item</tt> if no columns or rows have been inserted, removed, or moved around.</p>
<p>Returns an invalid model index if <tt>item</tt> is out of bounds or if <tt>item</tt> does not point to a value in the result set.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#indexInQuery(com.trolltech.qt.core.QModelIndex)">indexInQuery</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html" title="class in com.trolltech.qt.sql">QSqlQueryModel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><tt>QSqlQueryModel::indexInQuery</tt></DL>
</DD>
</DL>
<HR>

<A NAME="insertRecord(int, com.trolltech.qt.sql.QSqlRecord)"><!-- --></A><H3>
insertRecord</H3>
<PRE>
public final boolean <B>insertRecord</B>(int&nbsp;row,
                                  <A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&nbsp;record)</PRE>
<DL>
<DD><p>Inserts the <tt>record</tt> after <tt>row</tt>. If <tt>row</tt> is negative, the record will be appended to the end. Calls <a href="QSqlTableModel.html#insertRows(int, int, com.trolltech.qt.core.QModelIndex)"><tt>insertRows</tt></a> and <a href="QSqlTableModel.html#setRecord(int, com.trolltech.qt.sql.QSqlRecord)"><tt>setRecord</tt></a> internally.</p>
<p>Returns true if the row could be inserted, otherwise false.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#insertRows(int, int, com.trolltech.qt.core.QModelIndex)"><tt>insertRows</tt></a>, 
<a href="QSqlTableModel.html#removeRows(int, int, com.trolltech.qt.core.QModelIndex)"><tt>removeRows</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="isDirty(com.trolltech.qt.core.QModelIndex)"><!-- --></A><H3>
isDirty</H3>
<PRE>
public final boolean <B>isDirty</B>(<A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;index)</PRE>
<DL>
<DD><p>Returns true if the value at the index <tt>index</tt> is dirty, otherwise false. Dirty values are values that were modified in the model but not yet written into the database.</p>
<p>If <tt>index</tt> is invalid or points to a non-existing row, false is returned.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="primaryKey()"><!-- --></A><H3>
primaryKey</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/sql/QSqlIndex.html" title="class in com.trolltech.qt.sql">QSqlIndex</A> <B>primaryKey</B>()</PRE>
<DL>
<DD><p>Returns the primary key for the current table, or an empty <a href="QSqlIndex.html"><tt>QSqlIndex</tt></a> if the table is not set or has no primary key.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#setTable(java.lang.String)"><tt>setTable</tt></a>, 
<a href="QSqlTableModel.html#setPrimaryKey(com.trolltech.qt.sql.QSqlIndex)"><tt>setPrimaryKey</tt></a>, 
<tt>QSqlDatabase::primaryIndex</tt></DL>
</DD>
</DL>
<HR>

<A NAME="revertAll()"><!-- --></A><H3>
revertAll</H3>
<PRE>
public final void <B>revertAll</B>()</PRE>
<DL>
<DD><p>Reverts all pending changes.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#revert()"><tt>revert</tt></a>, 
<a href="QSqlTableModel.html#revertRow(int)"><tt>revertRow</tt></a>, 
<a href="QSqlTableModel.html#submitAll()"><tt>submitAll</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setPrimaryKey(com.trolltech.qt.sql.QSqlIndex)"><!-- --></A><H3>
setPrimaryKey</H3>
<PRE>
protected final void <B>setPrimaryKey</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlIndex.html" title="class in com.trolltech.qt.sql">QSqlIndex</A>&nbsp;key)</PRE>
<DL>
<DD><p>Protected method that allows subclasses to set the primary key to <tt>key</tt>.</p>
<p>Normally, the primary index is set automatically whenever you call <a href="QSqlTableModel.html#setTable(java.lang.String)"><tt>setTable</tt></a>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#primaryKey()"><tt>primaryKey</tt></a>, 
<tt>QSqlDatabase::primaryIndex</tt></DL>
</DD>
</DL>
<HR>

<A NAME="setQuery(com.trolltech.qt.sql.QSqlQuery)"><!-- --></A><H3>
setQuery</H3>
<PRE>
public final void <B>setQuery</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlQuery.html" title="class in com.trolltech.qt.sql">QSqlQuery</A>&nbsp;query)</PRE>
<DL>
<DD><p>This function simply calls QSqlQueryModel::setQuery(<tt>query</tt>). You should normally not call it on a <a href="QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)"><tt>QSqlTableModel</tt></a>. Instead, use <a href="QSqlTableModel.html#setTable(java.lang.String)"><tt>setTable</tt></a>, <a href="QSqlTableModel.html#setSort(int, com.trolltech.qt.core.Qt.SortOrder)"><tt>setSort</tt></a>, <a href="QSqlTableModel.html#setFilter(java.lang.String)"><tt>setFilter</tt></a>, etc., to set up the query.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#setQuery(com.trolltech.qt.sql.QSqlQuery)">setQuery</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html" title="class in com.trolltech.qt.sql">QSqlQueryModel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#selectStatement()"><tt>selectStatement</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setRecord(int, com.trolltech.qt.sql.QSqlRecord)"><!-- --></A><H3>
setRecord</H3>
<PRE>
public final boolean <B>setRecord</B>(int&nbsp;row,
                               <A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&nbsp;record)</PRE>
<DL>
<DD><p>Sets the values at the specified <tt>row</tt> to the values of <tt>record</tt>. Returns true if all the values could be set; otherwise returns false.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlQueryModel.html#record()"><tt>record</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="submitAll()"><!-- --></A><H3>
submitAll</H3>
<PRE>
public final boolean <B>submitAll</B>()</PRE>
<DL>
<DD><p>Submits all pending changes and returns true on success. Returns false on error, detailed error information can be obtained with <a href="QSqlQueryModel.html#lastError()"><tt>lastError</tt></a>.</p>
<p>On success the model will be repopulated. Any views presenting it will lose their selections.</p>
<p>Note: In <a href="QSqlTableModel.html#EditStrategy-enum"><tt>OnManualSubmit</tt></a> mode, already submitted changes won't be cleared from the cache when <a href="QSqlTableModel.html#submitAll()"><tt>submitAll</tt></a> fails. This allows transactions to be rolled back and resubmitted again without losing data.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#revertAll()"><tt>revertAll</tt></a>, 
<a href="QSqlQueryModel.html#lastError()"><tt>lastError</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="tableName()"><!-- --></A><H3>
tableName</H3>
<PRE>
public final java.lang.String <B>tableName</B>()</PRE>
<DL>
<DD><p>Returns the name of the currently selected table.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="clear()"><!-- --></A><H3>
clear</H3>
<PRE>
public void <B>clear</B>()</PRE>
<DL>
<DD><p>This function is reimplemented for internal reasons.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#clear()">clear</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html" title="class in com.trolltech.qt.sql">QSqlQueryModel</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="data(com.trolltech.qt.core.QModelIndex, int)"><!-- --></A><H3>
data</H3>
<PRE>
public java.lang.Object <B>data</B>(<A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;idx,
                             int&nbsp;role)</PRE>
<DL>
<DD><p>This function is reimplemented for internal reasons.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#data(com.trolltech.qt.core.QModelIndex, int)">data</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html" title="class in com.trolltech.qt.sql">QSqlQueryModel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)"><tt>setData</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="deleteRowFromTable(int)"><!-- --></A><H3>
deleteRowFromTable</H3>
<PRE>
protected boolean <B>deleteRowFromTable</B>(int&nbsp;row)</PRE>
<DL>
<DD><p>Deletes the given <tt>row</tt> from the currently active database table.</p>
<p>This is a low-level method that operates directly on the database and should not be called directly. Use <a href="%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#removeRow(int, com.trolltech.qt.core.QModelIndex)"><tt>removeRow</tt></a> or <a href="QSqlTableModel.html#removeRows(int, int, com.trolltech.qt.core.QModelIndex)"><tt>removeRows</tt></a> to delete values. The model will decide depending on its edit strategy when to modify the database.</p>
<p>Returns true if the row was deleted; otherwise returns false.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#removeRow(int, com.trolltech.qt.core.QModelIndex)"><tt>removeRow</tt></a>, 
<a href="QSqlTableModel.html#removeRows(int, int, com.trolltech.qt.core.QModelIndex)"><tt>removeRows</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="flags(com.trolltech.qt.core.QModelIndex)"><!-- --></A><H3>
flags</H3>
<PRE>
public <A HREF="../../../../com/trolltech/qt/core/Qt.ItemFlags.html" title="class in com.trolltech.qt.core">Qt.ItemFlags</A> <B>flags</B>(<A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;index)</PRE>
<DL>
<DD><p>This function is reimplemented for internal reasons.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#flags(com.trolltech.qt.core.QModelIndex)">flags</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html" title="class in com.trolltech.qt.core">QAbstractItemModel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><tt>Qt::ItemFlags</tt></DL>
</DD>
</DL>
<HR>

<A NAME="headerData(int, com.trolltech.qt.core.Qt.Orientation, int)"><!-- --></A><H3>
headerData</H3>
<PRE>
public java.lang.Object <B>headerData</B>(int&nbsp;section,
                                   <A HREF="../../../../com/trolltech/qt/core/Qt.Orientation.html" title="enum in com.trolltech.qt.core">Qt.Orientation</A>&nbsp;orientation,
                                   int&nbsp;role)</PRE>
<DL>
<DD><p>This function is reimplemented for internal reasons.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#headerData(int, com.trolltech.qt.core.Qt.Orientation, int)">headerData</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html" title="class in com.trolltech.qt.sql">QSqlQueryModel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlQueryModel.html#setHeaderData(int, com.trolltech.qt.core.Qt.Orientation, java.lang.Object, int)"><tt>setHeaderData</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="insertRowIntoTable(com.trolltech.qt.sql.QSqlRecord)"><!-- --></A><H3>
insertRowIntoTable</H3>
<PRE>
protected boolean <B>insertRowIntoTable</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&nbsp;values)</PRE>
<DL>
<DD><p>Inserts the values <tt>values</tt> into the currently active database table.</p>
<p>This is a low-level method that operates directly on the database and should not be called directly. Use <a href="%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#insertRow(int, com.trolltech.qt.core.QModelIndex)"><tt>insertRow</tt></a> and <a href="QSqlTableModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)"><tt>setData</tt></a> to insert values. The model will decide depending on its edit strategy when to modify the database.</p>
<p>Returns true if the values could be inserted, otherwise false. Error information can be retrieved with <a href="QSqlQueryModel.html#lastError()"><tt>lastError</tt></a>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlQueryModel.html#lastError()"><tt>lastError</tt></a>, 
<a href="%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#insertRow(int, com.trolltech.qt.core.QModelIndex)"><tt>insertRow</tt></a>, 
<a href="QSqlTableModel.html#insertRows(int, int, com.trolltech.qt.core.QModelIndex)"><tt>insertRows</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="insertRows(int, int, com.trolltech.qt.core.QModelIndex)"><!-- --></A><H3>
insertRows</H3>
<PRE>
public boolean <B>insertRows</B>(int&nbsp;row,
                          int&nbsp;count,
                          <A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;parent)</PRE>
<DL>
<DD><p>Inserts <tt>count</tt> empty rows at position <tt>row</tt>. Note that <tt>parent</tt> must be invalid, since this model does not support parent-child relations.</p>
<p>Only one row at a time can be inserted when using the <a href="QSqlTableModel.html#EditStrategy-enum"><tt>OnFieldChange</tt></a> or <a href="QSqlTableModel.html#EditStrategy-enum"><tt>OnRowChange</tt></a> update strategies.</p>
<p>The <a href="QSqlTableModel.html#primeInsert(int, com.trolltech.qt.sql.QSqlRecord)"><tt>primeInsert</tt></a> signal will be emitted for each new row. Connect to it if you want to initialize the new row with default values.</p>
<p>Returns false if the parameters are out of bounds; otherwise returns true.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#insertRows(int, int, com.trolltech.qt.core.QModelIndex)">insertRows</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html" title="class in com.trolltech.qt.core">QAbstractItemModel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#primeInsert(int, com.trolltech.qt.sql.QSqlRecord)"><tt>primeInsert</tt></a>, 
<a href="QSqlTableModel.html#insertRecord(int, com.trolltech.qt.sql.QSqlRecord)"><tt>insertRecord</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="orderByClause()"><!-- --></A><H3>
orderByClause</H3>
<PRE>
protected java.lang.String <B>orderByClause</B>()</PRE>
<DL>
<DD><p>Returns an SQL <tt>ORDER BY</tt> clause based on the currently set sort order.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#setSort(int, com.trolltech.qt.core.Qt.SortOrder)"><tt>setSort</tt></a>, 
<a href="QSqlTableModel.html#selectStatement()"><tt>selectStatement</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="removeColumns(int, int, com.trolltech.qt.core.QModelIndex)"><!-- --></A><H3>
removeColumns</H3>
<PRE>
public boolean <B>removeColumns</B>(int&nbsp;column,
                             int&nbsp;count,
                             <A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;parent)</PRE>
<DL>
<DD><p>Removes <tt>count</tt> columns from the <tt>parent</tt> model, starting at index <tt>column</tt>.</p>
<p>Returns if the columns were successfully removed; otherwise returns false.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#removeColumns(int, int, com.trolltech.qt.core.QModelIndex)">removeColumns</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html" title="class in com.trolltech.qt.sql">QSqlQueryModel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#removeRows(int, int, com.trolltech.qt.core.QModelIndex)"><tt>removeRows</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="removeRows(int, int, com.trolltech.qt.core.QModelIndex)"><!-- --></A><H3>
removeRows</H3>
<PRE>
public boolean <B>removeRows</B>(int&nbsp;row,
                          int&nbsp;count,
                          <A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;parent)</PRE>
<DL>
<DD><p>Removes <tt>count</tt> rows starting at <tt>row</tt>. Since this model does not support hierarchical structures, <tt>parent</tt> must be an invalid model index.</p>
<p>Emits the <a href="QSqlTableModel.html#beforeDelete(int)"><tt>beforeDelete</tt></a> signal before a row is deleted.</p>
<p>Returns true if all rows could be removed; otherwise returns false. Detailed error information can be retrieved using <a href="QSqlQueryModel.html#lastError()"><tt>lastError</tt></a>.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#removeRows(int, int, com.trolltech.qt.core.QModelIndex)">removeRows</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html" title="class in com.trolltech.qt.core">QAbstractItemModel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#removeColumns(int, int, com.trolltech.qt.core.QModelIndex)"><tt>removeColumns</tt></a>, 
<a href="QSqlTableModel.html#insertRows(int, int, com.trolltech.qt.core.QModelIndex)"><tt>insertRows</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="revert()"><!-- --></A><H3>
revert</H3>
<PRE>
public void <B>revert</B>()</PRE>
<DL>
<DD><p>This reimplemented slot is called by the item delegates when the user canceled editing the current row.</p>
<p>Reverts the changes if the model's strategy is set to <a href="QSqlTableModel.html#EditStrategy-enum"><tt>OnRowChange</tt></a>. Does nothing for the other edit strategies.</p>
<p>Use <a href="QSqlTableModel.html#revertAll()"><tt>revertAll</tt></a> to revert all pending changes for the <a href="QSqlTableModel.html#EditStrategy-enum"><tt>OnManualSubmit</tt></a> strategy or <a href="QSqlTableModel.html#revertRow(int)"><tt>revertRow</tt></a> to revert a specific row.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#revert()">revert</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html" title="class in com.trolltech.qt.core">QAbstractItemModel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#submit()"><tt>submit</tt></a>, 
<a href="QSqlTableModel.html#submitAll()"><tt>submitAll</tt></a>, 
<a href="QSqlTableModel.html#revertRow(int)"><tt>revertRow</tt></a>, 
<a href="QSqlTableModel.html#revertAll()"><tt>revertAll</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="revertRow(int)"><!-- --></A><H3>
revertRow</H3>
<PRE>
public void <B>revertRow</B>(int&nbsp;row)</PRE>
<DL>
<DD><p>Reverts all changes for the specified <tt>row</tt>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#revert()"><tt>revert</tt></a>, 
<a href="QSqlTableModel.html#revertAll()"><tt>revertAll</tt></a>, 
<a href="QSqlTableModel.html#submit()"><tt>submit</tt></a>, 
<a href="QSqlTableModel.html#submitAll()"><tt>submitAll</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="rowCount(com.trolltech.qt.core.QModelIndex)"><!-- --></A><H3>
rowCount</H3>
<PRE>
public int <B>rowCount</B>(<A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;parent)</PRE>
<DL>
<DD><p>This function is reimplemented for internal reasons.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html#rowCount(com.trolltech.qt.core.QModelIndex)">rowCount</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/sql/QSqlQueryModel.html" title="class in com.trolltech.qt.sql">QSqlQueryModel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlQueryModel.html#canFetchMore(com.trolltech.qt.core.QModelIndex)"><tt>canFetchMore</tt></a>, 
<tt>QSqlDriver::hasFeature</tt></DL>
</DD>
</DL>
<HR>

<A NAME="select()"><!-- --></A><H3>
select</H3>
<PRE>
public boolean <B>select</B>()</PRE>
<DL>
<DD><p>Populates the model with data from the table that was set via <a href="QSqlTableModel.html#setTable(java.lang.String)"><tt>setTable</tt></a>, using the specified filter and sort condition, and returns true if successful; otherwise returns false.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#setTable(java.lang.String)"><tt>setTable</tt></a>, 
<a href="QSqlTableModel.html#setFilter(java.lang.String)"><tt>setFilter</tt></a>, 
<a href="QSqlTableModel.html#selectStatement()"><tt>selectStatement</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="selectStatement()"><!-- --></A><H3>
selectStatement</H3>
<PRE>
protected java.lang.String <B>selectStatement</B>()</PRE>
<DL>
<DD><p>Returns the SQL <tt>SELECT</tt> statement used internally to populate the model. The statement includes the filter and the <tt>ORDER BY</tt> clause.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#filter()"><tt>filter</tt></a>, 
<a href="QSqlTableModel.html#orderByClause()"><tt>orderByClause</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)"><!-- --></A><H3>
setData</H3>
<PRE>
public boolean <B>setData</B>(<A HREF="../../../../com/trolltech/qt/core/QModelIndex.html" title="class in com.trolltech.qt.core">QModelIndex</A>&nbsp;index,
                       java.lang.Object&nbsp;value,
                       int&nbsp;role)</PRE>
<DL>
<DD><p>Sets the data for the item <tt>index</tt> for the role <tt>role</tt> to <tt>value</tt>. Depending on the edit strategy, the value might be applied to the database at once or cached in the model.</p>
<p>Returns true if the value could be set or false on error, for example if <tt>index</tt> is out of bounds.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)">setData</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html" title="class in com.trolltech.qt.core">QAbstractItemModel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#editStrategy()"><tt>editStrategy</tt></a>, 
<a href="QSqlTableModel.html#data(com.trolltech.qt.core.QModelIndex, int)"><tt>data</tt></a>, 
<a href="QSqlTableModel.html#submit()"><tt>submit</tt></a>, 
<a href="QSqlTableModel.html#submitAll()"><tt>submitAll</tt></a>, 
<a href="QSqlTableModel.html#revertRow(int)"><tt>revertRow</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setEditStrategy(com.trolltech.qt.sql.QSqlTableModel.EditStrategy)"><!-- --></A><H3>
setEditStrategy</H3>
<PRE>
public void <B>setEditStrategy</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.EditStrategy.html" title="enum in com.trolltech.qt.sql">QSqlTableModel.EditStrategy</A>&nbsp;strategy)</PRE>
<DL>
<DD><p>Sets the strategy for editing values in the database to <tt>strategy</tt>.</p>
<p>This will revert any pending changes.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#editStrategy()"><tt>editStrategy</tt></a>, 
<a href="QSqlTableModel.html#revertAll()"><tt>revertAll</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setFilter(java.lang.String)"><!-- --></A><H3>
setFilter</H3>
<PRE>
public void <B>setFilter</B>(java.lang.String&nbsp;filter)</PRE>
<DL>
<DD><p>Sets the current filter to <tt>filter</tt>.</p>
<p>The filter is a SQL <tt>WHERE</tt> clause without the keyword <tt>WHERE</tt> (for example, <tt>name='Josephine')</tt>.</p>
<p>If the model is already populated with data from a database, the model re-selects it with the new filter. Otherwise, the filter will be applied the next time <a href="QSqlTableModel.html#select()"><tt>select</tt></a> is called.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#filter()"><tt>filter</tt></a>, 
<a href="QSqlTableModel.html#select()"><tt>select</tt></a>, 
<a href="QSqlTableModel.html#selectStatement()"><tt>selectStatement</tt></a>, 
<a href="QSqlTableModel.html#orderByClause()"><tt>orderByClause</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setSort(int, com.trolltech.qt.core.Qt.SortOrder)"><!-- --></A><H3>
setSort</H3>
<PRE>
public void <B>setSort</B>(int&nbsp;column,
                    <A HREF="../../../../com/trolltech/qt/core/Qt.SortOrder.html" title="enum in com.trolltech.qt.core">Qt.SortOrder</A>&nbsp;order)</PRE>
<DL>
<DD><p>Sets the sort order for <tt>column</tt> to <tt>order</tt>. This does not affect the current data, to refresh the data using the new sort order, call <a href="QSqlTableModel.html#select()"><tt>select</tt></a>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#sort(int, com.trolltech.qt.core.Qt.SortOrder)"><tt>sort</tt></a>, 
<a href="QSqlTableModel.html#select()"><tt>select</tt></a>, 
<a href="QSqlTableModel.html#orderByClause()"><tt>orderByClause</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setTable(java.lang.String)"><!-- --></A><H3>
setTable</H3>
<PRE>
public void <B>setTable</B>(java.lang.String&nbsp;tableName)</PRE>
<DL>
<DD><p>Sets the database table on which the model operates to <tt>tableName</tt>. Does not select data from the table, but fetches its field information.</p>
<p>To populate the model with the table's data, call <a href="QSqlTableModel.html#select()"><tt>select</tt></a>.</p>
<p>Error information can be retrieved with <a href="QSqlQueryModel.html#lastError()"><tt>lastError</tt></a>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#select()"><tt>select</tt></a>, 
<a href="QSqlTableModel.html#setFilter(java.lang.String)"><tt>setFilter</tt></a>, 
<a href="QSqlQueryModel.html#lastError()"><tt>lastError</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="sort(int, com.trolltech.qt.core.Qt.SortOrder)"><!-- --></A><H3>
sort</H3>
<PRE>
public void <B>sort</B>(int&nbsp;column,
                 <A HREF="../../../../com/trolltech/qt/core/Qt.SortOrder.html" title="enum in com.trolltech.qt.core">Qt.SortOrder</A>&nbsp;order)</PRE>
<DL>
<DD><p>Sorts the data by <tt>column</tt> with the sort order <tt>order</tt>. This will immediately select data, use <a href="QSqlTableModel.html#setSort(int, com.trolltech.qt.core.Qt.SortOrder)"><tt>setSort</tt></a> to set a sort order without populating the model with data.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#sort(int, com.trolltech.qt.core.Qt.SortOrder)">sort</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html" title="class in com.trolltech.qt.core">QAbstractItemModel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#setSort(int, com.trolltech.qt.core.Qt.SortOrder)"><tt>setSort</tt></a>, 
<a href="QSqlTableModel.html#select()"><tt>select</tt></a>, 
<a href="QSqlTableModel.html#orderByClause()"><tt>orderByClause</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="submit()"><!-- --></A><H3>
submit</H3>
<PRE>
public boolean <B>submit</B>()</PRE>
<DL>
<DD><p>This reimplemented slot is called by the item delegates when the user stopped editing the current row.</p>
<p>Submits the currently edited row if the model's strategy is set to <a href="QSqlTableModel.html#EditStrategy-enum"><tt>OnRowChange</tt></a> or <a href="QSqlTableModel.html#EditStrategy-enum"><tt>OnFieldChange</tt></a>. Does nothing for the <a href="QSqlTableModel.html#EditStrategy-enum"><tt>OnManualSubmit</tt></a> strategy.</p>
<p>Use <a href="QSqlTableModel.html#submitAll()"><tt>submitAll</tt></a> to submit all pending changes for the <a href="QSqlTableModel.html#EditStrategy-enum"><tt>OnManualSubmit</tt></a> strategy.</p>
<p>Returns true on success; otherwise returns false. Use <a href="QSqlQueryModel.html#lastError()"><tt>lastError</tt></a> to query detailed error information.</p>
<p>On success the model will be repopulated. Any views presenting it will lose their selections.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html#submit()">submit</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/core/QAbstractItemModel.html" title="class in com.trolltech.qt.core">QAbstractItemModel</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlTableModel.html#revert()"><tt>revert</tt></a>, 
<a href="QSqlTableModel.html#revertRow(int)"><tt>revertRow</tt></a>, 
<a href="QSqlTableModel.html#submitAll()"><tt>submitAll</tt></a>, 
<a href="QSqlTableModel.html#revertAll()"><tt>revertAll</tt></a>, 
<a href="QSqlQueryModel.html#lastError()"><tt>lastError</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="updateRowInTable(int, com.trolltech.qt.sql.QSqlRecord)"><!-- --></A><H3>
updateRowInTable</H3>
<PRE>
protected boolean <B>updateRowInTable</B>(int&nbsp;row,
                                   <A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A>&nbsp;values)</PRE>
<DL>
<DD><p>Updates the given <tt>row</tt> in the currently active database table with the specified <tt>values</tt>. Returns true if successful; otherwise returns false.</p>
<p>This is a low-level method that operates directly on the database and should not be called directly. Use <a href="QSqlTableModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)"><tt>setData</tt></a> to update values. The model will decide depending on its edit strategy when to modify the database.</p>
<p>Note that only values that have the generated-flag set are updated. The generated-flag can be set with QSqlRecord::setGenerated() and tested with QSqlRecord::isGenerated().</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><tt>QSqlRecord::isGenerated</tt>, 
<a href="QSqlTableModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)"><tt>setData</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="fromNativePointer(com.trolltech.qt.QNativePointer)"><!-- --></A><H3>
fromNativePointer</H3>
<PRE>
public static <A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.html" title="class in com.trolltech.qt.sql">QSqlTableModel</A> <B>fromNativePointer</B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A>&nbsp;nativePointer)</PRE>
<DL>
<DD>This function returns the QSqlTableModel instance pointed to by nativePointer
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nativePointer</CODE> - the QNativePointer of which object should be returned.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlResult.VirtualHookOperation.html" title="enum in com.trolltech.qt.sql"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlTableModel.EditStrategy.html" title="enum in com.trolltech.qt.sql"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/trolltech/qt/sql/QSqlTableModel.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="QSqlTableModel.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>