📄 qicondrag.3qt
字号:
'\" t.TH QIconDrag 3qt "11 October 2001" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQIconDrag \- Supports drag and drop operations within a QIconView.PP\fC#include <qiconview.h>\fR.PPInherits QDragObject..PP.SS "Public Members".in +1c.ti -1c.BI "virtual \fB~QIconDrag\fR ()".br.ti -1c.BI "void \fBappend\fR ( const QIconDragItem & i, const QRect & pr, const QRect & tr )".br.ti -1c.BI "virtual QByteArray \fBencodedData\fR ( const char * mime ) const".br.in -1c.SS "Static Public Members".in +1c.ti -1c.BI "bool \fBcanDecode\fR ( QMimeSource * e )".br.in -1c.SH DESCRIPTIONThe QIconDrag class supports drag and drop operations within a QIconView..PPA QIconDrag object is used to maintain information about the positions of dragged items and data associated with the dragged items. QIconViews are able to use this information to paint the dragged items in the correct positions. Internally QIconDrag stores the data associated with drag items in QIconDragItem objects..PPIf you want to use the extended drag-and-drop functionality of QIconView create a QIconDrag object in a reimplementation of QIconView::dragObject(). Then create a QIconDragItem for each item which should be dragged, set the data it represents with QIconDragItem::setData(), and add each QIconDragItem to the drag object using append()..PPThe data in QIconDragItems is stored in a QByteArray and is mime-typed (see QMimeSource and the Drag and Drop overview). If you want to use your own mime-types derive a class from QIconDrag and reimplement format(), encodedData() and canDecode()..PPThe fileiconview example program demonstrates the use of the QIconDrag class including subclassing and reimplementing dragObject(), format(), encodedData() and canDecode(). See the files \fCqt/examples/fileiconview/qfileiconview.h\fR and \fCqt/examples/fileiconview/qfileiconview.cpp\fR..PPSee also QMimeSource::format() and Drag And Drop Classes..SH MEMBER FUNCTION DOCUMENTATION.SH "QIconDrag::~QIconDrag ()\fC [virtual]\fR"Destructor..SH "void QIconDrag::append ( const QIconDragItem & i, const QRect & pr, const QRect & tr )"Append the QIconDragItem, \fIi\fR, to the QIconDrag object's list of items. You must also supply the geometry of the pixmap, \fIpr\fR, and of the textual caption, \fItr\fR..PPSee also QIconDragItem..PPExample: fileiconview/qfileiconview.cpp..SH "bool QIconDrag::canDecode ( QMimeSource * e )\fC [static]\fR"Returns TRUE if \fIe\fR can be decoded by the QIconDrag, otherwise return FALSE..PPExample: fileiconview/qfileiconview.cpp..SH "QByteArray QIconDrag::encodedData ( const char * mime ) const\fC [virtual]\fR"Returns the encoded data of the drag object if \fImime\fR is application/x-qiconlist..PPExample: fileiconview/qfileiconview.cpp..PPReimplemented from QMimeSource..SH "SEE ALSO".BR http://doc.trolltech.com/qicondrag.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qicondrag.3qt) and the Qtversion (3.0.0).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -