Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 5239

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qevent.cpp -->
  <title>Qt 4.8: Qt 3 Support Members for QDropEvent</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QDropEvent</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<h1 class="title">Qt 3 Support Members for QDropEvent</h1>
<p><b>The following class members are part of the <a href="qt3support.html">Qt 3 support layer</a>.</b> They are provided to help you port old code to Qt 4. We advise against using them in new code.</p>
<p><ul><li><a href="qdropevent.html">QDropEvent class reference</a></li></ul></p>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdropevent-qt3.html#Action-enum">Action</a></b> { Copy, Link, Move, Private, UserAction }</td></tr>
</table>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdropevent-qt3.html#accept-2">accept</a></b> ( bool <i>accept</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdropevent-qt3.html#acceptAction">acceptAction</a></b> ( bool <i>accept</i> = true )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> Action </td><td class="memItemRight bottomAlign"><b><a href="qdropevent-qt3.html#action">action</a></b> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qdropevent-qt3.html#data">data</a></b> ( const char * <i>f</i> ) const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qdropevent-qt3.html#encodedData">encodedData</a></b> ( const char * <i>format</i> ) const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual const char * </td><td class="memItemRight bottomAlign"><b><a href="qdropevent-qt3.html#format">format</a></b> ( int <i>n</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qdropevent-qt3.html#provides">provides</a></b> ( const char * <i>mimeType</i> ) const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdropevent-qt3.html#setPoint">setPoint</a></b> ( const QPoint &amp; <i>point</i> )</td></tr>
</table>
<h2>Member Type Documentation</h2>
<!-- $$$Action$$$Copy$$$Link$$$Move$$$Private$$$UserAction -->
<h3 class="fn"><a name="Action-enum"></a>enum QDropEvent::<span class="name">Action</span></h3>
<p>When a drag and drop action is completed, the target is expected to perform an action on the data provided by the source. This will be one of the following:</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QDropEvent::Copy</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The default action. The source simply uses the data provided in the operation.</td></tr>
<tr><td class="topAlign"><tt>QDropEvent::Link</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The source should somehow create a link to the location specified by the data.</td></tr>
<tr><td class="topAlign"><tt>QDropEvent::Move</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The source should somehow move the object from the location specified by the data to a new location.</td></tr>
<tr><td class="topAlign"><tt>QDropEvent::Private</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The target has special knowledge of the MIME type, which the source should respond to in a similar way to a Copy.</td></tr>
<tr><td class="topAlign"><tt>QDropEvent::UserAction</tt></td><td class="topAlign"><tt>Private</tt></td><td class="topAlign">The source and target can co-operate using special actions. This feature is not currently supported.</td></tr>
</table>
<p>The Link and Move actions only makes sense if the data is a reference, for example, text/uri-list file lists (see <a href="porting4.html#quridrag">QUriDrag</a>).</p>
<!-- @@@Action -->
<h2>Member Function Documentation</h2>
<!-- $$$accept$$$acceptbool -->
<h3 class="fn"><a name="accept-2"></a><span class="type">void</span> QDropEvent::<span class="name">accept</span> ( <span class="type">bool</span> <i>accept</i> )</h3>
<p>Call setAccepted(<i>accept</i>) instead.</p>
<!-- @@@accept -->
<!-- $$$acceptAction[overload1]$$$acceptActionbool -->
<h3 class="fn"><a name="acceptAction"></a><span class="type">void</span> QDropEvent::<span class="name">acceptAction</span> ( <span class="type">bool</span> <i>accept</i> = true )</h3>
<p>Call this to indicate that the action described by <a href="qdropevent-qt3.html#action">action</a>() is accepted (i.e&#x2e; if <i>accept</i> is true, which is the default), not merely the default copy action. If you call acceptAction(true), there is no need to also call accept(true).</p>
<!-- @@@acceptAction -->
<!-- $$$action[overload1]$$$action -->
<h3 class="fn"><a name="action"></a><span class="type"><a href="qdropevent-qt3.html#Action-enum">Action</a></span> QDropEvent::<span class="name">action</span> () const</h3>
<p>Use <a href="qdropevent.html#dropAction">dropAction</a>() instead.</p>
<p>The table below shows the correspondance between the return type of action() and the return type of <a href="qdropevent.html#dropAction">dropAction</a>().</p>
<table class="generic">
<thead><tr class="qt-style"><th >Old enum value</th><th >New enum value</th></tr></thead>
<tr valign="top" class="odd"><td ><a href="qdropevent-qt3.html#Action-enum">QDropEvent::Copy</a></td><td ><a href="qt.html#DropAction-enum">Qt::CopyAction</a></td></tr>
<tr valign="top" class="even"><td ><a href="qdropevent-qt3.html#Action-enum">QDropEvent::Move</a></td><td ><a href="qt.html#DropAction-enum">Qt::MoveAction</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qdropevent-qt3.html#Action-enum">QDropEvent::Link</a></td><td ><a href="qt.html#DropAction-enum">Qt::LinkAction</a></td></tr>
<tr valign="top" class="even"><td >other</td><td ><a href="qt.html#DropAction-enum">Qt::CopyAction</a></td></tr>
</table>
<!-- @@@action -->
<!-- $$$data[overload1]$$$dataconstchar* -->
<h3 class="fn"><a name="data"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QDropEvent::<span class="name">data</span> ( const <span class="type">char</span> * <i>f</i> ) const</h3>
<p>The encoded data is in <i>f</i>. Use <a href="qdropevent-qt3.html#encodedData">QDropEvent::encodedData</a>().</p>
<!-- @@@data -->
<!-- $$$encodedData[overload1]$$$encodedDataconstchar* -->
<h3 class="fn"><a name="encodedData"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QDropEvent::<span class="name">encodedData</span> ( const <span class="type">char</span> * <i>format</i> ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qmimesource.html#encodedData">QMimeSource::encodedData</a>().</p>
<p>Returns a byte array containing the drag's data, in <i>format</i>.</p>
<p><a href="qdropevent-qt3.html#data">data</a>() 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 that particular <i>format</i>.</p>
<p>The resulting data will have a size of 0 if the format was not available.</p>
<p><b>See also </b><a href="qdropevent-qt3.html#format">format</a>() and <a href="qbytearray.html#size">QByteArray::size</a>().</p>
<!-- @@@encodedData -->
<!-- $$$format[overload1]$$$formatint -->
<h3 class="fn"><a name="format"></a>const <span class="type">char</span> * QDropEvent::<span class="name">format</span> ( <span class="type">int</span> <i>n</i> = 0 ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qmimesource.html#format">QMimeSource::format</a>().</p>
<p>Returns a string describing one of the available data types for this drag. Common examples are &quot;text/plain&quot; and &quot;image/gif&quot;. If <i>n</i> is less than zero or greater than the number of available data types, format() returns 0.</p>
<p>This function is provided mainly for debugging. Most drop targets will use <a href="qdropevent-qt3.html#provides">provides</a>().</p>
<p><b>See also </b><a href="qdropevent-qt3.html#data">data</a>() and <a href="qdropevent-qt3.html#provides">provides</a>().</p>
<!-- @@@format -->
<!-- $$$provides[overload1]$$$providesconstchar* -->
<h3 class="fn"><a name="provides"></a><span class="type">bool</span> QDropEvent::<span class="name">provides</span> ( const <span class="type">char</span> * <i>mimeType</i> ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qmimesource.html#provides">QMimeSource::provides</a>().</p>
<p>Returns true if this event provides format <i>mimeType</i>; otherwise returns false.</p>
<p><b>See also </b><a href="qdropevent-qt3.html#data">data</a>().</p>
<!-- @@@provides -->
<!-- $$$setPoint[overload1]$$$setPointconstQPoint& -->
<h3 class="fn"><a name="setPoint"></a><span class="type">void</span> QDropEvent::<span class="name">setPoint</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>point</i> )</h3>
<p>Sets the drop to happen at the given <i>point</i>. You do not normally need to use this as it will be set internally before your widget receives the drop event.</p>
<!-- @@@setPoint -->
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>