1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Wt: Wt::WAggregateProxyModel Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<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>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="namespaceWt.html">Wt</a>::<a class="el" href="classWt_1_1WAggregateProxyModel.html">WAggregateProxyModel</a>
</div>
</div>
<div class="contents">
<h1>Wt::WAggregateProxyModel Class Reference<br>
<small>
[<a class="el" href="group__modelview.html">Model/view system</a>]</small>
</h1><!-- doxytag: class="Wt::WAggregateProxyModel" --><!-- doxytag: inherits="Wt::WAbstractProxyModel" -->A proxy model for Wt's item models that provides column aggregation.
<a href="#_details">More...</a>
<p>
<code>#include <Wt/WAggregateProxyModel></code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WAggregateProxyModel:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WAggregateProxyModel__inherit__graph.png" border="0" usemap="#Wt_1_1WAggregateProxyModel__inherit__map" alt="Inheritance graph"></center>
<map name="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,184,181"><area shape="rect" href="classWt_1_1WAbstractItemModel.html" title="An abstract model for use with Wt's view classes." alt="" coords="15,80,180,107"><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="49,5,145,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classWt_1_1WAggregateProxyModel-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#6c7afd5908bad7f007f30f100b991c78">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="#6c7afd5908bad7f007f30f100b991c78"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cecfb768c8cd2fbb0ba7c2aeb90418d0"></a><!-- doxytag: member="Wt::WAggregateProxyModel::~WAggregateProxyModel" ref="cecfb768c8cd2fbb0ba7c2aeb90418d0" args="()" -->
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#cecfb768c8cd2fbb0ba7c2aeb90418d0">~WAggregateProxyModel</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#dd590f7e0789812c73874ab2bd4161bf">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="#dd590f7e0789812c73874ab2bd4161bf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2bfba95d10664dfecbbf8360c7612f93"></a><!-- doxytag: member="Wt::WAggregateProxyModel::removeAggregate" ref="2bfba95d10664dfecbbf8360c7612f93" args="(int parentColumn)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#2bfba95d10664dfecbbf8360c7612f93">removeAggregate</a> (int parentColumn)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes an aggregate that was previously added. <br></td></tr>
<tr><td class="memItemLeft" nowrap 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#bd53119f51f426bbf3e332227a7c140f">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="#bd53119f51f426bbf3e332227a7c140f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap 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#219cfab137c4e6b5fcdcfdaa00f2c652">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="#219cfab137c4e6b5fcdcfdaa00f2c652"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#dcd5632ba87b439d87b2470bf028cf28">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="#dcd5632ba87b439d87b2470bf028cf28"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#ccddd20f3e9110bb7a1797ec9ed84085">expandColumn</a> (int column)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Expands a column. <a href="#ccddd20f3e9110bb7a1797ec9ed84085"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#44082771ca19bdcd648e4cb6c4cf08be">collapseColumn</a> (int column)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Collapses a column. <a href="#44082771ca19bdcd648e4cb6c4cf08be"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#afec39e7801f9c4b19d6df601a130445">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="#afec39e7801f9c4b19d6df601a130445"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#bef979ff954c636e6a2b5b3d429a06a0">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="#bef979ff954c636e6a2b5b3d429a06a0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual WFlags< <a class="el" href="group__modelview.html#gfb18b4339442f1327c2a65850f3d8a53">HeaderFlag</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#ad873c5eeb40d473bb7127cfc2022658">headerFlags</a> (int section, <a class="el" href="namespaceWt.html#2a8d45559e16a0185bf61bfad0a67912">Orientation</a> orientation=Horizontal) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the flags for a header. <a href="#ad873c5eeb40d473bb7127cfc2022658"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#e70467185337c5ef4fd1a14a2f1397f8">setHeaderData</a> (int section, <a class="el" href="namespaceWt.html#2a8d45559e16a0185bf61bfad0a67912">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="#e70467185337c5ef4fd1a14a2f1397f8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual boost::any </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#ccb1c7428e090aa881a30eefa15141c1">headerData</a> (int section, <a class="el" href="namespaceWt.html#2a8d45559e16a0185bf61bfad0a67912">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="#ccb1c7428e090aa881a30eefa15141c1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap 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#be70985414fe0634927f72dbfb8f5341">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="#be70985414fe0634927f72dbfb8f5341"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap 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#7733a1eacce2d55230776d6b472cf14c">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="#7733a1eacce2d55230776d6b472cf14c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAggregateProxyModel.html#a5fc80d856911d48ed0bd2efd5c376e2">sort</a> (int column, <a class="el" href="group__modelview.html#g4173856040cf108a9c7360927a43ebac">SortOrder</a> order=AscendingOrder)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sorts the model according to a particular column. <a href="#a5fc80d856911d48ed0bd2efd5c376e2"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A proxy model for Wt's item models that provides column aggregation.
<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>
To use this proxy model, you should provide a source model using <a class="el" href="classWt_1_1WAggregateProxyModel.html#dcd5632ba87b439d87b2470bf028cf28" title="Sets the source model.">setSourceModel()</a>, and define column ranges that can be aggregated using <a class="el" href="classWt_1_1WAggregateProxyModel.html#dd590f7e0789812c73874ab2bd4161bf" title="Adds a new column aggregation definition.">addAggregate()</a>.<p>
Example: <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#2a8d45559e16a0185bf61bfad0a67912c2ebf22b096a22b18eef23e736aa2e28" 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#6c7afd5908bad7f007f30f100b991c78" title="Constructor.">WAggregateProxyModel</a> *proxy = <span class="keyword">new</span> <a class="code" href="classWt_1_1WAggregateProxyModel.html#6c7afd5908bad7f007f30f100b991c78" 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#gg9686ea88ce4db2c0a12ea84452f60133cf5dee884803e93b444f8bd222956bd6" 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 align="center">
<img src="WAggregateProxyModel-1.png" alt="WAggregateProxyModel-1.png">
<p><strong>A WTreeView using a WAggregateProxyModel</strong></p></div>
<dl class="note" compact><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>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="6c7afd5908bad7f007f30f100b991c78"></a><!-- doxytag: member="Wt::WAggregateProxyModel::WAggregateProxyModel" ref="6c7afd5908bad7f007f30f100b991c78" 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>
Sets up the proxy without aggregation functionality.
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="dd590f7e0789812c73874ab2bd4161bf"></a><!-- doxytag: member="Wt::WAggregateProxyModel::addAggregate" ref="dd590f7e0789812c73874ab2bd4161bf" 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><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds a new column aggregation definition.
<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> <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>
Aggregation definitions can be nested, but should be strictly hierarchical.<p>
The aggregate column will initially be collapsed.<p>
Only one aggregate can be defined per <code>parentColumn</code>.
</div>
</div><p>
<a class="anchor" name="bd53119f51f426bbf3e332227a7c140f"></a><!-- doxytag: member="Wt::WAggregateProxyModel::mapFromSource" ref="bd53119f51f426bbf3e332227a7c140f" 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>
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#219cfab137c4e6b5fcdcfdaa00f2c652" title="Maps a proxy model index to the source model.">mapToSource()</a>.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#219cfab137c4e6b5fcdcfdaa00f2c652" title="Maps a proxy model index to the source model.">mapToSource()</a> </dd></dl>
<p>Implements <a class="el" href="classWt_1_1WAbstractProxyModel.html#856d190cc66edcf05462e2476f43b01d">Wt::WAbstractProxyModel</a>.</p>
</div>
</div><p>
<a class="anchor" name="219cfab137c4e6b5fcdcfdaa00f2c652"></a><!-- doxytag: member="Wt::WAggregateProxyModel::mapToSource" ref="219cfab137c4e6b5fcdcfdaa00f2c652" 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>
This method returns a model index in the source model that corresponds to the proxy model index <code>proxyIndex</code>.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#bd53119f51f426bbf3e332227a7c140f" title="Maps a source model index to the proxy model.">mapFromSource()</a> </dd></dl>
<p>Implements <a class="el" href="classWt_1_1WAbstractProxyModel.html#c36b0ee3110073578da8b999d1882bf7">Wt::WAbstractProxyModel</a>.</p>
</div>
</div><p>
<a class="anchor" name="dcd5632ba87b439d87b2470bf028cf28"></a><!-- doxytag: member="Wt::WAggregateProxyModel::setSourceModel" ref="dcd5632ba87b439d87b2470bf028cf28" 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>
The source model provides the actual data for the proxy model.<p>
Ownership of the source model is <em>not</em> transferred.
<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractProxyModel.html#80f03a23bcd5d34eef1091a4891cda87">Wt::WAbstractProxyModel</a>.</p>
</div>
</div><p>
<a class="anchor" name="ccddd20f3e9110bb7a1797ec9ed84085"></a><!-- doxytag: member="Wt::WAggregateProxyModel::expandColumn" ref="ccddd20f3e9110bb7a1797ec9ed84085" 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>
Expands a column. This may only be called by a view when the <a class="el" href="group__modelview.html#ggfb18b4339442f1327c2a65850f3d8a5355020edcd8019b7fd0b330283b194929" title="Flag that indicates that the column can be expanded.">Wt::ColumnIsCollapsed</a> flag is set.<p>
The default implementation does nothing.<p>
<dl class="see" compact><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#d7da483e201a6a0d717438049ce1f1d1">Wt::WAbstractItemModel</a>.</p>
</div>
</div><p>
<a class="anchor" name="44082771ca19bdcd648e4cb6c4cf08be"></a><!-- doxytag: member="Wt::WAggregateProxyModel::collapseColumn" ref="44082771ca19bdcd648e4cb6c4cf08be" 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>
Collapses a column. This may only be called by a view when the <a class="el" href="group__modelview.html#ggfb18b4339442f1327c2a65850f3d8a53db54e2a704ae37581af6cc33828fef71" title="Flag that indicates that the column was expanded to the left.">Wt::ColumnIsExpandedLeft</a> or <a class="el" href="group__modelview.html#ggfb18b4339442f1327c2a65850f3d8a53b8f2b2845555220afc9c3c24c43194cd" title="Flag that indicates that the column was expanded to the right.">Wt::ColumnIsExpandedRight</a> flag is set.<p>
The default implementation does nothing.<p>
<dl class="see" compact><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#ccd1f651c0b01ae897a52b9ad4b0f553">Wt::WAbstractItemModel</a>.</p>
</div>
</div><p>
<a class="anchor" name="afec39e7801f9c4b19d6df601a130445"></a><!-- doxytag: member="Wt::WAggregateProxyModel::columnCount" ref="afec39e7801f9c4b19d6df601a130445" 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>
This returns the number of columns at index <code>parent</code>.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#bef979ff954c636e6a2b5b3d429a06a0" title="Returns the number of rows.">rowCount()</a> </dd></dl>
<p>Implements <a class="el" href="classWt_1_1WAbstractItemModel.html#bcf7912a95a0a60f8e9b1c37d30b8383">Wt::WAbstractItemModel</a>.</p>
</div>
</div><p>
<a class="anchor" name="bef979ff954c636e6a2b5b3d429a06a0"></a><!-- doxytag: member="Wt::WAggregateProxyModel::rowCount" ref="bef979ff954c636e6a2b5b3d429a06a0" 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>
This returns the number of rows at index <code>parent</code>.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#afec39e7801f9c4b19d6df601a130445" title="Returns the number of columns.">columnCount()</a> </dd></dl>
<p>Implements <a class="el" href="classWt_1_1WAbstractItemModel.html#b0709a8f71fd5df882f29bb29fd055f0">Wt::WAbstractItemModel</a>.</p>
</div>
</div><p>
<a class="anchor" name="ad873c5eeb40d473bb7127cfc2022658"></a><!-- doxytag: member="Wt::WAggregateProxyModel::headerFlags" ref="ad873c5eeb40d473bb7127cfc2022658" 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#gfb18b4339442f1327c2a65850f3d8a53">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#2a8d45559e16a0185bf61bfad0a67912">Orientation</a> </td>
<td class="paramname"> <em>orientation</em> = <code>Horizontal</code></td><td> </td>
</tr>
<tr>
<td></td>
<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>
The default implementation returns no flags set.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__modelview.html#gfb18b4339442f1327c2a65850f3d8a53" title="Flags that indicate header options.">Wt::HeaderFlag</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#6bb2a7e70f816606351be4a23c453a49">Wt::WAbstractItemModel</a>.</p>
</div>
</div><p>
<a class="anchor" name="e70467185337c5ef4fd1a14a2f1397f8"></a><!-- doxytag: member="Wt::WAggregateProxyModel::setHeaderData" ref="e70467185337c5ef4fd1a14a2f1397f8" 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#2a8d45559e16a0185bf61bfad0a67912">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><td> </td>
</tr>
<tr>
<td></td>
<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>
Returns <code>true</code> if the operation was successful.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#ccb1c7428e090aa881a30eefa15141c1" title="Returns the row or column header data.">headerData()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#57f5d417f933440db0d38ece7dd370f4">Wt::WAbstractItemModel</a>.</p>
</div>
</div><p>
<a class="anchor" name="ccb1c7428e090aa881a30eefa15141c1"></a><!-- doxytag: member="Wt::WAggregateProxyModel::headerData" ref="ccb1c7428e090aa881a30eefa15141c1" 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#2a8d45559e16a0185bf61bfad0a67912">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><td> </td>
</tr>
<tr>
<td></td>
<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>
When <code>orientation</code> is <a class="el" href="namespaceWt.html#2a8d45559e16a0185bf61bfad0a67912c2ebf22b096a22b18eef23e736aa2e28">Horizontal</a>, <code>section</code> is a column number, when <code>orientation</code> is <a class="el" href="namespaceWt.html#2a8d45559e16a0185bf61bfad0a67912f916b7ec24727db2d972f0770170c7f5">Vertical</a>, <code>section</code> is a row number.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractProxyModel.html#816f887f847e838e6b2cb3539f1614cd" title="Returns data at a specific model index.">data()</a>, <a class="el" href="classWt_1_1WAggregateProxyModel.html#e70467185337c5ef4fd1a14a2f1397f8" title="Sets header data for a column or row.">setHeaderData()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#86bbab7c809fce4de9b5cb543b2fb124">Wt::WAbstractItemModel</a>.</p>
</div>
</div><p>
<a class="anchor" name="be70985414fe0634927f72dbfb8f5341"></a><!-- doxytag: member="Wt::WAggregateProxyModel::parent" ref="be70985414fe0634927f72dbfb8f5341" 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>
You should use <a class="el" href="classWt_1_1WAbstractItemModel.html#c837a73fe423255035ffb076946de122" 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>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#7733a1eacce2d55230776d6b472cf14c" 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#da454d45706ca0c1a0921dedd351c48c">Wt::WAbstractItemModel</a>.</p>
</div>
</div><p>
<a class="anchor" name="7733a1eacce2d55230776d6b472cf14c"></a><!-- doxytag: member="Wt::WAggregateProxyModel::index" ref="7733a1eacce2d55230776d6b472cf14c" 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><td> </td>
</tr>
<tr>
<td></td>
<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>
When implementing this method, you can use <a class="el" href="classWt_1_1WAbstractItemModel.html#c837a73fe423255035ffb076946de122" 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>
If the location is invalid (out of bounds at the parent), then an invalid index must be returned.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAggregateProxyModel.html#be70985414fe0634927f72dbfb8f5341" title="Returns the parent for a model index.">parent()</a> </dd></dl>
<p>Implements <a class="el" href="classWt_1_1WAbstractItemModel.html#83f37bf04b8574b328c139b02523b8cb">Wt::WAbstractItemModel</a>.</p>
</div>
</div><p>
<a class="anchor" name="a5fc80d856911d48ed0bd2efd5c376e2"></a><!-- doxytag: member="Wt::WAggregateProxyModel::sort" ref="a5fc80d856911d48ed0bd2efd5c376e2" 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#g4173856040cf108a9c7360927a43ebac">Wt::SortOrder</a> </td>
<td class="paramname"> <em>order</em> = <code>AscendingOrder</code></td><td> </td>
</tr>
<tr>
<td></td>
<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>
If the model supports sorting, then it should emit the <a class="el" href="classWt_1_1WAbstractItemModel.html#abe99309231808a48c8f1db2c462f8e2" 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#5a6a3810afb5333405887df52827db02" title="Signal emitted when the layout is changed.">layoutChanged()</a> signal.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemModel.html#abe99309231808a48c8f1db2c462f8e2" title="Signal emitted when the layout is about to be changed.">layoutAboutToBeChanged()</a>, <a class="el" href="classWt_1_1WAbstractItemModel.html#5a6a3810afb5333405887df52827db02" title="Signal emitted when the layout is changed.">layoutChanged()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#133931424d4daa8422bcdea911cda713">Wt::WAbstractItemModel</a>.</p>
</div>
</div><p>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:06 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
</body>
</html>
|