⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qdropevent.3qt

📁 tmark1.11:用于生成QT/EMBEDDED应用工程的Markfile文件
💻 3QT
字号:
.TH QDropEvent 3qt "6 July 1999" "Troll Tech AS" \" -*- nroff -*-.\" Copyright 1992-1999 Troll Tech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQDropEvent \- Event sent when a drag-and-drop is completed.SH SYNOPSIS.br.PP\fC#include <qevent.h>\fR.PPInherits QEvent and QMimeSource..PPInherited by QDragMoveEvent..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQDropEvent\fR ( const QPoint & " "pos" ", Type " "typ" "=Drop )".br.ti -1c.BI "const QPoint& \fBpos\fR () const".br.ti -1c.BI "bool \fBisAccepted\fR () const".br.ti -1c.BI "void \fBaccept\fR ( bool " "y" "=TRUE )".br.ti -1c.BI "void \fBignore\fR ()".br.ti -1c.BI "bool \fBisActionAccepted\fR () const".br.ti -1c.BI "void \fBacceptAction\fR ( bool " "y" "=TRUE )".br.ti -1c.BI "enum \fBAction\fR { Copy, Link, Move, Private, UserAction=100 }".br.ti -1c.BI "void \fBsetAction\fR ( Action a )".br.ti -1c.BI "Action \fBaction\fR () const".br.ti -1c.BI "QWidget* \fBsource\fR () const".br.ti -1c.BI "virtual const char* \fBformat\fR ( int " "n" " = 0 ) const".br.ti -1c.BI "virtual QByteArray \fBencodedData\fR ( const char * ) const".br.ti -1c.BI "virtual bool \fBprovides\fR ( const char * ) const".br.ti -1c.BI "QByteArray \fBdata\fR ( const char * f ) const".br.ti -1c.BI "void \fBsetPoint\fR ( const QPoint & np )".br.in -1c.SH DESCRIPTIONEvent sent when a drag-and-drop is completed..PPWhen a widget accepts drop events, it will receive this event if it has accepted the most recent QDragEnterEvent or QDragMoveEvent sent to it..PPThe widget should use data() to extract data in an appropriate format..PPExamples:.(ldesktop/desktop.cpp.)l.SS "Member Type Documentation".SH "QDropEvent::Action"This type describes the action which a source requests that a target perform with dropped data. The values are:.TP\fCCopy\fR - the default action. The source simply users the data provided in the operation..TP\fCLink.\fR The source should somehow create a link to the location specified by the data..TP\fCMove.\fR The source should somehow move the object from the location specified by the data to a new location..TP\fCPrivate.\fR The target has special knowledge of the MIME type, which the source should respond to similar to a Copy..TP\fCUserAction.\fR The source and target can co-operate using special actions. This feature is not supported in Qt at this time..PPThe Link and Move actions only makes sense if the data is a reference, such as <a href="quridrag.html">text/uri-list file lists.SH MEMBER FUNCTION DOCUMENTATION.SH "void QDropEvent::acceptAction ( bool y=TRUE=TRUE )"Call this to indicate that the action described by action() is accepted, not merely the default copy action. If you call acceptAction(TRUE), there is no need to also call accept(TRUE)..SH "Action QDropEvent::action () const"Returns the action which the target is requesting be performed with the data. If your application understands the action and can process the supplied data, call acceptAction(); if your application can process the supplied data but can only perform the Copy action, call accept()..SH "QByteArray QDropEvent::data ( const char * f ) const"\fBThis function is obsolete.\fR It is provided to keep old programs working. We strongly advise against using it in new code..PPUse QDropEvent::encodedData()..SH "QByteArray QDropEvent::encodedData ( const char * format ) const \fC[virtual]\fR"Returns a byte array containing the payload data of this drag, in \fIformat.\fR.PPdata() normally needs to get the data from the drag source, which is potentially very slow, so it's advisable to call this function only if you're sure that you will need the data in \fIformat.\fR.PPThe resulting data will have a size of 0 if the format was not available..PPSee also: format() and QByteArray::size()..PPReimplemented from QMimeSource..SH "const char* QDropEvent::format ( int n = 0 ) const \fC[virtual]\fR"Returns a string describing one of the available data types for this drag. Common examples are "text/plain" and "image/gif". If \fIn\fR is less than zero or greater than the number of available data types, format() returns 0..PPThis function is provided mainly for debugging. Most drop targets will use provides()..PPSee also: data() and provides()..PPReimplemented from QMimeSource..SH "void QDropEvent::ignore ()"The opposite of accept()..SH "bool QDropEvent::isAccepted () const"Returns TRUE if the drop target accepts the event..SH "const QPoint& QDropEvent::pos () const"Returns the position where the drop was made..SH "bool QDropEvent::provides ( const char * mimeType ) const \fC[virtual]\fR"Returns TRUE if this event provides format \fImimeType\fR or FALSE if it does not..PPSee also: data()..PPReimplemented from QMimeSource..SH "void QDropEvent::setAction ( Action a )"Sets the action. This is used internally, you should not need to call this in your code - the \fIsource\fR decides the action, not the target..SH "QWidget* QDropEvent::source () const"If the source of the drag operation is a widget in this application, this function returns that source, otherwise 0. The source of the operation is the first parameter to to drag object subclass..PPThis is useful if your widget needs special behavior when dragging to itelf, etc..PPSee QDragObject::QDragObject() and subclasses..SH "SEE ALSO".BR http://www.troll.no/qt/qdropevent.html.SH COPYRIGHTCopyright 1992-1999 Troll Tech AS.  See the license file included inthe distribution for a complete license statement..SH AUTHORGenerated automatically from the source code.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -