<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Wt: Wt::WAggregateProxyModel Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Wt  <span id="projectnumber">3.2.3</span> </div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.5.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a> </li> <li class="navelem"><a class="el" href="classWt_1_1WAggregateProxyModel.html">WAggregateProxyModel</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <div class="title">Wt::WAggregateProxyModel Class Reference<div class="ingroups"><a class="el" href="group__modelview.html">Model/view system</a></div></div> </div> </div> <div class="contents"> <!-- doxytag: class="Wt::WAggregateProxyModel" --><!-- doxytag: inherits="Wt::WAbstractProxyModel" --> <p>A proxy model for Wt's item models that provides column aggregation. <a href="classWt_1_1WAggregateProxyModel.html#details">More...</a></p> <p><code>#include <Wt/WAggregateProxyModel></code></p> <div class="dynheader"> Inheritance diagram for Wt::WAggregateProxyModel:</div> <div class="dyncontent"> <div class="center"><img src="classWt_1_1WAggregateProxyModel__inherit__graph.png" border="0" usemap="#Wt_1_1WAggregateProxyModel_inherit__map" alt="Inheritance graph"/></div> <map name="Wt_1_1WAggregateProxyModel_inherit__map" id="Wt_1_1WAggregateProxyModel_inherit__map"> <area shape="rect" href="classWt_1_1WAbstractProxyModel.html" title="An abstract proxy model for Wt's item models." alt="" coords="11,155,187,181"/><area shape="rect" href="classWt_1_1WAbstractItemModel.html" title="An abstract model for use with Wt's view classes." alt="" coords="15,80,183,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="51,5,147,32"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classWt_1_1WAggregateProxyModel-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#a6c7afd5908bad7f007f30f100b991c78">WAggregateProxyModel</a> (<a class="el" href="classWt_1_1WObject.html">WObject</a> *parent=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#a6c7afd5908bad7f007f30f100b991c78"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acecfb768c8cd2fbb0ba7c2aeb90418d0"></a><!-- doxytag: member="Wt::WAggregateProxyModel::~WAggregateProxyModel" ref="acecfb768c8cd2fbb0ba7c2aeb90418d0" args="()" --> virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#acecfb768c8cd2fbb0ba7c2aeb90418d0">~WAggregateProxyModel</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#add590f7e0789812c73874ab2bd4161bf">addAggregate</a> (int parentColumn, int firstColumn, int lastColumn)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a new column aggregation definition. <a href="#add590f7e0789812c73874ab2bd4161bf"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#abd53119f51f426bbf3e332227a7c140f">mapFromSource</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &sourceIndex) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Maps a source model index to the proxy model. <a href="#abd53119f51f426bbf3e332227a7c140f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#a219cfab137c4e6b5fcdcfdaa00f2c652">mapToSource</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &proxyIndex) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Maps a proxy model index to the source model. <a href="#a219cfab137c4e6b5fcdcfdaa00f2c652"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#adcd5632ba87b439d87b2470bf028cf28">setSourceModel</a> (<a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a> *sourceModel)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the source model. <a href="#adcd5632ba87b439d87b2470bf028cf28"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#accddd20f3e9110bb7a1797ec9ed84085">expandColumn</a> (int column)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Expands a column. <a href="#accddd20f3e9110bb7a1797ec9ed84085"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#a44082771ca19bdcd648e4cb6c4cf08be">collapseColumn</a> (int column)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Collapses a column. <a href="#a44082771ca19bdcd648e4cb6c4cf08be"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#aafec39e7801f9c4b19d6df601a130445">columnCount</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &parent=<a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>()) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of columns. <a href="#aafec39e7801f9c4b19d6df601a130445"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#abef979ff954c636e6a2b5b3d429a06a0">rowCount</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &parent=<a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>()) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of rows. <a href="#abef979ff954c636e6a2b5b3d429a06a0"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual WFlags< <a class="el" href="group__modelview.html#gafb18b4339442f1327c2a65850f3d8a53">HeaderFlag</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#aad873c5eeb40d473bb7127cfc2022658">headerFlags</a> (int section, <a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a> orientation=Horizontal) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the flags for a header. <a href="#aad873c5eeb40d473bb7127cfc2022658"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#ae70467185337c5ef4fd1a14a2f1397f8">setHeaderData</a> (int section, <a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a> orientation, const boost::any &value, int role=EditRole)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets header data for a column or row. <a href="#ae70467185337c5ef4fd1a14a2f1397f8"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual boost::any </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#accb1c7428e090aa881a30eefa15141c1">headerData</a> (int section, <a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a> orientation=Horizontal, int role=DisplayRole) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the row or column header data. <a href="#accb1c7428e090aa881a30eefa15141c1"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#abe70985414fe0634927f72dbfb8f5341">parent</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &index) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the parent for a model index. <a href="#abe70985414fe0634927f72dbfb8f5341"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#a7733a1eacce2d55230776d6b472cf14c">index</a> (int row, int column, const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &parent=<a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>()) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the child index for the given row and column. <a href="#a7733a1eacce2d55230776d6b472cf14c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#aa5fc80d856911d48ed0bd2efd5c376e2">sort</a> (int column, <a class="el" href="group__modelview.html#ga4173856040cf108a9c7360927a43ebac">SortOrder</a> order=AscendingOrder)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the model according to a particular column. <a href="#aa5fc80d856911d48ed0bd2efd5c376e2"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A proxy model for Wt's item models that provides column aggregation. </p> <p>This proxy model does not store data itself, but presents data from a source model, and presents methods to organize columns using aggregation, through which a user may navigate (usually to obtain more detailed results related to a single aggregate quantity).</p> <p>To use this proxy model, you should provide a source model using <a class="el" href="classWt_1_1WAggregateProxyModel.html#adcd5632ba87b439d87b2470bf028cf28" title="Sets the source model.">setSourceModel()</a>, and define column ranges that can be aggregated using <a class="el" href="classWt_1_1WAggregateProxyModel.html#add590f7e0789812c73874ab2bd4161bf" title="Adds a new column aggregation definition.">addAggregate()</a>.</p> <p>Example: </p> <div class="fragment"><pre class="fragment"> <span class="keywordtype">int</span> COLS = 18; <span class="keywordtype">int</span> ROWS = 20; <span class="comment">// set up the source model</span> model_ = <span class="keyword">new</span> WStandardItemModel(0, COLS); std::string columns[] = { <span class="stringliteral">"Supplier"</span>, <span class="stringliteral">"2004"</span>, <span class="stringliteral">"Q1"</span>, <span class="stringliteral">"January"</span>, <span class="stringliteral">"February"</span>, <span class="stringliteral">"March"</span>, <span class="stringliteral">"Q2"</span>, <span class="stringliteral">"April"</span>, <span class="stringliteral">"May"</span>, <span class="stringliteral">"June"</span>, <span class="stringliteral">"Q3"</span>, <span class="stringliteral">"July"</span>, <span class="stringliteral">"August"</span>, <span class="stringliteral">"September"</span>, <span class="stringliteral">"Q4"</span>, <span class="stringliteral">"October"</span>, <span class="stringliteral">"November"</span>, <span class="stringliteral">"December"</span> }; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> i = 0; i < COLS; ++i) { model_->setHeaderData(i, <a class="code" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912ac2ebf22b096a22b18eef23e736aa2e28" title="Horizontal.">Horizontal</a>, columns[i]); } <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> i = 0; i < ROWS; ++i) { model_->insertRow(i); <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> j = 0; j < COLS; ++j) model_->setData(i, j, <span class="stringliteral">"col "</span> + boost::lexical_cast<std::string>(j)); } <span class="comment">// set up the proxy model</span> <a class="code" href="classWt_1_1WAggregateProxyModel.html#a6c7afd5908bad7f007f30f100b991c78" title="Constructor.">WAggregateProxyModel</a> *proxy = <span class="keyword">new</span> <a class="code" href="classWt_1_1WAggregateProxyModel.html#a6c7afd5908bad7f007f30f100b991c78" title="Constructor.">WAggregateProxyModel</a>(); proxy->setSourceModel(model_); proxy->addAggregate(1, 2, 17); proxy->addAggregate(2, 3, 5); proxy->addAggregate(6, 7, 9); proxy->addAggregate(10, 11, 13); proxy->addAggregate(14, 15, 17); proxy->expandColumn(1); <span class="comment">// expand 2004 -> Q1 Q2 Q3 Q4</span> <span class="comment">// define a view</span> treeView_ = <span class="keyword">new</span> WTreeView(root()); treeView_->setColumnBorder(<a class="code" href="group__style.html#gga9686ea88ce4db2c0a12ea84452f60133acf5dee884803e93b444f8bd222956bd6" title="Color black.">Wt::black</a>); treeView_->setModel(proxy); treeView_->setColumnWidth(0, 160); treeView_->setColumnResizeEnabled(<span class="keyword">true</span>); treeView_->setSortingEnabled(<span class="keyword">true</span>); </pre></div><p>This example would render like this:</p> <div class="image"> <img src="WAggregateProxyModel-1.png" alt="WAggregateProxyModel-1.png"/> <div class="caption"> A WTreeView using a WAggregateProxyModel</div></div> <dl class="note"><dt><b>Note:</b></dt><dd>This model does not support dynamic changes to the column definition of the source model (i.e. insertions or deletions of source model columns). </dd></dl> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a6c7afd5908bad7f007f30f100b991c78"></a><!-- doxytag: member="Wt::WAggregateProxyModel::WAggregateProxyModel" ref="a6c7afd5908bad7f007f30f100b991c78" args="(WObject *parent=0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Wt::WAggregateProxyModel::WAggregateProxyModel </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1WObject.html">WObject</a> * </td> <td class="paramname"><em>parent</em> = <code>0</code></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Constructor. </p> <p>Sets up the proxy without aggregation functionality. </p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="add590f7e0789812c73874ab2bd4161bf"></a><!-- doxytag: member="Wt::WAggregateProxyModel::addAggregate" ref="add590f7e0789812c73874ab2bd4161bf" args="(int parentColumn, int firstColumn, int lastColumn)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WAggregateProxyModel::addAggregate </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>parentColumn</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>firstColumn</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>lastColumn</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Adds a new column aggregation definition. </p> <p>The <code>parentColumn</code> is the column index in the source model that acts as an aggregate for columns <code>firstColumn</code> to <code>lastColumn</code>. <code>parentColumn</code> must border the range defined by <code>firstColumn</code> to <code>lastColumn:</code> </p> <div class="fragment"><pre class="fragment"> parentColumn == firstColumn - 1 || parentColumn == lastColumn + 1 </pre></div><p>Note that column parameters reference column indexes in the source model.</p> <p>Aggregation definitions can be nested, but should be strictly hierarchical.</p> <p>The aggregate column will initially be collapsed.</p> <p>Only one aggregate can be defined per <code>parentColumn</code>. </p> </div> </div> <a class="anchor" id="a44082771ca19bdcd648e4cb6c4cf08be"></a><!-- doxytag: member="Wt::WAggregateProxyModel::collapseColumn" ref="a44082771ca19bdcd648e4cb6c4cf08be" args="(int column)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WAggregateProxyModel::collapseColumn </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em></td><td>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Collapses a column. </p> <p>Collapses a column. This may only be called by a view when the <a class="el" href="group__modelview.html#ggafb18b4339442f1327c2a65850f3d8a53adb54e2a704ae37581af6cc33828fef71" title="Flag that indicates that the column was expanded to the left.">Wt::ColumnIsExpandedLeft</a> or <a class="el" href="group__modelview.html#ggafb18b4339442f1327c2a65850f3d8a53ab8f2b2845555220afc9c3c24c43194cd" title="Flag that indicates that the column was expanded to the right.">Wt::ColumnIsExpandedRight</a> flag is set.</p> <p>The default implementation does nothing.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html" title="A proxy model for Wt's item models that provides column aggregation.">WAggregateProxyModel</a> </dd></dl> <p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#accd1f651c0b01ae897a52b9ad4b0f553">Wt::WAbstractItemModel</a>.</p> </div> </div> <a class="anchor" id="aafec39e7801f9c4b19d6df601a130445"></a><!-- doxytag: member="Wt::WAggregateProxyModel::columnCount" ref="aafec39e7801f9c4b19d6df601a130445" args="(const WModelIndex &parent=WModelIndex()) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Wt::WAggregateProxyModel::columnCount </td> <td>(</td> <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> & </td> <td class="paramname"><em>parent</em> = <code><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>()</code></td><td>)</td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the number of columns. </p> <p>This returns the number of columns at index <code>parent</code>.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#abef979ff954c636e6a2b5b3d429a06a0" title="Returns the number of rows.">rowCount()</a> </dd></dl> <p>Implements <a class="el" href="classWt_1_1WAbstractItemModel.html#abcf7912a95a0a60f8e9b1c37d30b8383">Wt::WAbstractItemModel</a>.</p> </div> </div> <a class="anchor" id="accddd20f3e9110bb7a1797ec9ed84085"></a><!-- doxytag: member="Wt::WAggregateProxyModel::expandColumn" ref="accddd20f3e9110bb7a1797ec9ed84085" args="(int column)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WAggregateProxyModel::expandColumn </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em></td><td>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Expands a column. </p> <p>Expands a column. This may only be called by a view when the <a class="el" href="group__modelview.html#ggafb18b4339442f1327c2a65850f3d8a53a55020edcd8019b7fd0b330283b194929" title="Flag that indicates that the column can be expanded.">Wt::ColumnIsCollapsed</a> flag is set.</p> <p>The default implementation does nothing.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html" title="A proxy model for Wt's item models that provides column aggregation.">WAggregateProxyModel</a> </dd></dl> <p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#ad7da483e201a6a0d717438049ce1f1d1">Wt::WAbstractItemModel</a>.</p> </div> </div> <a class="anchor" id="accb1c7428e090aa881a30eefa15141c1"></a><!-- doxytag: member="Wt::WAggregateProxyModel::headerData" ref="accb1c7428e090aa881a30eefa15141c1" args="(int section, Orientation orientation=Horizontal, int role=DisplayRole) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">boost::any Wt::WAggregateProxyModel::headerData </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>section</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a> </td> <td class="paramname"><em>orientation</em> = <code>Horizontal</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>role</em> = <code>DisplayRole</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the row or column header data. </p> <p>When <code>orientation</code> is <a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912ac2ebf22b096a22b18eef23e736aa2e28">Horizontal</a>, <code>section</code> is a column number, when <code>orientation</code> is <a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912af916b7ec24727db2d972f0770170c7f5">Vertical</a>, <code>section</code> is a row number.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemModel.html#a9112b74d160f916ef75fb6c1c09dd8fe" title="Returns data at a specific model index.">data()</a>, <a class="el" href="classWt_1_1WAggregateProxyModel.html#ae70467185337c5ef4fd1a14a2f1397f8" title="Sets header data for a column or row.">setHeaderData()</a> </dd></dl> <p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#a86bbab7c809fce4de9b5cb543b2fb124">Wt::WAbstractItemModel</a>.</p> </div> </div> <a class="anchor" id="aad873c5eeb40d473bb7127cfc2022658"></a><!-- doxytag: member="Wt::WAggregateProxyModel::headerFlags" ref="aad873c5eeb40d473bb7127cfc2022658" args="(int section, Orientation orientation=Horizontal) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">WFlags< <a class="el" href="group__modelview.html#gafb18b4339442f1327c2a65850f3d8a53">HeaderFlag</a> > Wt::WAggregateProxyModel::headerFlags </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>section</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a> </td> <td class="paramname"><em>orientation</em> = <code>Horizontal</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the flags for a header. </p> <p>The default implementation returns no flags set.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__modelview.html#gafb18b4339442f1327c2a65850f3d8a53" title="Flags that indicate table header options.">Wt::HeaderFlag</a> </dd></dl> <p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#a6bb2a7e70f816606351be4a23c453a49">Wt::WAbstractItemModel</a>.</p> </div> </div> <a class="anchor" id="a7733a1eacce2d55230776d6b472cf14c"></a><!-- doxytag: member="Wt::WAggregateProxyModel::index" ref="a7733a1eacce2d55230776d6b472cf14c" args="(int row, int column, const WModelIndex &parent=WModelIndex()) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> Wt::WAggregateProxyModel::index </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>row</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>column</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> & </td> <td class="paramname"><em>parent</em> = <code><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>()</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the child index for the given row and column. </p> <p>When implementing this method, you can use <a class="el" href="classWt_1_1WAbstractItemModel.html#ac837a73fe423255035ffb076946de122" title="Creates a model index for the given row and column.">createIndex()</a> to create an index that corresponds to the item at <code>row</code> and <code>column</code> within <code>parent</code>.</p> <p>If the location is invalid (out of bounds at the parent), then an invalid index must be returned.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#abe70985414fe0634927f72dbfb8f5341" title="Returns the parent for a model index.">parent()</a> </dd></dl> <p>Implements <a class="el" href="classWt_1_1WAbstractItemModel.html#a83f37bf04b8574b328c139b02523b8cb">Wt::WAbstractItemModel</a>.</p> </div> </div> <a class="anchor" id="abd53119f51f426bbf3e332227a7c140f"></a><!-- doxytag: member="Wt::WAggregateProxyModel::mapFromSource" ref="abd53119f51f426bbf3e332227a7c140f" args="(const WModelIndex &sourceIndex) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> Wt::WAggregateProxyModel::mapFromSource </td> <td>(</td> <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> & </td> <td class="paramname"><em>sourceIndex</em></td><td>)</td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Maps a source model index to the proxy model. </p> <p>This method returns a model index in the proxy model that corresponds to the model index <code>sourceIndex</code> in the source model. This method must only be implemented for source model indexes that are mapped and thus are the result of <a class="el" href="classWt_1_1WAggregateProxyModel.html#a219cfab137c4e6b5fcdcfdaa00f2c652" title="Maps a proxy model index to the source model.">mapToSource()</a>.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#a219cfab137c4e6b5fcdcfdaa00f2c652" title="Maps a proxy model index to the source model.">mapToSource()</a> </dd></dl> <p>Implements <a class="el" href="classWt_1_1WAbstractProxyModel.html#a856d190cc66edcf05462e2476f43b01d">Wt::WAbstractProxyModel</a>.</p> </div> </div> <a class="anchor" id="a219cfab137c4e6b5fcdcfdaa00f2c652"></a><!-- doxytag: member="Wt::WAggregateProxyModel::mapToSource" ref="a219cfab137c4e6b5fcdcfdaa00f2c652" args="(const WModelIndex &proxyIndex) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> Wt::WAggregateProxyModel::mapToSource </td> <td>(</td> <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> & </td> <td class="paramname"><em>proxyIndex</em></td><td>)</td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Maps a proxy model index to the source model. </p> <p>This method returns a model index in the source model that corresponds to the proxy model index <code>proxyIndex</code>.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#abd53119f51f426bbf3e332227a7c140f" title="Maps a source model index to the proxy model.">mapFromSource()</a> </dd></dl> <p>Implements <a class="el" href="classWt_1_1WAbstractProxyModel.html#ac36b0ee3110073578da8b999d1882bf7">Wt::WAbstractProxyModel</a>.</p> </div> </div> <a class="anchor" id="abe70985414fe0634927f72dbfb8f5341"></a><!-- doxytag: member="Wt::WAggregateProxyModel::parent" ref="abe70985414fe0634927f72dbfb8f5341" args="(const WModelIndex &index) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> Wt::WAggregateProxyModel::parent </td> <td>(</td> <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> & </td> <td class="paramname"><em>index</em></td><td>)</td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the parent for a model index. </p> <p>An implementation should use <a class="el" href="classWt_1_1WAbstractItemModel.html#ac837a73fe423255035ffb076946de122" title="Creates a model index for the given row and column.">createIndex()</a> to create a model index that corresponds to the parent of a given index.</p> <p>Note that the index itself may be stale (referencing a row/column within the parent that is outside the model geometry), but its parent (identified by the <a class="el" href="classWt_1_1WModelIndex.html#a44aabe692bba87ba144c1ab9a7f98eb3" title="Returns the internal pointer.">WModelIndex::internalPointer()</a>) is referencing an existing parent. A stale index can only be used while the model geometry is being updated, i.e. during the emission of the corresponding [rows/columns](Being)[Removed/Inserted]() signals.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#a7733a1eacce2d55230776d6b472cf14c" title="Returns the child index for the given row and column.">index()</a> </dd></dl> <p>Implements <a class="el" href="classWt_1_1WAbstractItemModel.html#ada454d45706ca0c1a0921dedd351c48c">Wt::WAbstractItemModel</a>.</p> </div> </div> <a class="anchor" id="abef979ff954c636e6a2b5b3d429a06a0"></a><!-- doxytag: member="Wt::WAggregateProxyModel::rowCount" ref="abef979ff954c636e6a2b5b3d429a06a0" args="(const WModelIndex &parent=WModelIndex()) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Wt::WAggregateProxyModel::rowCount </td> <td>(</td> <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> & </td> <td class="paramname"><em>parent</em> = <code><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>()</code></td><td>)</td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the number of rows. </p> <p>This returns the number of rows at index <code>parent</code>.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#aafec39e7801f9c4b19d6df601a130445" title="Returns the number of columns.">columnCount()</a> </dd></dl> <p>Implements <a class="el" href="classWt_1_1WAbstractItemModel.html#ab0709a8f71fd5df882f29bb29fd055f0">Wt::WAbstractItemModel</a>.</p> </div> </div> <a class="anchor" id="ae70467185337c5ef4fd1a14a2f1397f8"></a><!-- doxytag: member="Wt::WAggregateProxyModel::setHeaderData" ref="ae70467185337c5ef4fd1a14a2f1397f8" args="(int section, Orientation orientation, const boost::any &value, int role=EditRole)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Wt::WAggregateProxyModel::setHeaderData </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>section</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a> </td> <td class="paramname"><em>orientation</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const boost::any & </td> <td class="paramname"><em>value</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>role</em> = <code>EditRole</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Sets header data for a column or row. </p> <p>Returns <code>true</code> if the operation was successful.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#accb1c7428e090aa881a30eefa15141c1" title="Returns the row or column header data.">headerData()</a> </dd></dl> <p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#a57f5d417f933440db0d38ece7dd370f4">Wt::WAbstractItemModel</a>.</p> </div> </div> <a class="anchor" id="adcd5632ba87b439d87b2470bf028cf28"></a><!-- doxytag: member="Wt::WAggregateProxyModel::setSourceModel" ref="adcd5632ba87b439d87b2470bf028cf28" args="(WAbstractItemModel *sourceModel)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WAggregateProxyModel::setSourceModel </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a> * </td> <td class="paramname"><em>sourceModel</em></td><td>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Sets the source model. </p> <p>The source model provides the actual data for the proxy model.</p> <p>Ownership of the source model is <em>not</em> transferred. </p> <p>Reimplemented from <a class="el" href="classWt_1_1WAbstractProxyModel.html#a2e21723dd84569f7e42f118efd7eecce">Wt::WAbstractProxyModel</a>.</p> </div> </div> <a class="anchor" id="aa5fc80d856911d48ed0bd2efd5c376e2"></a><!-- doxytag: member="Wt::WAggregateProxyModel::sort" ref="aa5fc80d856911d48ed0bd2efd5c376e2" args="(int column, SortOrder order=AscendingOrder)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WAggregateProxyModel::sort </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>column</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="group__modelview.html#ga4173856040cf108a9c7360927a43ebac">Wt::SortOrder</a> </td> <td class="paramname"><em>order</em> = <code>AscendingOrder</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Sorts the model according to a particular column. </p> <p>If the model supports sorting, then it should emit the <a class="el" href="classWt_1_1WAbstractItemModel.html#ab377ac2fcb9de9d191bd1353665d1389" title="Signal emitted when the layout is about to be changed.">layoutAboutToBeChanged()</a> signal, rearrange its items, and afterwards emit the <a class="el" href="classWt_1_1WAbstractItemModel.html#afe7cb1d5186881f83aa8f0e452aaef66" title="Signal emitted when the layout is changed.">layoutChanged()</a> signal.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemModel.html#ab377ac2fcb9de9d191bd1353665d1389" title="Signal emitted when the layout is about to be changed.">layoutAboutToBeChanged()</a>, <a class="el" href="classWt_1_1WAbstractItemModel.html#afe7cb1d5186881f83aa8f0e452aaef66" title="Signal emitted when the layout is changed.">layoutChanged()</a> </dd></dl> <p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#a133931424d4daa8422bcdea911cda713">Wt::WAbstractItemModel</a>.</p> </div> </div> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr size="1"><address style="text-align: right; margin: 3px"><small> Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the C++ Web Toolkit (Wt)</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" border="0" style="vertical-align: middle; display: inline-block; height: 2em"></a> 1.7.5.1</small></address> </body> </html>