File: classWt_1_1WModelIndex.html

package info (click to toggle)
witty 3.2.1-2%2Bdeb7u1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 70,436 kB
  • sloc: cpp: 117,095; ansic: 77,999; xml: 7,564; sh: 1,037; perl: 208; makefile: 144; java: 86; sql: 14
file content (571 lines) | stat: -rw-r--r-- 38,366 bytes parent folder | download
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
<!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::WModelIndex 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
   &#160;<span id="projectnumber">3.2.1</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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;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_1WModelIndex.html">WModelIndex</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Wt::WModelIndex 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::WModelIndex" -->
<p>A value class that describes an index to an item in a data model.  
 <a href="classWt_1_1WModelIndex.html#details">More...</a></p>

<p><code>#include &lt;Wt/WModelIndex&gt;</code></p>

<p><a href="classWt_1_1WModelIndex-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">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a29431c83f8ed71654e213ec4aae21813">WModelIndex</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an invalid <a class="el" href="classWt_1_1WModelIndex.html" title="A value class that describes an index to an item in a data model.">WModelIndex</a>.  <a href="#a29431c83f8ed71654e213ec4aae21813"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a0e6568dd7113662c3c378e2084729581">column</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the column for this model index.  <a href="#a0e6568dd7113662c3c378e2084729581"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#aa4f1385223391c46ee200a57672f6046">row</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the row for this model index.  <a href="#aa4f1385223391c46ee200a57672f6046"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a44aabe692bba87ba144c1ab9a7f98eb3">internalPointer</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the internal pointer.  <a href="#a44aabe692bba87ba144c1ab9a7f98eb3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">::uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a7ae49c4d0edaf9a520e6f5e8a62c3904">internalId</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the internal id.  <a href="#a7ae49c4d0edaf9a520e6f5e8a62c3904"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a2c01a7ea6cbb423eec3f4d12f26324c7">child</a> (int row, int column) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a model index for a child item.  <a href="#a2c01a7ea6cbb423eec3f4d12f26324c7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a0e6380caae0e785fdea9e30e0a95eec9">parent</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an index to the parent.  <a href="#a0e6380caae0e785fdea9e30e0a95eec9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">boost::any&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a7f05920329ca4b7fdbb10931afdb634e">data</a> (int role=DisplayRole) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns data in the model at this index.  <a href="#a7f05920329ca4b7fdbb10931afdb634e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">WFlags&lt; <a class="el" href="group__modelview.html#ga1d77c4de293aebfacbdde124de06b8b0">ItemFlag</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a04877832f757772b8dc7e6b30fb3638c">flags</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the flags for this item.  <a href="#a04877832f757772b8dc7e6b30fb3638c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a1d4b05ee51c5c6961d6123565fd77c82">isValid</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether the index is a real valid index.  <a href="#a1d4b05ee51c5c6961d6123565fd77c82"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a9fe91b75030a8a7373e3262fbbc6cad6">model</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the model to which this (valid) index is bound.  <a href="#a9fe91b75030a8a7373e3262fbbc6cad6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a6bb6b3624c4d75e3a495860e46c04f9e">operator==</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Comparison operator.  <a href="#a6bb6b3624c4d75e3a495860e46c04f9e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#ace2743acada845b3d4912e70c9787eac">operator!=</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Comparison operator.  <a href="#ace2743acada845b3d4912e70c9787eac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a29a0a0ab3e961b8087d95b7c62555cd1">operator&lt;</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Comparison operator.  <a href="#a29a0a0ab3e961b8087d95b7c62555cd1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a93c11e136a0fdc596eb745cc7fce7033">encodeAsRawIndex</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode to raw index (before a layout change).  <a href="#a93c11e136a0fdc596eb745cc7fce7033"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a084da8a1b7f4de1f1c126aeb721425e9">decodeFromRawIndex</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Decodes a raw index (after a layout change).  <a href="#a084da8a1b7f4de1f1c126aeb721425e9"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a7626f089fcd0440dff3f91a4b3ecb04e">encodeAsRawIndexes</a> (WModelIndexSet &amp;indexes)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility method for converting an entire set of indexes to raw.  <a href="#a7626f089fcd0440dff3f91a4b3ecb04e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static WModelIndexSet&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#a14760130fe8b1abb354c6bba3d60f07b">decodeFromRawIndexes</a> (const WModelIndexSet &amp;encodedIndexes)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility method to decode an entire set of raw indexes.  <a href="#a14760130fe8b1abb354c6bba3d60f07b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abe65ea47581a12a7db6caa9c0b2f8bec"></a><!-- doxytag: member="Wt::WModelIndex::isAncestor" ref="abe65ea47581a12a7db6caa9c0b2f8bec" args="(const Wt::WModelIndex &amp;i1, const Wt::WModelIndex &amp;i2)" -->
static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WModelIndex.html#abe65ea47581a12a7db6caa9c0b2f8bec">isAncestor</a> (const <a class="el" href="classWt_1_1WModelIndex.html">Wt::WModelIndex</a> &amp;i1, const <a class="el" href="classWt_1_1WModelIndex.html">Wt::WModelIndex</a> &amp;i2)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether i2 is an ancestor of i1. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A value class that describes an index to an item in a data model. </p>
<p>Indexes are used to indicate a particular item in a <a class="el" href="classWt_1_1WAbstractItemModel.html" title="An abstract model for use with Wt&#39;s view classes.">WAbstractItemModel</a>. An index points to the item by identifying its row and column location within a parent model index.</p>
<p>An index is immutable.</p>
<p>The default constructor creates an <em>invalid index</em>, which by convention indicates the parent of top level indexes. Thus, a model that specifies only a list or table of data (but no hierarchical data) would have as valid indexes only indexes that specify the <em>invalid</em> model index as parent.</p>
<p>Upon the model's choice, model indexes for hierarchical models may have an internal Id represented by a int64_t (<a class="el" href="classWt_1_1WModelIndex.html#a7ae49c4d0edaf9a520e6f5e8a62c3904" title="Returns the internal id.">internalId()</a>), a pointer (<a class="el" href="classWt_1_1WModelIndex.html#a44aabe692bba87ba144c1ab9a7f98eb3" title="Returns the internal pointer.">internalPointer()</a>).</p>
<p>Indexes are created by the model, within the protected <a class="el" href="classWt_1_1WAbstractItemModel.html#ac837a73fe423255035ffb076946de122" title="Creates a model index for the given row and column.">WAbstractItemModel::createIndex()</a> methods. In this way, models can define an internal pointer or id suitable for identifying parent items in the model.</p>
<p>When a model's geometry changes due to row or column insertions or removals, you may need to update your indexes, as otherwise they may no longer point to the same item (but instead still to the same row/column). Thus, if you store indexes and want to support model changes such as row or columns insertions/removals, then you need to react to the corresponding signals such as <a class="el" href="classWt_1_1WAbstractItemModel.html#a54c971088bb9b424f97fe31c17f8f12f" title="Signal emitted after a number of rows were inserted.">WAbstractItemModel::rowsInserted()</a> to update these indexes (i.e. shift them), or even remove them when the corresponding row/column has been removed.</p>
<p>When a model's layout changes (it is rearranging its contents for example in response to a sort operation), a similar problem arises. Some models support tracking of indexes over layout changes, using <em>raw</em> indexes. In reaction to <a class="el" href="classWt_1_1WAbstractItemModel.html#ab377ac2fcb9de9d191bd1353665d1389" title="Signal emitted when the layout is about to be changed.">WAbstractItemModel::layoutAboutToBeChanged()</a>, you should encode any index which you wish to recover after the layout change using <a class="el" href="classWt_1_1WModelIndex.html#a93c11e136a0fdc596eb745cc7fce7033" title="Encode to raw index (before a layout change).">encodeAsRawIndex()</a>, and in <a class="el" href="classWt_1_1WAbstractItemModel.html#afe7cb1d5186881f83aa8f0e452aaef66" title="Signal emitted when the layout is changed.">WAbstractItemModel::layoutChanged()</a> you can obtain an index that points to the same item using <a class="el" href="classWt_1_1WModelIndex.html#a084da8a1b7f4de1f1c126aeb721425e9" title="Decodes a raw index (after a layout change).">decodeFromRawIndex()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemModel.html" title="An abstract model for use with Wt&#39;s view classes.">WAbstractItemModel</a> </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a29431c83f8ed71654e213ec4aae21813"></a><!-- doxytag: member="Wt::WModelIndex::WModelIndex" ref="a29431c83f8ed71654e213ec4aae21813" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Wt::WModelIndex::WModelIndex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create an invalid <a class="el" href="classWt_1_1WModelIndex.html" title="A value class that describes an index to an item in a data model.">WModelIndex</a>. </p>
<p>Returns a model index for which <a class="el" href="classWt_1_1WModelIndex.html#a1d4b05ee51c5c6961d6123565fd77c82" title="Returns whether the index is a real valid index.">isValid()</a> return <code>false</code>. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a2c01a7ea6cbb423eec3f4d12f26324c7"></a><!-- doxytag: member="Wt::WModelIndex::child" ref="a2c01a7ea6cbb423eec3f4d12f26324c7" args="(int row, int column) 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::WModelIndex::child </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a model index for a child item. </p>
<p>This is a convenience method, and is only defined for indexes that are valid().</p>
<p>It has the same function as <a class="el" href="classWt_1_1WAbstractItemModel.html#a83f37bf04b8574b328c139b02523b8cb" title="Returns the child index for the given row and column.">WAbstractItemModel::index()</a> but is less general because the latter expression may also be used to retrieve top level children, i.e. when <code>index</code> is invalid.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemModel.html#a83f37bf04b8574b328c139b02523b8cb" title="Returns the child index for the given row and column.">WAbstractItemModel::index()</a>, <a class="el" href="classWt_1_1WModelIndex.html#a1d4b05ee51c5c6961d6123565fd77c82" title="Returns whether the index is a real valid index.">isValid()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a0e6568dd7113662c3c378e2084729581"></a><!-- doxytag: member="Wt::WModelIndex::column" ref="a0e6568dd7113662c3c378e2084729581" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Wt::WModelIndex::column </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the column for this model index. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WModelIndex.html#aa4f1385223391c46ee200a57672f6046" title="Returns the row for this model index.">row()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7f05920329ca4b7fdbb10931afdb634e"></a><!-- doxytag: member="Wt::WModelIndex::data" ref="a7f05920329ca4b7fdbb10931afdb634e" args="(int role=DisplayRole) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boost::any Wt::WModelIndex::data </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>role</em> = <code>DisplayRole</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns data in the model at this index. </p>
<p>This is a convenience method for <a class="el" href="classWt_1_1WAbstractItemModel.html#a9112b74d160f916ef75fb6c1c09dd8fe" title="Returns data at a specific model index.">WAbstractItemModel::data()</a>.</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.">WAbstractItemModel::data()</a> </dd>
<dd>
<a class="el" href="group__modelview.html#ga0ae864e12320f9f89172735e075ed068" title="Enumeration that indicates a role for a data item.">ItemDataRole</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a084da8a1b7f4de1f1c126aeb721425e9"></a><!-- doxytag: member="Wt::WModelIndex::decodeFromRawIndex" ref="a084da8a1b7f4de1f1c126aeb721425e9" args="() 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::WModelIndex::decodeFromRawIndex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Decodes a raw index (after a layout change). </p>
<p>A raw index can be decoded, within the context of a model that has been re-layed out.</p>
<p>This method returns a new index that points to the same item, or, <a class="el" href="classWt_1_1WModelIndex.html#a29431c83f8ed71654e213ec4aae21813" title="Create an invalid WModelIndex.">WModelIndex()</a> if the underlying model did not support encoding to raw indexes, or, if the item to which the index previously pointed, is no longer part of the model.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemModel.html#a85beaaea2e8609556543019618fd2a89" title="Converts a raw pointer to a model index.">WAbstractItemModel::fromRawIndex()</a>, <a class="el" href="classWt_1_1WAbstractItemModel.html#afe7cb1d5186881f83aa8f0e452aaef66" title="Signal emitted when the layout is changed.">WAbstractItemModel::layoutChanged()</a> </dd>
<dd>
<a class="el" href="classWt_1_1WModelIndex.html#a93c11e136a0fdc596eb745cc7fce7033" title="Encode to raw index (before a layout change).">encodeAsRawIndex()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a14760130fe8b1abb354c6bba3d60f07b"></a><!-- doxytag: member="Wt::WModelIndex::decodeFromRawIndexes" ref="a14760130fe8b1abb354c6bba3d60f07b" args="(const WModelIndexSet &amp;encodedIndexes)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">WModelIndexSet Wt::WModelIndex::decodeFromRawIndexes </td>
          <td>(</td>
          <td class="paramtype">const WModelIndexSet &amp;&#160;</td>
          <td class="paramname"><em>encodedIndexes</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Utility method to decode an entire set of raw indexes. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WModelIndex.html#a084da8a1b7f4de1f1c126aeb721425e9" title="Decodes a raw index (after a layout change).">decodeFromRawIndex()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a93c11e136a0fdc596eb745cc7fce7033"></a><!-- doxytag: member="Wt::WModelIndex::encodeAsRawIndex" ref="a93c11e136a0fdc596eb745cc7fce7033" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WModelIndex::encodeAsRawIndex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Encode to raw index (before a layout change). </p>
<p>Use this method to encode an index for which you want to recover an index after the layout change to the same item (which may still be in the model, but at a different location).</p>
<p>An index that has been encoded as a raw index cannot be used for anything but <a class="el" href="classWt_1_1WModelIndex.html#a084da8a1b7f4de1f1c126aeb721425e9" title="Decodes a raw index (after a layout change).">decodeFromRawIndex()</a> at a later point.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemModel.html#a5c4db8b3265c914f77efead35450f6dc" title="Converts a model index to a raw pointer that remains valid while the model&#39;s layout is changed...">WAbstractItemModel::toRawIndex()</a>, <a class="el" href="classWt_1_1WAbstractItemModel.html#ab377ac2fcb9de9d191bd1353665d1389" title="Signal emitted when the layout is about to be changed.">WAbstractItemModel::layoutAboutToBeChanged()</a> </dd>
<dd>
<a class="el" href="classWt_1_1WModelIndex.html#a084da8a1b7f4de1f1c126aeb721425e9" title="Decodes a raw index (after a layout change).">decodeFromRawIndex()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7626f089fcd0440dff3f91a4b3ecb04e"></a><!-- doxytag: member="Wt::WModelIndex::encodeAsRawIndexes" ref="a7626f089fcd0440dff3f91a4b3ecb04e" args="(WModelIndexSet &amp;indexes)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WModelIndex::encodeAsRawIndexes </td>
          <td>(</td>
          <td class="paramtype">WModelIndexSet &amp;&#160;</td>
          <td class="paramname"><em>indexes</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Utility method for converting an entire set of indexes to raw. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WModelIndex.html#a93c11e136a0fdc596eb745cc7fce7033" title="Encode to raw index (before a layout change).">encodeAsRawIndex()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a04877832f757772b8dc7e6b30fb3638c"></a><!-- doxytag: member="Wt::WModelIndex::flags" ref="a04877832f757772b8dc7e6b30fb3638c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">WFlags&lt; <a class="el" href="group__modelview.html#ga1d77c4de293aebfacbdde124de06b8b0">ItemFlag</a> &gt; Wt::WModelIndex::flags </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the flags for this item. </p>
<p>This is a convenience method for <a class="el" href="classWt_1_1WAbstractItemModel.html#ab5e60f81be797c0553a010eff5b9a592" title="Returns the flags for an item.">WAbstractItemModel::flags()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemModel.html#ab5e60f81be797c0553a010eff5b9a592" title="Returns the flags for an item.">WAbstractItemModel::flags()</a> </dd>
<dd>
<a class="el" href="group__modelview.html#ga1d77c4de293aebfacbdde124de06b8b0" title="Flags that indicate data item options.">ItemFlag</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7ae49c4d0edaf9a520e6f5e8a62c3904"></a><!-- doxytag: member="Wt::WModelIndex::internalId" ref="a7ae49c4d0edaf9a520e6f5e8a62c3904" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">::uint64_t Wt::WModelIndex::internalId </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the internal id. </p>
<p>The internal id is used by the model to retrieve the corresponding data.</p>
<p>This is only defined when the model created the index using WAbstractItemModel::createIndex(int, int, uint64_t) const.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WModelIndex.html#a44aabe692bba87ba144c1ab9a7f98eb3" title="Returns the internal pointer.">internalPointer()</a> </dd>
<dd>
WAbstractItemModel::createIndex(int, int, uint64_t) const </dd></dl>

</div>
</div>
<a class="anchor" id="a44aabe692bba87ba144c1ab9a7f98eb3"></a><!-- doxytag: member="Wt::WModelIndex::internalPointer" ref="a44aabe692bba87ba144c1ab9a7f98eb3" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* Wt::WModelIndex::internalPointer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the internal pointer. </p>
<p>The internal pointer is used by the model to retrieve the corresponding data.</p>
<p>This is only defined when the model created the index using <a class="el" href="classWt_1_1WAbstractItemModel.html#ac837a73fe423255035ffb076946de122" title="Creates a model index for the given row and column.">WAbstractItemModel::createIndex(int, int, void *) const</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WModelIndex.html#a7ae49c4d0edaf9a520e6f5e8a62c3904" title="Returns the internal id.">internalId()</a>, </dd>
<dd>
<a class="el" href="classWt_1_1WAbstractItemModel.html#ac837a73fe423255035ffb076946de122" title="Creates a model index for the given row and column.">WAbstractItemModel::createIndex(int, int, void *) const</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a1d4b05ee51c5c6961d6123565fd77c82"></a><!-- doxytag: member="Wt::WModelIndex::isValid" ref="a1d4b05ee51c5c6961d6123565fd77c82" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WModelIndex::isValid </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns whether the index is a real valid index. </p>
<p>Returns <code>true</code> when the index points to a valid data item, i.e. at a valid <a class="el" href="classWt_1_1WModelIndex.html#aa4f1385223391c46ee200a57672f6046" title="Returns the row for this model index.">row()</a> and <a class="el" href="classWt_1_1WModelIndex.html#a0e6568dd7113662c3c378e2084729581" title="Returns the column for this model index.">column()</a>.</p>
<p>An index may be invalid for two reasons:</p>
<ul>
<li>an operation requested an index that was out of model bounds,</li>
<li>or, the index corresponds to the model's top level root item, and is thus the parent index for top level items. </li>
</ul>

</div>
</div>
<a class="anchor" id="a9fe91b75030a8a7373e3262fbbc6cad6"></a><!-- doxytag: member="Wt::WModelIndex::model" ref="a9fe91b75030a8a7373e3262fbbc6cad6" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a>* Wt::WModelIndex::model </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the model to which this (valid) index is bound. </p>
<p>This returns the model that created the model index. </p>

</div>
</div>
<a class="anchor" id="ace2743acada845b3d4912e70c9787eac"></a><!-- doxytag: member="Wt::WModelIndex::operator!=" ref="ace2743acada845b3d4912e70c9787eac" args="(const WModelIndex &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WModelIndex::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Comparison operator. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WModelIndex.html#a6bb6b3624c4d75e3a495860e46c04f9e" title="Comparison operator.">operator==()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a29a0a0ab3e961b8087d95b7c62555cd1"></a><!-- doxytag: member="Wt::WModelIndex::operator&lt;" ref="a29a0a0ab3e961b8087d95b7c62555cd1" args="(const WModelIndex &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WModelIndex::operator&lt; </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Comparison operator. </p>
<p>Returns <code>true</code> if the index comes topologically before <code>other</code>.</p>
<p>Topological order follows the order in which the indexes would be displayed in a tree table view, from top to bottom followed by left to right. </p>

</div>
</div>
<a class="anchor" id="a6bb6b3624c4d75e3a495860e46c04f9e"></a><!-- doxytag: member="Wt::WModelIndex::operator==" ref="a6bb6b3624c4d75e3a495860e46c04f9e" args="(const WModelIndex &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WModelIndex::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Comparison operator. </p>
<p>Returns <code>true</code> only if the indexes point at the same data, in the same model. </p>

</div>
</div>
<a class="anchor" id="a0e6380caae0e785fdea9e30e0a95eec9"></a><!-- doxytag: member="Wt::WModelIndex::parent" ref="a0e6380caae0e785fdea9e30e0a95eec9" args="() 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::WModelIndex::parent </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns an index to the parent. </p>
<p>This is a convenience method for <a class="el" href="classWt_1_1WAbstractItemModel.html#ada454d45706ca0c1a0921dedd351c48c" title="Returns the parent for a model index.">WAbstractItemModel::parent()</a>.</p>
<p>For a top level data item, the <a class="el" href="classWt_1_1WModelIndex.html#a0e6380caae0e785fdea9e30e0a95eec9" title="Returns an index to the parent.">parent()</a> is an invalid index (see <a class="el" href="classWt_1_1WModelIndex.html#a29431c83f8ed71654e213ec4aae21813" title="Create an invalid WModelIndex.">WModelIndex()</a>).</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractItemModel.html#ada454d45706ca0c1a0921dedd351c48c" title="Returns the parent for a model index.">WAbstractItemModel::parent()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aa4f1385223391c46ee200a57672f6046"></a><!-- doxytag: member="Wt::WModelIndex::row" ref="aa4f1385223391c46ee200a57672f6046" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Wt::WModelIndex::row </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the row for this model index. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WModelIndex.html#a0e6568dd7113662c3c378e2084729581" title="Returns the column for this model index.">column()</a> </dd></dl>

</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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</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 Fri Mar 30 2012 for <a href="http://www.webtoolkit.eu/wt">the
C++ Web Toolkit (Wt)</a> by&nbsp;<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>