Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 4700

qt4-doc-4.8.7-26.2.mga7.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" />
<!-- q3table.cpp -->
  <title>Qt 4.8: Q3TableItem Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

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

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qt3support.html">Qt3Support</a></li>
<li>Q3TableItem</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3TableItem Class Reference</h1>
<!-- $$$Q3TableItem-brief -->
<p>The Q3TableItem class provides the cell content for <a href="q3table.html">Q3Table</a> cells. <a href="#details">More...</a></p>
<!-- @@@Q3TableItem -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3TableItem&gt;</span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html">Porting to Qt 4</a> for more information.</p>
<p><b>Inherited by: </b><a href="q3checktableitem.html">Q3CheckTableItem</a> and <a href="q3combotableitem.html">Q3ComboTableItem</a>.</p>
<ul>
<li><a href="q3tableitem-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#EditType-enum">EditType</a></b> { Always, WhenCurrent, OnTyping, Never }</td></tr>
</table>
<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="q3tableitem.html#Q3TableItem">Q3TableItem</a></b> ( Q3Table * <i>table</i>, EditType <i>et</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#Q3TableItem-2">Q3TableItem</a></b> ( Q3Table * <i>table</i>, EditType <i>et</i>, const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#Q3TableItem-3">Q3TableItem</a></b> ( Q3Table * <i>table</i>, EditType <i>et</i>, const QString &amp; <i>text</i>, const QPixmap &amp; <i>p</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#dtor.Q3TableItem">~Q3TableItem</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#alignment">alignment</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#col">col</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#colSpan">colSpan</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QWidget * </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#createEditor">createEditor</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> EditType </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#editType">editType</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#isEnabled">isEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#isReplaceable">isReplaceable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#key">key</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#paint">paint</a></b> ( QPainter * <i>p</i>, const QColorGroup &amp; <i>cg</i>, const QRect &amp; <i>cr</i>, bool <i>selected</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QPixmap </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#pixmap">pixmap</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#row">row</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#rowSpan">rowSpan</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#rtti">rtti</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#setCol">setCol</a></b> ( int <i>c</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#setContentFromEditor">setContentFromEditor</a></b> ( QWidget * <i>w</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#setEnabled">setEnabled</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#setPixmap">setPixmap</a></b> ( const QPixmap &amp; <i>p</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#setReplaceable">setReplaceable</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#setRow">setRow</a></b> ( int <i>r</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#setSpan">setSpan</a></b> ( int <i>rs</i>, int <i>cs</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#setText">setText</a></b> ( const QString &amp; <i>str</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#setWordWrap">setWordWrap</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#sizeHint">sizeHint</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3Table * </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#table">table</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#text">text</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3tableitem.html#wordWrap">wordWrap</a></b> () const</td></tr>
</table>
<a name="details"></a>
<!-- $$$Q3TableItem-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3TableItem class provides the cell content for <a href="q3table.html">Q3Table</a> cells.</p>
<p>For many applications Q3TableItems are ideal for presenting and editing the contents of <a href="q3table.html">Q3Table</a> cells. In situations where you need to create very large tables you may prefer an alternative approach to using Q3TableItems: see the notes on large tables.</p>
<p>A Q3TableItem contains a cell's data, by default, a string and a pixmap. The table item also holds the cell's display size and how the data should be aligned. The table item specifies the cell's <a href="q3tableitem.html#EditType-enum">EditType</a> and the editor used for in-place editing (by default a <a href="qlineedit.html">QLineEdit</a>). If you want checkboxes use <a href="q3checktableitem.html">Q3CheckTableItem</a>, and if you want comboboxes use <a href="q3combotableitem.html">Q3ComboTableItem</a>. The <a href="q3tableitem.html#EditType-enum">EditType</a> (set in the constructor) determines whether the cell's contents may be edited.</p>
<p>If a pixmap is specified it is displayed to the left of any text. You can change the text or pixmap with <a href="q3tableitem.html#setText">setText</a>() and <a href="q3tableitem.html#setPixmap">setPixmap</a>() respectively. For text you can use <a href="q3tableitem.html#setWordWrap">setWordWrap</a>().</p>
<p>When sorting table items the <a href="q3tableitem.html#key">key</a>() function is used; by default this returns the table item's <a href="q3tableitem.html#text">text</a>(). Reimplement <a href="q3tableitem.html#key">key</a>() to customize how your table items will sort.</p>
<p>Table items are inserted into a table using <a href="q3table.html#setItem">Q3Table::setItem</a>(). If you insert an item into a cell that already contains a table item the original item will be deleted.</p>
<p>Example:</p>
<pre class="cpp"> <span class="keyword">for</span> (<span class="type">int</span> row <span class="operator">=</span> <span class="number">0</span>; row <span class="operator">&lt;</span> table<span class="operator">-</span><span class="operator">&gt;</span>numRows(); row<span class="operator">+</span><span class="operator">+</span>) {
     <span class="keyword">for</span> (<span class="type">int</span> col <span class="operator">=</span> <span class="number">0</span>; col <span class="operator">&lt;</span> table<span class="operator">-</span><span class="operator">&gt;</span>numCols(); col<span class="operator">+</span><span class="operator">+</span>) {
         table<span class="operator">-</span><span class="operator">&gt;</span>setItem(row<span class="operator">,</span> col<span class="operator">,</span>
             <span class="keyword">new</span> <span class="type">Q3TableItem</span>(table<span class="operator">,</span> <span class="type">Q3TableItem</span><span class="operator">::</span>WhenCurrent<span class="operator">,</span> <span class="type"><a href="qstring.html">QString</a></span><span class="operator">::</span>number(row <span class="operator">*</span> col)));
     }
 }</pre>
<p>You can move a table item from one cell to another, in the same or a different table, using <a href="q3table.html#takeItem">Q3Table::takeItem</a>() and <a href="q3table.html#setItem">Q3Table::setItem</a>() but see also <a href="q3table.html#swapCells">Q3Table::swapCells</a>().</p>
<p>Table items can be deleted with delete in the standard way; the table and cell will be updated accordingly.</p>
<p>Note, that if you have a table item that is not currently in a table then anything you do to that item other than insert it into a table will result in undefined behaviour.</p>
<p>Reimplement <a href="q3tableitem.html#createEditor">createEditor</a>() and <a href="q3tableitem.html#setContentFromEditor">setContentFromEditor</a>() if you want to use your own widget instead of a <a href="qlineedit.html">QLineEdit</a> for editing cell contents. Reimplement <a href="q3tableitem.html#paint">paint</a>() if you want to display custom content.</p>
<p>It is important to ensure that your custom widget can accept the keyboard focus, so that the user can use the tab key to navigate the table as normal. Therefore, if the widget returned by <a href="q3tableitem.html#createEditor">createEditor</a>() does not itself accept the keyboard focus, it is necessary to nominate a child widget to do so on its behalf. For example, a <a href="porting4.html#qhbox">QHBox</a> with two child <a href="qlineedit.html">QLineEdit</a> widgets may use one of them to accept the keyboard focus:</p>
<pre class="cpp"> <span class="type"><a href="qwidget.html">QWidget</a></span><span class="operator">*</span> MyTableItem<span class="operator">::</span>createEditor() <span class="keyword">const</span>
 {
     <span class="type">QHBox</span><span class="operator">*</span> hbox <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QHBox</span>(table()<span class="operator">-</span><span class="operator">&gt;</span>viewport());
     hbox<span class="operator">-</span><span class="operator">&gt;</span>setFocusProxy(<span class="keyword">new</span> <span class="type"><a href="qlineedit.html">QLineEdit</a></span>(hbox));
     <span class="keyword">new</span> <span class="type"><a href="qlineedit.html">QLineEdit</a></span>(hbox);
     <span class="keyword">return</span> hbox;
 }</pre>
<p>By default, table items may be replaced by new Q3TableItems during the lifetime of a <a href="q3table.html">Q3Table</a>. Therefore, if you create your own subclass of Q3TableItem, and you want to ensure that this does not happen, you must call setReplaceable(false) in the constructor of your subclass.</p>
<p class="centerAlign"><img src="images/qtableitems.png" alt="Table Items" /></p></div>
<p><b>See also </b><a href="q3checktableitem.html">Q3CheckTableItem</a> and <a href="q3combotableitem.html">Q3ComboTableItem</a>.</p>
<!-- @@@Q3TableItem -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$EditType$$$Never$$$OnTyping$$$WhenCurrent$$$Always -->
<h3 class="fn"><a name="EditType-enum"></a>enum Q3TableItem::<span class="name">EditType</span></h3>
<a name="wheneditable"></a><p>This enum is used to define whether a cell is editable or read-only (in conjunction with other settings), and how the cell should be displayed.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3TableItem::Always</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The cell always <i>looks</i> editable.</td></tr>
</table>
<p>Using this EditType ensures that the editor created with <a href="q3tableitem.html#createEditor">createEditor</a>() (by default a <a href="qlineedit.html">QLineEdit</a>) is always visible. This has implications for the alignment of the content: the default editor aligns everything (even numbers) to the left whilst numerical values in the cell are by default aligned to the right.</p>
<p>If a cell with the edit type <tt>Always</tt> looks misaligned you could reimplement <a href="q3tableitem.html#createEditor">createEditor</a>() for these items.</p>
<table class="valuelist"><tr valign="top" class="even"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3TableItem::WhenCurrent</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The cell <i>looks</i> editable only when it has keyboard focus (see <a href="q3table.html#setCurrentCell">Q3Table::setCurrentCell</a>()).</td></tr>
<tr><td class="topAlign"><tt>Q3TableItem::OnTyping</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The cell <i>looks</i> editable only when the user types in it or double-clicks it. It resembles the <tt>WhenCurrent</tt> functionality but is, perhaps, nicer.</td></tr>
</table>
<p>The <tt>OnTyping</tt> edit type is the default when <a href="q3tableitem.html" class="compat">Q3TableItem</a> objects are created by the convenience functions <a href="q3table.html#setText">Q3Table::setText</a>() and <a href="q3table.html#setPixmap">Q3Table::setPixmap</a>().</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3TableItem::Never</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The cell is not editable.</td></tr>
</table>
<p>The cell is actually editable only if <a href="q3table.html#isRowReadOnly">Q3Table::isRowReadOnly</a>() is false for its row, <a href="q3table.html#isColumnReadOnly">Q3Table::isColumnReadOnly</a>() is false for its column, and <a href="q3table.html#readOnly-prop">Q3Table::isReadOnly</a>() is false.</p>
<p>Q3ComboTableItems have an isEditable() property. This property is used to indicate whether the user may enter their own text or are restricted to choosing one of the choices in the list. Q3ComboTableItems may be interacted with only if they are editable in accordance with their EditType as described above.</p>
<!-- @@@EditType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3TableItem[overload1]$$$Q3TableItemQ3Table*EditType -->
<h3 class="fn"><a name="Q3TableItem"></a>Q3TableItem::<span class="name">Q3TableItem</span> ( <span class="type"><a href="q3table.html">Q3Table</a></span> * <i>table</i>, <span class="type"><a href="q3tableitem.html#EditType-enum">EditType</a></span> <i>et</i> )</h3>
<p>Creates a table item that is a child of table <i>table</i> with no text. The item has the <a href="q3tableitem.html#EditType-enum">EditType</a> <i>et</i>.</p>
<p>The table item will use a <a href="qlineedit.html">QLineEdit</a> for its editor, will not word-wrap and will occupy a single cell. Insert the table item into a table with <a href="q3table.html#setItem">Q3Table::setItem</a>().</p>
<p>The table takes ownership of the table item, so a table item should not be inserted into more than one table at a time.</p>
<!-- @@@Q3TableItem -->
<!-- $$$Q3TableItem$$$Q3TableItemQ3Table*EditTypeconstQString& -->
<h3 class="fn"><a name="Q3TableItem-2"></a>Q3TableItem::<span class="name">Q3TableItem</span> ( <span class="type"><a href="q3table.html">Q3Table</a></span> * <i>table</i>, <span class="type"><a href="q3tableitem.html#EditType-enum">EditType</a></span> <i>et</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )</h3>
<p>Creates a table item that is a child of table <i>table</i> with text <i>text</i>. The item has the <a href="q3tableitem.html#EditType-enum">EditType</a> <i>et</i>.</p>
<p>The table item will use a <a href="qlineedit.html">QLineEdit</a> for its editor, will not word-wrap and will occupy a single cell. Insert the table item into a table with <a href="q3table.html#setItem">Q3Table::setItem</a>().</p>
<p>The table takes ownership of the table item, so a table item should not be inserted into more than one table at a time.</p>
<!-- @@@Q3TableItem -->
<!-- $$$Q3TableItem$$$Q3TableItemQ3Table*EditTypeconstQString&constQPixmap& -->
<h3 class="fn"><a name="Q3TableItem-3"></a>Q3TableItem::<span class="name">Q3TableItem</span> ( <span class="type"><a href="q3table.html">Q3Table</a></span> * <i>table</i>, <span class="type"><a href="q3tableitem.html#EditType-enum">EditType</a></span> <i>et</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, const <span class="type"><a href="qpixmap.html">QPixmap</a></span> &amp; <i>p</i> )</h3>
<p>Creates a table item that is a child of table <i>table</i> with text <i>text</i> and pixmap <i>p</i>. The item has the <a href="q3tableitem.html#EditType-enum">EditType</a> <i>et</i>.</p>
<p>The table item will display the pixmap to the left of the text. It will use a <a href="qlineedit.html">QLineEdit</a> for editing the text, will not word-wrap and will occupy a single cell. Insert the table item into a table with <a href="q3table.html#setItem">Q3Table::setItem</a>().</p>
<p>The table takes ownership of the table item, so a table item should not be inserted in more than one table at a time.</p>
<!-- @@@Q3TableItem -->
<!-- $$$~Q3TableItem[overload1]$$$~Q3TableItem -->
<h3 class="fn"><a name="dtor.Q3TableItem"></a>Q3TableItem::<span class="name">~Q3TableItem</span> ()<tt> [virtual]</tt></h3>
<p>The destructor deletes this item and frees all allocated resources.</p>
<p>If the table item is in a table (i.e&#x2e; was inserted with setItem()), it will be removed from the table and the cell it occupied.</p>
<!-- @@@~Q3TableItem -->
<!-- $$$alignment[overload1]$$$alignment -->
<h3 class="fn"><a name="alignment"></a><span class="type">int</span> Q3TableItem::<span class="name">alignment</span> () const<tt> [virtual]</tt></h3>
<p>The alignment function returns how the text contents of the cell are aligned when drawn. The default implementation aligns numbers to the right and any other text to the left.</p>
<p><b>See also </b><a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a>.</p>
<!-- @@@alignment -->
<!-- $$$col[overload1]$$$col -->
<h3 class="fn"><a name="col"></a><span class="type">int</span> Q3TableItem::<span class="name">col</span> () const</h3>
<p>Returns the column where the table item is located. If the cell spans multiple columns, this function returns the left-most column.</p>
<p><b>See also </b><a href="q3tableitem.html#row">row</a>() and <a href="q3tableitem.html#setCol">setCol</a>().</p>
<!-- @@@col -->
<!-- $$$colSpan[overload1]$$$colSpan -->
<h3 class="fn"><a name="colSpan"></a><span class="type">int</span> Q3TableItem::<span class="name">colSpan</span> () const</h3>
<p>Returns the column span of the table item, usually 1.</p>
<p><b>See also </b><a href="q3tableitem.html#setSpan">setSpan</a>() and <a href="q3tableitem.html#rowSpan">rowSpan</a>().</p>
<!-- @@@colSpan -->
<!-- $$$createEditor[overload1]$$$createEditor -->
<h3 class="fn"><a name="createEditor"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * Q3TableItem::<span class="name">createEditor</span> () const<tt> [virtual]</tt></h3>
<p>This virtual function creates an editor which the user can interact with to edit the cell's contents. The default implementation creates a <a href="qlineedit.html">QLineEdit</a>.</p>
<p>If the function returns 0, the cell is read-only.</p>
<p>The returned widget should preferably be invisible, ideally with <a href="q3scrollview.html#viewport">Q3Table::viewport</a>() as parent.</p>
<p>If you reimplement this function you'll almost certainly need to reimplement <a href="q3tableitem.html#setContentFromEditor">setContentFromEditor</a>(), and may need to reimplement <a href="q3tableitem.html#sizeHint">sizeHint</a>().</p>
<p><b>See also </b><a href="q3table.html#createEditor">Q3Table::createEditor</a>(), <a href="q3tableitem.html#setContentFromEditor">setContentFromEditor</a>(), <a href="q3scrollview.html#viewport">Q3Table::viewport</a>(), and <a href="q3tableitem.html#setReplaceable">setReplaceable</a>().</p>
<!-- @@@createEditor -->
<!-- $$$editType[overload1]$$$editType -->
<h3 class="fn"><a name="editType"></a><span class="type"><a href="q3tableitem.html#EditType-enum">EditType</a></span> Q3TableItem::<span class="name">editType</span> () const</h3>
<p>Returns the table item's edit type.</p>
<p>This is set when the table item is constructed.</p>
<p><b>See also </b><a href="q3tableitem.html#EditType-enum">EditType</a> and <a href="q3tableitem.html#Q3TableItem">Q3TableItem</a>().</p>
<!-- @@@editType -->
<!-- $$$isEnabled[overload1]$$$isEnabled -->
<h3 class="fn"><a name="isEnabled"></a><span class="type">bool</span> Q3TableItem::<span class="name">isEnabled</span> () const</h3>
<p>Returns true if the table item is enabled; otherwise returns false.</p>
<p><b>See also </b><a href="q3tableitem.html#setEnabled">setEnabled</a>().</p>
<!-- @@@isEnabled -->
<!-- $$$isReplaceable[overload1]$$$isReplaceable -->
<h3 class="fn"><a name="isReplaceable"></a><span class="type">bool</span> Q3TableItem::<span class="name">isReplaceable</span> () const</h3>
<p>This function returns whether the contents of the cell may be replaced with the contents of another table item. Regardless of this setting, table items that span more than one cell may not have their contents replaced by another table item.</p>
<p>(This differs from <a href="q3tableitem.html#EditType-enum">EditType</a> because <a href="q3tableitem.html#EditType-enum">EditType</a> is concerned with whether the <i>user</i> is able to change the contents of a cell.)</p>
<p><b>See also </b><a href="q3tableitem.html#setReplaceable">setReplaceable</a>() and <a href="q3tableitem.html#EditType-enum">EditType</a>.</p>
<!-- @@@isReplaceable -->
<!-- $$$key[overload1]$$$key -->
<h3 class="fn"><a name="key"></a><span class="type"><a href="qstring.html">QString</a></span> Q3TableItem::<span class="name">key</span> () const<tt> [virtual]</tt></h3>
<p>This virtual function returns the key that should be used for sorting. The default implementation returns the <a href="q3tableitem.html#text">text</a>() of the relevant item.</p>
<p><b>See also </b><a href="q3table.html#sorting-prop">Q3Table::setSorting</a>().</p>
<!-- @@@key -->
<!-- $$$paint[overload1]$$$paintQPainter*constQColorGroup&constQRect&bool -->
<h3 class="fn"><a name="paint"></a><span class="type">void</span> Q3TableItem::<span class="name">paint</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, const <span class="type"><a href="qcolorgroup.html">QColorGroup</a></span> &amp; <i>cg</i>, const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>cr</i>, <span class="type">bool</span> <i>selected</i> )<tt> [virtual]</tt></h3>
<p>This virtual function is used to paint the contents of an item using the painter <i>p</i> in the rectangular area <i>cr</i> using the color group <i>cg</i>.</p>
<p>If <i>selected</i> is true the cell is displayed in a way that indicates that it is highlighted.</p>
<p>You don't usually need to use this function but if you want to draw custom content in a cell you will need to reimplement it.</p>
<p>The painter passed to this function is translated so that 0, 0 is the top-left corner of the item that is being painted.</p>
<p>Note that 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(table()<span class="operator">-</span><span class="operator">&gt;</span>cellRect(row<span class="operator">,</span> col)<span class="operator">,</span> <span class="type"><a href="qpainter.html">QPainter</a></span><span class="operator">::</span>ClipPainter);
 <span class="comment">//... your drawing code</span>
 p<span class="operator">-</span><span class="operator">&gt;</span>setClipping(<span class="keyword">false</span>);</pre>
<!-- @@@paint -->
<!-- $$$pixmap[overload1]$$$pixmap -->
<h3 class="fn"><a name="pixmap"></a><span class="type"><a href="qpixmap.html">QPixmap</a></span> Q3TableItem::<span class="name">pixmap</span> () const<tt> [virtual]</tt></h3>
<p>Returns the table item's pixmap or a null pixmap if no pixmap has been set.</p>
<p><b>See also </b><a href="q3tableitem.html#setPixmap">setPixmap</a>() and <a href="q3tableitem.html#text">text</a>().</p>
<!-- @@@pixmap -->
<!-- $$$row[overload1]$$$row -->
<h3 class="fn"><a name="row"></a><span class="type">int</span> Q3TableItem::<span class="name">row</span> () const</h3>
<p>Returns the row where the table item is located. If the cell spans multiple rows, this function returns the top-most row.</p>
<p><b>See also </b><a href="q3tableitem.html#col">col</a>() and <a href="q3tableitem.html#setRow">setRow</a>().</p>
<!-- @@@row -->
<!-- $$$rowSpan[overload1]$$$rowSpan -->
<h3 class="fn"><a name="rowSpan"></a><span class="type">int</span> Q3TableItem::<span class="name">rowSpan</span> () const</h3>
<p>Returns the row span of the table item, usually 1.</p>
<p><b>See also </b><a href="q3tableitem.html#setSpan">setSpan</a>() and <a href="q3tableitem.html#colSpan">colSpan</a>().</p>
<!-- @@@rowSpan -->
<!-- $$$rtti[overload1]$$$rtti -->
<h3 class="fn"><a name="rtti"></a><span class="type">int</span> Q3TableItem::<span class="name">rtti</span> () const<tt> [virtual]</tt></h3>
<p>Returns the Run Time Type Identification value for this table item which for Q3TableItems is 0.</p>
<p>When you create subclasses based on <a href="q3tableitem.html" class="compat">Q3TableItem</a> make sure that each subclass returns a unique rtti() value. It is advisable to use values greater than 1000, preferably large random numbers, to allow for extensions to this class.</p>
<p><b>See also </b><a href="q3checktableitem.html#rtti">Q3CheckTableItem::rtti</a>() and <a href="q3combotableitem.html#rtti">Q3ComboTableItem::rtti</a>().</p>
<!-- @@@rtti -->
<!-- $$$setCol[overload1]$$$setColint -->
<h3 class="fn"><a name="setCol"></a><span class="type">void</span> Q3TableItem::<span class="name">setCol</span> ( <span class="type">int</span> <i>c</i> )<tt> [virtual]</tt></h3>
<p>Sets column <i>c</i> as the table item's column. Usually you will not need to call this function.</p>
<p>If the cell spans multiple columns, this function sets the left-most column and retains the width of the multi-cell table item.</p>
<p><b>See also </b><a href="q3tableitem.html#col">col</a>(), <a href="q3tableitem.html#setRow">setRow</a>(), and <a href="q3tableitem.html#colSpan">colSpan</a>().</p>
<!-- @@@setCol -->
<!-- $$$setContentFromEditor[overload1]$$$setContentFromEditorQWidget* -->
<h3 class="fn"><a name="setContentFromEditor"></a><span class="type">void</span> Q3TableItem::<span class="name">setContentFromEditor</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>w</i> )<tt> [virtual]</tt></h3>
<p>Whenever the content of a cell has been edited by the editor <i>w</i>, <a href="q3table.html" class="compat">Q3Table</a> calls this virtual function to copy the new values into the <a href="q3tableitem.html" class="compat">Q3TableItem</a>.</p>
<p>If you reimplement <a href="q3tableitem.html#createEditor">createEditor</a>() and return something that is not a <a href="qlineedit.html">QLineEdit</a> you will need to reimplement this function.</p>
<p><b>See also </b><a href="q3table.html#setCellContentFromEditor">Q3Table::setCellContentFromEditor</a>().</p>
<!-- @@@setContentFromEditor -->
<!-- $$$setEnabled[overload1]$$$setEnabledbool -->
<h3 class="fn"><a name="setEnabled"></a><span class="type">void</span> Q3TableItem::<span class="name">setEnabled</span> ( <span class="type">bool</span> <i>b</i> )<tt> [virtual]</tt></h3>
<p>If <i>b</i> is true, the table item is enabled; if <i>b</i> is false the table item is disabled.</p>
<p>A disabled item doesn't respond to user interaction.</p>
<p><b>See also </b><a href="q3tableitem.html#isEnabled">isEnabled</a>().</p>
<!-- @@@setEnabled -->
<!-- $$$setPixmap[overload1]$$$setPixmapconstQPixmap& -->
<h3 class="fn"><a name="setPixmap"></a><span class="type">void</span> Q3TableItem::<span class="name">setPixmap</span> ( const <span class="type"><a href="qpixmap.html">QPixmap</a></span> &amp; <i>p</i> )<tt> [virtual]</tt></h3>
<p>Sets pixmap <i>p</i> to be this item's pixmap.</p>
<p>Note that setPixmap() does not update the cell the table item belongs to. Use <a href="q3table.html#updateCell">Q3Table::updateCell</a>() to repaint the cell's contents.</p>
<p>For <a href="q3combotableitem.html" class="compat">Q3ComboTableItem</a>s and <a href="q3checktableitem.html" class="compat">Q3CheckTableItem</a>s this function has no visible effect.</p>
<p><b>See also </b><a href="q3table.html#setPixmap">Q3Table::setPixmap</a>(), <a href="q3tableitem.html#pixmap">pixmap</a>(), and <a href="q3tableitem.html#setText">setText</a>().</p>
<!-- @@@setPixmap -->
<!-- $$$setReplaceable[overload1]$$$setReplaceablebool -->
<h3 class="fn"><a name="setReplaceable"></a><span class="type">void</span> Q3TableItem::<span class="name">setReplaceable</span> ( <span class="type">bool</span> <i>b</i> )<tt> [virtual]</tt></h3>
<p>If <i>b</i> is true it is acceptable to replace the contents of the cell with the contents of another <a href="q3tableitem.html" class="compat">Q3TableItem</a>. If <i>b</i> is false the contents of the cell may not be replaced by the contents of another table item. Table items that span more than one cell may not have their contents replaced by another table item.</p>
<p>(This differs from <a href="q3tableitem.html#EditType-enum">EditType</a> because <a href="q3tableitem.html#EditType-enum">EditType</a> is concerned with whether the <i>user</i> is able to change the contents of a cell.)</p>
<p><b>See also </b><a href="q3tableitem.html#isReplaceable">isReplaceable</a>().</p>
<!-- @@@setReplaceable -->
<!-- $$$setRow[overload1]$$$setRowint -->
<h3 class="fn"><a name="setRow"></a><span class="type">void</span> Q3TableItem::<span class="name">setRow</span> ( <span class="type">int</span> <i>r</i> )<tt> [virtual]</tt></h3>
<p>Sets row <i>r</i> as the table item's row. Usually you do not need to call this function.</p>
<p>If the cell spans multiple rows, this function sets the top row and retains the height of the multi-cell table item.</p>
<p><b>See also </b><a href="q3tableitem.html#row">row</a>(), <a href="q3tableitem.html#setCol">setCol</a>(), and <a href="q3tableitem.html#rowSpan">rowSpan</a>().</p>
<!-- @@@setRow -->
<!-- $$$setSpan[overload1]$$$setSpanintint -->
<h3 class="fn"><a name="setSpan"></a><span class="type">void</span> Q3TableItem::<span class="name">setSpan</span> ( <span class="type">int</span> <i>rs</i>, <span class="type">int</span> <i>cs</i> )<tt> [virtual]</tt></h3>
<p>Changes the extent of the <a href="q3tableitem.html" class="compat">Q3TableItem</a> so that it spans multiple cells covering <i>rs</i> rows and <i>cs</i> columns. The top left cell is the original cell.</p>
<p><b>Warning:</b> This function only works if the item has already been inserted into the table using e.g&#x2e; <a href="q3table.html#setItem">Q3Table::setItem</a>(). This function also checks to make sure if <i>rs</i> and <i>cs</i> are within the bounds of the table and returns without changing the span if they are not. In addition swapping, inserting or removing rows and columns that cross Q3TableItems spanning more than one cell is not supported.</p>
<p><b>See also </b><a href="q3tableitem.html#rowSpan">rowSpan</a>() and <a href="q3tableitem.html#colSpan">colSpan</a>().</p>
<!-- @@@setSpan -->
<!-- $$$setText[overload1]$$$setTextconstQString& -->
<h3 class="fn"><a name="setText"></a><span class="type">void</span> Q3TableItem::<span class="name">setText</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>str</i> )<tt> [virtual]</tt></h3>
<p>Changes the table item's text to <i>str</i>.</p>
<p>Note that setText() does not update the cell the table item belongs to. Use <a href="q3table.html#updateCell">Q3Table::updateCell</a>() to repaint the cell's contents.</p>
<p><b>See also </b><a href="q3table.html#setText">Q3Table::setText</a>(), <a href="q3tableitem.html#text">text</a>(), <a href="q3tableitem.html#setPixmap">setPixmap</a>(), and <a href="q3table.html#updateCell">Q3Table::updateCell</a>().</p>
<!-- @@@setText -->
<!-- $$$setWordWrap[overload1]$$$setWordWrapbool -->
<h3 class="fn"><a name="setWordWrap"></a><span class="type">void</span> Q3TableItem::<span class="name">setWordWrap</span> ( <span class="type">bool</span> <i>b</i> )<tt> [virtual]</tt></h3>
<p>If <i>b</i> is true, the cell's text will be wrapped over multiple lines, when necessary, to fit the width of the cell; otherwise the text will be written as a single line.</p>
<p><b>See also </b><a href="q3tableitem.html#wordWrap">wordWrap</a>(), <a href="q3table.html#adjustColumn">Q3Table::adjustColumn</a>(), and <a href="q3table.html#setColumnStretchable">Q3Table::setColumnStretchable</a>().</p>
<!-- @@@setWordWrap -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn"><a name="sizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> Q3TableItem::<span class="name">sizeHint</span> () const<tt> [virtual]</tt></h3>
<p>This virtual function returns the size a cell needs to show its entire content.</p>
<p>If you subclass <a href="q3tableitem.html" class="compat">Q3TableItem</a> you will often need to reimplement this function.</p>
<!-- @@@sizeHint -->
<!-- $$$table[overload1]$$$table -->
<h3 class="fn"><a name="table"></a><span class="type"><a href="q3table.html">Q3Table</a></span> * Q3TableItem::<span class="name">table</span> () const</h3>
<p>Returns the <a href="q3table.html" class="compat">Q3Table</a> the table item belongs to.</p>
<p><b>See also </b><a href="q3table.html#setItem">Q3Table::setItem</a>() and <a href="q3tableitem.html#Q3TableItem">Q3TableItem</a>().</p>
<!-- @@@table -->
<!-- $$$text[overload1]$$$text -->
<h3 class="fn"><a name="text"></a><span class="type"><a href="qstring.html">QString</a></span> Q3TableItem::<span class="name">text</span> () const<tt> [virtual]</tt></h3>
<p>Returns the text of the table item or an empty string if there is no text.</p>
<p>To ensure that the current value of the editor is returned, <a href="q3tableitem.html#setContentFromEditor">setContentFromEditor</a>() is called:</p>
<ol class="1">
<li>if the editMode() is <tt>Always</tt>, or</li>
<li>if editMode() is <i>not</i> <tt>Always</tt> but the editor of the cell is active and the editor is not a <a href="qlineedit.html">QLineEdit</a>.</li>
</ol>
<p>This means that text() returns the original text value of the item if the editor is a line edit, until the user commits an edit (e.g&#x2e; by pressing Enter or Tab) in which case the new text is returned. For other editors (e.g&#x2e; a combobox) <a href="q3tableitem.html#setContentFromEditor">setContentFromEditor</a>() is always called so the currently display value is the one returned.</p>
<p><b>See also </b><a href="q3tableitem.html#setText">setText</a>() and <a href="q3tableitem.html#pixmap">pixmap</a>().</p>
<!-- @@@text -->
<!-- $$$wordWrap[overload1]$$$wordWrap -->
<h3 class="fn"><a name="wordWrap"></a><span class="type">bool</span> Q3TableItem::<span class="name">wordWrap</span> () const</h3>
<p>Returns true if word wrap is enabled for the cell; otherwise returns false.</p>
<p><b>See also </b><a href="q3tableitem.html#setWordWrap">setWordWrap</a>().</p>
<!-- @@@wordWrap -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      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>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      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>