File: classIconPair.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 (532 lines) | stat: -rw-r--r-- 37,901 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
<!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 examples: IconPair 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="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>
    </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>
<div class="contents">
<h1>IconPair Class Reference<br>
<small>
[<a class="el" href="group__treelist.html">Treelist example</a>]</small>
</h1><!-- doxytag: class="IconPair" --><!-- doxytag: inherits="Wt::WCompositeWidget" -->An icon pair (identical to WIconPair).  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="IconPair_8h-source.html">IconPair.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for IconPair:</div>
<div class="dynsection">
<p><center><img src="classIconPair__inherit__graph.png" border="0" usemap="#IconPair__inherit__map" alt="Inheritance graph"></center>
<map name="IconPair__inherit__map">
<area shape="rect" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCompositeWidget.html" title="Wt::WCompositeWidget" alt="" coords="5,155,165,181"><area shape="rect" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html" title="Wt::WWidget" alt="" coords="37,80,133,107"><area shape="rect" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WObject.html" title="Wt::WObject" alt="" coords="37,5,133,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classIconPair-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 Slots</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#c4fc5158f2431ff46f81943db2c6edca">showIcon1</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set state to 0 (show icon 1).  <a href="#c4fc5158f2431ff46f81943db2c6edca"></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="classIconPair.html#4a06f61619db889f4f11adac37e45b42">showIcon2</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set state to 1 (show icon 2).  <a href="#4a06f61619db889f4f11adac37e45b42"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#e046514e1811766cbb4568ff5067de57">IconPair</a> (const std::string icon1URI, const std::string icon2URI, bool clickIsSwitch=true, <a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a> *<a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#3461e31818c4d2f516641bdaf508312a">parent</a>=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a two-state icon widget.  <a href="#e046514e1811766cbb4568ff5067de57"></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="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea">setState</a> (int num)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set which icon should be visible.  <a href="#349d74977ef2174b64bab37e2b9a27ea"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#8ad646ae8a69c65428c6244bb3af24e6">state</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current state.  <a href="#8ad646ae8a69c65428c6244bb3af24e6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#faed887865e6069e3c4689feed6cf43a">icon1</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the first icon image.  <a href="#faed887865e6069e3c4689feed6cf43a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#a7fcead5a40120b8765213c217351cda">icon2</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the second icon image.  <a href="#a7fcead5a40120b8765213c217351cda"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1EventSignal.html">Wt::EventSignal</a><br>
&lt; <a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WMouseEvent.html">Wt::WMouseEvent</a> &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#dd2ab8e518f79ef40d8000f32bc004dc">icon1Clicked</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Signal emitted when clicked while in state 0 (icon 1 is shown).  <a href="#dd2ab8e518f79ef40d8000f32bc004dc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1EventSignal.html">Wt::EventSignal</a><br>
&lt; <a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WMouseEvent.html">Wt::WMouseEvent</a> &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#aa5a73811e71280dcdf2ce4e9efc540a">icon2Clicked</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Signal emitted when clicked while in state 1 (icon 2 is shown).  <a href="#aa5a73811e71280dcdf2ce4e9efc540a"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#6f89d1e7951bcc1e060b9bc73bc97a7e">undoShowIcon1</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Undo function for prelearning <a class="el" href="classIconPair.html#c4fc5158f2431ff46f81943db2c6edca" title="Set state to 0 (show icon 1).">showIcon1()</a>.  <a href="#6f89d1e7951bcc1e060b9bc73bc97a7e"></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="classIconPair.html#28fe301bcdd61cb0f022cb3aac17de6d">undoShowIcon2</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Undo function for prelearning <a class="el" href="classIconPair.html#4a06f61619db889f4f11adac37e45b42" title="Set state to 1 (show icon 2).">showIcon2()</a>.  <a href="#28fe301bcdd61cb0f022cb3aac17de6d"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#c05f98096ddc1f784692a45714380dc7">impl_</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a">icon1_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">First icon.  <a href="#faea8a9d7016035313d7ff57386ecd0a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9">icon2_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Second icon.  <a href="#38a46596764e5dc56fec4d3e0c0479e9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#ae00701197f8c04483503c8f11be2fe9">previousState_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Undo state for prelearning stateless <a class="el" href="classIconPair.html#c4fc5158f2431ff46f81943db2c6edca" title="Set state to 0 (show icon 1).">showIcon1()</a> and <a class="el" href="classIconPair.html#4a06f61619db889f4f11adac37e45b42" title="Set state to 1 (show icon 2).">showIcon2()</a> slots.  <a href="#ae00701197f8c04483503c8f11be2fe9"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
An icon pair (identical to WIconPair). 
<p>
This widget manages two images, only one of which is shown at a single time.<p>
The widget may also react to click events, by changing state.<p>
This widget is part of the Wt treelist example, where it is used to represent the expand/collapse icons, and the corresponding map open/close icon.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classTreeNode.html" title="Example implementation of a single tree list node.">TreeNode</a> </dd></dl>

<p>Definition at line <a class="el" href="IconPair_8h-source.html#l00034">34</a> of file <a class="el" href="IconPair_8h-source.html">IconPair.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="e046514e1811766cbb4568ff5067de57"></a><!-- doxytag: member="IconPair::IconPair" ref="e046514e1811766cbb4568ff5067de57" args="(const std::string icon1URI, const std::string icon2URI, bool clickIsSwitch=true, Wt::WContainerWidget *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IconPair::IconPair           </td>
          <td>(</td>
          <td class="paramtype">const std::string&nbsp;</td>
          <td class="paramname"> <em>icon1URI</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string&nbsp;</td>
          <td class="paramname"> <em>icon2URI</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>clickIsSwitch</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a> *&nbsp;</td>
          <td class="paramname"> <em>parent</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Construct a two-state icon widget. 
<p>
The constructor takes the URI of the two icons. When clickIsSwitch is set true, clicking on the icon will switch state. 
<p>Definition at line <a class="el" href="IconPair_8C-source.html#l00012">12</a> of file <a class="el" href="IconPair_8C-source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00014"></a>00014   : <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCompositeWidget.html">Wt::WCompositeWidget</a>(parent),
<a name="l00015"></a>00015     <a class="code" href="classIconPair.html#c05f98096ddc1f784692a45714380dc7">impl_</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a>()),
<a name="l00016"></a>00016     <a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>(icon1URI, <a class="code" href="classIconPair.html#c05f98096ddc1f784692a45714380dc7">impl_</a>)),
<a name="l00017"></a>00017     <a class="code" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>(icon2URI, <a class="code" href="classIconPair.html#c05f98096ddc1f784692a45714380dc7">impl_</a>)),
<a name="l00018"></a>00018     <a class="code" href="classIconPair.html#dd2ab8e518f79ef40d8000f32bc004dc" title="Signal emitted when clicked while in state 0 (icon 1 is shown).">icon1Clicked</a>(<a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>()),
<a name="l00019"></a>00019     <a class="code" href="classIconPair.html#aa5a73811e71280dcdf2ce4e9efc540a" title="Signal emitted when clicked while in state 1 (icon 2 is shown).">icon2Clicked</a>(<a class="code" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>())
<a name="l00020"></a>00020 {
<a name="l00021"></a>00021   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCompositeWidget.html#a5a3e93a551fd41b180c6b28fa169946">setImplementation</a>(<a class="code" href="classIconPair.html#c05f98096ddc1f784692a45714380dc7">impl_</a>);
<a name="l00022"></a>00022 
<a name="l00023"></a>00023   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WObject.html#c00d775170f47e715894b24de6b869da">implementStateless</a>(&amp;<a class="code" href="classIconPair.html#c4fc5158f2431ff46f81943db2c6edca" title="Set state to 0 (show icon 1).">IconPair::showIcon1</a>, &amp;<a class="code" href="classIconPair.html#6f89d1e7951bcc1e060b9bc73bc97a7e" title="Undo function for prelearning showIcon1().">IconPair::undoShowIcon1</a>);
<a name="l00024"></a>00024   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WObject.html#c00d775170f47e715894b24de6b869da">implementStateless</a>(&amp;<a class="code" href="classIconPair.html#4a06f61619db889f4f11adac37e45b42" title="Set state to 1 (show icon 2).">IconPair::showIcon2</a>, &amp;<a class="code" href="classIconPair.html#28fe301bcdd61cb0f022cb3aac17de6d" title="Undo function for prelearning showIcon2().">IconPair::undoShowIcon2</a>);
<a name="l00025"></a>00025 
<a name="l00026"></a>00026   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCompositeWidget.html#ed7eec7b9a562b84fdb97f68f37ce694">setInline</a>(<span class="keyword">true</span>);
<a name="l00027"></a>00027 
<a name="l00028"></a>00028   <a class="code" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#0825c3ccbd4999afc1a88fafa6aa6fc7">hide</a>();
<a name="l00029"></a>00029 
<a name="l00030"></a>00030   <span class="keywordflow">if</span> (clickIsSwitch) {
<a name="l00031"></a>00031     <a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>().connect(SLOT(<a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>, <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#0825c3ccbd4999afc1a88fafa6aa6fc7">Wt::WImage::hide</a>));
<a name="l00032"></a>00032     <a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>().connect(SLOT(<a class="code" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>, <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#52dcef5a385ddfa0a8c3e6c20000f181">Wt::WImage::show</a>));
<a name="l00033"></a>00033 
<a name="l00034"></a>00034     <a class="code" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>().connect(SLOT(<a class="code" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>, <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#0825c3ccbd4999afc1a88fafa6aa6fc7">Wt::WImage::hide</a>));
<a name="l00035"></a>00035     <a class="code" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>().connect(SLOT(<a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>, <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#52dcef5a385ddfa0a8c3e6c20000f181">Wt::WImage::show</a>)); <span class="comment">//</span>
<a name="l00036"></a>00036 
<a name="l00037"></a>00037     <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCompositeWidget.html#d1eb3d24f374cb311ef88e43b3036503">decorationStyle</a>().setCursor(<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/namespaceWt.html#6dc0346a6ae888d6d4ab44f022e61eb6f860d39b9a2ba8f7d7359453bf15a37c">Wt::PointingHandCursor</a>);
<a name="l00038"></a>00038   }
<a name="l00039"></a>00039 } <span class="comment">//</span>
</pre></div>
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="349d74977ef2174b64bab37e2b9a27ea"></a><!-- doxytag: member="IconPair::setState" ref="349d74977ef2174b64bab37e2b9a27ea" args="(int num)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IconPair::setState           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>num</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set which icon should be visible. 
<p>
The first icon has number 0, and the second icon has number 1.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classIconPair.html#8ad646ae8a69c65428c6244bb3af24e6" title="Get the current state.">state()</a> </dd></dl>

<p>Definition at line <a class="el" href="IconPair_8C-source.html#l00041">41</a> of file <a class="el" href="IconPair_8C-source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00042"></a>00042 {
<a name="l00043"></a>00043   <span class="keywordflow">if</span> (num == 0) {
<a name="l00044"></a>00044     <a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#52dcef5a385ddfa0a8c3e6c20000f181">show</a>();
<a name="l00045"></a>00045     <a class="code" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#0825c3ccbd4999afc1a88fafa6aa6fc7">hide</a>();
<a name="l00046"></a>00046   } <span class="keywordflow">else</span> {
<a name="l00047"></a>00047     <a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#0825c3ccbd4999afc1a88fafa6aa6fc7">hide</a>();
<a name="l00048"></a>00048     <a class="code" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#52dcef5a385ddfa0a8c3e6c20000f181">show</a>();
<a name="l00049"></a>00049   }
<a name="l00050"></a>00050 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="8ad646ae8a69c65428c6244bb3af24e6"></a><!-- doxytag: member="IconPair::state" ref="8ad646ae8a69c65428c6244bb3af24e6" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int IconPair::state           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the current state. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState()</a> </dd></dl>

<p>Definition at line <a class="el" href="IconPair_8C-source.html#l00052">52</a> of file <a class="el" href="IconPair_8C-source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00053"></a>00053 {
<a name="l00054"></a>00054   <span class="keywordflow">return</span> (<a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWebWidget.html#594cbc1789cb8e2123bc5d968aa320ea">isHidden</a>() ? 1 : 0);
<a name="l00055"></a>00055 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="faed887865e6069e3c4689feed6cf43a"></a><!-- doxytag: member="IconPair::icon1" ref="faed887865e6069e3c4689feed6cf43a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>* IconPair::icon1           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the first icon image. 
<p>

<p>Definition at line <a class="el" href="IconPair_8h-source.html#l00061">61</a> of file <a class="el" href="IconPair_8h-source.html">IconPair.h</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00061"></a>00061 { <span class="keywordflow">return</span> <a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>; }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="a7fcead5a40120b8765213c217351cda"></a><!-- doxytag: member="IconPair::icon2" ref="a7fcead5a40120b8765213c217351cda" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>* IconPair::icon2           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the second icon image. 
<p>

<p>Definition at line <a class="el" href="IconPair_8h-source.html#l00065">65</a> of file <a class="el" href="IconPair_8h-source.html">IconPair.h</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00065"></a>00065 { <span class="keywordflow">return</span> <a class="code" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>; }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="c4fc5158f2431ff46f81943db2c6edca"></a><!-- doxytag: member="IconPair::showIcon1" ref="c4fc5158f2431ff46f81943db2c6edca" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IconPair::showIcon1           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set state to 0 (show icon 1). 
<p>

<p>Definition at line <a class="el" href="IconPair_8C-source.html#l00057">57</a> of file <a class="el" href="IconPair_8C-source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00058"></a>00058 {
<a name="l00059"></a>00059   <a class="code" href="classIconPair.html#ae00701197f8c04483503c8f11be2fe9" title="Undo state for prelearning stateless showIcon1() and showIcon2() slots.">previousState_</a> = (<a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWebWidget.html#594cbc1789cb8e2123bc5d968aa320ea">isHidden</a>() ? 1 : 0);
<a name="l00060"></a>00060   <a class="code" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(0);
<a name="l00061"></a>00061 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="4a06f61619db889f4f11adac37e45b42"></a><!-- doxytag: member="IconPair::showIcon2" ref="4a06f61619db889f4f11adac37e45b42" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IconPair::showIcon2           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set state to 1 (show icon 2). 
<p>

<p>Definition at line <a class="el" href="IconPair_8C-source.html#l00063">63</a> of file <a class="el" href="IconPair_8C-source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00064"></a>00064 {
<a name="l00065"></a>00065   <a class="code" href="classIconPair.html#ae00701197f8c04483503c8f11be2fe9" title="Undo state for prelearning stateless showIcon1() and showIcon2() slots.">previousState_</a> = (<a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWebWidget.html#594cbc1789cb8e2123bc5d968aa320ea">isHidden</a>() ? 1 : 0);
<a name="l00066"></a>00066   <a class="code" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(1);
<a name="l00067"></a>00067 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="6f89d1e7951bcc1e060b9bc73bc97a7e"></a><!-- doxytag: member="IconPair::undoShowIcon1" ref="6f89d1e7951bcc1e060b9bc73bc97a7e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IconPair::undoShowIcon1           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Undo function for prelearning <a class="el" href="classIconPair.html#c4fc5158f2431ff46f81943db2c6edca" title="Set state to 0 (show icon 1).">showIcon1()</a>. 
<p>

<p>Definition at line <a class="el" href="IconPair_8C-source.html#l00069">69</a> of file <a class="el" href="IconPair_8C-source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00070"></a>00070 {
<a name="l00071"></a>00071   <a class="code" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(<a class="code" href="classIconPair.html#ae00701197f8c04483503c8f11be2fe9" title="Undo state for prelearning stateless showIcon1() and showIcon2() slots.">previousState_</a>);
<a name="l00072"></a>00072 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="28fe301bcdd61cb0f022cb3aac17de6d"></a><!-- doxytag: member="IconPair::undoShowIcon2" ref="28fe301bcdd61cb0f022cb3aac17de6d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IconPair::undoShowIcon2           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Undo function for prelearning <a class="el" href="classIconPair.html#4a06f61619db889f4f11adac37e45b42" title="Set state to 1 (show icon 2).">showIcon2()</a>. 
<p>

<p>Definition at line <a class="el" href="IconPair_8C-source.html#l00074">74</a> of file <a class="el" href="IconPair_8C-source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00075"></a>00075 {
<a name="l00076"></a>00076   <a class="code" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(<a class="code" href="classIconPair.html#ae00701197f8c04483503c8f11be2fe9" title="Undo state for prelearning stateless showIcon1() and showIcon2() slots.">previousState_</a>);
<a name="l00077"></a>00077 } <span class="comment">//</span>
</pre></div>
<p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="c05f98096ddc1f784692a45714380dc7"></a><!-- doxytag: member="IconPair::impl_" ref="c05f98096ddc1f784692a45714380dc7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a>* <a class="el" href="classIconPair.html#c05f98096ddc1f784692a45714380dc7">IconPair::impl_</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="IconPair_8h-source.html#l00077">77</a> of file <a class="el" href="IconPair_8h-source.html">IconPair.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="faea8a9d7016035313d7ff57386ecd0a"></a><!-- doxytag: member="IconPair::icon1_" ref="faea8a9d7016035313d7ff57386ecd0a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>* <a class="el" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a">IconPair::icon1_</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
First icon. 
<p>

<p>Definition at line <a class="el" href="IconPair_8h-source.html#l00080">80</a> of file <a class="el" href="IconPair_8h-source.html">IconPair.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="38a46596764e5dc56fec4d3e0c0479e9"></a><!-- doxytag: member="IconPair::icon2_" ref="38a46596764e5dc56fec4d3e0c0479e9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>* <a class="el" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9">IconPair::icon2_</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Second icon. 
<p>

<p>Definition at line <a class="el" href="IconPair_8h-source.html#l00083">83</a> of file <a class="el" href="IconPair_8h-source.html">IconPair.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="dd2ab8e518f79ef40d8000f32bc004dc"></a><!-- doxytag: member="IconPair::icon1Clicked" ref="dd2ab8e518f79ef40d8000f32bc004dc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1EventSignal.html">Wt::EventSignal</a>&lt;<a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WMouseEvent.html">Wt::WMouseEvent</a>&gt;&amp; <a class="el" href="classIconPair.html#dd2ab8e518f79ef40d8000f32bc004dc">IconPair::icon1Clicked</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Signal emitted when clicked while in state 0 (icon 1 is shown). 
<p>

<p>Definition at line <a class="el" href="IconPair_8h-source.html#l00089">89</a> of file <a class="el" href="IconPair_8h-source.html">IconPair.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="aa5a73811e71280dcdf2ce4e9efc540a"></a><!-- doxytag: member="IconPair::icon2Clicked" ref="aa5a73811e71280dcdf2ce4e9efc540a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1EventSignal.html">Wt::EventSignal</a>&lt;<a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WMouseEvent.html">Wt::WMouseEvent</a>&gt;&amp; <a class="el" href="classIconPair.html#aa5a73811e71280dcdf2ce4e9efc540a">IconPair::icon2Clicked</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Signal emitted when clicked while in state 1 (icon 2 is shown). 
<p>

<p>Definition at line <a class="el" href="IconPair_8h-source.html#l00094">94</a> of file <a class="el" href="IconPair_8h-source.html">IconPair.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="ae00701197f8c04483503c8f11be2fe9"></a><!-- doxytag: member="IconPair::previousState_" ref="ae00701197f8c04483503c8f11be2fe9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classIconPair.html#ae00701197f8c04483503c8f11be2fe9">IconPair::previousState_</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Undo state for prelearning stateless <a class="el" href="classIconPair.html#c4fc5158f2431ff46f81943db2c6edca" title="Set state to 0 (show icon 1).">showIcon1()</a> and <a class="el" href="classIconPair.html#4a06f61619db889f4f11adac37e45b42" title="Set state to 1 (show icon 2).">showIcon2()</a> slots. 
<p>

<p>Definition at line <a class="el" href="IconPair_8h-source.html#l00098">98</a> of file <a class="el" href="IconPair_8h-source.html">IconPair.h</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li>/home/koen/project/wt/public-git/wt/examples/treelist/<a class="el" href="IconPair_8h-source.html">IconPair.h</a><li>/home/koen/project/wt/public-git/wt/examples/treelist/<a class="el" href="IconPair_8C-source.html">IconPair.C</a></ul>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:12 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>