~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/q3table.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-08-01 11:30:30 UTC
  • mto: (15.1.1 lenny) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 55.
  • Revision ID: james.westby@ubuntu.com-20080801113030-c33y1z0l21t6cj5r
Tags: upstream-4.4.1
ImportĀ upstreamĀ versionĀ 4.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.4.0-1209388211/qt-x11-opensource-src-4.4.0/src/qt3support/itemviews/q3table.cpp -->
 
5
<!-- /fasttmp/mkdist-qt-4.4.1-1217326953/qt-all-opensource-src-4.4.1/src/qt3support/itemviews/q3table.cpp -->
6
6
<head>
7
7
  <title>Qt 4.4: Q3Table Class Reference</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
 
11
<a name="//apple_ref/cpp/cl//Q3Table" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
13
<tr>
13
14
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
127
128
<li><div class="fn"/>13 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
128
129
<li><div class="fn"/>206 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
129
130
<li><div class="fn"/>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
130
 
<li><div class="fn"/>14 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
131
<li><div class="fn"/>12 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
131
132
</ul>
132
133
<a name="public-slots"></a>
133
134
<h3>Public Slots</h3>
297
298
<p>When the user clicks a cell the <a href="q3table.html#currentChanged">currentChanged</a>() signal is emitted. You can also connect to the lower level <a href="q3table.html#clicked">clicked</a>(), <a href="q3table.html#doubleClicked">doubleClicked</a>() and <a href="q3table.html#pressed">pressed</a>() signals. If the user changes the selection the <a href="q3table.html#selectionChanged">selectionChanged</a>() signal is emitted; similarly if the user changes a cell's value the <a href="q3table.html#valueChanged">valueChanged</a>() signal is emitted. If the user right-clicks (or presses the appropriate platform-specific key sequence) the <a href="q3table.html#contextMenuRequested">contextMenuRequested</a>() signal is emitted. If the user drops a drag and drop object the <a href="q3table.html#dropped">dropped</a>() signal is emitted with the drop event.</p>
298
299
<hr />
299
300
<h2>Member Type Documentation</h2>
 
301
<a name="//apple_ref/cpp/tag/Q3Table/EditMode" />
 
302
<a name="//apple_ref/cpp/econst/Q3Table/NotEditing" />
 
303
<a name="//apple_ref/cpp/econst/Q3Table/Editing" />
 
304
<a name="//apple_ref/cpp/econst/Q3Table/Replacing" />
300
305
<h3 class="fn"><a name="EditMode-enum"></a>enum Q3Table::EditMode</h3>
301
306
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
302
307
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
304
309
<tr><td valign="top"><tt>Q3Table::Editing</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">A cell is currently being edited. The editor was initialised with the cell's contents.</td></tr>
305
310
<tr><td valign="top"><tt>Q3Table::Replacing</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">A cell is currently being edited. The editor was not initialised with the cell's contents.</td></tr>
306
311
</table></p>
 
312
<a name="//apple_ref/cpp/tag/Q3Table/FocusStyle" />
 
313
<a name="//apple_ref/cpp/econst/Q3Table/FollowStyle" />
 
314
<a name="//apple_ref/cpp/econst/Q3Table/SpreadSheet" />
307
315
<h3 class="fn"><a name="FocusStyle-enum"></a>enum Q3Table::FocusStyle</h3>
308
316
<p>Specifies how the current cell (focus cell) is drawn.</p>
309
317
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
311
319
<tr><td valign="top"><tt>Q3Table::FollowStyle</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The current cell is drawn according to the current style and the cell's background is also drawn selected, if the current cell is within a selection</td></tr>
312
320
<tr><td valign="top"><tt>Q3Table::SpreadSheet</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The current cell is drawn as in a spreadsheet. This means, it is signified by a black rectangle around the cell, and the background of the current cell is always drawn with the widget's base color - even when selected.</td></tr>
313
321
</table></p>
 
322
<a name="//apple_ref/cpp/tag/Q3Table/SelectionMode" />
 
323
<a name="//apple_ref/cpp/econst/Q3Table/NoSelection" />
 
324
<a name="//apple_ref/cpp/econst/Q3Table/Single" />
 
325
<a name="//apple_ref/cpp/econst/Q3Table/Multi" />
 
326
<a name="//apple_ref/cpp/econst/Q3Table/SingleRow" />
 
327
<a name="//apple_ref/cpp/econst/Q3Table/MultiRow" />
314
328
<h3 class="fn"><a name="SelectionMode-enum"></a>enum Q3Table::SelectionMode</h3>
315
329
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
316
330
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
322
336
</table></p>
323
337
<hr />
324
338
<h2>Property Documentation</h2>
 
339
<a name="//apple_ref/cpp/instm/Q3Table/columnMovingEnabled" />
 
340
<a name="//apple_ref/cpp/instm/Q3Table/setColumnMovingEnabled" />
325
341
<h3 class="fn"><a name="columnMovingEnabled-prop"></a>columnMovingEnabled : bool</h3>
326
342
<p>This property holds whether columns can be moved by the user.</p>
327
343
<p>The default is false. Columns are moved by dragging whilst holding down the Ctrl key.</p>
331
347
<li><div class="fn"/><b>virtual void setColumnMovingEnabled ( bool <i>b</i> )</b></li>
332
348
</ul>
333
349
<p>See also <a href="q3table.html#rowMovingEnabled-prop">rowMovingEnabled</a>.</p>
 
350
<a name="//apple_ref/cpp/instm/Q3Table/focusStyle" />
 
351
<a name="//apple_ref/cpp/instm/Q3Table/setFocusStyle" />
334
352
<h3 class="fn"><a name="focusStyle-prop"></a>focusStyle : <a href="q3table.html#FocusStyle-enum">FocusStyle</a></h3>
335
353
<p>This property holds how the current (focus) cell is drawn.</p>
336
354
<p>The default style is <tt>SpreadSheet</tt>.</p>
340
358
<li><div class="fn"/><b>virtual void setFocusStyle ( FocusStyle <i>fs</i> )</b></li>
341
359
</ul>
342
360
<p>See also <a href="q3table.html#FocusStyle-enum">Q3Table::FocusStyle</a>.</p>
 
361
<a name="//apple_ref/cpp/instm/Q3Table/numCols" />
 
362
<a name="//apple_ref/cpp/instm/Q3Table/setNumCols" />
343
363
<h3 class="fn"><a name="numCols-prop"></a>numCols : int</h3>
344
364
<p>This property holds the number of columns in the table.</p>
345
365
<p>Access functions:</p>
348
368
<li><div class="fn"/><b>virtual void setNumCols ( int <i>r</i> )</b></li>
349
369
</ul>
350
370
<p>See also <a href="q3table.html#numRows-prop">numRows</a>.</p>
 
371
<a name="//apple_ref/cpp/instm/Q3Table/numRows" />
 
372
<a name="//apple_ref/cpp/instm/Q3Table/setNumRows" />
351
373
<h3 class="fn"><a name="numRows-prop"></a>numRows : int</h3>
352
374
<p>This property holds the number of rows in the table.</p>
353
375
<p>Access functions:</p>
356
378
<li><div class="fn"/><b>virtual void setNumRows ( int <i>r</i> )</b></li>
357
379
</ul>
358
380
<p>See also <a href="q3table.html#numCols-prop">numCols</a>.</p>
 
381
<a name="//apple_ref/cpp/instm/Q3Table/numSelections" />
359
382
<h3 class="fn"><a name="numSelections-prop"></a>numSelections : const int</h3>
360
383
<p>This property holds the number of selections.</p>
361
384
<p>Access functions:</p>
363
386
<li><div class="fn"/><b>int numSelections () const</b></li>
364
387
</ul>
365
388
<p>See also <a href="q3table.html#currentSelection">currentSelection</a>().</p>
 
389
<a name="//apple_ref/cpp/instm/Q3Table/isReadOnly" />
 
390
<a name="//apple_ref/cpp/instm/Q3Table/setReadOnly" />
366
391
<h3 class="fn"><a name="readOnly-prop"></a>readOnly : bool</h3>
367
392
<p>This property holds whether the table is read-only.</p>
368
393
<p>Whether a cell in the table is editable or read-only depends on the cell's <a href="q3tableitem.html#EditType-enum">EditType</a>, and this setting.</p>
372
397
<li><div class="fn"/><b>virtual void setReadOnly ( bool <i>b</i> )</b></li>
373
398
</ul>
374
399
<p>See also <a href="qwidget.html#enabled-prop">QWidget::enabled</a>, <a href="q3table.html#setColumnReadOnly">setColumnReadOnly</a>(), and <a href="q3table.html#setRowReadOnly">setRowReadOnly</a>().</p>
 
400
<a name="//apple_ref/cpp/instm/Q3Table/rowMovingEnabled" />
 
401
<a name="//apple_ref/cpp/instm/Q3Table/setRowMovingEnabled" />
375
402
<h3 class="fn"><a name="rowMovingEnabled-prop"></a>rowMovingEnabled : bool</h3>
376
403
<p>This property holds whether rows can be moved by the user.</p>
377
404
<p>The default is false. Rows are moved by dragging whilst holding down the Ctrl key.</p>
381
408
<li><div class="fn"/><b>virtual void setRowMovingEnabled ( bool <i>b</i> )</b></li>
382
409
</ul>
383
410
<p>See also <a href="q3table.html#columnMovingEnabled-prop">columnMovingEnabled</a>.</p>
 
411
<a name="//apple_ref/cpp/instm/Q3Table/selectionMode" />
 
412
<a name="//apple_ref/cpp/instm/Q3Table/setSelectionMode" />
384
413
<h3 class="fn"><a name="selectionMode-prop"></a>selectionMode : <a href="q3table.html#SelectionMode-enum">SelectionMode</a></h3>
385
414
<p>This property holds the current selection mode.</p>
386
415
<p>The default mode is <tt>Multi</tt> which allows the user to select multiple ranges of cells.</p>
389
418
<li><div class="fn"/><b>SelectionMode selectionMode () const</b></li>
390
419
<li><div class="fn"/><b>virtual void setSelectionMode ( SelectionMode <i>mode</i> )</b></li>
391
420
</ul>
 
421
<a name="//apple_ref/cpp/instm/Q3Table/showGrid" />
 
422
<a name="//apple_ref/cpp/instm/Q3Table/setShowGrid" />
392
423
<h3 class="fn"><a name="showGrid-prop"></a>showGrid : bool</h3>
393
424
<p>This property holds whether the table's grid is displayed.</p>
394
425
<p>The grid is shown by default.</p>
397
428
<li><div class="fn"/><b>bool showGrid () const</b></li>
398
429
<li><div class="fn"/><b>virtual void setShowGrid ( bool <i>b</i> )</b></li>
399
430
</ul>
 
431
<a name="//apple_ref/cpp/instm/Q3Table/sorting" />
 
432
<a name="//apple_ref/cpp/instm/Q3Table/setSorting" />
400
433
<h3 class="fn"><a name="sorting-prop"></a>sorting : bool</h3>
401
434
<p>This property holds whether a click on the header of a column sorts that column.</p>
402
435
<p>Access functions:</p>
407
440
<p>See also <a href="q3table.html#sortColumn">sortColumn</a>().</p>
408
441
<hr />
409
442
<h2>Member Function Documentation</h2>
 
443
<a name="//apple_ref/cpp/instm/Q3Table/Q3Table" />
410
444
<h3 class="fn"><a name="Q3Table"></a>Q3Table::Q3Table ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0, const char * <i>name</i> = 0 )</h3>
411
445
<p>Creates an empty table object called <i>name</i> as a child of <i>parent</i>.</p>
412
446
<p>Call <a href="q3table.html#numRows-prop">setNumRows</a>() and <a href="q3table.html#numCols-prop">setNumCols</a>() to set the table size before populating the table if you're using Q3TableItems.</p>
413
447
<h3 class="fn"><a name="Q3Table-2"></a>Q3Table::Q3Table ( int <i>numRows</i>, int <i>numCols</i>, <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0, const char * <i>name</i> = 0 )</h3>
414
448
<p>Constructs an empty table called <i>name</i> with <i>numRows</i> rows and <i>numCols</i> columns. The table is a child of <i>parent</i>.</p>
415
449
<p>If you're using <a href="q3tableitem.html">Q3TableItem</a>s to populate the table's cells, you can create <a href="q3tableitem.html">Q3TableItem</a>, <a href="q3combotableitem.html">Q3ComboTableItem</a> and <a href="q3checktableitem.html">Q3CheckTableItem</a> items and insert them into the table using <a href="q3table.html#setItem">setItem</a>(). (See the notes on large tables for an alternative to using Q3TableItems.)</p>
 
450
<a name="//apple_ref/cpp/instm/Q3Table/~Q3Table" />
416
451
<h3 class="fn"><a name="dtor.Q3Table"></a>Q3Table::~Q3Table ()</h3>
417
452
<p>Releases all the resources used by the <a href="q3table.html">Q3Table</a> object, including all <a href="q3tableitem.html">Q3TableItem</a>s and their widgets.</p>
 
453
<a name="//apple_ref/cpp/instm/Q3Table/activateNextCell" />
418
454
<h3 class="fn"><a name="activateNextCell"></a>void Q3Table::activateNextCell ()&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
419
455
<p>This function is called to activate the next cell if in-place editing was finished by pressing the Enter key.</p>
420
456
<p>The default behaviour is to move from top to bottom, i.e&#x2e; move to the cell beneath the cell being edited. Reimplement this function if you want different behaviour, e.g&#x2e; moving from left to right.</p>
 
457
<a name="//apple_ref/cpp/instm/Q3Table/addSelection" />
421
458
<h3 class="fn"><a name="addSelection"></a>int Q3Table::addSelection ( const <a href="q3tableselection.html">Q3TableSelection</a> &amp; <i>s</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
422
459
<p>Adds a selection described by <i>s</i> to the table and returns its number or -1 if the selection is invalid.</p>
423
460
<p>Remember to call <a href="q3tableselection.html#init">Q3TableSelection::init</a>() and <a href="q3tableselection.html#expandTo">Q3TableSelection::expandTo</a>() to make the selection valid (see also <a href="q3tableselection.html#isActive">Q3TableSelection::isActive</a>(), or use the <a href="q3tableselection.html">Q3TableSelection</a>(int,int,int,int) constructor).</p>
424
461
<p>See also <a href="q3table.html#numSelections-prop">numSelections</a>(), <a href="q3table.html#removeSelection">removeSelection</a>(), and <a href="q3table.html#clearSelection">clearSelection</a>().</p>
 
462
<a name="//apple_ref/cpp/instm/Q3Table/adjustColumn" />
425
463
<h3 class="fn"><a name="adjustColumn"></a>void Q3Table::adjustColumn ( int <i>col</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
426
464
<p>Resizes column <i>col</i> so that the column width is wide enough to display the widest item the column contains.</p>
427
465
<p>See also <a href="q3table.html#adjustRow">adjustRow</a>().</p>
 
466
<a name="//apple_ref/cpp/instm/Q3Table/adjustRow" />
428
467
<h3 class="fn"><a name="adjustRow"></a>void Q3Table::adjustRow ( int <i>row</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
429
468
<p>Resizes row <i>row</i> so that the row height is tall enough to display the tallest item the row contains.</p>
430
469
<p>See also <a href="q3table.html#adjustColumn">adjustColumn</a>().</p>
 
470
<a name="//apple_ref/cpp/instm/Q3Table/beginEdit" />
431
471
<h3 class="fn"><a name="beginEdit"></a><a href="qwidget.html">QWidget</a> * Q3Table::beginEdit ( int <i>row</i>, int <i>col</i>, bool <i>replace</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
432
472
<p>This function is called to start in-place editing of the cell at <i>row</i>, <i>col</i>. Editing is achieved by creating an editor (<a href="q3table.html#createEditor">createEditor</a>() is called) and setting the cell's editor with <a href="q3table.html#setCellWidget">setCellWidget</a>() to the newly created editor. (After editing is complete <a href="q3table.html#endEdit">endEdit</a>() will be called to replace the cell's content with the editor's content.) If <i>replace</i> is true the editor will start empty; otherwise it will be initialized with the cell's content (if any), i.e&#x2e; the user will be modifying the original cell content.</p>
433
473
<p>See also <a href="q3table.html#endEdit">endEdit</a>().</p>
 
474
<a name="//apple_ref/cpp/instm/Q3Table/cellGeometry" />
434
475
<h3 class="fn"><a name="cellGeometry"></a><a href="qrect.html">QRect</a> Q3Table::cellGeometry ( int <i>row</i>, int <i>col</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
435
476
<p>Returns the bounding rectangle of the cell at <i>row</i>, <i>col</i> in content coordinates.</p>
 
477
<a name="//apple_ref/cpp/instm/Q3Table/cellRect" />
436
478
<h3 class="fn"><a name="cellRect"></a><a href="qrect.html">QRect</a> Q3Table::cellRect ( int <i>row</i>, int <i>col</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
437
479
<p>Returns the geometry of cell <i>row</i>, <i>col</i> in the cell's coordinate system. This is a convenience function useful in <a href="q3table.html#paintCell">paintCell</a>(). It is equivalent to <a href="qrect.html">QRect</a>(<a href="qpoint.html">QPoint</a>(0,0), cellGeometry( row, col).<a href="qwidget.html#size-prop">size</a>());</p>
438
480
<p>See also <a href="q3table.html#cellGeometry">cellGeometry</a>().</p>
 
481
<a name="//apple_ref/cpp/instm/Q3Table/cellWidget" />
439
482
<h3 class="fn"><a name="cellWidget"></a><a href="qwidget.html">QWidget</a> * Q3Table::cellWidget ( int <i>row</i>, int <i>col</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
440
483
<p>Returns the widget that has been set for the cell at <i>row</i>, <i>col</i>, or 0 if no widget has been set.</p>
441
484
<p>If you don't use <a href="q3tableitem.html">Q3TableItem</a>s you may need to reimplement this function: see the notes on large tables.</p>
442
485
<p>See also <a href="q3table.html#clearCellWidget">clearCellWidget</a>() and <a href="q3table.html#setCellWidget">setCellWidget</a>().</p>
 
486
<a name="//apple_ref/cpp/instm/Q3Table/clearCell" />
443
487
<h3 class="fn"><a name="clearCell"></a>void Q3Table::clearCell ( int <i>row</i>, int <i>col</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
444
488
<p>Removes the <a href="q3tableitem.html">Q3TableItem</a> at <i>row</i>, <i>col</i>.</p>
445
489
<p>If you don't use <a href="q3tableitem.html">Q3TableItem</a>s you may need to reimplement this function: see the notes on large tables.</p>
 
490
<a name="//apple_ref/cpp/instm/Q3Table/clearCellWidget" />
446
491
<h3 class="fn"><a name="clearCellWidget"></a>void Q3Table::clearCellWidget ( int <i>row</i>, int <i>col</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
447
492
<p>Removes the widget (if there is one) set for the cell at <i>row</i>, <i>col</i>.</p>
448
493
<p>If you don't use <a href="q3tableitem.html">Q3TableItem</a>s you may need to reimplement this function: see the notes on large tables.</p>
449
494
<p>This function deletes the widget at <i>row</i>, <i>col</i>. Note that the widget is not deleted immediately; instead <a href="qobject.html#deleteLater">QObject::deleteLater</a>() is called on the widget to avoid problems with timing issues.</p>
450
495
<p>See also <a href="q3table.html#cellWidget">cellWidget</a>() and <a href="q3table.html#setCellWidget">setCellWidget</a>().</p>
 
496
<a name="//apple_ref/cpp/instm/Q3Table/clearSelection" />
451
497
<h3 class="fn"><a name="clearSelection"></a>void Q3Table::clearSelection ( bool <i>repaint</i> = true )&nbsp;&nbsp;<tt> [slot]</tt></h3>
452
498
<p>Clears all selections and repaints the appropriate regions if <i>repaint</i> is true.</p>
453
499
<p>See also <a href="q3table.html#removeSelection">removeSelection</a>().</p>
 
500
<a name="//apple_ref/cpp/instm/Q3Table/clicked" />
454
501
<h3 class="fn"><a name="clicked"></a>void Q3Table::clicked ( int <i>row</i>, int <i>col</i>, int <i>button</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>mousePos</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
455
502
<p>This signal is emitted when mouse button <i>button</i> is clicked. The cell where the event took place is at <i>row</i>, <i>col</i>, and the mouse's position is in <i>mousePos</i>.</p>
456
503
<p>See also <a href="qt.html#MouseButton-enum">Qt::MouseButton</a>.</p>
 
504
<a name="//apple_ref/cpp/instm/Q3Table/columnAt" />
457
505
<h3 class="fn"><a name="columnAt"></a>int Q3Table::columnAt ( int <i>x</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
458
506
<p>Returns the number of the column at position <i>x</i>. <i>x</i> must be given in content coordinates.</p>
459
507
<p>See also <a href="q3table.html#columnPos">columnPos</a>() and <a href="q3table.html#rowAt">rowAt</a>().</p>
 
508
<a name="//apple_ref/cpp/instm/Q3Table/columnClicked" />
460
509
<h3 class="fn"><a name="columnClicked"></a>void Q3Table::columnClicked ( int <i>col</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
461
510
<p>This function is called when the column <i>col</i> has been clicked. The default implementation sorts this column if <a href="q3table.html#sorting-prop">sorting</a>() is true.</p>
 
511
<a name="//apple_ref/cpp/instm/Q3Table/columnIndexChanged" />
462
512
<h3 class="fn"><a name="columnIndexChanged"></a>void Q3Table::columnIndexChanged ( int <i>section</i>, int <i>fromIndex</i>, int <i>toIndex</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
463
513
<p>This function is called when column order is to be changed, i.e&#x2e; when the user moved the column header <i>section</i> from <i>fromIndex</i> to <i>toIndex</i>.</p>
464
514
<p>If you want to change the column order programmatically, call <a href="q3table.html#swapRows">swapRows</a>() or <a href="q3table.html#swapColumns">swapColumns</a>();</p>
465
515
<p>See also <a href="q3header.html#indexChange">Q3Header::indexChange</a>() and <a href="q3table.html#rowIndexChanged">rowIndexChanged</a>().</p>
 
516
<a name="//apple_ref/cpp/instm/Q3Table/columnPos" />
466
517
<h3 class="fn"><a name="columnPos"></a>int Q3Table::columnPos ( int <i>col</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
467
518
<p>Returns the x-coordinate of the column <i>col</i> in content coordinates.</p>
468
519
<p>See also <a href="q3table.html#columnAt">columnAt</a>() and <a href="q3table.html#rowPos">rowPos</a>().</p>
 
520
<a name="//apple_ref/cpp/instm/Q3Table/columnWidth" />
469
521
<h3 class="fn"><a name="columnWidth"></a>int Q3Table::columnWidth ( int <i>col</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
470
522
<p>Returns the width of column <i>col</i>.</p>
471
523
<p>See also <a href="q3table.html#setColumnWidth">setColumnWidth</a>() and <a href="q3table.html#rowHeight">rowHeight</a>().</p>
 
524
<a name="//apple_ref/cpp/instm/Q3Table/columnWidthChanged" />
472
525
<h3 class="fn"><a name="columnWidthChanged"></a>void Q3Table::columnWidthChanged ( int <i>col</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
473
526
<p>This function should be called whenever the column width of <i>col</i> has been changed. It updates the geometry of any affected columns and repaints the table to reflect the changes it has made.</p>
 
527
<a name="//apple_ref/cpp/instm/Q3Table/contentsDragEnterEvent" />
474
528
<h3 class="fn"><a name="contentsDragEnterEvent"></a>void Q3Table::contentsDragEnterEvent ( <a href="qdragenterevent.html">QDragEnterEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
475
529
<p>This event handler is called whenever a <a href="q3table.html">Q3Table</a> object receives a <a href="qdragenterevent.html">QDragEnterEvent</a> <i>e</i>, i.e&#x2e; when the user pressed the mouse button to drag something.</p>
476
530
<p>The focus is moved to the cell where the <a href="qdragenterevent.html">QDragEnterEvent</a> occurred.</p>
477
531
<p>Reimplemented from <a href="q3scrollview.html#contentsDragEnterEvent">Q3ScrollView</a>.</p>
 
532
<a name="//apple_ref/cpp/instm/Q3Table/contentsDragLeaveEvent" />
478
533
<h3 class="fn"><a name="contentsDragLeaveEvent"></a>void Q3Table::contentsDragLeaveEvent ( <a href="qdragleaveevent.html">QDragLeaveEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
479
534
<p>This event handler is called when a drag activity leaves <i>this</i> <a href="q3table.html">Q3Table</a> object with event <i>e</i>.</p>
480
535
<p>Reimplemented from <a href="q3scrollview.html#contentsDragLeaveEvent">Q3ScrollView</a>.</p>
 
536
<a name="//apple_ref/cpp/instm/Q3Table/contentsDragMoveEvent" />
481
537
<h3 class="fn"><a name="contentsDragMoveEvent"></a>void Q3Table::contentsDragMoveEvent ( <a href="qdragmoveevent.html">QDragMoveEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
482
538
<p>This event handler is called whenever a <a href="q3table.html">Q3Table</a> object receives a <a href="qdragmoveevent.html">QDragMoveEvent</a> <i>e</i>, i.e&#x2e; when the user actually drags the mouse.</p>
483
539
<p>The focus is moved to the cell where the <a href="qdragmoveevent.html">QDragMoveEvent</a> occurred.</p>
484
540
<p>Reimplemented from <a href="q3scrollview.html#contentsDragMoveEvent">Q3ScrollView</a>.</p>
 
541
<a name="//apple_ref/cpp/instm/Q3Table/contentsDropEvent" />
485
542
<h3 class="fn"><a name="contentsDropEvent"></a>void Q3Table::contentsDropEvent ( <a href="qdropevent.html">QDropEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
486
543
<p>This event handler is called when the user ends a drag and drop by dropping something onto <i>this</i> <a href="q3table.html">Q3Table</a> and thus triggers the drop event, <i>e</i>.</p>
487
544
<p>Reimplemented from <a href="q3scrollview.html#contentsDropEvent">Q3ScrollView</a>.</p>
 
545
<a name="//apple_ref/cpp/instm/Q3Table/contextMenuRequested" />
488
546
<h3 class="fn"><a name="contextMenuRequested"></a>void Q3Table::contextMenuRequested ( int <i>row</i>, int <i>col</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
489
547
<p>This signal is emitted when the user invokes a context menu with the right mouse button (or with a system-specific keypress). The cell where the event took place is at <i>row</i>, <i>col</i>. <i>pos</i> is the position where the context menu will appear in the global coordinate system. This signal is always emitted, even if the contents of the cell are disabled.</p>
 
548
<a name="//apple_ref/cpp/instm/Q3Table/createEditor" />
490
549
<h3 class="fn"><a name="createEditor"></a><a href="qwidget.html">QWidget</a> * Q3Table::createEditor ( int <i>row</i>, int <i>col</i>, bool <i>initFromCell</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
491
550
<p>This function returns the widget which should be used as an editor for the contents of the cell at <i>row</i>, <i>col</i>.</p>
492
551
<p>If <i>initFromCell</i> is true, the editor is used to edit the current contents of the cell (so the editor widget should be initialized with this content). If <i>initFromCell</i> is false, the content of the cell is replaced with the new content which the user entered into the widget created by this function.</p>
495
554
<p>If you are not using <a href="q3tableitem.html">Q3TableItem</a>s and you don't want to use a <a href="qlineedit.html">QLineEdit</a> as the default editor, subclass <a href="q3table.html">Q3Table</a> and reimplement this function with code like this:</p>
496
555
<pre>     Q3TableItem *i = item(row, col);
497
556
     if (initFromCell || (i &amp;&amp; !i-&gt;isReplaceable()))
498
 
         // If we had a Q3TableItem ask the base class to create the editor
 
557
         <span class="comment">// If we had a Q3TableItem ask the base class to create the editor</span>
499
558
         return Q3Table::createEditor(row, col, initFromCell);
500
559
     else
501
560
         return ...(create your own editor)</pre>
502
561
<p>Ownership of the editor widget is transferred to the caller.</p>
503
562
<p>If you reimplement this function return 0 for read-only cells. You will need to reimplement <a href="q3table.html#setCellContentFromEditor">setCellContentFromEditor</a>() to retrieve the data the user entered.</p>
504
563
<p>See also <a href="q3tableitem.html#createEditor">Q3TableItem::createEditor</a>().</p>
 
564
<a name="//apple_ref/cpp/instm/Q3Table/currEditCol" />
505
565
<h3 class="fn"><a name="currEditCol"></a>int Q3Table::currEditCol () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
506
566
<p>Returns the current edited column</p>
 
567
<a name="//apple_ref/cpp/instm/Q3Table/currEditRow" />
507
568
<h3 class="fn"><a name="currEditRow"></a>int Q3Table::currEditRow () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
508
569
<p>Returns the current edited row</p>
 
570
<a name="//apple_ref/cpp/instm/Q3Table/currentChanged" />
509
571
<h3 class="fn"><a name="currentChanged"></a>void Q3Table::currentChanged ( int <i>row</i>, int <i>col</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
510
572
<p>This signal is emitted when the current cell has changed to <i>row</i>, <i>col</i>.</p>
 
573
<a name="//apple_ref/cpp/instm/Q3Table/currentColumn" />
511
574
<h3 class="fn"><a name="currentColumn"></a>int Q3Table::currentColumn () const</h3>
512
575
<p>Returns the current column.</p>
513
576
<p>See also <a href="q3table.html#currentRow">currentRow</a>().</p>
 
577
<a name="//apple_ref/cpp/instm/Q3Table/currentRow" />
514
578
<h3 class="fn"><a name="currentRow"></a>int Q3Table::currentRow () const</h3>
515
579
<p>Returns the current row.</p>
516
580
<p>See also <a href="q3table.html#currentColumn">currentColumn</a>().</p>
 
581
<a name="//apple_ref/cpp/instm/Q3Table/currentSelection" />
517
582
<h3 class="fn"><a name="currentSelection"></a>int Q3Table::currentSelection () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
518
583
<p>Returns the number of the current selection or -1 if there is no current selection.</p>
519
584
<p>See also <a href="q3table.html#numSelections-prop">numSelections</a>().</p>
 
585
<a name="//apple_ref/cpp/instm/Q3Table/doubleClicked" />
520
586
<h3 class="fn"><a name="doubleClicked"></a>void Q3Table::doubleClicked ( int <i>row</i>, int <i>col</i>, int <i>button</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>mousePos</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
521
587
<p>This signal is emitted when mouse button <i>button</i> is double-clicked. The cell where the event took place is at <i>row</i>, <i>col</i>, and the mouse's position is in <i>mousePos</i>.</p>
522
588
<p>See also <a href="qt.html#MouseButton-enum">Qt::MouseButton</a>.</p>
 
589
<a name="//apple_ref/cpp/instm/Q3Table/dragEnabled" />
523
590
<h3 class="fn"><a name="dragEnabled"></a>bool Q3Table::dragEnabled () const</h3>
524
591
<p>If this function returns true, the table supports dragging.</p>
525
592
<p>See also <a href="q3table.html#setDragEnabled">setDragEnabled</a>().</p>
 
593
<a name="//apple_ref/cpp/instm/Q3Table/dragObject" />
526
594
<h3 class="fn"><a name="dragObject"></a><a href="q3dragobject.html">Q3DragObject</a> * Q3Table::dragObject ()&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
527
595
<p>If the user presses the mouse on a selected cell, starts moving (i.e&#x2e; dragging), and <a href="q3table.html#dragEnabled">dragEnabled</a>() is true, this function is called to obtain a drag object. A drag using this object begins immediately unless dragObject() returns 0.</p>
528
596
<p>By default this function returns 0. You might reimplement it and create a <a href="q3dragobject.html">Q3DragObject</a> depending on the selected items.</p>
529
597
<p>See also <a href="q3table.html#dropped">dropped</a>().</p>
 
598
<a name="//apple_ref/cpp/instm/Q3Table/drawContents" />
530
599
<h3 class="fn"><a name="drawContents"></a>void Q3Table::drawContents ( <a href="qpainter.html">QPainter</a> * <i>p</i>, int <i>cx</i>, int <i>cy</i>, int <i>cw</i>, int <i>ch</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
531
600
<p>Draws the table contents on the painter <i>p</i>. This function is optimized so that it only draws the cells inside the <i>cw</i> pixels wide and <i>ch</i> pixels high clipping rectangle at position <i>cx</i>, <i>cy</i>.</p>
532
601
<p>Additionally, drawContents() highlights the current cell.</p>
533
602
<p>Reimplemented from <a href="q3scrollview.html#drawContents">Q3ScrollView</a>.</p>
 
603
<a name="//apple_ref/cpp/instm/Q3Table/dropped" />
534
604
<h3 class="fn"><a name="dropped"></a>void Q3Table::dropped ( <a href="qdropevent.html">QDropEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
535
605
<p>This signal is emitted when a drop event occurred on the table.</p>
536
606
<p><i>e</i> contains information about the drop.</p>
 
607
<a name="//apple_ref/cpp/instm/Q3Table/editCell" />
537
608
<h3 class="fn"><a name="editCell"></a>void Q3Table::editCell ( int <i>row</i>, int <i>col</i>, bool <i>replace</i> = false )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
538
609
<p>Starts editing the cell at <i>row</i>, <i>col</i>.</p>
539
610
<p>If <i>replace</i> is true the content of this cell will be replaced by the content of the editor when editing is finished, i.e&#x2e; the user will be entering new data; otherwise the current content of the cell (if any) will be modified in the editor.</p>
540
611
<p>See also <a href="q3table.html#beginEdit">beginEdit</a>().</p>
 
612
<a name="//apple_ref/cpp/instm/Q3Table/editMode" />
541
613
<h3 class="fn"><a name="editMode"></a><a href="q3table.html#EditMode-enum">EditMode</a> Q3Table::editMode () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
542
614
<p>Returns the current edit mode</p>
543
615
<p>See also <a href="q3table.html#setEditMode">setEditMode</a>() and <a href="q3table.html#EditMode-enum">Q3Table::EditMode</a>.</p>
 
616
<a name="//apple_ref/cpp/instm/Q3Table/endEdit" />
544
617
<h3 class="fn"><a name="endEdit"></a>void Q3Table::endEdit ( int <i>row</i>, int <i>col</i>, bool <i>accept</i>, bool <i>replace</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
545
618
<p>This function is called when in-place editing of the cell at <i>row</i>, <i>col</i> is requested to stop.</p>
546
619
<p>If the cell is not being edited or <i>accept</i> is false the function returns and the cell's contents are left unchanged.</p>
548
621
<p><a href="q3table.html#setCellContentFromEditor">setCellContentFromEditor</a>() is called to replace the contents of the cell with the contents of the cell's editor.</p>
549
622
<p>Finally <a href="q3table.html#clearCellWidget">clearCellWidget</a>() is called to remove the editor widget.</p>
550
623
<p>See also <a href="q3table.html#setCellContentFromEditor">setCellContentFromEditor</a>() and <a href="q3table.html#beginEdit">beginEdit</a>().</p>
 
624
<a name="//apple_ref/cpp/instm/Q3Table/ensureCellVisible" />
551
625
<h3 class="fn"><a name="ensureCellVisible"></a>void Q3Table::ensureCellVisible ( int <i>row</i>, int <i>col</i> )</h3>
552
626
<p>Scrolls the table until the cell at <i>row</i>, <i>col</i> becomes visible.</p>
 
627
<a name="//apple_ref/cpp/instm/Q3Table/hideColumn" />
553
628
<h3 class="fn"><a name="hideColumn"></a>void Q3Table::hideColumn ( int <i>col</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
554
629
<p>Hides column <i>col</i>.</p>
555
630
<p>See also <a href="q3table.html#showColumn">showColumn</a>() and <a href="q3table.html#hideRow">hideRow</a>().</p>
 
631
<a name="//apple_ref/cpp/instm/Q3Table/hideRow" />
556
632
<h3 class="fn"><a name="hideRow"></a>void Q3Table::hideRow ( int <i>row</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
557
633
<p>Hides row <i>row</i>.</p>
558
634
<p>See also <a href="q3table.html#showRow">showRow</a>() and <a href="q3table.html#hideColumn">hideColumn</a>().</p>
 
635
<a name="//apple_ref/cpp/instm/Q3Table/horizontalHeader" />
559
636
<h3 class="fn"><a name="horizontalHeader"></a><a href="q3header.html">Q3Header</a> * Q3Table::horizontalHeader () const</h3>
560
637
<p>Returns the table's top <a href="q3header.html">Q3Header</a>.</p>
561
638
<p>This header contains the column labels.</p>
562
639
<p>To modify a column label use <a href="q3header.html#setLabel">Q3Header::setLabel</a>().</p>
563
640
<p>See also <a href="q3table.html#verticalHeader">verticalHeader</a>(), <a href="q3table.html#setTopMargin">setTopMargin</a>(), and <a href="q3header.html">Q3Header</a>.</p>
 
641
<a name="//apple_ref/cpp/instm/Q3Table/indexOf" />
564
642
<h3 class="fn"><a name="indexOf"></a>int Q3Table::indexOf ( int <i>row</i>, int <i>col</i> ) const&nbsp;&nbsp;<tt> [protected]</tt></h3>
565
643
<p>Returns a single integer which identifies a particular <i>row</i> and <i>col</i> by mapping the 2D table to a 1D array.</p>
566
644
<p>This is useful, for example, if you have a sparse table and want to use a <a href="q3intdict.html">Q3IntDict</a> to map integers to the cells that are used.</p>
 
645
<a name="//apple_ref/cpp/instm/Q3Table/insertColumns" />
567
646
<h3 class="fn"><a name="insertColumns"></a>void Q3Table::insertColumns ( int <i>col</i>, int <i>count</i> = 1 )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
568
647
<p>Inserts <i>count</i> empty columns at column <i>col</i>. Also clears the selection(s).</p>
569
648
<p>See also <a href="q3table.html#insertRows">insertRows</a>() and <a href="q3table.html#removeColumn">removeColumn</a>().</p>
 
649
<a name="//apple_ref/cpp/instm/Q3Table/insertRows" />
570
650
<h3 class="fn"><a name="insertRows"></a>void Q3Table::insertRows ( int <i>row</i>, int <i>count</i> = 1 )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
571
651
<p>Inserts <i>count</i> empty rows at row <i>row</i>. Also clears the selection(s).</p>
572
652
<p>See also <a href="q3table.html#insertColumns">insertColumns</a>() and <a href="q3table.html#removeRow">removeRow</a>().</p>
 
653
<a name="//apple_ref/cpp/instm/Q3Table/insertWidget" />
573
654
<h3 class="fn"><a name="insertWidget"></a>void Q3Table::insertWidget ( int <i>row</i>, int <i>col</i>, <a href="qwidget.html">QWidget</a> * <i>w</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
574
655
<p>Inserts widget <i>w</i> at <i>row</i>, <i>col</i> into the internal data structure. See the documentation of <a href="q3table.html#setCellWidget">setCellWidget</a>() for further details.</p>
575
656
<p>If you don't use <a href="q3tableitem.html">Q3TableItem</a>s you may need to reimplement this function: see the notes on large tables.</p>
 
657
<a name="//apple_ref/cpp/instm/Q3Table/isColumnHidden" />
576
658
<h3 class="fn"><a name="isColumnHidden"></a>bool Q3Table::isColumnHidden ( int <i>col</i> ) const</h3>
577
659
<p>Returns true if column <i>col</i> is hidden; otherwise returns false.</p>
578
660
<p>See also <a href="q3table.html#hideColumn">hideColumn</a>() and <a href="q3table.html#isRowHidden">isRowHidden</a>().</p>
 
661
<a name="//apple_ref/cpp/instm/Q3Table/isColumnReadOnly" />
579
662
<h3 class="fn"><a name="isColumnReadOnly"></a>bool Q3Table::isColumnReadOnly ( int <i>col</i> ) const</h3>
580
663
<p>Returns true if column <i>col</i> is read-only; otherwise returns false.</p>
581
664
<p>Whether a cell in this column is editable or read-only depends on the cell's EditType, and this setting.</p>
582
665
<p>See also <a href="q3table.html#setColumnReadOnly">setColumnReadOnly</a>() and <a href="q3table.html#isRowReadOnly">isRowReadOnly</a>().</p>
 
666
<a name="//apple_ref/cpp/instm/Q3Table/isColumnSelected" />
583
667
<h3 class="fn"><a name="isColumnSelected"></a>bool Q3Table::isColumnSelected ( int <i>col</i>, bool <i>full</i> = false ) const</h3>
584
668
<p>Returns true if column <i>col</i> is selected; otherwise returns false.</p>
585
669
<p>If <i>full</i> is false (the default), 'column is selected' means that at least one cell in the column is selected. If <i>full</i> is true, then 'column is selected' means every cell in the column is selected.</p>
586
670
<p>See also <a href="q3table.html#isRowSelected">isRowSelected</a>() and <a href="q3table.html#isSelected">isSelected</a>().</p>
 
671
<a name="//apple_ref/cpp/instm/Q3Table/isColumnStretchable" />
587
672
<h3 class="fn"><a name="isColumnStretchable"></a>bool Q3Table::isColumnStretchable ( int <i>col</i> ) const</h3>
588
673
<p>Returns true if column <i>col</i> is stretchable; otherwise returns false.</p>
589
674
<p>See also <a href="q3table.html#setColumnStretchable">setColumnStretchable</a>() and <a href="q3table.html#isRowStretchable">isRowStretchable</a>().</p>
 
675
<a name="//apple_ref/cpp/instm/Q3Table/isEditing" />
590
676
<h3 class="fn"><a name="isEditing"></a>bool Q3Table::isEditing () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
591
677
<p>Returns true if the <a href="q3table.html#EditMode-enum">EditMode</a> is <tt>Editing</tt> or <tt>Replacing</tt>; otherwise (i.e&#x2e; the <a href="q3table.html#EditMode-enum">EditMode</a> is <tt>NotEditing</tt>) returns false.</p>
592
678
<p>See also <a href="q3table.html#EditMode-enum">Q3Table::EditMode</a>.</p>
 
679
<a name="//apple_ref/cpp/instm/Q3Table/isRowHidden" />
593
680
<h3 class="fn"><a name="isRowHidden"></a>bool Q3Table::isRowHidden ( int <i>row</i> ) const</h3>
594
681
<p>Returns true if row <i>row</i> is hidden; otherwise returns false.</p>
595
682
<p>See also <a href="q3table.html#hideRow">hideRow</a>() and <a href="q3table.html#isColumnHidden">isColumnHidden</a>().</p>
 
683
<a name="//apple_ref/cpp/instm/Q3Table/isRowReadOnly" />
596
684
<h3 class="fn"><a name="isRowReadOnly"></a>bool Q3Table::isRowReadOnly ( int <i>row</i> ) const</h3>
597
685
<p>Returns true if row <i>row</i> is read-only; otherwise returns false.</p>
598
686
<p>Whether a cell in this row is editable or read-only depends on the cell's <a href="q3tableitem.html#EditType-enum">EditType</a>, and this setting.</p>
599
687
<p>See also <a href="q3table.html#setRowReadOnly">setRowReadOnly</a>() and <a href="q3table.html#isColumnReadOnly">isColumnReadOnly</a>().</p>
 
688
<a name="//apple_ref/cpp/instm/Q3Table/isRowSelected" />
600
689
<h3 class="fn"><a name="isRowSelected"></a>bool Q3Table::isRowSelected ( int <i>row</i>, bool <i>full</i> = false ) const</h3>
601
690
<p>Returns true if row <i>row</i> is selected; otherwise returns false.</p>
602
691
<p>If <i>full</i> is false (the default), 'row is selected' means that at least one cell in the row is selected. If <i>full</i> is true, then 'row is selected' means every cell in the row is selected.</p>
603
692
<p>See also <a href="q3table.html#isColumnSelected">isColumnSelected</a>() and <a href="q3table.html#isSelected">isSelected</a>().</p>
 
693
<a name="//apple_ref/cpp/instm/Q3Table/isRowStretchable" />
604
694
<h3 class="fn"><a name="isRowStretchable"></a>bool Q3Table::isRowStretchable ( int <i>row</i> ) const</h3>
605
695
<p>Returns true if row <i>row</i> is stretchable; otherwise returns false.</p>
606
696
<p>See also <a href="q3table.html#setRowStretchable">setRowStretchable</a>() and <a href="q3table.html#isColumnStretchable">isColumnStretchable</a>().</p>
 
697
<a name="//apple_ref/cpp/instm/Q3Table/isSelected" />
607
698
<h3 class="fn"><a name="isSelected"></a>bool Q3Table::isSelected ( int <i>row</i>, int <i>col</i> ) const</h3>
608
699
<p>Returns true if the cell at <i>row</i>, <i>col</i> is selected; otherwise returns false.</p>
609
700
<p>See also <a href="q3table.html#isRowSelected">isRowSelected</a>() and <a href="q3table.html#isColumnSelected">isColumnSelected</a>().</p>
 
701
<a name="//apple_ref/cpp/instm/Q3Table/item" />
610
702
<h3 class="fn"><a name="item"></a><a href="q3tableitem.html">Q3TableItem</a> * Q3Table::item ( int <i>row</i>, int <i>col</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
611
703
<p>Returns the <a href="q3tableitem.html">Q3TableItem</a> representing the contents of the cell at <i>row</i>, <i>col</i>.</p>
612
704
<p>If <i>row</i> or <i>col</i> are out of range or no content has been set for this cell, item() returns 0.</p>
613
705
<p>If you don't use <a href="q3tableitem.html">Q3TableItem</a>s you may need to reimplement this function: see the notes on large tables.</p>
614
706
<p>See also <a href="q3table.html#setItem">setItem</a>().</p>
 
707
<a name="//apple_ref/cpp/instm/Q3Table/paintCell" />
615
708
<h3 class="fn"><a name="paintCell"></a>void Q3Table::paintCell ( <a href="qpainter.html">QPainter</a> * <i>p</i>, int <i>row</i>, int <i>col</i>, const <a href="qrect.html">QRect</a> &amp; <i>cr</i>, bool <i>selected</i>, const <a href="qcolorgroup.html">QColorGroup</a> &amp; <i>cg</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
616
709
<p>Paints the cell at <i>row</i>, <i>col</i> on the painter <i>p</i>. The painter has already been translated to the cell's origin. <i>cr</i> describes the cell coordinates in the content coordinate system.</p>
617
710
<p>If <i>selected</i> is true the cell is highlighted.</p>
620
713
<p>If you're using a <a href="q3tableitem.html">Q3TableItem</a> subclass, for example, to store a data structure, then reimplementing <a href="q3tableitem.html#paint">Q3TableItem::paint</a>() may be the best approach. For data you want to draw immediately, e.g&#x2e; data retrieved from a database, it is probably best to reimplement paintCell(). Note that if you reimplement paintCell(), i.e&#x2e; don't use <a href="q3tableitem.html">Q3TableItem</a>s, you must reimplement other functions: see the notes on large tables.</p>
621
714
<p>Note that the painter is not clipped by default in order to get maximum efficiency. If you want clipping, use code like this:</p>
622
715
<pre>     p-&gt;setClipRect(cellRect(row, col), QPainter::CoordPainter);
623
 
     //... your drawing code
 
716
     <span class="comment">//... your drawing code</span>
624
717
     p-&gt;setClipping(false);</pre>
625
718
<h3 class="fn"><a name="paintCell-2"></a>void Q3Table::paintCell ( <a href="qpainter.html">QPainter</a> * <i>p</i>, int <i>row</i>, int <i>col</i>, const <a href="qrect.html">QRect</a> &amp; <i>cr</i>, bool <i>selected</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
626
719
<p>This is an overloaded member function, provided for convenience.</p>
627
720
<p>Use the other <a href="q3table.html#paintCell">paintCell</a>() function. This function is only included for backwards compatibility.</p>
 
721
<a name="//apple_ref/cpp/instm/Q3Table/paintEmptyArea" />
628
722
<h3 class="fn"><a name="paintEmptyArea"></a>void Q3Table::paintEmptyArea ( <a href="qpainter.html">QPainter</a> * <i>p</i>, int <i>cx</i>, int <i>cy</i>, int <i>cw</i>, int <i>ch</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
629
723
<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>
630
724
<p>paintEmptyArea() is invoked by <a href="q3table.html#drawContents">drawContents</a>() to erase or fill unused areas.</p>
 
725
<a name="//apple_ref/cpp/instm/Q3Table/paintFocus" />
631
726
<h3 class="fn"><a name="paintFocus"></a>void Q3Table::paintFocus ( <a href="qpainter.html">QPainter</a> * <i>p</i>, const <a href="qrect.html">QRect</a> &amp; <i>cr</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
632
727
<p>Draws the focus rectangle of the current cell (see <a href="q3table.html#currentRow">currentRow</a>(), <a href="q3table.html#currentColumn">currentColumn</a>()).</p>
633
728
<p>The painter <i>p</i> is already translated to the cell's origin, while <i>cr</i> specifies the cell's geometry in content coordinates.</p>
 
729
<a name="//apple_ref/cpp/instm/Q3Table/pixmap" />
634
730
<h3 class="fn"><a name="pixmap"></a><a href="qpixmap.html">QPixmap</a> Q3Table::pixmap ( int <i>row</i>, int <i>col</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
635
731
<p>Returns the pixmap set for the cell at <i>row</i>, <i>col</i>, or a null-pixmap if the cell contains no pixmap.</p>
636
732
<p>See also <a href="q3table.html#setPixmap">setPixmap</a>().</p>
 
733
<a name="//apple_ref/cpp/instm/Q3Table/pressed" />
637
734
<h3 class="fn"><a name="pressed"></a>void Q3Table::pressed ( int <i>row</i>, int <i>col</i>, int <i>button</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>mousePos</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
638
735
<p>This signal is emitted when mouse button <i>button</i> is pressed. The cell where the event took place is at <i>row</i>, <i>col</i>, and the mouse's position is in <i>mousePos</i>.</p>
639
736
<p>See also <a href="qt.html#MouseButton-enum">Qt::MouseButton</a>.</p>
 
737
<a name="//apple_ref/cpp/instm/Q3Table/removeColumn" />
640
738
<h3 class="fn"><a name="removeColumn"></a>void Q3Table::removeColumn ( int <i>col</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
641
739
<p>Removes column <i>col</i>, and deletes all its cells including any table items and widgets the cells may contain. Also clears the selection(s).</p>
642
740
<p>See also <a href="q3table.html#removeColumns">removeColumns</a>(), <a href="q3table.html#hideColumn">hideColumn</a>(), <a href="q3table.html#insertColumns">insertColumns</a>(), and <a href="q3table.html#removeRow">removeRow</a>().</p>
 
741
<a name="//apple_ref/cpp/instm/Q3Table/removeColumns" />
643
742
<h3 class="fn"><a name="removeColumns"></a>void Q3Table::removeColumns ( const <a href="q3memarray.html">Q3MemArray</a>&lt;int&gt; &amp; <i>cols</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
644
743
<p>Removes the columns listed in the array <i>cols</i>, and deletes all their cells including any table items and widgets the cells may contain.</p>
645
744
<p>The array passed in must only contain valid columns (in the range from 0 to <a href="q3table.html#numCols-prop">numCols</a>() - 1) with no duplicates, and must be sorted in ascending order. Also clears the selection(s).</p>
646
745
<p>See also <a href="q3table.html#removeColumn">removeColumn</a>(), <a href="q3table.html#insertColumns">insertColumns</a>(), and <a href="q3table.html#removeRows">removeRows</a>().</p>
 
746
<a name="//apple_ref/cpp/instm/Q3Table/removeRow" />
647
747
<h3 class="fn"><a name="removeRow"></a>void Q3Table::removeRow ( int <i>row</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
648
748
<p>Removes row <i>row</i>, and deletes all its cells including any table items and widgets the cells may contain. Also clears the selection(s).</p>
649
749
<p>See also <a href="q3table.html#hideRow">hideRow</a>(), <a href="q3table.html#insertRows">insertRows</a>(), <a href="q3table.html#removeColumn">removeColumn</a>(), and <a href="q3table.html#removeRows">removeRows</a>().</p>
 
750
<a name="//apple_ref/cpp/instm/Q3Table/removeRows" />
650
751
<h3 class="fn"><a name="removeRows"></a>void Q3Table::removeRows ( const <a href="q3memarray.html">Q3MemArray</a>&lt;int&gt; &amp; <i>rows</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
651
752
<p>Removes the rows listed in the array <i>rows</i>, and deletes all their cells including any table items and widgets the cells may contain.</p>
652
753
<p>The array passed in must only contain valid rows (in the range from 0 to <a href="q3table.html#numRows-prop">numRows</a>() - 1) with no duplicates, and must be sorted in ascending order. Also clears the selection(s).</p>
653
754
<p>See also <a href="q3table.html#removeRow">removeRow</a>(), <a href="q3table.html#insertRows">insertRows</a>(), and <a href="q3table.html#removeColumns">removeColumns</a>().</p>
 
755
<a name="//apple_ref/cpp/instm/Q3Table/removeSelection" />
654
756
<h3 class="fn"><a name="removeSelection"></a>void Q3Table::removeSelection ( const <a href="q3tableselection.html">Q3TableSelection</a> &amp; <i>s</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
655
757
<p>If the table has a selection, <i>s</i>, this selection is removed from the table.</p>
656
758
<p>See also <a href="q3table.html#addSelection">addSelection</a>() and <a href="q3table.html#numSelections-prop">numSelections</a>().</p>
658
760
<p>This is an overloaded member function, provided for convenience.</p>
659
761
<p>Removes selection number <i>num</i> from the table.</p>
660
762
<p>See also <a href="q3table.html#numSelections-prop">numSelections</a>(), <a href="q3table.html#addSelection">addSelection</a>(), and <a href="q3table.html#clearSelection">clearSelection</a>().</p>
 
763
<a name="//apple_ref/cpp/instm/Q3Table/repaintSelections" />
661
764
<h3 class="fn"><a name="repaintSelections"></a>void Q3Table::repaintSelections ()</h3>
662
765
<p>Repaints all selections</p>
 
766
<a name="//apple_ref/cpp/instm/Q3Table/resizeData" />
663
767
<h3 class="fn"><a name="resizeData"></a>void Q3Table::resizeData ( int <i>len</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
664
768
<p>This is called when <a href="q3table.html">Q3Table</a>'s internal array needs to be resized to <i>len</i> elements.</p>
665
769
<p>If you don't use Q3TableItems you should reimplement this as an empty method to avoid wasting memory. See the notes on large tables for further details.</p>
 
770
<a name="//apple_ref/cpp/instm/Q3Table/rowAt" />
666
771
<h3 class="fn"><a name="rowAt"></a>int Q3Table::rowAt ( int <i>y</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
667
772
<p>Returns the number of the row at position <i>y</i>. <i>y</i> must be given in content coordinates.</p>
668
773
<p>See also <a href="q3table.html#rowPos">rowPos</a>() and <a href="q3table.html#columnAt">columnAt</a>().</p>
 
774
<a name="//apple_ref/cpp/instm/Q3Table/rowHeight" />
669
775
<h3 class="fn"><a name="rowHeight"></a>int Q3Table::rowHeight ( int <i>row</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
670
776
<p>Returns the height of row <i>row</i>.</p>
671
777
<p>See also <a href="q3table.html#setRowHeight">setRowHeight</a>() and <a href="q3table.html#columnWidth">columnWidth</a>().</p>
 
778
<a name="//apple_ref/cpp/instm/Q3Table/rowHeightChanged" />
672
779
<h3 class="fn"><a name="rowHeightChanged"></a>void Q3Table::rowHeightChanged ( int <i>row</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
673
780
<p>This function should be called whenever the row height of <i>row</i> has been changed. It updates the geometry of any affected rows and repaints the table to reflect the changes it has made.</p>
 
781
<a name="//apple_ref/cpp/instm/Q3Table/rowIndexChanged" />
674
782
<h3 class="fn"><a name="rowIndexChanged"></a>void Q3Table::rowIndexChanged ( int <i>section</i>, int <i>fromIndex</i>, int <i>toIndex</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
675
783
<p>This function is called when the order of the rows is to be changed, i.e&#x2e; the user moved the row header section <i>section</i> from <i>fromIndex</i> to <i>toIndex</i>.</p>
676
784
<p>If you want to change the order programmatically, call <a href="q3table.html#swapRows">swapRows</a>() or <a href="q3table.html#swapColumns">swapColumns</a>();</p>
677
785
<p>See also <a href="q3header.html#indexChange">Q3Header::indexChange</a>() and <a href="q3table.html#columnIndexChanged">columnIndexChanged</a>().</p>
 
786
<a name="//apple_ref/cpp/instm/Q3Table/rowPos" />
678
787
<h3 class="fn"><a name="rowPos"></a>int Q3Table::rowPos ( int <i>row</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
679
788
<p>Returns the y-coordinate of the row <i>row</i> in content coordinates.</p>
680
789
<p>See also <a href="q3table.html#rowAt">rowAt</a>() and <a href="q3table.html#columnPos">columnPos</a>().</p>
 
790
<a name="//apple_ref/cpp/instm/Q3Table/selectCells" />
681
791
<h3 class="fn"><a name="selectCells"></a>void Q3Table::selectCells ( int <i>start_row</i>, int <i>start_col</i>, int <i>end_row</i>, int <i>end_col</i> )</h3>
682
792
<p>Selects the range starting at <i>start_row</i> and <i>start_col</i> and ending at <i>end_row</i> and <i>end_col</i>.</p>
683
793
<p>See also <a href="q3tableselection.html">Q3TableSelection</a>.</p>
 
794
<a name="//apple_ref/cpp/instm/Q3Table/selectColumn" />
684
795
<h3 class="fn"><a name="selectColumn"></a>void Q3Table::selectColumn ( int <i>col</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
685
796
<p>Selects the column <i>col</i>.</p>
686
797
<p>See also <a href="q3tableselection.html">Q3TableSelection</a>.</p>
 
798
<a name="//apple_ref/cpp/instm/Q3Table/selectRow" />
687
799
<h3 class="fn"><a name="selectRow"></a>void Q3Table::selectRow ( int <i>row</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
688
800
<p>Selects the row <i>row</i>.</p>
689
801
<p>See also <a href="q3tableselection.html">Q3TableSelection</a>.</p>
 
802
<a name="//apple_ref/cpp/instm/Q3Table/selection" />
690
803
<h3 class="fn"><a name="selection"></a><a href="q3tableselection.html">Q3TableSelection</a> Q3Table::selection ( int <i>num</i> ) const</h3>
691
804
<p>Returns selection number <i>num</i>, or an inactive <a href="q3tableselection.html">Q3TableSelection</a> if <i>num</i> is out of range (see <a href="q3tableselection.html#isActive">Q3TableSelection::isActive</a>()).</p>
 
805
<a name="//apple_ref/cpp/instm/Q3Table/selectionChanged" />
692
806
<h3 class="fn"><a name="selectionChanged"></a>void Q3Table::selectionChanged ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
693
807
<p>This signal is emitted whenever a selection changes.</p>
694
808
<p>See also <a href="q3tableselection.html">Q3TableSelection</a>.</p>
 
809
<a name="//apple_ref/cpp/instm/Q3Table/setCellContentFromEditor" />
695
810
<h3 class="fn"><a name="setCellContentFromEditor"></a>void Q3Table::setCellContentFromEditor ( int <i>row</i>, int <i>col</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
696
811
<p>This function is called to replace the contents of the cell at <i>row</i>, <i>col</i> with the contents of the cell's editor.</p>
697
812
<p>If there already exists a <a href="q3tableitem.html">Q3TableItem</a> for the cell, it calls <a href="q3tableitem.html#setContentFromEditor">Q3TableItem::setContentFromEditor</a>() on this <a href="q3tableitem.html">Q3TableItem</a>.</p>
698
813
<p>If, for example, you want to create different <a href="q3tableitem.html">Q3TableItem</a>s depending on the contents of the editor, you might reimplement this function.</p>
699
814
<p>If you want to work without <a href="q3tableitem.html">Q3TableItem</a>s, you will need to reimplement this function to save the data the user entered into your data structure. (See the notes on large tables.)</p>
700
815
<p>See also <a href="q3tableitem.html#setContentFromEditor">Q3TableItem::setContentFromEditor</a>() and <a href="q3table.html#createEditor">createEditor</a>().</p>
 
816
<a name="//apple_ref/cpp/instm/Q3Table/setCellWidget" />
701
817
<h3 class="fn"><a name="setCellWidget"></a>void Q3Table::setCellWidget ( int <i>row</i>, int <i>col</i>, <a href="qwidget.html">QWidget</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
702
818
<p>Sets the widget <i>e</i> to the cell at <i>row</i>, <i>col</i> and takes care of placing and resizing the widget when the cell geometry changes.</p>
703
819
<p>By default widgets are inserted into a vector with <a href="q3table.html#numRows-prop">numRows</a>() * <a href="q3table.html#numCols-prop">numCols</a>() elements. In very large tables you will probably want to store the widgets in a data structure that consumes less memory (see the notes on large tables). To support the use of your own data structure this function calls <a href="q3table.html#insertWidget">insertWidget</a>() to add the widget to the internal data structure. To use your own data structure reimplement <a href="q3table.html#insertWidget">insertWidget</a>(), <a href="q3table.html#cellWidget">cellWidget</a>() and <a href="q3table.html#clearCellWidget">clearCellWidget</a>().</p>
704
820
<p>Cell widgets are created dynamically with the <tt>new</tt> operator. The cell widgets are destroyed automatically once the table is destroyed; the table takes ownership of the widget when using setCellWidget.</p>
705
821
<p>See also <a href="q3table.html#cellWidget">cellWidget</a>().</p>
 
822
<a name="//apple_ref/cpp/instm/Q3Table/setColumnLabels" />
706
823
<h3 class="fn"><a name="setColumnLabels"></a>void Q3Table::setColumnLabels ( const <a href="qstringlist.html">QStringList</a> &amp; <i>labels</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
707
824
<p>Sets the section labels of the <a href="q3table.html#horizontalHeader">horizontalHeader</a>() to <i>labels</i></p>
 
825
<a name="//apple_ref/cpp/instm/Q3Table/setColumnReadOnly" />
708
826
<h3 class="fn"><a name="setColumnReadOnly"></a>void Q3Table::setColumnReadOnly ( int <i>col</i>, bool <i>ro</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
709
827
<p>If <i>ro</i> is true, column <i>col</i> is set to be read-only; otherwise the column is set to be editable.</p>
710
828
<p>Whether a cell in this column is editable or read-only depends on the cell's EditType, and this setting.</p>
711
829
<p>See also <a href="q3table.html#isColumnReadOnly">isColumnReadOnly</a>(), <a href="q3table.html#setRowReadOnly">setRowReadOnly</a>(), and <a href="q3table.html#readOnly-prop">setReadOnly</a>().</p>
 
830
<a name="//apple_ref/cpp/instm/Q3Table/setColumnStretchable" />
712
831
<h3 class="fn"><a name="setColumnStretchable"></a>void Q3Table::setColumnStretchable ( int <i>col</i>, bool <i>stretch</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
713
832
<p>If <i>stretch</i> is true, column <i>col</i> is set to be stretchable; otherwise column <i>col</i> is set to be unstretchable.</p>
714
833
<p>If the table widget's width decreases or increases stretchable columns will grow narrower or wider to fit the space available as completely as possible. The user cannot manually resize stretchable columns.</p>
715
834
<p>See also <a href="q3table.html#isColumnStretchable">isColumnStretchable</a>(), <a href="q3table.html#setRowStretchable">setRowStretchable</a>(), and <a href="q3table.html#adjustColumn">adjustColumn</a>().</p>
 
835
<a name="//apple_ref/cpp/instm/Q3Table/setColumnWidth" />
716
836
<h3 class="fn"><a name="setColumnWidth"></a>void Q3Table::setColumnWidth ( int <i>col</i>, int <i>w</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
717
837
<p>Resizes column <i>col</i> to be <i>w</i> pixels wide.</p>
718
838
<p>See also <a href="q3table.html#columnWidth">columnWidth</a>() and <a href="q3table.html#setRowHeight">setRowHeight</a>().</p>
 
839
<a name="//apple_ref/cpp/instm/Q3Table/setCurrentCell" />
719
840
<h3 class="fn"><a name="setCurrentCell"></a>void Q3Table::setCurrentCell ( int <i>row</i>, int <i>col</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
720
841
<p>Moves the focus to the cell at <i>row</i>, <i>col</i>.</p>
721
842
<p>See also <a href="q3table.html#currentRow">currentRow</a>() and <a href="q3table.html#currentColumn">currentColumn</a>().</p>
 
843
<a name="//apple_ref/cpp/instm/Q3Table/setDragEnabled" />
722
844
<h3 class="fn"><a name="setDragEnabled"></a>void Q3Table::setDragEnabled ( bool <i>b</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
723
845
<p>If <i>b</i> is true, the table starts a drag (see <a href="q3table.html#dragObject">dragObject</a>()) when the user presses and moves the mouse on a selected cell.</p>
724
846
<p>See also <a href="q3table.html#dragEnabled">dragEnabled</a>().</p>
 
847
<a name="//apple_ref/cpp/instm/Q3Table/setEditMode" />
725
848
<h3 class="fn"><a name="setEditMode"></a>void Q3Table::setEditMode ( <a href="q3table.html#EditMode-enum">EditMode</a> <i>mode</i>, int <i>row</i>, int <i>col</i> )&nbsp;&nbsp;<tt> [protected]</tt></h3>
726
849
<p>Sets the current edit mode to <i>mode</i>, the current edit row to <i>row</i> and the current edit column to <i>col</i>.</p>
727
850
<p>See also <a href="q3table.html#editMode">editMode</a>() and <a href="q3table.html#EditMode-enum">EditMode</a>.</p>
 
851
<a name="//apple_ref/cpp/instm/Q3Table/setItem" />
728
852
<h3 class="fn"><a name="setItem"></a>void Q3Table::setItem ( int <i>row</i>, int <i>col</i>, <a href="q3tableitem.html">Q3TableItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
729
853
<p>Inserts the table item <i>item</i> into the table at row <i>row</i>, column <i>col</i>, and repaints the cell. If a table item already exists in this cell it is deleted and replaced with <i>item</i>. The table takes ownership of the table item.</p>
730
854
<p>If you don't use <a href="q3tableitem.html">Q3TableItem</a>s you may need to reimplement this function: see the notes on large tables.</p>
731
855
<p>See also <a href="q3table.html#item">item</a>() and <a href="q3table.html#takeItem">takeItem</a>().</p>
 
856
<a name="//apple_ref/cpp/instm/Q3Table/setLeftMargin" />
732
857
<h3 class="fn"><a name="setLeftMargin"></a>void Q3Table::setLeftMargin ( int <i>m</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
733
858
<p>Sets the left margin to be <i>m</i> pixels wide.</p>
734
859
<p>The <a href="q3table.html#verticalHeader">verticalHeader</a>(), which displays row labels, occupies this margin.</p>
735
860
<p>In an Arabic or Hebrew localization, the <a href="q3table.html#verticalHeader">verticalHeader</a>() will appear on the right side of the table, and this call will set the right margin.</p>
736
861
<p>See also <a href="q3scrollview.html#leftMargin">leftMargin</a>(), <a href="q3table.html#setTopMargin">setTopMargin</a>(), and <a href="q3table.html#verticalHeader">verticalHeader</a>().</p>
 
862
<a name="//apple_ref/cpp/instm/Q3Table/setPixmap" />
737
863
<h3 class="fn"><a name="setPixmap"></a>void Q3Table::setPixmap ( int <i>row</i>, int <i>col</i>, const <a href="qpixmap.html">QPixmap</a> &amp; <i>pix</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
738
864
<p>Sets the pixmap in the cell at <i>row</i>, <i>col</i> to <i>pix</i>.</p>
739
865
<p>If the cell does not contain a table item a <a href="q3tableitem.html">Q3TableItem</a> is created with an <a href="q3tableitem.html#EditType-enum">EditType</a> of <tt>OnTyping</tt>, otherwise the existing table item's pixmap (if any) is replaced with <i>pix</i>.</p>
740
866
<p>Note that <a href="q3combotableitem.html">Q3ComboTableItem</a>s and <a href="q3checktableitem.html">Q3CheckTableItem</a>s don't show pixmaps.</p>
741
867
<p>See also <a href="q3table.html#pixmap">pixmap</a>(), <a href="q3table.html#setText">setText</a>(), <a href="q3table.html#setItem">setItem</a>(), and <a href="q3tableitem.html#setPixmap">Q3TableItem::setPixmap</a>().</p>
 
868
<a name="//apple_ref/cpp/instm/Q3Table/setRowHeight" />
742
869
<h3 class="fn"><a name="setRowHeight"></a>void Q3Table::setRowHeight ( int <i>row</i>, int <i>h</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
743
870
<p>Resizes row <i>row</i> to be <i>h</i> pixels high.</p>
744
871
<p>See also <a href="q3table.html#rowHeight">rowHeight</a>() and <a href="q3table.html#setColumnWidth">setColumnWidth</a>().</p>
 
872
<a name="//apple_ref/cpp/instm/Q3Table/setRowLabels" />
745
873
<h3 class="fn"><a name="setRowLabels"></a>void Q3Table::setRowLabels ( const <a href="qstringlist.html">QStringList</a> &amp; <i>labels</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
746
874
<p>Sets the section labels of the <a href="q3table.html#verticalHeader">verticalHeader</a>() to <i>labels</i></p>
 
875
<a name="//apple_ref/cpp/instm/Q3Table/setRowReadOnly" />
747
876
<h3 class="fn"><a name="setRowReadOnly"></a>void Q3Table::setRowReadOnly ( int <i>row</i>, bool <i>ro</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
748
877
<p>If <i>ro</i> is true, row <i>row</i> is set to be read-only; otherwise the row is set to be editable.</p>
749
878
<p>Whether a cell in this row is editable or read-only depends on the cell's EditType, and this setting.</p>
750
879
<p>See also <a href="q3table.html#isRowReadOnly">isRowReadOnly</a>(), <a href="q3table.html#setColumnReadOnly">setColumnReadOnly</a>(), and <a href="q3table.html#readOnly-prop">setReadOnly</a>().</p>
 
880
<a name="//apple_ref/cpp/instm/Q3Table/setRowStretchable" />
751
881
<h3 class="fn"><a name="setRowStretchable"></a>void Q3Table::setRowStretchable ( int <i>row</i>, bool <i>stretch</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
752
882
<p>If <i>stretch</i> is true, row <i>row</i> is set to be stretchable; otherwise row <i>row</i> is set to be unstretchable.</p>
753
883
<p>If the table widget's height decreases or increases stretchable rows will grow shorter or taller to fit the space available as completely as possible. The user cannot manually resize stretchable rows.</p>
754
884
<p>See also <a href="q3table.html#isRowStretchable">isRowStretchable</a>() and <a href="q3table.html#setColumnStretchable">setColumnStretchable</a>().</p>
 
885
<a name="//apple_ref/cpp/instm/Q3Table/setText" />
755
886
<h3 class="fn"><a name="setText"></a>void Q3Table::setText ( int <i>row</i>, int <i>col</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
756
887
<p>Sets the text in the cell at <i>row</i>, <i>col</i> to <i>text</i>.</p>
757
888
<p>If the cell does not contain a table item a <a href="q3tableitem.html">Q3TableItem</a> is created with an <a href="q3tableitem.html#EditType-enum">EditType</a> of <tt>OnTyping</tt>, otherwise the existing table item's text (if any) is replaced with <i>text</i>.</p>
758
889
<p>See also <a href="q3table.html#text">text</a>(), <a href="q3table.html#setPixmap">setPixmap</a>(), <a href="q3table.html#setItem">setItem</a>(), and <a href="q3tableitem.html#setText">Q3TableItem::setText</a>().</p>
 
890
<a name="//apple_ref/cpp/instm/Q3Table/setTopMargin" />
759
891
<h3 class="fn"><a name="setTopMargin"></a>void Q3Table::setTopMargin ( int <i>m</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
760
892
<p>Sets the top margin to be <i>m</i> pixels high.</p>
761
893
<p>The <a href="q3table.html#horizontalHeader">horizontalHeader</a>(), which displays column labels, occupies this margin.</p>
762
894
<p>See also <a href="q3scrollview.html#topMargin">topMargin</a>() and <a href="q3table.html#setLeftMargin">setLeftMargin</a>().</p>
 
895
<a name="//apple_ref/cpp/instm/Q3Table/showColumn" />
763
896
<h3 class="fn"><a name="showColumn"></a>void Q3Table::showColumn ( int <i>col</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
764
897
<p>Shows column <i>col</i>.</p>
765
898
<p>See also <a href="q3table.html#hideColumn">hideColumn</a>() and <a href="q3table.html#showRow">showRow</a>().</p>
 
899
<a name="//apple_ref/cpp/instm/Q3Table/showRow" />
766
900
<h3 class="fn"><a name="showRow"></a>void Q3Table::showRow ( int <i>row</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
767
901
<p>Shows row <i>row</i>.</p>
768
902
<p>See also <a href="q3table.html#hideRow">hideRow</a>() and <a href="q3table.html#showColumn">showColumn</a>().</p>
 
903
<a name="//apple_ref/cpp/instm/Q3Table/sortColumn" />
769
904
<h3 class="fn"><a name="sortColumn"></a>void Q3Table::sortColumn ( int <i>col</i>, bool <i>ascending</i> = true, bool <i>wholeRows</i> = false )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
770
905
<p>Sorts column <i>col</i>. If <i>ascending</i> is true the sort is in ascending order, otherwise the sort is in descending order.</p>
771
906
<p>If <i>wholeRows</i> is true, entire rows are sorted using <a href="q3table.html#swapRows">swapRows</a>(); otherwise only cells in the column are sorted using <a href="q3table.html#swapCells">swapCells</a>().</p>
772
907
<p>Note that if you are not using Q3TableItems you will need to reimplement <a href="q3table.html#swapRows">swapRows</a>() and <a href="q3table.html#swapCells">swapCells</a>(). (See the notes on large tables.)</p>
773
908
<p>See also <a href="q3table.html#swapRows">swapRows</a>().</p>
 
909
<a name="//apple_ref/cpp/instm/Q3Table/startDrag" />
774
910
<h3 class="fn"><a name="startDrag"></a>void Q3Table::startDrag ()&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
775
911
<p>Starts a drag.</p>
776
912
<p>Usually you don't need to call or reimplement this function yourself.</p>
777
913
<p>See also <a href="q3table.html#dragObject">dragObject</a>().</p>
 
914
<a name="//apple_ref/cpp/instm/Q3Table/swapCells" />
778
915
<h3 class="fn"><a name="swapCells"></a>void Q3Table::swapCells ( int <i>row1</i>, int <i>col1</i>, int <i>row2</i>, int <i>col2</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
779
916
<p>Swaps the contents of the cell at <i>row1</i>, <i>col1</i> with the contents of the cell at <i>row2</i>, <i>col2</i>.</p>
780
917
<p>This function is also called when the table is sorted.</p>
781
918
<p>If you don't use <a href="q3tableitem.html">Q3TableItem</a>s and want your users to be able to swap cells, you will need to reimplement this function. (See the notes on large tables.)</p>
782
919
<p>See also <a href="q3table.html#swapColumns">swapColumns</a>() and <a href="q3table.html#swapRows">swapRows</a>().</p>
 
920
<a name="//apple_ref/cpp/instm/Q3Table/swapColumns" />
783
921
<h3 class="fn"><a name="swapColumns"></a>void Q3Table::swapColumns ( int <i>col1</i>, int <i>col2</i>, bool <i>swapHeader</i> = false )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
784
922
<p>Swaps the data in <i>col1</i> with <i>col2</i>.</p>
785
923
<p>This function is used to swap the positions of two columns. It is called when the user changes the order of columns (see <a href="q3table.html#columnMovingEnabled-prop">setColumnMovingEnabled</a>(), and when columns are sorted.</p>
786
924
<p>If you don't use <a href="q3tableitem.html">Q3TableItem</a>s and want your users to be able to swap columns you will need to reimplement this function. (See the notes on large tables.)</p>
787
925
<p>If <i>swapHeader</i> is true, the columns' header contents is also swapped.</p>
788
926
<p>See also <a href="q3table.html#swapCells">swapCells</a>().</p>
 
927
<a name="//apple_ref/cpp/instm/Q3Table/swapRows" />
789
928
<h3 class="fn"><a name="swapRows"></a>void Q3Table::swapRows ( int <i>row1</i>, int <i>row2</i>, bool <i>swapHeader</i> = false )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
790
929
<p>Swaps the data in <i>row1</i> and <i>row2</i>.</p>
791
930
<p>This function is used to swap the positions of two rows. It is called when the user changes the order of rows (see <a href="q3table.html#rowMovingEnabled-prop">setRowMovingEnabled</a>()), and when rows are sorted.</p>
793
932
<p>If <i>swapHeader</i> is true, the rows' header contents is also swapped.</p>
794
933
<p>This function will not update the <a href="q3table.html">Q3Table</a>, you will have to do this manually, e.g&#x2e; by calling <a href="q3scrollview.html#updateContents">updateContents</a>().</p>
795
934
<p>See also <a href="q3table.html#swapColumns">swapColumns</a>() and <a href="q3table.html#swapCells">swapCells</a>().</p>
 
935
<a name="//apple_ref/cpp/instm/Q3Table/takeItem" />
796
936
<h3 class="fn"><a name="takeItem"></a>void Q3Table::takeItem ( <a href="q3tableitem.html">Q3TableItem</a> * <i>i</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
797
937
<p>Takes the table item <i>i</i> out of the table. This function does <i>not</i> delete the table item. You must either delete the table item yourself or put it into a table (using <a href="q3table.html#setItem">setItem</a>()) which will then take ownership of it.</p>
798
938
<p>Use this function if you want to move an item from one cell in a table to another, or to move an item from one table to another, reinserting the item with <a href="q3table.html#setItem">setItem</a>().</p>
799
939
<p>If you want to exchange two cells use <a href="q3table.html#swapCells">swapCells</a>().</p>
 
940
<a name="//apple_ref/cpp/instm/Q3Table/text" />
800
941
<h3 class="fn"><a name="text"></a><a href="qstring.html">QString</a> Q3Table::text ( int <i>row</i>, int <i>col</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
801
942
<p>Returns the text in the cell at <i>row</i>, <i>col</i>, or an empty string if the relevant item does not exist or has no text.</p>
802
943
<p>See also <a href="q3table.html#setText">setText</a>() and <a href="q3table.html#setPixmap">setPixmap</a>().</p>
 
944
<a name="//apple_ref/cpp/instm/Q3Table/updateCell" />
803
945
<h3 class="fn"><a name="updateCell"></a>void Q3Table::updateCell ( int <i>row</i>, int <i>col</i> )</h3>
804
946
<p>Repaints the cell at <i>row</i>, <i>col</i>.</p>
 
947
<a name="//apple_ref/cpp/instm/Q3Table/updateHeaderStates" />
805
948
<h3 class="fn"><a name="updateHeaderStates"></a>void Q3Table::updateHeaderStates ()</h3>
806
949
<p>This functions updates all the header states to be in sync with the current selections. This should be called after programmatically changing, adding or removing selections, so that the headers are updated.</p>
 
950
<a name="//apple_ref/cpp/instm/Q3Table/valueChanged" />
807
951
<h3 class="fn"><a name="valueChanged"></a>void Q3Table::valueChanged ( int <i>row</i>, int <i>col</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
808
952
<p>This signal is emitted when the user changed the value in the cell at <i>row</i>, <i>col</i>.</p>
 
953
<a name="//apple_ref/cpp/instm/Q3Table/verticalHeader" />
809
954
<h3 class="fn"><a name="verticalHeader"></a><a href="q3header.html">Q3Header</a> * Q3Table::verticalHeader () const</h3>
810
955
<p>Returns the table's vertical <a href="q3header.html">Q3Header</a>.</p>
811
956
<p>This header contains the row labels.</p>
814
959
<table width="100%" cellspacing="0" border="0"><tr class="address">
815
960
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
816
961
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
817
 
<td width="30%" align="right"><div align="right">Qt 4.4.0</div></td>
 
962
<td width="30%" align="right"><div align="right">Qt 4.4.1</div></td>
818
963
</tr></table></div></address></body>
819
964
</html>