Sophie

Sophie

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

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

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

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

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li>Qt3SupportLight</li>
<li>Q3GridView</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3GridView Class Reference</h1>
<!-- $$$Q3GridView-brief -->
<p>The Q3GridView class provides an abstract base for fixed-size grids. <a href="#details">More...</a></p>
<!-- @@@Q3GridView -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3GridView&gt;</span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qgridview">Porting to Qt 4</a> for more information.</p>
<p><b>Inherits: </b><a href="q3scrollview.html">Q3ScrollView</a>.</p>
<ul>
<li><a href="q3gridview-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="q3gridview.html#cellHeight-prop">cellHeight</a></b> : int</li>
<li class="fn"><b><a href="q3gridview.html#cellWidth-prop">cellWidth</a></b> : int</li>
<li class="fn"><b><a href="q3gridview.html#numCols-prop">numCols</a></b> : int</li>
<li class="fn"><b><a href="q3gridview.html#numRows-prop">numRows</a></b> : int</li>
</ul>
<ul>
<li class="fn">10 properties inherited from <a href="q3scrollview.html#properties">Q3ScrollView</a></li>
<li class="fn">2 properties inherited from <a href="q3frame.html#properties">Q3Frame</a></li>
<li class="fn">6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#Q3GridView">Q3GridView</a></b> ( QWidget * <i>parent</i> = 0, const char * <i>name</i> = 0, Qt::WindowFlags <i>f</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#dtor.Q3GridView">~Q3GridView</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#cellGeometry">cellGeometry</a></b> ( int <i>row</i>, int <i>column</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#cellHeight-prop">cellHeight</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#cellRect">cellRect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#cellWidth-prop">cellWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#columnAt">columnAt</a></b> ( int <i>x</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#ensureCellVisible">ensureCellVisible</a></b> ( int <i>row</i>, int <i>column</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#gridSize">gridSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#numCols-prop">numCols</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#numRows-prop">numRows</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#repaintCell">repaintCell</a></b> ( int <i>row</i>, int <i>column</i>, bool <i>erase</i> = true )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#rowAt">rowAt</a></b> ( int <i>y</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#cellHeight-prop">setCellHeight</a></b> ( int )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#cellWidth-prop">setCellWidth</a></b> ( int )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#numCols-prop">setNumCols</a></b> ( int )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#numRows-prop">setNumRows</a></b> ( int )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#updateCell">updateCell</a></b> ( int <i>row</i>, int <i>column</i> )</td></tr>
</table>
<ul>
<li class="fn">49 public functions inherited from <a href="q3scrollview.html#public-functions">Q3ScrollView</a></li>
<li class="fn">4 public functions inherited from <a href="q3frame.html#public-functions">Q3Frame</a></li>
<li class="fn">14 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#dimensionChange">dimensionChange</a></b> ( int <i>oldNumRows</i>, int <i>oldNumCols</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#paintCell">paintCell</a></b> ( QPainter * <i>p</i>, int <i>row</i>, int <i>col</i> ) = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#paintEmptyArea">paintEmptyArea</a></b> ( QPainter * <i>p</i>, int <i>cx</i>, int <i>cy</i>, int <i>cw</i>, int <i>ch</i> )</td></tr>
</table>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3gridview.html#drawContents">drawContents</a></b> ( QPainter * <i>p</i>, int <i>cx</i>, int <i>cy</i>, int <i>cw</i>, int <i>ch</i> )</td></tr>
</table>
<ul>
<li class="fn">26 protected functions inherited from <a href="q3scrollview.html#protected-functions">Q3ScrollView</a></li>
<li class="fn">5 protected functions inherited from <a href="q3frame.html#protected-functions">Q3Frame</a></li>
<li class="fn">3 protected functions inherited from <a href="qframe.html#protected-functions">QFrame</a></li>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">8 public slots inherited from <a href="q3scrollview.html#public-slots">Q3ScrollView</a></li>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">5 signals inherited from <a href="q3scrollview.html#signals">Q3ScrollView</a></li>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3GridView-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3GridView class provides an abstract base for fixed-size grids.</p>
<p>A grid view consists of a number of abstract cells organized in rows and columns. The cells have a fixed size and are identified with a row index and a column index. The top-left cell is in row 0, column 0. The bottom-right cell is in row <a href="q3gridview.html#numRows-prop">numRows</a>()-1, column <a href="q3gridview.html#numCols-prop">numCols</a>()-1.</p>
<p>You can define <a href="q3gridview.html#numRows-prop">numRows</a>, <a href="q3gridview.html#numCols-prop">numCols</a>, <a href="q3gridview.html#cellWidth-prop">cellWidth</a> and <a href="q3gridview.html#cellHeight-prop">cellHeight</a>. Reimplement the pure virtual function <a href="q3gridview.html#paintCell">paintCell</a>() to draw the contents of a cell.</p>
<p>With <a href="q3gridview.html#ensureCellVisible">ensureCellVisible</a>(), you can ensure a certain cell is visible. With <a href="q3gridview.html#rowAt">rowAt</a>() and <a href="q3gridview.html#columnAt">columnAt</a>() you can find a cell based on the given x- and y-coordinates.</p>
<p>If you need to monitor changes to the grid's dimensions (i.e&#x2e; when <a href="q3gridview.html#numRows-prop">numRows</a> or <a href="q3gridview.html#numCols-prop">numCols</a> is changed), reimplement the <a href="q3gridview.html#dimensionChange">dimensionChange</a>() change handler.</p>
<p>Note: the row and column indices are always given in the order, row (vertical offset) then column (horizontal offset). This order is the opposite of all pixel operations, which are given in the order x (horizontal offset), y (vertical offset).</p>
<p>Q3GridView is a very simple abstract class based on <a href="q3scrollview.html">Q3ScrollView</a>. It is designed to simplify the task of drawing many cells of the same size in a potentially scrollable canvas. If you need rows and columns with different sizes, use a <a href="q3table.html">Q3Table</a> instead. If you need a simple list of items, use a <a href="q3listbox.html">Q3ListBox</a>. If you need to present hierarichal data use a <a href="q3listview.html">Q3ListView</a>, and if you need random objects at random positions, consider using either a <a href="q3iconview.html">Q3IconView</a> or a <a href="q3canvas.html">Q3Canvas</a>.</p>
</div>
<!-- @@@Q3GridView -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$cellHeight-prop$$$cellHeight$$$setCellHeightint -->
<h3 class="fn"><a name="cellHeight-prop"></a><span class="name">cellHeight</span> : <span class="type">int</span></h3>
<p>This property holds the height of a grid row.</p>
<p>All rows in a grid view have the same height.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>cellHeight</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCellHeight</b></span> ( int )</td></tr>
</table>
<p><b>See also </b><a href="q3gridview.html#cellWidth-prop">cellWidth</a>.</p>
<!-- @@@cellHeight -->
<!-- $$$cellWidth-prop$$$cellWidth$$$setCellWidthint -->
<h3 class="fn"><a name="cellWidth-prop"></a><span class="name">cellWidth</span> : <span class="type">int</span></h3>
<p>This property holds the width of a grid column.</p>
<p>All columns in a grid view have the same width.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>cellWidth</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCellWidth</b></span> ( int )</td></tr>
</table>
<p><b>See also </b><a href="q3gridview.html#cellHeight-prop">cellHeight</a>.</p>
<!-- @@@cellWidth -->
<!-- $$$numCols-prop$$$numCols$$$setNumColsint -->
<h3 class="fn"><a name="numCols-prop"></a><span class="name">numCols</span> : <span class="type">int</span></h3>
<p>This property holds the number of columns in the grid.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>numCols</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setNumCols</b></span> ( int )</td></tr>
</table>
<p><b>See also </b><a href="q3gridview.html#numRows-prop">numRows</a>.</p>
<!-- @@@numCols -->
<!-- $$$numRows-prop$$$numRows$$$setNumRowsint -->
<h3 class="fn"><a name="numRows-prop"></a><span class="name">numRows</span> : <span class="type">int</span></h3>
<p>This property holds the number of rows in the grid.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>numRows</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setNumRows</b></span> ( int )</td></tr>
</table>
<p><b>See also </b><a href="q3gridview.html#numCols-prop">numCols</a>.</p>
<!-- @@@numRows -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3GridView[overload1]$$$Q3GridViewQWidget*constchar*Qt::WindowFlags -->
<h3 class="fn"><a name="Q3GridView"></a>Q3GridView::<span class="name">Q3GridView</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0, const <span class="type">char</span> * <i>name</i> = 0, <span class="type"><a href="qt.html#WindowType-enum">Qt::WindowFlags</a></span> <i>f</i> = 0 )</h3>
<p>Constructs a grid view.</p>
<p>The <i>parent</i>, <i>name</i> and widget flag, <i>f</i>, arguments are passed to the <a href="q3scrollview.html" class="compat">Q3ScrollView</a> constructor.</p>
<!-- @@@Q3GridView -->
<!-- $$$~Q3GridView[overload1]$$$~Q3GridView -->
<h3 class="fn"><a name="dtor.Q3GridView"></a>Q3GridView::<span class="name">~Q3GridView</span> ()</h3>
<p>Destroys the grid view.</p>
<!-- @@@~Q3GridView -->
<!-- $$$cellGeometry[overload1]$$$cellGeometryintint -->
<h3 class="fn"><a name="cellGeometry"></a><span class="type"><a href="qrect.html">QRect</a></span> Q3GridView::<span class="name">cellGeometry</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i> )</h3>
<p>Returns the geometry of cell (<i>row</i>, <i>column</i>) in the content coordinate system.</p>
<p><b>See also </b><a href="q3gridview.html#cellRect">cellRect</a>().</p>
<!-- @@@cellGeometry -->
<!-- $$$cellRect[overload1]$$$cellRect -->
<h3 class="fn"><a name="cellRect"></a><span class="type"><a href="qrect.html">QRect</a></span> Q3GridView::<span class="name">cellRect</span> () const</h3>
<p>Returns the geometry of a cell in a cell's coordinate system. This is a convenience function useful in <a href="q3gridview.html#paintCell">paintCell</a>(). It is equivalent to <a href="qrect.html">QRect</a>(0, 0, <a href="q3gridview.html#cellWidth-prop">cellWidth</a>(), <a href="q3gridview.html#cellHeight-prop">cellHeight</a>()).</p>
<p><b>See also </b><a href="q3gridview.html#cellGeometry">cellGeometry</a>().</p>
<!-- @@@cellRect -->
<!-- $$$columnAt[overload1]$$$columnAtint -->
<h3 class="fn"><a name="columnAt"></a><span class="type">int</span> Q3GridView::<span class="name">columnAt</span> ( <span class="type">int</span> <i>x</i> ) const</h3>
<p>Returns the number of the column at position <i>x</i>. <i>x</i> must be given in content coordinates.</p>
<p><b>See also </b><a href="q3gridview.html#rowAt">rowAt</a>().</p>
<!-- @@@columnAt -->
<!-- $$$dimensionChange[overload1]$$$dimensionChangeintint -->
<h3 class="fn"><a name="dimensionChange"></a><span class="type">void</span> Q3GridView::<span class="name">dimensionChange</span> ( <span class="type">int</span> <i>oldNumRows</i>, <span class="type">int</span> <i>oldNumCols</i> )<tt> [virtual protected]</tt></h3>
<p>This change handler is called whenever any of the grid's dimensions change. <i>oldNumRows</i> and <i>oldNumCols</i> contain the old dimensions, <a href="q3gridview.html#numRows-prop">numRows</a>() and <a href="q3gridview.html#numCols-prop">numCols</a>() contain the new dimensions.</p>
<!-- @@@dimensionChange -->
<!-- $$$drawContents[overload1]$$$drawContentsQPainter*intintintint -->
<h3 class="fn"><a name="drawContents"></a><span class="type">void</span> Q3GridView::<span class="name">drawContents</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, <span class="type">int</span> <i>cx</i>, <span class="type">int</span> <i>cy</i>, <span class="type">int</span> <i>cw</i>, <span class="type">int</span> <i>ch</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#drawContents">Q3ScrollView::drawContents</a>().</p>
<!-- @@@drawContents -->
<!-- $$$ensureCellVisible[overload1]$$$ensureCellVisibleintint -->
<h3 class="fn"><a name="ensureCellVisible"></a><span class="type">void</span> Q3GridView::<span class="name">ensureCellVisible</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i> )</h3>
<p>Ensures cell (<i>row</i>, <i>column</i>) is visible, scrolling the grid view if necessary.</p>
<!-- @@@ensureCellVisible -->
<!-- $$$gridSize[overload1]$$$gridSize -->
<h3 class="fn"><a name="gridSize"></a><span class="type"><a href="qsize.html">QSize</a></span> Q3GridView::<span class="name">gridSize</span> () const</h3>
<p>Returns the size of the grid in pixels.</p>
<!-- @@@gridSize -->
<!-- $$$paintCell[overload1]$$$paintCellQPainter*intint -->
<h3 class="fn"><a name="paintCell"></a><span class="type">void</span> Q3GridView::<span class="name">paintCell</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i> )<tt> [pure virtual protected]</tt></h3>
<p>This pure virtual function is called to paint the single cell at (<i>row</i>, <i>col</i>) using painter <i>p</i>. The painter must be open when paintCell() is called and must remain open.</p>
<p>The coordinate system is <a href="qpainter.html#translate">translated</a> so that the origin is at the top-left corner of the cell to be painted, i.e&#x2e; <i>cell</i> coordinates. Do not scale or shear the coordinate system (or if you do, restore the transformation matrix before you return).</p>
<p>The painter is not clipped by default in order to get maximum efficiency. If you want clipping, use</p>
<pre class="cpp"> p<span class="operator">-</span><span class="operator">&gt;</span>setClipRect(cellRect()<span class="operator">,</span> <span class="type"><a href="qpainter.html">QPainter</a></span><span class="operator">::</span>CoordPainter);
 <span class="comment">//... your drawing code</span>
 p<span class="operator">-</span><span class="operator">&gt;</span>setClipping(<span class="keyword">false</span>);</pre>
<!-- @@@paintCell -->
<!-- $$$paintEmptyArea[overload1]$$$paintEmptyAreaQPainter*intintintint -->
<h3 class="fn"><a name="paintEmptyArea"></a><span class="type">void</span> Q3GridView::<span class="name">paintEmptyArea</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, <span class="type">int</span> <i>cx</i>, <span class="type">int</span> <i>cy</i>, <span class="type">int</span> <i>cw</i>, <span class="type">int</span> <i>ch</i> )<tt> [virtual protected]</tt></h3>
<p>This function fills the <i>cw</i> pixels wide and <i>ch</i> pixels high rectangle starting at position (<i>cx</i>, <i>cy</i>) with the background color using the painter <i>p</i>.</p>
<p>paintEmptyArea() is invoked by <a href="q3gridview.html#drawContents">drawContents</a>() to erase or fill unused areas.</p>
<!-- @@@paintEmptyArea -->
<!-- $$$repaintCell[overload1]$$$repaintCellintintbool -->
<h3 class="fn"><a name="repaintCell"></a><span class="type">void</span> Q3GridView::<span class="name">repaintCell</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>, <span class="type">bool</span> <i>erase</i> = true )</h3>
<p>Repaints cell (<i>row</i>, <i>column</i>).</p>
<p>If <i>erase</i> is true, Qt erases the area of the cell before the <a href="q3gridview.html#paintCell">paintCell</a>() call; otherwise no erasing takes place.</p>
<p><b>See also </b><a href="qwidget.html#repaint">QWidget::repaint</a>().</p>
<!-- @@@repaintCell -->
<!-- $$$rowAt[overload1]$$$rowAtint -->
<h3 class="fn"><a name="rowAt"></a><span class="type">int</span> Q3GridView::<span class="name">rowAt</span> ( <span class="type">int</span> <i>y</i> ) const</h3>
<p>Returns the number of the row at position <i>y</i>. <i>y</i> must be given in content coordinates.</p>
<p><b>See also </b><a href="q3gridview.html#columnAt">columnAt</a>().</p>
<!-- @@@rowAt -->
<!-- $$$updateCell[overload1]$$$updateCellintint -->
<h3 class="fn"><a name="updateCell"></a><span class="type">void</span> Q3GridView::<span class="name">updateCell</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i> )</h3>
<p>Updates cell (<i>row</i>, <i>column</i>).</p>
<p><b>See also </b><a href="qwidget.html#update">QWidget::update</a>().</p>
<!-- @@@updateCell -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

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