| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 
 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Qt Toolkit - QIconView Class</title><style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }body { background: white; color: black; }
--></style>
</head><body bgcolor="#ffffff">
<table width="100%">
<tr><td><a href="index.html">
<img width="100" height="100" src="qtlogo.png"
alt="Home" border="0"><img width="100"
height="100" src="face.png" alt="Home" border="0">
</a><td valign=top><div align=right><img src="dochead.png" width="472" height="27"><br>
<a href="classes.html"><b>Classes</b></a>
-<a href="annotated.html">Annotated</a>
- <a href="hierarchy.html">Tree</a>
-<a href="functions.html">Functions</a>
-<a href="index.html">Home</a>
-<a href="topicals.html"><b>Structure</b></a>
</div>
</table>
<h1 align=center>QIconView Class Reference<br><small>[ <a href="iconview.html">iconview module</a> ]</small></h1><br clear="all">
<p>
The QIconView class provides an area with movable labelled icons.
<a href="#details">More...</a>
<p>
<code>#include <<a href="qiconview-h.html">qiconview.h</a>></code>
<p>
Inherits <a href="qscrollview.html">QScrollView</a>.
<p><a href="qiconview-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class="fn">enum<a href="#SelectionMode"><b>SelectionMode</b></a>{Single=0, Multi, Extended, NoSelection}</div>
<li><div class="fn">enum<a href="#Arrangement"><b>Arrangement</b></a>{LeftToRight=0, TopToBottom}</div>
<li><div class="fn">enum<a href="#ResizeMode"><b>ResizeMode</b></a>{Fixed=0, Adjust}</div>
<li><div class="fn">enum<a href="#ItemTextPos"><b>ItemTextPos</b></a>{Bottom=0, Right}</div>
<li><div class="fn"><a href="#c34dd2"><b>QIconView</b></a>(QWidget*parent=0, constchar*name=0, WFlagsf=0)</div>
<li><div class="fn">virtual<a href="#1eb1d0"><b>~QIconView</b></a>()</div>
<li><div class="fn">virtualvoid<a href="#e330e3"><b>insertItem</b></a>(QIconViewItem*item, QIconViewItem*after=0L)</div>
<li><div class="fn">virtualvoid<a href="#e89028"><b>takeItem</b></a>(QIconViewItem*item)</div>
<li><div class="fn">int<a href="#fb331e"><b>index</b></a>(constQIconViewItem*item)const</div>
<li><div class="fn">QIconViewItem*<a href="#e30745"><b>firstItem</b></a>()const</div>
<li><div class="fn">QIconViewItem*<a href="#dcdad6"><b>lastItem</b></a>()const</div>
<li><div class="fn">QIconViewItem*<a href="#4b5a9c"><b>currentItem</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#5cdf69"><b>setCurrentItem</b></a>(QIconViewItem*item)</div>
<li><div class="fn">virtualvoid<a href="#564205"><b>setSelected</b></a>(QIconViewItem*item, bools, boolcb=FALSE)</div>
<li><div class="fn">uint<a href="#7420e0"><b>count</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#7eddc3"><b>setSelectionMode</b></a>(SelectionModem)</div>
<li><div class="fn">SelectionMode<a href="#c11bd2"><b>selectionMode</b></a>()const</div>
<li><div class="fn">QIconViewItem*<a href="#249521"><b>findItem</b></a>(constQPoint&pos)const</div>
<li><div class="fn">QIconViewItem*<a href="#664873"><b>findItem</b></a>(constQString&text)const</div>
<li><div class="fn">virtualvoid<a href="#dde4aa"><b>selectAll</b></a>(boolselect)</div>
<li><div class="fn">virtualvoid<a href="#bafd29"><b>clearSelection</b></a>()</div>
<li><div class="fn">virtualvoid<a href="#7359d3"><b>invertSelection</b></a>()</div>
<li><div class="fn">virtualvoid<a href="#b1ae03"><b>repaintItem</b></a>(QIconViewItem*item)</div>
<li><div class="fn">void<a href="#315ad3"><b>ensureItemVisible</b></a>(QIconViewItem*item)</div>
<li><div class="fn">QIconViewItem*<a href="#1ae627"><b>findFirstVisibleItem</b></a>(constQRect&r)const</div>
<li><div class="fn">QIconViewItem*<a href="#8483a2"><b>findLastVisibleItem</b></a>(constQRect&r)const</div>
<li><div class="fn">virtualvoid<a href="#50ab3c"><b>clear</b></a>()</div>
<li><div class="fn">virtualvoid<a href="#e4de51"><b>setGridX</b></a>(intrx)</div>
<li><div class="fn">virtualvoid<a href="#3d01f7"><b>setGridY</b></a>(intry)</div>
<li><div class="fn">int<a href="#e09530"><b>gridX</b></a>()const</div>
<li><div class="fn">int<a href="#2bb36d"><b>gridY</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#4919c2"><b>setSpacing</b></a>(intsp)</div>
<li><div class="fn">int<a href="#56c2a5"><b>spacing</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#39d892"><b>setItemTextPos</b></a>(ItemTextPospos)</div>
<li><div class="fn">ItemTextPos<a href="#b52b54"><b>itemTextPos</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#562836"><b>setItemTextBackground</b></a>(constQBrush&b)</div>
<li><div class="fn">QBrush<a href="#951aa7"><b>itemTextBackground</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#6d0e1b"><b>setArrangement</b></a>(Arrangementam)</div>
<li><div class="fn">Arrangement<a href="#5a6b0f"><b>arrangement</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#7ee766"><b>setResizeMode</b></a>(ResizeModeam)</div>
<li><div class="fn">ResizeMode<a href="#f71edb"><b>resizeMode</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#eaf4d8"><b>setMaxItemWidth</b></a>(intw)</div>
<li><div class="fn">int<a href="#ad3821"><b>maxItemWidth</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#b59c0b"><b>setMaxItemTextLength</b></a>(intw)</div>
<li><div class="fn">int<a href="#620ee7"><b>maxItemTextLength</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#456d21"><b>setAutoArrange</b></a>(boolb)</div>
<li><div class="fn">bool<a href="#def500"><b>autoArrange</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#8e4de6"><b>setShowToolTips</b></a>(boolb)</div>
<li><div class="fn">bool<a href="#1ac0b4"><b>showToolTips</b></a>()const</div>
<li><div class="fn">void<a href="#bb74b6"><b>setSorting</b></a>(boolsort, boolascending=TRUE)</div>
<li><div class="fn">bool<a href="#a0d422"><b>sorting</b></a>()const</div>
<li><div class="fn">bool<a href="#2279f0"><b>sortDirection</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#79d742"><b>setItemsMovable</b></a>(boolb)</div>
<li><div class="fn">bool<a href="#a665fb"><b>itemsMovable</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#588a44"><b>setWordWrapIconText</b></a>(boolb)</div>
<li><div class="fn">bool<a href="#417e12"><b>wordWrapIconText</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#e9e83a"><b>sort</b></a>(boolascending=TRUE)</div>
</ul>
<h2>Public Slots</h2>
<ul>
<li><div class="fn">virtualvoid<a href="#0afe2f"><b>arrangeItemsInGrid</b></a>(constQSize&grid, boolupdate=TRUE)</div>
<li><div class="fn">virtualvoid<a href="#d31996"><b>arrangeItemsInGrid</b></a>(boolupdate=TRUE)</div>
<li><div class="fn">virtualvoid<b>updateContents</b>()(internal)</div>
</ul>
<h2>Signals</h2>
<ul>
<li><div class="fn">void<a href="#2b18b6"><b>selectionChanged</b></a>()</div>
<li><div class="fn">void<a href="#708086"><b>selectionChanged</b></a>(QIconViewItem*item)</div>
<li><div class="fn">void<a href="#da72bc"><b>currentChanged</b></a>(QIconViewItem*item)</div>
<li><div class="fn">void<a href="#6320c9"><b>clicked</b></a>(QIconViewItem*)</div>
<li><div class="fn">void<a href="#38d855"><b>clicked</b></a>(QIconViewItem*, constQPoint&)</div>
<li><div class="fn">void<a href="#fa9379"><b>pressed</b></a>(QIconViewItem*)</div>
<li><div class="fn">void<a href="#bed3f8"><b>pressed</b></a>(QIconViewItem*, constQPoint&)</div>
<li><div class="fn">void<a href="#11199f"><b>doubleClicked</b></a>(QIconViewItem*item)</div>
<li><div class="fn">void<a href="#a90915"><b>returnPressed</b></a>(QIconViewItem*item)</div>
<li><div class="fn">void<a href="#f86bc8"><b>rightButtonClicked</b></a>(QIconViewItem*item, constQPoint&pos)</div>
<li><div class="fn">void<a href="#f5e12f"><b>rightButtonPressed</b></a>(QIconViewItem*item, constQPoint&pos)</div>
<li><div class="fn">void<a href="#9c591c"><b>mouseButtonPressed</b></a>(intbutton, QIconViewItem*item, constQPoint&pos)</div>
<li><div class="fn">void<a href="#974828"><b>mouseButtonClicked</b></a>(intbutton, QIconViewItem*item, constQPoint&pos)</div>
<li><div class="fn">void<a href="#4ac3f1"><b>dropped</b></a>(QDropEvent*e, constQValueList<QIconDragItem>&lst)</div>
<li><div class="fn">void<a href="#f15d2f"><b>moved</b></a>()</div>
<li><div class="fn">void<a href="#66af67"><b>onItem</b></a>(QIconViewItem*item)</div>
<li><div class="fn">void<a href="#e877ee"><b>onViewport</b></a>()</div>
<li><div class="fn">void<a href="#b1b915"><b>itemRenamed</b></a>(QIconViewItem*item, constQString&)</div>
<li><div class="fn">void<a href="#aa1ca7"><b>itemRenamed</b></a>(QIconViewItem*item)</div>
</ul>
<h2>Protected Members</h2>
<ul>
<li><div class="fn">virtualvoid<a href="#7edba7"><b>drawRubber</b></a>(QPainter*p)</div>
<li><div class="fn">virtualQDragObject*<a href="#fb21b5"><b>dragObject</b></a>()</div>
<li><div class="fn">virtualvoid<a href="#a3f9fe"><b>startDrag</b></a>()</div>
<li><div class="fn">virtualvoid<a href="#121320"><b>insertInGrid</b></a>(QIconViewItem*item)</div>
<li><div class="fn">virtualvoid<a href="#bdda29"><b>drawBackground</b></a>(QPainter*p, constQRect&r)</div>
<li><div class="fn">void<a href="#d84aa4"><b>emitSelectionChanged</b></a>(QIconViewItem*i=0)</div>
<li><div class="fn">void<b>emitRenamed</b>(QIconViewItem*item)(internal)</div>
<li><div class="fn">QIconViewItem*<a href="#7b6f8b"><b>makeRowLayout</b></a>(QIconViewItem*begin, int&y)</div>
</ul>
<h2>Protected Slots</h2>
<ul>
<li><div class="fn">virtualvoid<a href="#c95118"><b>doAutoScroll</b></a>()</div>
<li><div class="fn">virtualvoid<a href="#014cc9"><b>adjustItems</b></a>()</div>
<li><div class="fn">virtualvoid<a href="#ad0f3d"><b>slotUpdate</b></a>()</div>
</ul>
<h2>Properties</h2>
<table border=1 cellpadding=3 cellspacing=0>
<tr><th>Type<th>Name<th>READ<th>WRITE<th>Options
<tr><td>bool<td>sorting<td>sorting<td> <td> 
<tr><td>bool<td>sortDirection<td>sortDirection<td> <td> 
<tr><td>SelectionMode<td>selectionMode<td>selectionMode<td>setSelectionMode<td> 
<tr><td>int<td>gridX<td>gridX<td>setGridX<td> 
<tr><td>int<td>gridY<td>gridY<td>setGridY<td> 
<tr><td>int<td>spacing<td>spacing<td>setSpacing<td> 
<tr><td>ItemTextPos<td>itemTextPos<td>itemTextPos<td>setItemTextPos<td> 
<tr><td>QBrush<td>itemTextBackground<td>itemTextBackground<td>setItemTextBackground<td> 
<tr><td>Arrangement<td>arrangement<td>arrangement<td>setArrangement<td> 
<tr><td>ResizeMode<td>resizeMode<td>resizeMode<td>setResizeMode<td> 
<tr><td>int<td>maxItemWidth<td>maxItemWidth<td>setMaxItemWidth<td> 
<tr><td>int<td>maxItemTextLength<td>maxItemTextLength<td>setMaxItemTextLength<td> 
<tr><td>bool<td>autoArrange<td>autoArrange<td>setAutoArrange<td> 
<tr><td>bool<td>itemsMovable<td>itemsMovable<td>setItemsMovable<td> 
<tr><td>bool<td>wordWrapIconText<td>wordWrapIconText<td>setWordWrapIconText<td> 
<tr><td>bool<td>showToolTips<td>showToolTips<td>setShowToolTips<td> 
<tr><td>uint<td>count<td>count<td> <td> 
</table>
<hr><h2><a name="details"></a>Detailed Description</h2>
The QIconView class provides an area with movable labelled icons.
<p>
It can display and control a grid or other 2-d layout of items, and
provides the ability to add or remove new items at any time, lets
the user select one or may items, rearrange the items, provides drag
and drop of items, and so on.
<p>Each item (a <a href="qiconviewitem.html">QIconViewItem</a>) contains a text and a pixmap (the icon itself).
<p>The simplest usage of QIconView is to create the object, create some
QIconViewItems with the view as parent, set the view's geometry, and
show it.
<p>When an item is inserted, QIconView allocates a spot for it. The
default <a href="#Arrangement">Arrangement</a> is <code>LeftToRight</code> - QIconView fills up the
leftmost column first, then goes rightwards. You can change that
using <a href="#6d0e1b">setArrangement</a>(), or insert items in a specified position by
calling the appropriate constructors or QIconViewItem::insertItem(),
or sort while the view is on-screen using <a href="#bb74b6">setSorting</a>() and/or
<a href="#e9e83a">sort</a>().
<p>Each (<a href="qiconviewitem.html#1f9f1b">selectable</a>) item
can be selected, and the view provides various <a href="#SelectionMode">SelectionMode</a>
settings. The default is <code>Single</code> - when one item is selected, the
previously selected item is unselected.
<p>The QIconView provides a widget which can contain lots of iconview
items which can be selected, dragged and so on.
<p>Items can be inserted in a grid and can flow from top to bottom
(TopToBottom) or from left to right (LeftToRight). The text can be
either displayed at the bottom of the icons or the the right of the
icons. Items can also be inserted in a sorted order. There are also
methods to re-arrange and re-sort the items after they have been
inserted.
<p>There is a variety of selection modes, described in the
<a href="#SelectionMode">QIconView::SelectionMode</a> documentation. The default is
single-selection, and you can change it using <a href="#7eddc3">setSelectionMode</a>().
<p>Since QIconView offers multiple selection it has to display keyboard
focus and selection state separately. Therefore there are functions
both to set the selection state of an item, <a href="#564205">setSelected</a>(), and to
select which item displays keyboard focus, <a href="#5cdf69">setCurrentItem</a>().
<p>When multiple items may be selected, the iconview provides a
rubberband too.
<p>Items can also be in-place renamed.
<p>The normal way to insert some items is to create QIconViewItems and
pass the iconview as parent. By using <a href="#e330e3">insertItem</a>(), items can be
inserted manually too. The QIconView offers basic methods similar to
the <a href="qlistview.html">QListView</a> and <a href="qlistbox.html">QListBox</a>, like <a href="#e89028">QIconView::takeItem</a>(),
<a href="#bafd29">QIconView::clearSelection</a>(), <a href="#564205">QIconView::setSelected</a>(),
<a href="#5cdf69">QIconView::setCurrentItem</a>(), <a href="#4b5a9c">QIconView::currentItem</a>() and much more.
<p>As the internal structure to store the iconview items is linear (a
double linked list), no iterator class is needed to iterate over all
items. This can be easily done with a code like
<p><pre>  <a href="qiconview.html">QIconView</a> *iv = the iconview
  for ( <a href="qiconviewitem.html">QIconViewItem</a> *i = iv-><a href="#e30745">firstItem</a>(); i; i = i-><a href="qiconviewitem.html#a582f3">nextItem</a>() ) {
      i->doSmething();
  }
</pre>
<p>To notify the application about changes in the iconview there are
several signals which are emitted by the QIconView.
<p>The QIconView is designed for Drag'<a href="n.html">n</a>'Drop, as the icons are also
moved inside the iconview itself using DnD. So the QIconView
provides some methods for extended DnD too. To use DnD correctly in
the iconview, please read following instructions:
<p>There are two different ways to do that, depending what you want.
The first case is the simple one, in which case just the dragobject
you created is dragged around. If you want, that drag shapes (the
rectangles of the dragged items with exact positions) are drawn, you
have to choose the more complicated way. Here first the simple case
is described:
<p>In the simple case you only need for starting a drag to reimplement
<a href="#fb21b5">QIconView::dragObject</a>(). There you create a <a href="qdragobject.html">QDragObject</a> with the
data you want to drag and return it. And for entering drags you
don't need to do anything special then. Just connect to <a href="#4ac3f1">dropped</a>()
signal to get notified about drops onto the viewport and reimplement
<a href="qiconviewitem.html#88a066">QIconViewItem::acceptDrop</a>() and <a href="qiconviewitem.html#ae2271">QIconViewItem::dropped</a>() to be able
to react on drops onto an iconview item.
<p>If you want to have drag shapes drawn, you have to do quite a bit
more and complex things:
<p>The first part is starting drags: If you want to use extended DnD in
the QIconView, you should use <a href="qicondrag.html">QIconDrag</a> (or a derived class from
that) as dragobject and in <a href="#fb21b5">dragObject</a>() create such an object and
return it. Before returning it, fill it there with QIconDragItems.
Normally such a drag should offer data of each selected item. So in
dragObject() you should iterate over all items, create for each
selected item a <a href="qicondragitem.html">QIconDragItem</a> and append this with
<a href="qicondrag.html#fb28c9">QIconDrag::append</a>() to the QIconDrag object. With
<a href="qicondragitem.html#47c167">QIconDragItem::setData</a>() you can set the data of each item which
should be dragged. If you want to offer the data in additional
mime-types, it's the best to use a class derived from QIconDrag
which implements additional encoding and decoding functions.
<p>Now, when a drag enters the iconview, there is not much todo. Just
connect to the dropped() signal and reimplement
QIconViewItem::dropped() and QIconViewItem::acceptDrop(). The only
special thing in this case is the second argument in the dropped()
signal and in QIconViewItem::dropped(). Fur further details about
that look at the documentation of these signal/method.
<p>For an example implementation of the complex Drag'n'Drop stuff look at the
qfileiconview example (qt/examples/qfileiconview)
<p>Finally, see also <a href="qiconviewitem.html#64b56b">QIconViewItem::setDragEnabled</a>(),
<a href="qiconviewitem.html#b9410b">QIconViewItem::setDropEnabled</a>(), QIconViewItem::acceptDrop() and
QIconViewItem::dropped()
<p><img src=qiconview-m.png> <img src=qiconview-w.png>
<p>Examples:
 <a href="iconview-main-cpp.html#QIconView">iconview/main.cpp</a>
<hr><h2>Member Type Documentation</h2>
<h3 class="fn"><a name="Arrangement">QIconView::Arrangement</a></h3>
This enum type decides in which direction the items, which do not
fit onto the screen anymore flow.
<p><ul>
<li> <code>LeftToRight</code> - Items, which don't fit onto the view, go further down (you get a vertical scrollbar)
<li> <code>TopToBottom</code> - Items, which don't fit onto the view, go further right (you get a horizontal scrollbar)
</ul>
<h3 class="fn"><a name="ItemTextPos">QIconView::ItemTextPos</a></h3>
This enum type specifies the position of the item text in relation to the icon.
<p><ul>
<li> <code>Bottom</code> - The text is drawn at the bottom of the icon)
<li> <code>Right</code> - The text is drawn at the right of the icon)
</ul>
<h3 class="fn"><a name="ResizeMode">QIconView::ResizeMode</a></h3>
This enum type decides how QIconView should treat the positions of
its icons when the widget is resized.  The currently defined modes
are: <ul>
<li> <code>Fixed</code> - the icons' positions are not changed.
<li> <code>Adjust</code> - the icons' positions are adjusted to be within the
new geometry, if possible.
<p></ul>
<h3 class="fn"><a name="SelectionMode">QIconView::SelectionMode</a></h3>
This enumerated type is used by QIconView to indicate how it reacts
to selection by the user. It has four values: <ul>
<li> <code>Single</code> - When the user selects an item, any already-selected
item becomes unselected, and the user cannot unselect the selected
item. This means that the user can never clear the selection, even
though the selection may be cleared by the application programmer
using <a href="#bafd29">QIconView::clearSelection</a>().
<li> <code>Multi</code> - When the user selects an item in the most ordinary
way, the selection status of that item is toggled and the other
items are left alone.
<li> <code>Extended</code> - When the user selects an item in the most
ordinary way, the selection is cleared and the new item selected.
However, if the user presses the CTRL key when clicking on an item,
the clicked item gets toggled and all other items are left untouched. And
if the user presses the SHIFT key while clicking on an item, all items
between the current item and the clicked item get selected or unselected
depending on the state of the clicked item.
Also multiple items can be selected by dragging the mouse while the
left mouse button stayes pressed.
<li> <code>NoSelection</code> - Items cannot be selected.
<p></ul>
<p>In other words, <code>Single</code> is a real single-selection iconview, <code>Multi</code> a real multi-selection iconview, and <code>Extended</code> iconview
where users can select multiple items but usually want to select
either just one or a range of contiguous items, and <code>NoSelection</code>
is for a iconview where the user can look but not touch.
<hr><h2>Member Function Documentation</h2>
<h3 class="fn"><a name="c34dd2"></a>QIconView::QIconView(<a href="qwidget.html">QWidget</a>*parent=0, constchar*name=0, WFlagsf=0)</h3>
<p>Constructs an empty icon view.
<h3 class="fn"><a name="1eb1d0"></a>QIconView::~QIconView() <code>[virtual]</code></h3>
<p>Destructs the iconview and deletes all items.
<h3 class="fn">void<a name="014cc9"></a>QIconView::adjustItems() <code>[virtualprotected slot]</code></h3>
<p>Adjusts the positions of the items to the geometry of the iconview.
<h3 class="fn">void<a name="d31996"></a>QIconView::arrangeItemsInGrid(boolupdate=TRUE) <code>[virtualslot]</code></h3>
<p>Arranges all items in the grid. For the grid the specified
values, given by <a href="#e4de51">QIconView::setGridX</a>() and <a href="#3d01f7">QIconView::setGridY</a>()
are used.
Even if <a href="#a0d422">QIconView::sorting</a>() is enabled, the items are not resorted
in this method. If you want to sort and re-arrange all items, use
iconview-><a href="#e9e83a">sort</a>( iconview-><a href="#2279f0">sortDirection</a>() );
<p>If <em>update</em> is TRUE, the viewport is repainted.
<p>See also  <a href="#e4de51">QIconView::setGridX</a>(), <a href="#3d01f7">QIconView::setGridY</a>() and <a href="#e9e83a">QIconView::sort</a>().
<h3 class="fn">void<a name="0afe2f"></a>QIconView::arrangeItemsInGrid(const<a href="qsize.html">QSize</a>&grid, boolupdate=TRUE) <code>[virtualslot]</code></h3>
<p>Arranges all items in the <em>grid;</em> If the grid is invalid (see
<a href="qsize.html#fb07e1">QSize::isValid</a>(), an invalid size is created when using the default
constructor of <a href="qsize.html">QSize</a>()) the best fitting grid is calculated first
and used then.
<p>if <em>update</em> is TRUE, the viewport is repainted.
<h3 class="fn">QIconView::Arrangement<a name="5a6b0f"></a>QIconView::arrangement()const</h3>
<p>Returns the arrangement mode of the iconview.
<p>See also  <a href="#6d0e1b">QIconView::setArrangement</a>().
<h3 class="fn">bool<a name="def500"></a>QIconView::autoArrange()const</h3>
<p>Returns TRUE if all items are re-arranged in the grid if a new one is
inserted, else FALSE.
<p>See also  <a href="#456d21">QIconView::setAutoArrange</a>().
<h3 class="fn">void<a name="50ab3c"></a>QIconView::clear() <code>[virtual]</code></h3>
<p>Cleares the iconview.
<h3 class="fn">void<a name="bafd29"></a>QIconView::clearSelection() <code>[virtual]</code></h3>
<p>Unselects all items.
<h3 class="fn">void<a name="6320c9"></a>QIconView::clicked(<a href="qiconviewitem.html">QIconViewItem</a>*item) <code>[signal]</code></h3>
<p>This signal is emitted when the user clicked (pressed + released) with any mouse button on
either and item (then <em>item</em> is the item under the mouse cursor) or
somewhere else (then <em>item</em> is 0).
<h3 class="fn">void<a name="38d855"></a>QIconView::clicked(<a href="qiconviewitem.html">QIconViewItem</a>*item, const<a href="qpoint.html">QPoint</a>&pos) <code>[signal]</code></h3>
<p>This signal is emitted when the user clicked (pressed + released) with any mouse button on
either and item (then <em>item</em> is the item under the mouse cursor) or
somewhere else (then <em>item</em> is 0). <em>pos</em> the position of the mouse cursor.
<h3 class="fn">void<a name="2ce4a4"></a>QIconView::contentsDragEnterEvent(<a href="qdragenterevent.html">QDragEnterEvent</a>*e) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">void<a name="65bb27"></a>QIconView::contentsDragLeaveEvent(<a href="qdragleaveevent.html">QDragLeaveEvent</a>*) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">void<a name="879836"></a>QIconView::contentsDragMoveEvent(<a href="qdragmoveevent.html">QDragMoveEvent</a>*e) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">void<a name="89b938"></a>QIconView::contentsDropEvent(<a href="qdropevent.html">QDropEvent</a>*e) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">void<a name="5a1a1d"></a>QIconView::contentsMouseDoubleClickEvent(<a href="qmouseevent.html">QMouseEvent</a>*e) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">void<a name="557cf2"></a>QIconView::contentsMouseMoveEvent(<a href="qmouseevent.html">QMouseEvent</a>*e) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">void<a name="ac0157"></a>QIconView::contentsMousePressEvent(<a href="qmouseevent.html">QMouseEvent</a>*e) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">void<a name="38a1e2"></a>QIconView::contentsMouseReleaseEvent(<a href="qmouseevent.html">QMouseEvent</a>*e) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">uint<a name="7420e0"></a>QIconView::count()const</h3>
<p>Returns the number of items in the iconview.
<h3 class="fn">void<a name="da72bc"></a>QIconView::currentChanged(<a href="qiconviewitem.html">QIconViewItem</a>*item) <code>[signal]</code></h3>
<p>This signal is emitted, when the different items got current.
<em>item</em> is the new current item or 0, if no item is current now.
<h3 class="fn"><a href="qiconviewitem.html">QIconViewItem</a>*<a name="4b5a9c"></a>QIconView::currentItem()const</h3>
<p>Returns a pointer to the current item fo the iconview, or 0, if no
item is current.
<h3 class="fn">void<a name="c95118"></a>QIconView::doAutoScroll() <code>[virtualprotected slot]</code></h3>
<p>Does autoscrolling when selecting multiple icons with the rubber band.
<h3 class="fn">void<a name="11199f"></a>QIconView::doubleClicked(<a href="qiconviewitem.html">QIconViewItem</a>*item) <code>[signal]</code></h3>
<p>This signal is emitted, if the user double-clicked on the item <em>item.</em>
<h3 class="fn"><a href="qdragobject.html">QDragObject</a>*<a name="fb21b5"></a>QIconView::dragObject() <code>[virtualprotected]</code></h3>
<p>Returns the <a href="qdragobject.html">QDragObject</a> which should be used for DnD. This method
is called by the iconview when starting a drag to get the dragobject
which should be used for the drag.
Subclasses may reimplement this.
<p>See also  <a href="qicondrag.html">QIconDrag</a>.
<h3 class="fn">void<a name="bdda29"></a>QIconView::drawBackground(<a href="qpainter.html">QPainter</a>*p, const<a href="qrect.html">QRect</a>&r) <code>[virtualprotected]</code></h3>
<p>This method is called to draw the rectangle <em>r</em> of the background using
the painter <em>p.</em> xOffset and yOffset are known using the methods
<a href="qscrollview.html#d83f9b">contentsX</a>() and <a href="qscrollview.html#abff81">contentsY</a>().
<p>The default implementation only fills <em>r</em> with <a href="qwidget.html#5bc085">colorGroup</a>().base(). Subclasses
may reimplement this to draw fency backgrounds.
<h3 class="fn">void<a name="4a5b80"></a>QIconView::drawContents(<a href="qpainter.html">QPainter</a>*p, intcx, intcy, intcw, intch) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">void<a name="7edba7"></a>QIconView::drawRubber(<a href="qpainter.html">QPainter</a>*p) <code>[virtualprotected]</code></h3>
<p>Draws the rubber band using the painter <em>p.</em>
<h3 class="fn">void<a name="4ac3f1"></a>QIconView::dropped(<a href="qdropevent.html">QDropEvent</a>*e, const<a href="qvaluelist.html">QValueList</a><<a href="qicondragitem.html">QIconDragItem</a>>&lst) <code>[signal]</code></h3>
<p>This signal is emitted, when a drop event occurred onto the viewport
(not onto an icon), which the iconview itself can't handle.
<p><em>e</em> gives you all information about the drop. If the drag object of
the drop was a <a href="qicondrag.html">QIconDrag</a>, <em>lst</em> contains the list of the dropped
items. You can get the data using <a href="qicondragitem.html#675733">QIconDragItem::data</a>() of each item
then.
<p>So, if <em>lst</em> is not empty, use this data for further operations,
else the drag was not a QIconDrag, so you have to decode <em>e</em>
yourself and work with that.
<h3 class="fn">void<a name="d84aa4"></a>QIconView::emitSelectionChanged(<a href="qiconviewitem.html">QIconViewItem</a>*i=0) <code>[protected]</code></h3>
<p>Emits signals, that indicate selection changes.
<h3 class="fn">void<a name="315ad3"></a>QIconView::ensureItemVisible(<a href="qiconviewitem.html">QIconViewItem</a>*item)</h3>
<p>Makes sure, that <em>item</em> is visible, and scrolls the view if required.
<h3 class="fn">void<a name="79eaee"></a>QIconView::enterEvent(<a href="qevent.html">QEvent</a>*e) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">bool<a name="f0abe4"></a>QIconView::eventFilter(<a href="qobject.html">QObject</a>*o, <a href="qevent.html">QEvent</a>*e) <code>[virtual]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<p>Reimplemented from <a href="qobject.html#bb8547">QObject.</a>
<h3 class="fn"><a href="qiconviewitem.html">QIconViewItem</a>*<a name="1ae627"></a>QIconView::findFirstVisibleItem(const<a href="qrect.html">QRect</a>&r)const</h3>
<p>Finds the first item which is visible in the rectangle <em>r</em> in contents coordinates. If no items are
visible at all, 0 is returned.
<h3 class="fn"><a href="qiconviewitem.html">QIconViewItem</a>*<a name="249521"></a>QIconView::findItem(const<a href="qpoint.html">QPoint</a>&pos)const</h3>
<p>Returns a pointer to the item which contains <em>pos,</em> which is given
on contents coordinates.
<h3 class="fn"><a href="qiconviewitem.html">QIconViewItem</a>*<a name="664873"></a>QIconView::findItem(const<a href="qstring.html">QString</a>&text)const</h3>
<p>Returns a pointer to the first item which could be found that contains
<em>text,</em> or 0 if no such item could be found.
<h3 class="fn"><a href="qiconviewitem.html">QIconViewItem</a>*<a name="8483a2"></a>QIconView::findLastVisibleItem(const<a href="qrect.html">QRect</a>&r)const</h3>
<p>Finds the last item which is visible in the rectangle <em>r</em> in contents coordinates. If no items are
visible at all, 0 is returned.
<h3 class="fn"><a href="qiconviewitem.html">QIconViewItem</a>*<a name="e30745"></a>QIconView::firstItem()const</h3>
<p>Returns a pointer to the first item fo the iconview, or 0, if there
are no items in the iconview.
<h3 class="fn">void<a name="af9f1c"></a>QIconView::focusInEvent(<a href="qfocusevent.html">QFocusEvent</a>*e) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">void<a name="ae85b4"></a>QIconView::focusOutEvent(<a href="qfocusevent.html">QFocusEvent</a>*) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">int<a name="e09530"></a>QIconView::gridX()const</h3>
<p>Returns the horizontal grid.
<p>See also  <a href="#e4de51">QIconView::setGridX</a>().
<h3 class="fn">int<a name="2bb36d"></a>QIconView::gridY()const</h3>
<p>Returns the vertica grid.
<p>See also  <a href="#3d01f7">QIconView::setGridY</a>().
<h3 class="fn">int<a name="fb331e"></a>QIconView::index(const<a href="qiconviewitem.html">QIconViewItem</a>*item)const</h3>
<p>Returns the index of <em>item</em> or -1 if <em>item</em> doesn't exist
in this icon view.
<h3 class="fn">void<a name="121320"></a>QIconView::insertInGrid(<a href="qiconviewitem.html">QIconViewItem</a>*item) <code>[virtualprotected]</code></h3>
<p>Inserts an item in the grid of the iconview. You should never need
to call this manually.
<h3 class="fn">void<a name="e330e3"></a>QIconView::insertItem(<a href="qiconviewitem.html">QIconViewItem</a>*item, <a href="qiconviewitem.html">QIconViewItem</a>*after=0L) <code>[virtual]</code></h3>
<p>Inserts the iconview item <em>item</em> after <em>after.</em> If <em>after</em> is 0,
<em>item</em> is appended.
<p>You should never need to call this method yourself, you should rather do
<p><pre>    (void) new <a href="qiconviewitem.html">QIconViewItem</a>( iconview, "This is the text of the item", pixmap );
</pre>
<p>This does everything required for inserting an item.
<h3 class="fn">void<a name="7359d3"></a>QIconView::invertSelection() <code>[virtual]</code></h3>
<p>Inverts the selection. Works only in Multi and Extended selection mode.
<h3 class="fn">void<a name="aa1ca7"></a>QIconView::itemRenamed(<a href="qiconviewitem.html">QIconViewItem</a>*item) <code>[signal]</code></h3>
<p>If the <em>item</em> has been renamed (e.g. by in-place renaming),
this signal is emitted.
<h3 class="fn">void<a name="b1b915"></a>QIconView::itemRenamed(<a href="qiconviewitem.html">QIconViewItem</a>*item, const<a href="qstring.html">QString</a>&name) <code>[signal]</code></h3>
<p>If the <em>item</em> has been renamed (e.g. by in-place renaming),
this signal is emitted. <em>name</em> is the new text (name) of the item.
<h3 class="fn"><a href="qbrush.html">QBrush</a><a name="951aa7"></a>QIconView::itemTextBackground()const</h3>
<p>Returns the brush which is used to draw the background of an item text
<p>See also  <a href="#562836">setItemTextBackground</a>().
<h3 class="fn">QIconView::ItemTextPos<a name="b52b54"></a>QIconView::itemTextPos()const</h3>
<p>Returns the position, at which the text of the items are drawn.
<p>See also  <a href="#39d892">QIconView::setItemTextPos</a>().
<h3 class="fn">bool<a name="a665fb"></a>QIconView::itemsMovable()const</h3>
<p>Returns TRUE, if the user is allowed to move items around
in the iconview, else FALSE;
<p>See also  <a href="#79d742">QIconView::setItemsMovable</a>().
<h3 class="fn">void<a name="ecd8d8"></a>QIconView::keyPressEvent(<a href="qkeyevent.html">QKeyEvent</a>*e) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn"><a href="qiconviewitem.html">QIconViewItem</a>*<a name="dcdad6"></a>QIconView::lastItem()const</h3>
<p>Returns a pointer to the last item fo the iconview, or 0, if there
are no items in the iconview.
<h3 class="fn"><a href="qiconviewitem.html">QIconViewItem</a>*<a name="7b6f8b"></a>QIconView::makeRowLayout(<a href="qiconviewitem.html">QIconViewItem</a>*begin, int&y) <code>[protected]</code></h3>
<p>Lays out a row of icons (in <a href="#Arrangement">Arrangement</a> == TopToBottom this is a column). Starts
laying out with the item <em>begin. y</em> is the starting coordinate.
Returns the last item of the row and sets the new starting coordinate to <em>y.</em>
<p>This function may be made private in a future version of Qt. We
recommend not calling it.
<h3 class="fn">int<a name="620ee7"></a>QIconView::maxItemTextLength()const</h3>
<p>Returns the maximum length (in characters), which the
text of an icon may have.
<p>See also  <a href="#b59c0b">QIconView::setMaxItemTextLength</a>().
<h3 class="fn">int<a name="ad3821"></a>QIconView::maxItemWidth()const</h3>
<p>Returns the maximum width (in pixels), which an item may have.
<p>See also  <a href="#eaf4d8">QIconView::setMaxItemWidth</a>().
<h3 class="fn"><a href="qsize.html">QSize</a><a name="d7a32a"></a>QIconView::minimumSizeHint()const <code>[virtual]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<p>Reimplemented from <a href="qwidget.html#3f0fc2">QWidget.</a>
<h3 class="fn">void<a name="974828"></a>QIconView::mouseButtonClicked(intbutton, <a href="qiconviewitem.html">QIconViewItem</a>*item, const<a href="qpoint.html">QPoint</a>&pos) <code>[signal]</code></h3>
<p>This signal is emitted when the user clicked (pressed + released) with any mouse button on
either and item (then <em>item</em> is the item under the mouse cursor) or
somewhere else (then <em>item</em> is 0). <em>button</em> is the number of the mouse button which
the user clicked, and <em>pos</em> the position of the mouse cursor.
<h3 class="fn">void<a name="9c591c"></a>QIconView::mouseButtonPressed(intbutton, <a href="qiconviewitem.html">QIconViewItem</a>*item, const<a href="qpoint.html">QPoint</a>&pos) <code>[signal]</code></h3>
<p>This signal is emitted when the user pressed with any mouse button on
either and item (then <em>item</em> is the item under the mouse cursor) or
somewhere else (then <em>item</em> is 0). <em>button</em> is the number of the mouse button which
the user pressed, and <em>pos</em> the position of the mouse cursor.
<h3 class="fn">void<a name="f15d2f"></a>QIconView::moved() <code>[signal]</code></h3>
<p>This signal is emitted after successfully dropping an (or some) item(s) of the iconview
somewhere and if they should be removed now.
<h3 class="fn">void<a name="66af67"></a>QIconView::onItem(<a href="qiconviewitem.html">QIconViewItem</a>*i) <code>[signal]</code></h3>
<p>This signal is emitted, when the user moves the mouse cursor onto an item.
Its only emitted once per item.
<h3 class="fn">void<a name="e877ee"></a>QIconView::onViewport() <code>[signal]</code></h3>
<p>This signal is emitted, when the user moves the mouse cursor, which was
on an item away from the item onto the viewport.
<h3 class="fn">void<a name="fa9379"></a>QIconView::pressed(<a href="qiconviewitem.html">QIconViewItem</a>*item) <code>[signal]</code></h3>
<p>This signal is emitted when the user pressed with any mouse button on
either and item (then <em>item</em> is the item under the mouse cursor) or
somewhere else (then <em>item</em> is 0).
<h3 class="fn">void<a name="bed3f8"></a>QIconView::pressed(<a href="qiconviewitem.html">QIconViewItem</a>*item, const<a href="qpoint.html">QPoint</a>&pos) <code>[signal]</code></h3>
<p>This signal is emitted when the user pressed with any mouse button on
either and item (then <em>item</em> is the item under the mouse cursor) or
somewhere else (then <em>item</em> is 0). <em>pos</em> the position of the mouse cursor.
<h3 class="fn">void<a name="b1ae03"></a>QIconView::repaintItem(<a href="qiconviewitem.html">QIconViewItem</a>*item) <code>[virtual]</code></h3>
<p>Repaints the <em>item.</em>
<h3 class="fn">void<a name="4d1720"></a>QIconView::resizeEvent(<a href="qresizeevent.html">QResizeEvent</a>*e) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">QIconView::ResizeMode<a name="f71edb"></a>QIconView::resizeMode()const</h3>
<p>Returns the resize mode of the iconview.
<p>See also  <a href="#7ee766">QIconView::setResizeMode</a>().
<h3 class="fn">void<a name="a90915"></a>QIconView::returnPressed(<a href="qiconviewitem.html">QIconViewItem</a>*item) <code>[signal]</code></h3>
<p>This signal is emitted, if the user pressed the return or enter button.
<em>item</em> is the item which was current while return or enter was pressed.
<h3 class="fn">void<a name="f86bc8"></a>QIconView::rightButtonClicked(<a href="qiconviewitem.html">QIconViewItem</a>*item, const<a href="qpoint.html">QPoint</a>&pos) <code>[signal]</code></h3>
<p>This signal is emitted when the user clicked (pressed + released) with the right
mouse button on either and item (then <em>item</em> is the item under the mouse cursor) or
somewhere else (then <em>item</em> is 0). <em>pos</em> the position of the mouse cursor.
<h3 class="fn">void<a name="f5e12f"></a>QIconView::rightButtonPressed(<a href="qiconviewitem.html">QIconViewItem</a>*item, const<a href="qpoint.html">QPoint</a>&pos) <code>[signal]</code></h3>
<p>This signal is emitted when the user pressed with the right mouse button on
either and item (then <em>item</em> is the item under the mouse cursor) or
somewhere else (then <em>item</em> is 0). <em>pos</em> the position of the mouse cursor.
<h3 class="fn">void<a name="dde4aa"></a>QIconView::selectAll(boolselect) <code>[virtual]</code></h3>
<p>If <em>select</em> is TRUE, all items get selected, else all get unselected.
This works only in the selection modes Multi and Extended. In
Single and NoSelection mode the selection of the current item is
just set to <em>select.</em>
<h3 class="fn">void<a name="2b18b6"></a>QIconView::selectionChanged() <code>[signal]</code></h3>
<p>This signal is emitted when the selection has been changed. It's emitted
in each selection mode.
<h3 class="fn">void<a name="708086"></a>QIconView::selectionChanged(<a href="qiconviewitem.html">QIconViewItem</a>*item) <code>[signal]</code></h3>
<p>This signal is emitted when the selection has been changed. <em>item</em>
is the new selected item. This signal is only emitted in single
selection mode.
<h3 class="fn">QIconView::SelectionMode<a name="c11bd2"></a>QIconView::selectionMode()const</h3>
<p>Returns the selection mode of the iconview.  The initial mode is
<code>Single.</code>
<p>See also  <a href="#7eddc3">setSelectionMode</a>().
<h3 class="fn">void<a name="6d0e1b"></a>QIconView::setArrangement(<a href="qiconview.html#Arrangement">Arrangement</a>am)</h3>
<p>Sets the arrangement mode of the iconview to <em>am,</em> which must be
one of <code>LeftToRight</code> and TopToBottom.
<p>See also  <a href="#Arrangement">Arrangement</a>.
<h3 class="fn">void<a name="456d21"></a>QIconView::setAutoArrange(boolb) <code>[virtual]</code></h3>
<p>If <em>b</em> is TRUE, all items are re-arranged in the grid if a new one is
inserted. Else, the best fitting place for the new item is searched and
the other ones are not touched.
<p>This setting only applies if the iconview is visible. If you insert
items and the iconview is not visible, the icons are reordered when it
gets visible.
<h3 class="fn">void<a name="a3bc91"></a>QIconView::setContentsPos(intx, inty) <code>[virtualslot]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">void<a name="5cdf69"></a>QIconView::setCurrentItem(<a href="qiconviewitem.html">QIconViewItem</a>*item) <code>[virtual]</code></h3>
<p>Makes <em>item</em> the new current item of the iconview.
<h3 class="fn">void<a name="a23b3b"></a>QIconView::setFont(const<a href="qfont.html">QFont</a>&f) <code>[virtual]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">void<a name="e4de51"></a>QIconView::setGridX(intrx) <code>[virtual]</code></h3>
<p>Sets the horizontal grid to <em>rx.</em>  If <em>rx</em> is -1, there is no
horizontal grid used for arranging items.
<h3 class="fn">void<a name="3d01f7"></a>QIconView::setGridY(intry) <code>[virtual]</code></h3>
<p>Sets the vertical grid to <em>ry.</em>  If <em>ry</em> is -1, there is no
vertical grid used for arranging items.
<h3 class="fn">void<a name="562836"></a>QIconView::setItemTextBackground(const<a href="qbrush.html">QBrush</a>&brush) <code>[virtual]</code></h3>
<p>Sets the <em>brush,</em> which should be used when drawing the background
of an item text. By default, this brush is set to NoBrush, which means
no extra brush is used for drawing the item text background (just the normal
iconview background).
<h3 class="fn">void<a name="39d892"></a>QIconView::setItemTextPos(<a href="qiconview.html#ItemTextPos">ItemTextPos</a>pos)</h3>
<p>Sets the position, where the text of the items is drawn. This can be Bottom
or Right.
<h3 class="fn">void<a name="79d742"></a>QIconView::setItemsMovable(boolb) <code>[virtual]</code></h3>
<p>If <em>b</em> is TRUE, the user is allowed to move items around in
the iconview.
if <em>b</em> is FALSE, the user is not allowed to do that.
<h3 class="fn">void<a name="b59c0b"></a>QIconView::setMaxItemTextLength(intw) <code>[virtual]</code></h3>
<p>Sets the maximum length (in characters), which an item text may have.
<h3 class="fn">void<a name="eaf4d8"></a>QIconView::setMaxItemWidth(intw) <code>[virtual]</code></h3>
<p>Sets the maximum width, which an item may have. If a <a href="#e09530">gridX</a>() is set,
this value is ignored, and the gridX() value is used.
<h3 class="fn">void<a name="6002eb"></a>QIconView::setPalette(const<a href="qpalette.html">QPalette</a>&p) <code>[virtual]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">void<a name="7ee766"></a>QIconView::setResizeMode(<a href="qiconview.html#ResizeMode">ResizeMode</a>rm)</h3>
<p>Sets the resize mode of the iconview to <em>rm,</em> which must be one of
<code>Fixed</code> and Adjust.
<p>See also  <a href="#ResizeMode">ResizeMode</a>.
<h3 class="fn">void<a name="564205"></a>QIconView::setSelected(<a href="qiconviewitem.html">QIconViewItem</a>*item, bools, boolcb=FALSE) <code>[virtual]</code></h3>
<p>Selects or unselects <em>item</em> depending on <em>s,</em> and may also
unselect other items, depending on <a href="#c11bd2">QIconView::selectionMode</a>() and <em>cb.</em>
<p>If <em>s</em> is FALSE, <em>item</em> is unselected.
<p>If <em>s</em> is TRUE and QIconView::selectionMode() is <code>Single,</code> <em>item</em>
is selected, and the item which was selected is unselected.
<p>If <em>s</em> is TRUE and QIconView::selectionMode() is <code>Extended,</code> <em>item</em> is selected. If <em>cb</em> is TRUE, the other items of the iconview
are not touched. If <em>cb</em> is FALSE (the default) all other items are
unselected.
<p>If <em>s</em> is TRUE and QIconView::selectionMode() is <code>Multi</code> <em>item</em>
is selected.
<p>Note that <em>cb</em> is used only if QIconView::selectionMode() is <code>Extended.</code> <em>cb</em> defaults to FALSE.
<p>All items whose selection status change repaint themselves.
<h3 class="fn">void<a name="7eddc3"></a>QIconView::setSelectionMode(<a href="qiconview.html#SelectionMode">SelectionMode</a>m)</h3>
<p>Sets the selection mode of the iconview to <em>m,</em> which may be one of
<code>Single</code> (the default), <code>Extended, Multi</code> or <code>NoSelection.</code>
<p>See also  <a href="#c11bd2">selectionMode</a>().
<p>Examples:
 <a href="iconview-main-cpp.html#setSelectionMode">iconview/main.cpp</a>
<h3 class="fn">void<a name="8e4de6"></a>QIconView::setShowToolTips(boolb) <code>[virtual]</code></h3>
<p>If <a href="#417e12">wordWrapIconText</a>() is FALSE, it happens that an item text
is truncated because it's too large for one line. If you specify TRUE for
<em>b</em> here and the user moves the mouse onto the item a tooltip with
the whole item text is shown.
If you pass <em>FALSE</em> here this feature is switched off.
<p>See also  <a href="#588a44">setWordWrapIconText</a>().
<h3 class="fn">void<a name="bb74b6"></a>QIconView::setSorting(boolsort, boolascending=TRUE)</h3>
<p>If <em>sort</em> is TRUE, new items are inserted sorted. The sort
direction is specified using <em>ascending.</em>
<p>Inserting items sorted only works when re-arranging items is
set to TRUE as well (using <a href="#456d21">QIconView::setAutoArrange</a>()).
<p>See also  <a href="#456d21">QIconView::setAutoArrange</a>() and <a href="#def500">QIconView::autoArrange</a>().
<h3 class="fn">void<a name="4919c2"></a>QIconView::setSpacing(intsp) <code>[virtual]</code></h3>
<p>Sets the space between iconview items to <em>sp.</em>
<h3 class="fn">void<a name="588a44"></a>QIconView::setWordWrapIconText(boolb) <code>[virtual]</code></h3>
<p>If the width of an item text is larger than the maximal item width,
there are two possibilities how the QIconView can deal with this.
Either it does a word wrap of the item text, so that it uses
multiple lines. Or it truncates the item text so that it shrinks
to the maximal item width and appends three dots "..." to the
displayed text to indicate that not the full text is displayed.
<p>If you set <em>b</em> to TRUE, a word wrap is done, else the
text is displayed truncated.
<p>NOTE: Both possibilities just change the way how the text is
displayed, they do NOT modify the item text itslef.
<p>See also  <a href="#8e4de6">setShowToolTips</a>().
<h3 class="fn">void<a name="1441c1"></a>QIconView::showEvent(<a href="qshowevent.html">QShowEvent</a>*) <code>[virtual]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<h3 class="fn">bool<a name="1ac0b4"></a>QIconView::showToolTips()const</h3>
<p>Returns TRUE if a tooltip is shown for truncated item texts and
FALSE otherwise.
<p>See also  <a href="#8e4de6">setShowToolTips</a>() and <a href="#588a44">setWordWrapIconText</a>().
<h3 class="fn"><a href="qsize.html">QSize</a><a name="245965"></a>QIconView::sizeHint()const <code>[virtual]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<p>Examples:
 <a href="iconview-main-cpp.html#sizeHint">iconview/main.cpp</a>
<p>Reimplemented from <a href="qwidget.html#290bcd">QWidget.</a>
<h3 class="fn"><a href="qsizepolicy.html">QSizePolicy</a><a name="a4c733"></a>QIconView::sizePolicy()const <code>[virtual]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<p>Reimplemented from <a href="qwidget.html#2d5d13">QWidget.</a>
<h3 class="fn">void<a name="ad0f3d"></a>QIconView::slotUpdate() <code>[virtualprotected slot]</code></h3>
<p>Because of efficiency, the iconview is not redrawn immediately after
inserting a new item, but with a very small delay using a <a href="qtimer.html">QTimer</a>. The
result of this is, that if lots of items are inserted in a short time
(e.g. in a loop), the iconview is not redrawn after each inserted item,
but after inserting all of them, which makes the operation much faster
and flicker-free.
<h3 class="fn">void<a name="e9e83a"></a>QIconView::sort(boolascending=TRUE) <code>[virtual]</code></h3>
<p>Sorts the items of the listview and re-arranges them afterwards. If
<em>ascending</em> is TRUE, the items are sorted in increasing order, else
in decreasing order. For sorting <a href="qiconviewitem.html#26ab3f">QIconViewItem::compare</a>() is used.
The default sort direction is set to the sort direction you set
here.
<p>See also  <a href="qiconviewitem.html#3dd534">QIconViewItem::key</a>(), <a href="qiconviewitem.html#5ed08f">QIconViewItem::setKey</a>(), <a href="qiconviewitem.html#26ab3f">QIconViewItem::compare</a>(), <a href="#bb74b6">QIconView::setSorting</a>() and <a href="#2279f0">QIconView::sortDirection</a>().
<h3 class="fn">bool<a name="2279f0"></a>QIconView::sortDirection()const</h3>
<p>Returns TRUE if the sort direction for inserting new items is ascending,
FALSE means descending. This sort direction has only a meaning if re-sorting
and re-arranging of new inserted items is enabled.
<p>See also  <a href="#bb74b6">QIconView::setSorting</a>() and <a href="#456d21">QIconView::setAutoArrange</a>().
<h3 class="fn">bool<a name="a0d422"></a>QIconView::sorting()const</h3>
<p>Returns TRUE if new items are inserted sorted, else FALSE.
<p>See also  <a href="#bb74b6">QIconView::setSorting</a>().
<h3 class="fn">int<a name="56c2a5"></a>QIconView::spacing()const</h3>
<p>Returns the spacing between iconview items.
<h3 class="fn">void<a name="a3f9fe"></a>QIconView::startDrag() <code>[virtualprotected]</code></h3>
<p>Starts a drag.
<h3 class="fn">void<a name="2a9862"></a>QIconView::styleChange(<a href="qstyle.html">QStyle</a>&old) <code>[virtualprotected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<p>Reimplemented from <a href="qwidget.html#7a14f4">QWidget.</a>
<h3 class="fn">void<a name="e89028"></a>QIconView::takeItem(<a href="qiconviewitem.html">QIconViewItem</a>*item) <code>[virtual]</code></h3>
<p>Takes the iconview item <em>item</em> out of the iconview and causes an update
of the screen display.  The item is not deleted.  You should normally not
need to call this function, as QIconViewItem::~<a href="qiconviewitem.html">QIconViewItem</a>() calls it.
The normal way to delete an item is <code>delete.</code>
<h3 class="fn">bool<a name="417e12"></a>QIconView::wordWrapIconText()const</h3>
<p>Returns TRUE, if an item text which needs too much
space (to the width) is displayed word wrapped, or FALSE
if it gets displayed truncated.
<p>See also  <a href="#588a44">setWordWrapIconText</a>() and <a href="#8e4de6">setShowToolTips</a>().
<h3 class="fn">void<a name="d5aa9d"></a>QIconView::emitRenamed(<a href="qiconviewitem.html">QIconViewItem</a>*item) <code>[protected]</code></h3>
<p>For internal use only.
<h3 class="fn">void<a name="b1549b"></a>QIconView::updateContents() <code>[virtualslot]</code></h3>
<p>For internal use only.
<hr><p>
Search the documentation, FAQ, qt-interest archive and more (uses
<a href="http://www.trolltech.com">www.trolltech.com</a>):<br>
<form method=post action="http://www.trolltech.com/search.cgi">
<input type=hidden name="version" value="2.3.1"><nobr>
<input size="50" name="search"><input type=submit value="Search">
</nobr></form><hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>,
copyright © 1995-2000
<a href="http://www.trolltech.com">Trolltech</a>, all rights reserved.<p><address><hr><div align="center">
<table width="100%" cellspacing="0" border="0"><tr>
<td>Copyright  2000 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 2.3.1</div>
</table></div></address></body></html>
 |