summaryrefslogtreecommitdiffstats
path: root/sip/qt/qiconview.sip
blob: a9dc9d5b9fe169265e4a5bd71e857306dbd1436b (plain)
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
// This is the SIP interface definition for TQIconView, TQIconViewItem, TQIconDrag
// and TQIconDragItem.
//
// Copyright (c) 2007
// 	Riverbank Computing Limited <info@riverbankcomputing.co.uk>
// 
// 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>TQIconView (TQt v2.1+)</Title>
<FuncSynopsis>
        <FuncDef>TQIconViewItem *<Function>makeRowLayout</Function></FuncDef>
        <ParamDef>TQIconViewItem *<Parameter>begin</Parameter></ParamDef>
        <ParamDef>int &<Parameter>y</Parameter></ParamDef>
</FuncSynopsis>
<Para>
Not yet implemented.
</Para>
</Sect2>

<Sect2><Title>TQIconViewItem (TQt v2.1+)</Title>
<Para>
<Literal>TQIconViewItem</Literal> is fully implemented.
</Para>
</Sect2>

<Sect2><Title>TQIconDrag (TQt v2.1+)</Title>
<Para>
<Literal>TQIconDrag</Literal> is fully implemented.
</Para>
</Sect2>

<Sect2><Title>TQIconDragItem (TQt v2.1+)</Title>
<Para>
<Literal>TQIconDragItem</Literal> is fully implemented.
</Para>
</Sect2>
%End


%If (TQt_ICONVIEW)
%If (TQt_2_1_0 -)

%If (TQt_DRAGANDDROP)

class TQIconDragItem
{
%TypeHeaderCode
#include <tqiconview.h>
%End

public:
	TQIconDragItem();

	virtual TQByteArray data() const;
	virtual void setData(const TQByteArray &);
};

 
class TQIconDrag : TQDragObject
{
%TypeHeaderCode
#include <tqiconview.h>
%End

public:
	TQIconDrag(TQWidget * /TransferThis/,const char * = 0);
 
	void append(const TQIconDragItem &,const TQRect &,const TQRect &);
 
	virtual const char* format(int) const;
	static bool canDecode(TQMimeSource *);
	virtual TQByteArray encodedData(const char *) const;

private:
%If (TQt_3_1_0 -)
	TQIconDrag(const TQIconDrag &);
%End
};

%End


class TQIconViewItem : TQt
{
%TypeHeaderCode
#include <tqiconview.h>
%End

public:
	TQIconViewItem(TQIconView * /TransferThis/);
	TQIconViewItem(TQIconView * /TransferThis/,TQIconViewItem *);
	TQIconViewItem(TQIconView * /TransferThis/,const TQString &);
	TQIconViewItem(TQIconView * /TransferThis/,TQIconViewItem *,
		      const TQString &);
	TQIconViewItem(TQIconView * /TransferThis/,const TQString &,
		      const TQPixmap &);
	TQIconViewItem(TQIconView * /TransferThis/,TQIconViewItem *,
		      const TQString &,const TQPixmap &);
%If (TQt_3_0_0 -)
	TQIconViewItem(TQIconView * /TransferThis/,const TQString &,
		      const TQPicture &);
	TQIconViewItem(TQIconView * /TransferThis/,TQIconViewItem *,
		      const TQString &,const TQPicture &);
%End

	virtual void setRenameEnabled(bool);
	virtual void setDragEnabled(bool);
	virtual void setDropEnabled(bool);

	virtual TQString text() const;
	virtual TQPixmap *pixmap() const;
%If (TQt_3_0_0 -)
	virtual TQPicture *picture() const;
%End
	virtual TQString key() const;

	bool renameEnabled() const;
	bool dragEnabled() const;
	bool dropEnabled() const;

	TQIconView *iconView() const;
	TQIconViewItem *prevItem() const;
	TQIconViewItem *nextItem() const;

	int index() const;

	virtual void setSelected(bool,bool);
	virtual void setSelected(bool);
	virtual void setSelectable(bool);

	bool isSelected() const;
	bool isSelectable() const;

	virtual void repaint();

%If (- TQt_3_0_0)
	virtual void move(int,int);
%End
%If (TQt_3_0_0 -)
	virtual bool move(int,int);
%End
	virtual void moveBy(int,int);
%If (- TQt_3_0_0)
	virtual void move(const TQPoint &);
%End
%If (TQt_3_0_0 -)
	virtual bool move(const TQPoint &);
%End
	virtual void moveBy(const TQPoint &);

	TQRect rect() const;
	int x() const;
	int y() const;
	int width() const;
	int height() const;
	TQSize size() const;
	TQPoint pos() const;
	TQRect textRect(bool = 1) const;
	TQRect pixmapRect(bool = 1) const;
%If (- TQt_3_0_0)
	bool contains(TQPoint) const;
	bool intersects(TQRect) const;
%End
%If (TQt_3_0_0 -)
	bool contains(const TQPoint &) const;
	bool intersects(const TQRect &) const;
%End

	virtual bool acceptDrop(const TQMimeSource *) const;

	void rename();

	virtual int compare(TQIconViewItem *) const;

	virtual void setText(const TQString &);
	virtual void setPixmap(const TQPixmap &);
%If (TQt_3_0_0 -)
	virtual void setPicture(const TQPicture &);
%End
	virtual void setText(const TQString &,bool,bool = 1);
	virtual void setPixmap(const TQPixmap &,bool,bool = 1);
	virtual void setKey(const TQString &);

%If (TQt_3_0_0 -)
	virtual int rtti() const;
%End

protected:
	virtual void removeRenameBox();
	virtual void calcRect(const TQString & = TQString::null);
	virtual void paintItem(TQPainter *,const TQColorGroup &);
	virtual void paintFocus(TQPainter *,const TQColorGroup &);
%If (TQt_DRAGANDDROP)
	virtual void dropped(TQDropEvent *,const TQValueList<TQIconDragItem> &);
%End
	virtual void dragEntered();
	virtual void dragLeft();
	void setItemRect(const TQRect &);
	void setTextRect(const TQRect &);
	void setPixmapRect(const TQRect &);
	void calcTmpText();
%If (TQt_3_1_0 -)
	TQString tempText() const;
%End
};


class TQIconView : TQScrollView
{
%TypeHeaderCode
#include <tqiconview.h>
%End

public:
	enum SelectionMode {
		Single,
		Multi,
		Extended,
		NoSelection
	};

	enum Arrangement {
		LeftToRight,
		TopToBottom
	};

	enum ResizeMode {
		Fixed,
		Adjust
	};

	enum ItemTextPos {
		Bottom,
		Right
	};

	TQIconView(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);

	virtual void insertItem(TQIconViewItem *,TQIconViewItem * = 0);
	virtual void takeItem(TQIconViewItem *);

	int index(const TQIconViewItem *) const;

	TQIconViewItem *firstItem() const;
	TQIconViewItem *lastItem() const;
	TQIconViewItem *currentItem() const;
	virtual void setCurrentItem(TQIconViewItem *);
	virtual void setSelected(TQIconViewItem *,bool,bool = 0);

	uint count() const;

	virtual void showEvent(TQShowEvent *);

	virtual void setSelectionMode(SelectionMode);
	SelectionMode selectionMode() const;

	TQIconViewItem *findItem(const TQPoint &) const;
%If (- TQt_3_0_0)
	TQIconViewItem *findItem(const TQString &) const;
%End
%If (TQt_3_0_0 -)
	TQIconViewItem *findItem(const TQString &,
				ComparisonFlags = BeginsWith) const;
%End
	virtual void selectAll(bool);
	virtual void clearSelection();
	virtual void invertSelection();

	virtual void repaintItem(TQIconViewItem *);
%If (TQt_3_1_0 -)
	void repaintSelectedItems();
%End

	void ensureItemVisible(TQIconViewItem *);
	TQIconViewItem* findFirstVisibleItem(const TQRect &) const;
	TQIconViewItem* findLastVisibleItem(const TQRect &) const;

	virtual void clear();

	virtual void setGridX(int);
	virtual void setGridY(int);
	int gridX() const;
	int gridY() const;
	virtual void setSpacing(int);
	int spacing() const;
	virtual void setItemTextPos(ItemTextPos);
	ItemTextPos itemTextPos() const;
	virtual void setItemTextBackground(const TQBrush &);
	TQBrush itemTextBackground() const;
	virtual void setArrangement(Arrangement);
	Arrangement arrangement() const;
	virtual void setResizeMode(ResizeMode);
	ResizeMode resizeMode() const;
	virtual void setMaxItemWidth(int);
	int maxItemWidth() const;
	virtual void setMaxItemTextLength(int);
	int maxItemTextLength() const;
	virtual void setAutoArrange(bool);
	bool autoArrange() const;
	virtual void setShowToolTips(bool);
	bool showToolTips() const;

	void setSorting(bool,bool = 1);
	bool sorting() const;
	bool sortDirection() const;

	virtual void setItemsMovable(bool);
	bool itemsMovable() const;
	virtual void setWordWrapIconText(bool);
	bool wordWrapIconText() const;

	bool eventFilter(TQObject *,TQEvent *);

	TQSize minimumSizeHint() const;
%If (- TQt_3_0_0)
	TQSizePolicy sizePolicy() const;
%End
	TQSize sizeHint() const;

	virtual void sort(bool = 1);

	virtual void setFont(const TQFont &);
	virtual void setPalette(const TQPalette &);

%If (TQt_3_0_0 -)
	bool isRenaming() const;
%End

public slots:
	virtual void arrangeItemsInGrid(const TQSize &,bool = 1);
	virtual void arrangeItemsInGrid(bool = 1);
	virtual void setContentsPos(int,int);
	virtual void updateContents();

signals:
	void selectionChanged();
	void selectionChanged(TQIconViewItem *);
	void currentChanged(TQIconViewItem *);
	void clicked(TQIconViewItem *);
	void clicked(TQIconViewItem *,const TQPoint &);
	void pressed(TQIconViewItem *);
	void pressed(TQIconViewItem *,const TQPoint &);

	void doubleClicked(TQIconViewItem *);
	void returnPressed(TQIconViewItem *);
	void rightButtonClicked(TQIconViewItem *,const TQPoint &);
	void rightButtonPressed(TQIconViewItem *,const TQPoint &);
	void mouseButtonPressed(int,TQIconViewItem *,const TQPoint &);
	void mouseButtonClicked(int,TQIconViewItem *,const TQPoint &);
%If (TQt_3_0_0 -)
	void contextMenuRequested(TQIconViewItem *,const TQPoint &);
%End
%If (TQt_DRAGANDDROP)
	void dropped(TQDropEvent *,const TQValueList<TQIconDragItem> &);
%End
	void moved();
	void onItem(TQIconViewItem *);
	void onViewport();
	void itemRenamed(TQIconViewItem *,const TQString &);
	void itemRenamed(TQIconViewItem *);

protected slots:
	virtual void doAutoScroll();
	virtual void adjustItems();
	virtual void slotUpdate();

protected:
%If (- TQt_3_0_0)
	virtual void drawContents(TQPainter *,int,int,int,int);
	virtual void contentsMousePressEvent(TQMouseEvent *);
	virtual void contentsMouseReleaseEvent(TQMouseEvent *);
	virtual void contentsMouseMoveEvent(TQMouseEvent *);
	virtual void contentsMouseDoubleClickEvent(TQMouseEvent *);
%End
%If (TQt_3_0_0 -)
	void drawContents(TQPainter *,int,int,int,int);
	void contentsMousePressEvent(TQMouseEvent *);
	void contentsMouseReleaseEvent(TQMouseEvent *);
	void contentsMouseMoveEvent(TQMouseEvent *);
	void contentsMouseDoubleClickEvent(TQMouseEvent *);
	void contentsContextMenuEvent(TQContextMenuEvent *);
%End

%If (- TQt_3_0_0)
%If (TQt_DRAGANDDROP)
	virtual void contentsDragEnterEvent(TQDragEnterEvent *);
	virtual void contentsDragMoveEvent(TQDragMoveEvent *);
	virtual void contentsDragLeaveEvent(TQDragLeaveEvent *);
	virtual void contentsDropEvent(TQDropEvent *);
%End

	virtual void resizeEvent(TQResizeEvent *);
	virtual void keyPressEvent(TQKeyEvent *);
	virtual void focusInEvent(TQFocusEvent *);
	virtual void focusOutEvent(TQFocusEvent *);
	virtual void enterEvent(TQEvent *);
%End
%If (TQt_3_0_0 -)
%If (TQt_DRAGANDDROP)
	void contentsDragEnterEvent(TQDragEnterEvent *);
	void contentsDragMoveEvent(TQDragMoveEvent *);
	void contentsDragLeaveEvent(TQDragLeaveEvent *);
	void contentsDropEvent(TQDropEvent *);
%End

	void resizeEvent(TQResizeEvent *);
	void keyPressEvent(TQKeyEvent *);
	void focusInEvent(TQFocusEvent *);
	void focusOutEvent(TQFocusEvent *);
	void enterEvent(TQEvent *);
%End

	virtual void drawRubber(TQPainter *);
%If (TQt_DRAGANDDROP)
	virtual TQDragObject *dragObject();
	virtual void startDrag();
%End
	virtual void insertInGrid(TQIconViewItem *);
	virtual void drawBackground(TQPainter *,const TQRect &);

	void emitSelectionChanged(TQIconViewItem * = 0);
	void emitRenamed(TQIconViewItem *);

%If (- TQt_3_0_0)
//	TQIconViewItem *makeRowLayout(TQIconViewItem *,int &);
%End
%If (TQt_3_0_0 -)
//	TQIconViewItem *makeRowLayout(TQIconViewItem *,int &,bool &);
%End

	void styleChange(TQStyle &);
%If (TQt_3_0_0 -)
	void windowActivationChange(bool);
%End

private:
	TQIconView(const TQIconView &);
};

%End
%End