File: classWt_1_1WItemSelectionModel.html

package info (click to toggle)
witty 3.1.2-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 45,512 kB
  • ctags: 35,832
  • sloc: cpp: 69,469; ansic: 66,945; xml: 4,383; sh: 594; perl: 108; makefile: 106
file content (167 lines) | stat: -rw-r--r-- 10,833 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
<!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::WItemSelectionModel 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&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceWt.html">Wt</a>::<a class="el" href="classWt_1_1WItemSelectionModel.html">WItemSelectionModel</a>
  </div>
</div>
<div class="contents">
<h1>Wt::WItemSelectionModel Class Reference<br>
<small>
[<a class="el" href="group__modelview.html">Model/view system</a>]</small>
</h1><!-- doxytag: class="Wt::WItemSelectionModel" --><!-- doxytag: inherits="Wt::WObject" -->A class that represents a selection for a <a class="el" href="classWt_1_1WAbstractItemView.html" title="An abstract base class for item views.">WAbstractItemView</a>.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;Wt/WItemSelectionModel&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WItemSelectionModel:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WItemSelectionModel__inherit__graph.png" border="0" usemap="#Wt_1_1WItemSelectionModel__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1WItemSelectionModel__inherit__map">
<area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="43,5,139,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classWt_1_1WItemSelectionModel-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"><a class="anchor" name="42fb83302389cc2942cc09a198c0ee00"></a><!-- doxytag: member="Wt::WItemSelectionModel::model" ref="42fb83302389cc2942cc09a198c0ee00" args="() const " -->
<a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WItemSelectionModel.html#42fb83302389cc2942cc09a198c0ee00">model</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the <a class="el" href="classWt_1_1WAbstractItemModel.html" title="An abstract model for use with Wt&#39;s view classes.">WAbstractItemModel</a>. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">WModelIndexSet&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WItemSelectionModel.html#4c366757fa7e6b5b6519d34e3c2ac084">selectedIndexes</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the set of selected items.  <a href="#4c366757fa7e6b5b6519d34e3c2ac084"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WItemSelectionModel.html#96e391104f8846557ed95f5a93f4f452">isSelected</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;index) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns wheter an item is selected.  <a href="#96e391104f8846557ed95f5a93f4f452"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WItemSelectionModel.html#cbf2a0659f9b5f04becbf5dd02aff9b3">setSelectionBehavior</a> (<a class="el" href="namespaceWt.html#04aecd34ae0810219e82208a9890de13">SelectionBehavior</a> behavior)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the selection behaviour.  <a href="#cbf2a0659f9b5f04becbf5dd02aff9b3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceWt.html#04aecd34ae0810219e82208a9890de13">SelectionBehavior</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WItemSelectionModel.html#7bddf47881159cdd36651891954f3a39">selectionBehavior</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the selection behaviour.  <a href="#7bddf47881159cdd36651891954f3a39"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A class that represents a selection for a <a class="el" href="classWt_1_1WAbstractItemView.html" title="An abstract base class for item views.">WAbstractItemView</a>. 
<p>
This model is currently only used by <a class="el" href="classWt_1_1WTreeView.html" title="A view class that displays a model as a tree or tree table.">WTreeView</a>, and plays only a role in drag &amp; drop of an item selection.<p>
When an item selection is dragged from a view widget, the generated drop events will have as source object (see <a class="el" href="classWt_1_1WDropEvent.html#dfe27a00e34b7322a52bc7dc73d4d5af" title="Returns the source of the drag&amp;drop operation.">WDropEvent::source()</a>) this selection model.<p>
Although this class does not (yet) allow you to modify the selection, note that manipulations to the model may modify the selection (row insertions and removals may shift the selection, and row deletions may shrink the selection).<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Currently this class cannot be shared between multiple views.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WTreeView.html" title="A view class that displays a model as a tree or tree table.">WTreeView</a>, <a class="el" href="classWt_1_1WAbstractItemModel.html" title="An abstract model for use with Wt&#39;s view classes.">WAbstractItemModel</a> </dd></dl>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="4c366757fa7e6b5b6519d34e3c2ac084"></a><!-- doxytag: member="Wt::WItemSelectionModel::selectedIndexes" ref="4c366757fa7e6b5b6519d34e3c2ac084" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">WModelIndexSet Wt::WItemSelectionModel::selectedIndexes           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the set of selected items. 
<p>
The model indexes are returned as a set, topologically ordered (in the order they appear in the view). 
</div>
</div><p>
<a class="anchor" name="96e391104f8846557ed95f5a93f4f452"></a><!-- doxytag: member="Wt::WItemSelectionModel::isSelected" ref="96e391104f8846557ed95f5a93f4f452" args="(const WModelIndex &amp;index) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WItemSelectionModel::isSelected           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>index</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns wheter an item is selected. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WItemSelectionModel.html#4c366757fa7e6b5b6519d34e3c2ac084" title="Returns the set of selected items.">selectedIndexes()</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="cbf2a0659f9b5f04becbf5dd02aff9b3"></a><!-- doxytag: member="Wt::WItemSelectionModel::setSelectionBehavior" ref="cbf2a0659f9b5f04becbf5dd02aff9b3" args="(SelectionBehavior behavior)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WItemSelectionModel::setSelectionBehavior           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceWt.html#04aecd34ae0810219e82208a9890de13">SelectionBehavior</a>&nbsp;</td>
          <td class="paramname"> <em>behavior</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the selection behaviour. 
<p>
By default, the selection contains rows (<a class="el" href="namespaceWt.html#04aecd34ae0810219e82208a9890de13f392e7f86ea1d0807e54de5739011239">SelectRows</a>), in which case model indexes will always be have column 0, but represent the whole row.<p>
Alternatively, you can allow selection for individual items (<a class="el" href="namespaceWt.html#04aecd34ae0810219e82208a9890de13fcf79c96af1f3bd64b7b143fd1ec1126">SelectItems</a>). 
</div>
</div><p>
<a class="anchor" name="7bddf47881159cdd36651891954f3a39"></a><!-- doxytag: member="Wt::WItemSelectionModel::selectionBehavior" ref="7bddf47881159cdd36651891954f3a39" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceWt.html#04aecd34ae0810219e82208a9890de13">SelectionBehavior</a> Wt::WItemSelectionModel::selectionBehavior           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the selection behaviour. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WItemSelectionModel.html#cbf2a0659f9b5f04becbf5dd02aff9b3" title="Sets the selection behaviour.">setSelectionBehavior()</a> </dd></dl>

</div>
</div><p>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:07 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by&nbsp;<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>