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
|
// This is the SIP interface definition for TQListView, TQListViewItem,
// TQCheckListItem and TQListViewItemIterator.
//
// Copyright (c) 2007
// Riverbank Computing Limited <[email protected]>
//
// This file is part of PyTQt.
//
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%ExportedDoc
<Sect2><Title>TQListView</Title>
<Para>
<Literal>TQListView</Literal> is fully implemented.
</Para>
<Para>
Note that to remove a child <Literal>TQListViewItem</Literal> you must first
call <Literal>takeItem()</Literal> and then <Literal>del()</Literal>.
</Para>
</Sect2>
<Sect2><Title>TQListViewItem</Title>
<Para>
<Literal>TQListViewItem</Literal> is fully implemented.
</Para>
<Para>
Note that to remove a child <Literal>TQListViewItem</Literal> you must first
call <Literal>takeItem()</Literal> and then <Literal>del()</Literal>.
</Para>
</Sect2>
<Sect2><Title>TQCheckListItem</Title>
<Para>
<Literal>TQCheckListItem</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>TQListViewItemIterator (TQt v2+)</Title>
<Para>
<Literal>TQListViewItemIterator</Literal> is fully implemented.
</Para>
</Sect2>
%End
class TQListViewItem : TQt
{
%TypeHeaderCode
#include <tqlistview.h>
%End
public:
TQListViewItem(TQListView * /TransferThis/);
TQListViewItem(TQListViewItem * /TransferThis/);
TQListViewItem(TQListView * /TransferThis/,TQListViewItem *);
TQListViewItem(TQListViewItem * /TransferThis/,TQListViewItem *);
TQListViewItem(TQListView * /TransferThis/,
TQString,TQString = TQString::null,
TQString = TQString::null,TQString = TQString::null,
TQString = TQString::null,TQString = TQString::null,
TQString = TQString::null,TQString = TQString::null);
TQListViewItem(TQListViewItem * /TransferThis/,
TQString,TQString = TQString::null,
TQString = TQString::null,TQString = TQString::null,
TQString = TQString::null,TQString = TQString::null,
TQString = TQString::null,TQString = TQString::null);
TQListViewItem(TQListView * /TransferThis/,TQListViewItem *,
TQString,TQString = TQString::null,
TQString = TQString::null,TQString = TQString::null,
TQString = TQString::null,TQString = TQString::null,
TQString = TQString::null,TQString = TQString::null);
TQListViewItem(TQListViewItem * /TransferThis/,TQListViewItem *,
TQString,TQString = TQString::null,
TQString = TQString::null,TQString = TQString::null,
TQString = TQString::null,TQString = TQString::null,
TQString = TQString::null,TQString = TQString::null);
virtual void insertItem(TQListViewItem * /Transfer/);
virtual void takeItem(TQListViewItem * /TransferBack/);
int height() const;
virtual void invalidateHeight();
int totalHeight() const;
virtual int width(const TQFontMetrics &,const TQListView *,int) const;
void widthChanged(int = -1) const;
int depth() const;
virtual void setText(int,const TQString &);
virtual TQString text(int) const;
virtual void setPixmap(int,const TQPixmap &);
virtual const TQPixmap *pixmap(int) const;
virtual TQString key(int,bool) const;
virtual int compare(TQListViewItem *,int,bool) const;
virtual void sortChildItems(int,bool);
int childCount() const;
bool isOpen() const;
virtual void setOpen(bool);
virtual void setup();
virtual void setSelected(bool);
bool isSelected() const;
virtual void paintCell(TQPainter *,const TQColorGroup &,int,int,int);
virtual void paintBranches(TQPainter *,const TQColorGroup &,int,int,int);
virtual void paintFocus(TQPainter *,const TQColorGroup &,const TQRect &);
TQListViewItem *firstChild() const;
TQListViewItem *nextSibling() const;
TQListViewItem *parent() const;
TQListViewItem *itemAbove();
TQListViewItem *itemBelow();
int itemPos() const;
TQListView *listView() const;
virtual void setSelectable(bool);
bool isSelectable() const;
virtual void setExpandable(bool);
bool isExpandable();
void repaint() const;
virtual void sort();
void moveItem(TQListViewItem *);
virtual void setDragEnabled(bool);
virtual void setDropEnabled(bool);
bool dragEnabled() const;
bool dropEnabled() const;
virtual bool acceptDrop(const TQMimeSource *) const;
void setVisible(bool);
bool isVisible() const;
virtual void setRenameEnabled(int,bool);
bool renameEnabled(int) const;
virtual void startRename(int);
virtual void setEnabled(bool);
bool isEnabled() const;
virtual int rtti() const;
virtual void setMultiLinesEnabled(bool);
bool multiLinesEnabled() const;
protected:
virtual void enforceSortOrder() const;
virtual void setHeight(int);
virtual void activate();
bool activatedPos(TQPoint &);
virtual void dropped(TQDropEvent *);
virtual void dragEntered();
virtual void dragLeft();
virtual void okRename(int);
virtual void cancelRename(int);
void ignoreDoubleClick();
};
class TQListView : TQScrollView
{
%TypeHeaderCode
#include <tqlistview.h>
%End
public:
TQListView(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
int treeStepSize() const;
virtual void setTreeStepSize(int);
virtual void insertItem(TQListViewItem * /Transfer/);
virtual void takeItem(TQListViewItem * /TransferBack/);
TQHeader *header() const;
virtual int addColumn(const TQString &,int = -1);
virtual int addColumn(const TQIconSet &,const TQString &,int = -1);
void removeColumn(int);
virtual void setColumnText(int,const TQString &);
virtual void setColumnText(int,const TQIconSet &,const TQString &);
TQString columnText(int) const;
virtual void setColumnWidth(int,int);
int columnWidth(int) const;
enum WidthMode
{
Manual,
Maximum
};
virtual void setColumnWidthMode(int,WidthMode);
WidthMode columnWidthMode(int) const;
int columns() const;
virtual void setColumnAlignment(int,int);
int columnAlignment(int) const;
void show();
TQListViewItem *itemAt(const TQPoint &) const;
TQRect itemRect(const TQListViewItem *) const;
int itemPos(const TQListViewItem *);
void ensureItemVisible(const TQListViewItem *);
void repaintItem(const TQListViewItem *) const;
virtual void setMultiSelection(bool);
bool isMultiSelection() const;
enum SelectionMode {
Single,
Multi,
Extended,
NoSelection
};
void setSelectionMode(SelectionMode);
SelectionMode selectionMode() const;
virtual void clearSelection();
virtual void setSelected(TQListViewItem *,bool);
void setSelectionAnchor(TQListViewItem *);
bool isSelected(TQListViewItem *) const;
TQListViewItem *selectedItem() const;
virtual void setOpen(TQListViewItem *,bool);
bool isOpen(TQListViewItem *) const;
virtual void setCurrentItem(TQListViewItem *);
TQListViewItem *currentItem() const;
TQListViewItem *firstChild() const;
TQListViewItem *lastItem() const;
int childCount() const;
virtual void setAllColumnsShowFocus(bool);
bool allColumnsShowFocus() const;
virtual void setItemMargin(int);
int itemMargin() const;
virtual void setRootIsDecorated(bool);
bool rootIsDecorated() const;
virtual void setSorting(int,bool = 1);
int sortColumn() const;
void setSortColumn(int);
SortOrder sortOrder() const;
void setSortOrder(SortOrder);
virtual void sort();
virtual void setFont(const TQFont &);
virtual void setPalette(const TQPalette &);
bool eventFilter(TQObject *,TQEvent *);
TQSize sizeHint() const;
TQSize minimumSizeHint() const;
void setShowSortIndicator(bool);
bool showSortIndicator() const;
virtual void setShowToolTips(bool);
bool showToolTips() const;
enum ResizeMode {
NoColumn,
AllColumns,
LastColumn
};
virtual void setResizeMode(ResizeMode);
ResizeMode resizeMode() const;
TQListViewItem *findItem(const TQString &,int,
ComparisonFlags = ExactMatch | CaseSensitive) const;
enum RenameAction {
Accept,
Reject
};
virtual void setDefaultRenameAction(RenameAction);
RenameAction defaultRenameAction() const;
bool isRenaming() const;
void hideColumn(int);
public slots:
virtual void clear();
void invertSelection();
void selectAll(bool);
void setContentsPos(int,int);
void triggerUpdate();
void adjustColumn(int);
signals:
void selectionChanged();
void selectionChanged(TQListViewItem *);
void currentChanged(TQListViewItem *);
void clicked(TQListViewItem *);
void clicked(TQListViewItem *,const TQPoint &,int);
void pressed(TQListViewItem *);
void pressed(TQListViewItem *,const TQPoint &,int);
void doubleClicked(TQListViewItem *);
void doubleClicked(TQListViewItem *,const TQPoint &,int);
void returnPressed(TQListViewItem *);
void spacePressed(TQListViewItem *);
void rightButtonClicked(TQListViewItem *,const TQPoint &,int);
void rightButtonPressed(TQListViewItem *,const TQPoint &,int);
void mouseButtonPressed(int,TQListViewItem *,const TQPoint &,int);
void mouseButtonClicked(int,TQListViewItem *,const TQPoint &,int);
void contextMenuRequested(TQListViewItem *,const TQPoint &,int);
void onItem(TQListViewItem *);
void onViewport();
void expanded(TQListViewItem *);
void collapsed(TQListViewItem *);
void dropped(TQDropEvent *);
void itemRenamed(TQListViewItem *,int,const TQString &);
void itemRenamed(TQListViewItem *,int);
protected:
void contentsMousePressEvent(TQMouseEvent *);
void contentsMouseReleaseEvent(TQMouseEvent *);
void contentsMouseMoveEvent(TQMouseEvent *);
void contentsMouseDoubleClickEvent(TQMouseEvent *);
void contentsContextMenuEvent(TQContextMenuEvent *);
void contentsDragEnterEvent(TQDragEnterEvent *);
void contentsDragMoveEvent(TQDragMoveEvent *);
void contentsDragLeaveEvent(TQDragLeaveEvent *);
void contentsDropEvent(TQDropEvent *);
virtual TQDragObject *dragObject();
virtual void startDrag();
void focusInEvent(TQFocusEvent *);
void focusOutEvent(TQFocusEvent *);
void keyPressEvent(TQKeyEvent *);
void resizeEvent(TQResizeEvent *);
void viewportResizeEvent(TQResizeEvent *);
void showEvent(TQShowEvent *);
void drawContentsOffset(TQPainter *,int,int,int,int,int,int);
virtual void paintEmptyArea(TQPainter *,const TQRect &);
void styleChange(TQStyle &);
void windowActivationChange(bool);
protected slots:
void updateContents();
void doAutoScroll();
private:
TQListView(const TQWidget &);
};
class TQCheckListItem : TQListViewItem
{
%TypeHeaderCode
#include <tqlistview.h>
%End
public:
enum Type {
RadioButton,
CheckBox,
Controller,
RadioButtonController,
CheckBoxController,
};
enum ToggleState {
Off,
NoChange,
On
};
TQCheckListItem(TQCheckListItem * /TransferThis/,const TQString &,
Type = RadioButtonController);
TQCheckListItem(TQCheckListItem * /TransferThis/,TQListViewItem *,
const TQString &,Type = RadioButtonController);
TQCheckListItem(TQListViewItem * /TransferThis/,const TQString &,
Type = RadioButtonController);
TQCheckListItem(TQListViewItem * /TransferThis/,TQListViewItem *,
const TQString &,Type = RadioButtonController);
TQCheckListItem(TQListView * /TransferThis/,const TQString &,
Type = RadioButtonController);
TQCheckListItem(TQListView * /TransferThis/,TQListViewItem *,
const TQString &,Type = RadioButtonController);
TQCheckListItem(TQListViewItem * /TransferThis/,const TQString &,
const TQPixmap &);
TQCheckListItem(TQListView * /TransferThis/,const TQString &,
const TQPixmap &);
void paintCell(TQPainter *,const TQColorGroup &,int,int,int);
virtual void paintFocus(TQPainter *,const TQColorGroup &,const TQRect &);
int width(const TQFontMetrics &,const TQListView *,int) const;
void setup();
virtual void setOn(bool);
bool isOn() const;
Type type() const;
TQString text() const;
TQString text(int) const;
void setTristate(bool);
bool isTristate() const;
ToggleState state() const;
void setState(ToggleState);
int rtti() const;
protected:
void activate();
void turnOffChild();
virtual void stateChange(bool);
};
class TQListViewItemIterator
{
%TypeHeaderCode
#include <tqlistview.h>
%End
public:
enum IteratorFlag {
Visible,
Invisible,
Selected,
Unselected,
Selectable,
NotSelectable,
DragEnabled,
DragDisabled,
DropEnabled,
DropDisabled,
Expandable,
NotExpandable,
Checked,
NotChecked
};
TQListViewItemIterator();
TQListViewItemIterator(TQListViewItem *);
TQListViewItemIterator(TQListViewItem *,int);
TQListViewItemIterator(const TQListViewItemIterator &);
TQListViewItemIterator(TQListView *);
TQListViewItemIterator(TQListView *,int);
TQListViewItemIterator &operator+=(int);
TQListViewItemIterator &operator-=(int);
TQListViewItem *current() const;
};
|