1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
|
// This is the SIP interface definition for TQListBox, TQListBoxItem,
// TQListBoxPixmap and TQListBoxText.
//
// 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>TQListBox</Title>
<FuncSynopsis>
<FuncDef>bool <Function>itemYPos</Function></FuncDef>
<ParamDef>int <Parameter>index</Parameter></ParamDef>
<ParamDef>int *<Parameter>yPos</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes the <Literal>index</Literal> parameter and returns a tuple
containing the <Literal>bool</Literal> result and <Literal>yPos</Literal>.
(TQt v1.x)
</Para>
</Sect2>
<Sect2><Title>TQListBoxItem</Title>
<Para>
<Literal>TQListBoxItem</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>TQListBoxPixmap</Title>
<Para>
<Literal>TQListBoxPixmap</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>TQListBoxText</Title>
<Para>
<Literal>TQListBoxText</Literal> is fully implemented.
</Para>
</Sect2>
%End
%If (- TQt_2_00)
%ModuleHeaderCode
#include <qlistbox.h>
%End
// List box item types.
const int LBI_Undefined;
const int LBI_Text;
const int LBI_Pixmap;
const int LBI_UserDefined;
class TQListBox : TQTableView
{
%TypeHeaderCode
#include <qlistbox.h>
%End
public:
TQListBox(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
void setFont(const TQFont &);
uint count() const;
void insertStrList(const TQStrList *,int = -1);
// void insertStrList(const char **,int = -1,int = -1);
void insertItem(const TQListBoxItem * /Transfer/,int = -1);
void insertItem(const char *,int = -1);
void insertItem(const TQPixmap &,int = -1);
void inSort(const TQListBoxItem *);
void inSort(const char *);
void removeItem(int);
void clear();
const char *text(int) const;
const TQPixmap *pixmap(int) const;
void changeItem(const TQListBoxItem * /Transfer/,int);
void changeItem(const char *,int);
void changeItem(const TQPixmap &,int);
bool autoUpdate() const;
void setAutoUpdate(bool);
int numItemsVisible() const;
void setFixedVisibleLines(int);
int currentItem() const;
void setCurrentItem(int);
void centerCurrentItem();
int topItem() const;
void setTopItem(int);
void setBottomItem(int);
bool dragSelect() const;
void setDragSelect(bool);
bool autoScroll() const;
void setAutoScroll(bool);
bool autoScrollBar() const;
void setAutoScrollBar(bool);
bool scrollBar() const;
void setScrollBar(bool);
bool autoBottomScrollBar() const;
void setAutoBottomScrollBar(bool);
bool bottomScrollBar() const;
void setBottomScrollBar(bool);
bool smoothScrolling() const;
void setSmoothScrolling(bool);
int itemHeight() const;
int itemHeight(int) const;
long maxItemWidth() const;
bool isMultiSelection() const;
void setMultiSelection(bool);
void setSelected(int,bool);
bool isSelected(int) const;
TQSize sizeHint() const;
public slots:
void clearSelection();
signals:
void highlighted(int);
void selected(int);
void highlighted(const char *);
void selected(const char *);
void selectionChanged();
protected:
TQListBoxItem *item(int) const;
bool itemVisible(int);
int cellHeight(int = 0);
void paintCell(TQPainter *,int,int);
void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *);
void mouseDoubleClickEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *);
void focusInEvent(TQFocusEvent *);
void focusOutEvent(TQFocusEvent *);
void resizeEvent(TQResizeEvent *);
void timerEvent(TQTimerEvent *);
int findItem(int) const;
bool itemYPos(int,int *) const;
void updateItem(int,bool = 1);
void clearList();
void updateCellWidth();
void toggleCurrentItem();
private:
TQListBox(const TQListBox &);
};
%End
%If (TQt_2_00 -)
class TQListBox : TQScrollView
{
%TypeHeaderCode
#include <qlistbox.h>
%End
public:
TQListBox(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
virtual void setFont(const TQFont &);
uint count() const;
void insertStringList(const TQStringList &,int = -1);
void insertStrList(const TQStrList *,int = -1);
// void insertStrList(const TQStrList &,int = -1);
// void insertStrList(const char **,int = -1,int = -1);
void insertItem(const TQListBoxItem * /Transfer/,int = -1);
%If (TQt_2_1_0 -)
void insertItem(const TQListBoxItem * /Transfer/,const TQListBoxItem *);
%End
void insertItem(const TQString &,int = -1);
void insertItem(const TQPixmap &,int = -1);
%If (TQt_2_1_0 -)
void insertItem(const TQPixmap &,const TQString &,int = -1);
%End
void removeItem(int);
%If (- TQt_3_0_0)
void clear();
%End
TQString text(int) const;
const TQPixmap *pixmap(int) const;
void changeItem(const TQListBoxItem * /Transfer/,int);
void changeItem(const TQString &,int);
void changeItem(const TQPixmap &,int);
%If (TQt_2_1_0 -)
void changeItem(const TQPixmap &,const TQString &,int);
%End
void takeItem(const TQListBoxItem * /TransferBack/);
int numItemsVisible() const;
int currentItem() const;
%If (TQt_2_1_0 -)
TQString currentText() const;
%End
virtual void setCurrentItem(int);
virtual void setCurrentItem(TQListBoxItem *);
void centerCurrentItem();
int topItem() const;
virtual void setTopItem(int);
virtual void setBottomItem(int);
long maxItemWidth() const;
%If (- TQt_2_1_0)
enum SelectionMode {
Single,
Multi,
Extended
};
%End
%If (TQt_2_1_0 -)
enum SelectionMode {
Single,
Multi,
Extended,
NoSelection
};
%End
virtual void setSelectionMode(SelectionMode);
SelectionMode selectionMode() const;
void setMultiSelection(bool);
bool isMultiSelection() const;
virtual void setSelected(TQListBoxItem *,bool);
void setSelected(int,bool);
bool isSelected(int) const;
bool isSelected(TQListBoxItem *) const;
%If (TQt_3_1_0 -)
TQListBoxItem *selectedItem() const;
%End
TQSize sizeHint() const;
TQSize minimumSizeHint() const;
TQListBoxItem *item(int) const;
int index(const TQListBoxItem *) const;
%If (TQt_2_1_0 - TQt_3_0_0)
TQListBoxItem *findItem(const TQString &) const;
%End
%If (TQt_3_0_0 -)
TQListBoxItem *findItem(const TQString &,
ComparisonFlags = BeginsWith) const;
%End
void triggerUpdate(bool);
bool itemVisible(int);
bool itemVisible(const TQListBoxItem *);
enum LayoutMode {
FixedNumber,
FitToWidth,
FitToHeight = FitToWidth,
Variable
};
virtual void setColumnMode(LayoutMode /Constrained/);
virtual void setColumnMode(int);
virtual void setRowMode(LayoutMode /Constrained/);
virtual void setRowMode(int);
LayoutMode columnMode() const;
LayoutMode rowMode() const;
int numColumns() const;
int numRows() const;
bool variableWidth() const;
virtual void setVariableWidth(bool);
bool variableHeight() const;
virtual void setVariableHeight(bool);
void viewportPaintEvent(TQPaintEvent *);
int itemHeight(int = 0) const;
TQListBoxItem *itemAt(TQPoint) const;
TQRect itemRect(TQListBoxItem *) const;
%If (TQt_2_1_0 -)
TQListBoxItem *firstItem() const;
void sort(bool = 1);
%End
public slots:
%If (TQt_3_0_0 -)
void clear();
%End
virtual void ensureCurrentVisible();
virtual void clearSelection();
%If (TQt_2_1_0 - TQt_3_0_0)
void selectAll(bool);
void invertSelection();
%End
%If (TQt_3_0_0 -)
virtual void selectAll(bool);
virtual void invertSelection();
%End
signals:
void highlighted(int);
void selected(int);
void highlighted(const TQString &);
void selected(const TQString &);
void highlighted(TQListBoxItem *);
void selected(TQListBoxItem *);
void selectionChanged();
%If (TQt_2_1_0 -)
void selectionChanged(TQListBoxItem *);
void currentChanged(TQListBoxItem *);
void clicked(TQListBoxItem *);
void clicked(TQListBoxItem *,const TQPoint &);
void pressed(TQListBoxItem *);
void pressed(TQListBoxItem *,const TQPoint &);
void doubleClicked(TQListBoxItem *);
void returnPressed(TQListBoxItem *);
void rightButtonClicked(TQListBoxItem *,const TQPoint &);
void rightButtonPressed(TQListBoxItem *,const TQPoint &);
void mouseButtonPressed(int,TQListBoxItem *,const TQPoint &);
void mouseButtonClicked(int,TQListBoxItem *,const TQPoint &);
%End
%If (TQt_3_0_0 -)
void contextMenuRequested(TQListBoxItem *,const TQPoint &);
%End
%If (TQt_2_1_0 -)
void onItem(TQListBoxItem *);
void onViewport();
%End
protected:
%If (- TQt_3_0_0)
void viewportMousePressEvent(TQMouseEvent *);
void viewportMouseReleaseEvent(TQMouseEvent *);
void viewportMouseDoubleClickEvent(TQMouseEvent *);
void viewportMouseMoveEvent(TQMouseEvent *);
%End
void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *);
void mouseDoubleClickEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *);
%If (TQt_3_0_0 -)
void contentsContextMenuEvent(TQContextMenuEvent *);
%End
void keyPressEvent(TQKeyEvent *);
void focusInEvent(TQFocusEvent *);
void focusOutEvent(TQFocusEvent *);
void resizeEvent(TQResizeEvent *);
void showEvent(TQShowEvent *);
%If (TQt_3_0_0 -)
bool eventFilter(TQObject *,TQEvent *);
%End
void updateItem(int);
void updateItem(TQListBoxItem *);
virtual void paintCell(TQPainter *,int,int);
void toggleCurrentItem();
%If (TQt_2_2_0 -)
bool isRubberSelecting() const;
%End
void doLayout() const;
%If (TQt_3_0_0 -)
void windowActivationChange(bool);
%End
protected slots:
%If (TQt_2_1_0 -)
void clearInputString();
%End
private:
TQListBox(const TQListBox &);
};
%End
class TQListBoxItem
{
%TypeHeaderCode
#include <qlistbox.h>
%End
public:
%If (- TQt_2_00)
TQListBoxItem();
%End
%If (TQt_2_00 -)
TQListBoxItem(TQListBox * /TransferThis/ = 0);
%End
%If (TQt_2_1_0 -)
TQListBoxItem(TQListBox * /TransferThis/,TQListBoxItem *);
%End
%If (- TQt_2_00)
virtual const char *text() const;
%End
%If (TQt_2_00 -)
virtual TQString text() const;
%End
virtual const TQPixmap *pixmap() const;
%If (- TQt_2_00)
virtual int height(const TQListBox *) const = 0;
virtual int width(const TQListBox *) const = 0;
%End
%If (TQt_2_00 -)
virtual int height(const TQListBox *) const;
virtual int width(const TQListBox *) const;
%End
%If (TQt_2_00 - TQt_3_0_0)
bool selected() const;
%End
%If (TQt_2_1_0 - TQt_3_0_0)
bool current() const;
%End
%If (TQt_3_0_0 -)
bool isSelected() const;
bool isCurrent() const;
%End
%If (TQt_2_00 -)
TQListBox *listBox() const;
%End
%If (TQt_2_1_0 -)
void setSelectable(bool);
bool isSelectable() const;
TQListBoxItem *next() const;
TQListBoxItem *prev() const;
%End
%If (TQt_3_0_0 -)
virtual int rtti() const;
%End
protected:
virtual void paint(TQPainter *) = 0;
%If (- TQt_2_00)
void setText(const char *);
%End
%If (TQt_2_00 -)
virtual void setText(const TQString &);
%End
%If (TQt_2_1_0 -)
void setCustomHighlighting(bool);
%End
private:
TQListBoxItem(const TQListBoxItem &);
};
class TQListBoxText : TQListBoxItem
{
%TypeHeaderCode
#include <qlistbox.h>
%End
public:
%If (- TQt_2_00)
TQListBoxText(const char * = 0);
%End
%If (TQt_2_00 -)
TQListBoxText(TQListBox * /TransferThis/,
const TQString & = TQString::null);
TQListBoxText(const TQString & = TQString::null);
%End
%If (TQt_2_1_0 -)
TQListBoxText(TQListBox * /TransferThis/,const TQString &,TQListBoxItem *);
%End
%If (- TQt_2_00)
void paint(TQPainter *);
%End
int height(const TQListBox *) const;
int width(const TQListBox *) const;
%If (TQt_3_0_0 -)
int rtti() const;
%End
protected:
%If (TQt_2_00 -)
void paint(TQPainter *);
%End
private:
TQListBoxText(const TQListBoxText &);
};
class TQListBoxPixmap : TQListBoxItem
{
%TypeHeaderCode
#include <qlistbox.h>
%End
public:
%If (TQt_2_00 -)
TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &);
%End
TQListBoxPixmap(const TQPixmap &);
%If (TQt_2_1_0 -)
TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &,
TQListBoxItem *);
TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &,
const TQString &);
TQListBoxPixmap(const TQPixmap &,const TQString &);
TQListBoxPixmap(TQListBox * /TransferThis/,const TQPixmap &,
const TQString &,TQListBoxItem *);
%End
const TQPixmap *pixmap() const;
%If (TQt_2_00 -)
int height(const TQListBox *) const;
int width(const TQListBox *) const;
%End
%If (TQt_3_0_0 -)
int rtti() const;
%End
protected:
void paint(TQPainter *);
%If (- TQt_2_00)
int height(const TQListBox *) const;
int width(const TQListBox *) const;
%End
private:
TQListBoxPixmap(const TQListBoxPixmap &);
};
|