Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 4953

qt-doc-4.8.5-10.fc18.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" />
<!-- qclipboard.cpp -->
  <title>Qt 4.8: QClipboard Class Reference</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>QClipboard</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">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#notes-for-x11-users">Notes for X11 Users</a></li>
<li class="level2"><a href="#notes-for-mac-os-x-users">Notes for Mac OS X Users</a></li>
<li class="level2"><a href="#notes-for-windows-and-mac-os-x-users">Notes for Windows and Mac OS X Users</a></li>
</ul>
</div>
<h1 class="title">QClipboard Class Reference</h1>
<!-- $$$QClipboard-brief -->
<p>The QClipboard class provides access to the window system clipboard. <a href="#details">More...</a></p>
<!-- @@@QClipboard -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QClipboard&gt;</span></pre><p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<ul>
<li><a href="qclipboard-members.html">List of all members, including inherited members</a></li>
<li><a href="qclipboard-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#Mode-enum">Mode</a></b> { Clipboard, Selection, FindBuffer }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#clear">clear</a></b> ( Mode <i>mode</i> = Clipboard )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QImage </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#image">image</a></b> ( Mode <i>mode</i> = Clipboard ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QMimeData * </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#mimeData">mimeData</a></b> ( Mode <i>mode</i> = Clipboard ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#ownsClipboard">ownsClipboard</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#ownsFindBuffer">ownsFindBuffer</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#ownsSelection">ownsSelection</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPixmap </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#pixmap">pixmap</a></b> ( Mode <i>mode</i> = Clipboard ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#setImage">setImage</a></b> ( const QImage &amp; <i>image</i>, Mode <i>mode</i> = Clipboard )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#setMimeData">setMimeData</a></b> ( QMimeData * <i>src</i>, Mode <i>mode</i> = Clipboard )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#setPixmap">setPixmap</a></b> ( const QPixmap &amp; <i>pixmap</i>, Mode <i>mode</i> = Clipboard )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#setText">setText</a></b> ( const QString &amp; <i>text</i>, Mode <i>mode</i> = Clipboard )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#supportsFindBuffer">supportsFindBuffer</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#supportsSelection">supportsSelection</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#text">text</a></b> ( Mode <i>mode</i> = Clipboard ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#text-2">text</a></b> ( QString &amp; <i>subtype</i>, Mode <i>mode</i> = Clipboard ) const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#changed">changed</a></b> ( QClipboard::Mode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#dataChanged">dataChanged</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#findBufferChanged">findBufferChanged</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#selectionChanged">selectionChanged</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qclipboard.html#event">event</a></b> ( QEvent * <i>e</i> )</td></tr>
</table>
<ul>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QClipboard-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QClipboard class provides access to the window system clipboard.</p>
<p>The clipboard offers a simple mechanism to copy and paste data between applications.</p>
<p>QClipboard supports the same data types that <a href="qdrag.html">QDrag</a> does, and uses similar mechanisms. For advanced clipboard usage read <a href="dnd.html">Drag and Drop</a>.</p>
<p>There is a single QClipboard object in an application, accessible as <a href="qapplication.html#clipboard">QApplication::clipboard</a>().</p>
<p>Example:</p>
<pre class="cpp"> <span class="type">QClipboard</span> <span class="operator">*</span>clipboard <span class="operator">=</span> <span class="type"><a href="qapplication.html">QApplication</a></span><span class="operator">::</span>clipboard();
 <span class="type"><a href="qstring.html">QString</a></span> originalText <span class="operator">=</span> clipboard<span class="operator">-</span><span class="operator">&gt;</span><a href="qclipboard.html#text">text</a>();
 <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 clipboard<span class="operator">-</span><span class="operator">&gt;</span><a href="qclipboard.html#setText">setText</a>(newText);</pre>
<p>QClipboard features some convenience functions to access common data types: <a href="qclipboard.html#setText">setText</a>() allows the exchange of Unicode text and <a href="qclipboard.html#setPixmap">setPixmap</a>() and <a href="qclipboard.html#setImage">setImage</a>() allows the exchange of QPixmaps and QImages between applications. The <a href="qclipboard.html#setMimeData">setMimeData</a>() function is the ultimate in flexibility: it allows you to add any <a href="qmimedata.html">QMimeData</a> into the clipboard. There are corresponding getters for each of these, e.g&#x2e; <a href="qclipboard.html#text">text</a>(), <a href="qclipboard.html#image">image</a>() and <a href="qclipboard.html#pixmap">pixmap</a>(). You can clear the clipboard by calling <a href="qclipboard.html#clear">clear</a>().</p>
<p>A typical example of the use of these functions follows:</p>
<pre class="cpp"> <span class="type">void</span> DropArea<span class="operator">::</span>paste()
 {
     <span class="keyword">const</span> <span class="type">QClipboard</span> <span class="operator">*</span>clipboard <span class="operator">=</span> <span class="type"><a href="qapplication.html">QApplication</a></span><span class="operator">::</span>clipboard();
     <span class="keyword">const</span> <span class="type"><a href="qmimedata.html">QMimeData</a></span> <span class="operator">*</span>mimeData <span class="operator">=</span> clipboard<span class="operator">-</span><span class="operator">&gt;</span>mimeData();

     <span class="keyword">if</span> (mimeData<span class="operator">-</span><span class="operator">&gt;</span>hasImage()) {
         setPixmap(qvariant_cast<span class="operator">&lt;</span><span class="type"><a href="qpixmap.html">QPixmap</a></span><span class="operator">&gt;</span>(mimeData<span class="operator">-</span><span class="operator">&gt;</span>imageData()));
     } <span class="keyword">else</span> <span class="keyword">if</span> (mimeData<span class="operator">-</span><span class="operator">&gt;</span>hasHtml()) {
         setText(mimeData<span class="operator">-</span><span class="operator">&gt;</span>html());
         setTextFormat(<span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>RichText);
     } <span class="keyword">else</span> <span class="keyword">if</span> (mimeData<span class="operator">-</span><span class="operator">&gt;</span>hasText()) {
         setText(mimeData<span class="operator">-</span><span class="operator">&gt;</span>text());
         setTextFormat(<span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>PlainText);
     } <span class="keyword">else</span> {
         setText(tr(<span class="string">&quot;Cannot display data&quot;</span>));
     }</pre>
<a name="notes-for-x11-users"></a>
<h3>Notes for X11 Users</h3>
<ul>
<li>The X11 Window System has the concept of a separate selection and clipboard. When text is selected, it is immediately available as the global mouse selection. The global mouse selection may later be copied to the clipboard. By convention, the middle mouse button is used to paste the global mouse selection.</li>
<li>X11 also has the concept of ownership; if you change the selection within a window, X11 will only notify the owner and the previous owner of the change, i.e&#x2e; it will not notify all applications that the selection or clipboard data changed.</li>
<li>Lastly, the X11 clipboard is event driven, i.e&#x2e; the clipboard will not function properly if the event loop is not running. Similarly, it is recommended that the contents of the clipboard are stored or retrieved in direct response to user-input events, e.g&#x2e; mouse button or key presses and releases. You should not store or retrieve the clipboard contents in response to timer or non-user-input events.</li>
<li>Since there is no standard way to copy and paste files between applications on X11, various MIME types and conventions are currently in use. For instance, Nautilus expects files to be supplied with a <tt>x-special/gnome-copied-files</tt> MIME type with data beginning with the cut/copy action, a newline character, and the URL of the file.</li>
</ul>
<a name="notes-for-mac-os-x-users"></a>
<h3>Notes for Mac OS X Users</h3>
<p>Mac OS X supports a separate find buffer that holds the current search string in Find operations. This find clipboard can be accessed by specifying the <a href="qclipboard.html#Mode-enum">FindBuffer</a> mode.</p>
<a name="notes-for-windows-and-mac-os-x-users"></a>
<h3>Notes for Windows and Mac OS X Users</h3>
<ul>
<li>Windows and Mac OS X do not support the global mouse selection; they only supports the global clipboard, i.e&#x2e; they only add text to the clipboard when an explicit copy or cut is made.</li>
<li>Windows and Mac OS X does not have the concept of ownership; the clipboard is a fully global resource so all applications are notified of changes.</li>
</ul>
</div>
<p><b>See also </b><a href="qapplication.html">QApplication</a>.</p>
<!-- @@@QClipboard -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Mode$$$Clipboard$$$Selection$$$FindBuffer$$$LastMode -->
<h3 class="fn"><a name="Mode-enum"></a>enum QClipboard::<span class="name">Mode</span></h3>
<a name="clipboard-mode"></a><p>This enum type is used to control which part of the system clipboard is used by <a href="qclipboard.html#mimeData">QClipboard::mimeData</a>(), <a href="qclipboard.html#setMimeData">QClipboard::setMimeData</a>() and related functions.</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>QClipboard::Clipboard</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">indicates that data should be stored and retrieved from the global clipboard.</td></tr>
<tr><td class="topAlign"><tt>QClipboard::Selection</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">indicates that data should be stored and retrieved from the global mouse selection. Support for <tt>Selection</tt> is provided only on systems with a global mouse selection (e.g&#x2e; X11).</td></tr>
<tr><td class="topAlign"><tt>QClipboard::FindBuffer</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">indicates that data should be stored and retrieved from the Find buffer. This mode is used for holding search strings on Mac OS X.</td></tr>
</table>
<p><b>See also </b><a href="qclipboard.html#supportsSelection">QClipboard::supportsSelection</a>().</p>
<!-- @@@Mode -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$changed[overload1]$$$changedQClipboard::Mode -->
<h3 class="fn"><a name="changed"></a><span class="type">void</span> QClipboard::<span class="name">changed</span> ( <span class="type"><a href="qclipboard.html#Mode-enum">QClipboard::Mode</a></span> <i>mode</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the data for the given clipboard <i>mode</i> is changed.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qclipboard.html#dataChanged">dataChanged</a>(), <a href="qclipboard.html#selectionChanged">selectionChanged</a>(), and <a href="qclipboard.html#findBufferChanged">findBufferChanged</a>().</p>
<!-- @@@changed -->
<!-- $$$clear[overload1]$$$clearMode -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> QClipboard::<span class="name">clear</span> ( <span class="type"><a href="qclipboard.html#Mode-enum">Mode</a></span> <i>mode</i> = Clipboard )</h3>
<p>Clear the clipboard contents.</p>
<p>The <i>mode</i> argument is used to control which part of the system clipboard is used. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Clipboard</a>, this function clears the global clipboard contents. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Selection</a>, this function clears the global mouse selection contents. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::FindBuffer</a>, this function clears the search string buffer.</p>
<p><b>See also </b><a href="qclipboard.html#Mode-enum">QClipboard::Mode</a> and <a href="qclipboard.html#supportsSelection">supportsSelection</a>().</p>
<!-- @@@clear -->
<!-- $$$dataChanged[overload1]$$$dataChanged -->
<h3 class="fn"><a name="dataChanged"></a><span class="type">void</span> QClipboard::<span class="name">dataChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when the clipboard data is changed.</p>
<p>On Mac OS X and with Qt version 4.3 or higher, clipboard changes made by other applications will only be detected when the application is activated.</p>
<p><b>See also </b><a href="qclipboard.html#findBufferChanged">findBufferChanged</a>(), <a href="qclipboard.html#selectionChanged">selectionChanged</a>(), and <a href="qclipboard.html#changed">changed</a>().</p>
<!-- @@@dataChanged -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QClipboard::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$findBufferChanged[overload1]$$$findBufferChanged -->
<h3 class="fn"><a name="findBufferChanged"></a><span class="type">void</span> QClipboard::<span class="name">findBufferChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when the find buffer is changed. This only applies to Mac OS X.</p>
<p>With Qt version 4.3 or higher, clipboard changes made by other applications will only be detected when the application is activated.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qclipboard.html#dataChanged">dataChanged</a>(), <a href="qclipboard.html#selectionChanged">selectionChanged</a>(), and <a href="qclipboard.html#changed">changed</a>().</p>
<!-- @@@findBufferChanged -->
<!-- $$$image[overload1]$$$imageMode -->
<h3 class="fn"><a name="image"></a><span class="type"><a href="qimage.html">QImage</a></span> QClipboard::<span class="name">image</span> ( <span class="type"><a href="qclipboard.html#Mode-enum">Mode</a></span> <i>mode</i> = Clipboard ) const</h3>
<p>Returns the clipboard image, or returns a null image if the clipboard does not contain an image or if it contains an image in an unsupported image format.</p>
<p>The <i>mode</i> argument is used to control which part of the system clipboard is used. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Clipboard</a>, the image is retrieved from the global clipboard. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Selection</a>, the image is retrieved from the global mouse selection.</p>
<p><b>See also </b><a href="qclipboard.html#setImage">setImage</a>(), <a href="qclipboard.html#pixmap">pixmap</a>(), <a href="qclipboard.html#mimeData">mimeData</a>(), and <a href="qimage.html#isNull">QImage::isNull</a>().</p>
<!-- @@@image -->
<!-- $$$mimeData[overload1]$$$mimeDataMode -->
<h3 class="fn"><a name="mimeData"></a>const <span class="type"><a href="qmimedata.html">QMimeData</a></span> * QClipboard::<span class="name">mimeData</span> ( <span class="type"><a href="qclipboard.html#Mode-enum">Mode</a></span> <i>mode</i> = Clipboard ) const</h3>
<p>Returns a reference to a <a href="qmimedata.html">QMimeData</a> representation of the current clipboard data.</p>
<p>The <i>mode</i> argument is used to control which part of the system clipboard is used. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Clipboard</a>, the data is retrieved from the global clipboard. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Selection</a>, the data is retrieved from the global mouse selection. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::FindBuffer</a>, the data is retrieved from the search string buffer.</p>
<p>The <a href="qclipboard.html#text">text</a>(), <a href="qclipboard.html#image">image</a>(), and <a href="qclipboard.html#pixmap">pixmap</a>() functions are simpler wrappers for retrieving text, image, and pixmap data.</p>
<p><b>See also </b><a href="qclipboard.html#setMimeData">setMimeData</a>().</p>
<!-- @@@mimeData -->
<!-- $$$ownsClipboard[overload1]$$$ownsClipboard -->
<h3 class="fn"><a name="ownsClipboard"></a><span class="type">bool</span> QClipboard::<span class="name">ownsClipboard</span> () const</h3>
<p>Returns true if this clipboard object owns the clipboard data; otherwise returns false.</p>
<!-- @@@ownsClipboard -->
<!-- $$$ownsFindBuffer[overload1]$$$ownsFindBuffer -->
<h3 class="fn"><a name="ownsFindBuffer"></a><span class="type">bool</span> QClipboard::<span class="name">ownsFindBuffer</span> () const</h3>
<p>Returns true if this clipboard object owns the find buffer data; otherwise returns false.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@ownsFindBuffer -->
<!-- $$$ownsSelection[overload1]$$$ownsSelection -->
<h3 class="fn"><a name="ownsSelection"></a><span class="type">bool</span> QClipboard::<span class="name">ownsSelection</span> () const</h3>
<p>Returns true if this clipboard object owns the mouse selection data; otherwise returns false.</p>
<!-- @@@ownsSelection -->
<!-- $$$pixmap[overload1]$$$pixmapMode -->
<h3 class="fn"><a name="pixmap"></a><span class="type"><a href="qpixmap.html">QPixmap</a></span> QClipboard::<span class="name">pixmap</span> ( <span class="type"><a href="qclipboard.html#Mode-enum">Mode</a></span> <i>mode</i> = Clipboard ) const</h3>
<p>Returns the clipboard pixmap, or null if the clipboard does not contain a pixmap. Note that this can lose information. For example, if the image is 24-bit and the display is 8-bit, the result is converted to 8 bits, and if the image has an alpha channel, the result just has a mask.</p>
<p>The <i>mode</i> argument is used to control which part of the system clipboard is used. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Clipboard</a>, the pixmap is retrieved from the global clipboard. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Selection</a>, the pixmap is retrieved from the global mouse selection.</p>
<p><b>See also </b><a href="qclipboard.html#setPixmap">setPixmap</a>(), <a href="qclipboard.html#image">image</a>(), <a href="qclipboard.html#mimeData">mimeData</a>(), and <a href="qpixmap.html#convertFromImage">QPixmap::convertFromImage</a>().</p>
<!-- @@@pixmap -->
<!-- $$$selectionChanged[overload1]$$$selectionChanged -->
<h3 class="fn"><a name="selectionChanged"></a><span class="type">void</span> QClipboard::<span class="name">selectionChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when the selection is changed. This only applies to windowing systems that support selections, e.g&#x2e; X11. Windows and Mac OS X don't support selections.</p>
<p><b>See also </b><a href="qclipboard.html#dataChanged">dataChanged</a>(), <a href="qclipboard.html#findBufferChanged">findBufferChanged</a>(), and <a href="qclipboard.html#changed">changed</a>().</p>
<!-- @@@selectionChanged -->
<!-- $$$setImage[overload1]$$$setImageconstQImage&Mode -->
<h3 class="fn"><a name="setImage"></a><span class="type">void</span> QClipboard::<span class="name">setImage</span> ( const <span class="type"><a href="qimage.html">QImage</a></span> &amp; <i>image</i>, <span class="type"><a href="qclipboard.html#Mode-enum">Mode</a></span> <i>mode</i> = Clipboard )</h3>
<p>Copies the <i>image</i> into the clipboard.</p>
<p>The <i>mode</i> argument is used to control which part of the system clipboard is used. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Clipboard</a>, the image is stored in the global clipboard. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Selection</a>, the data is stored in the global mouse selection.</p>
<p>This is shorthand for:</p>
<pre class="cpp"> <span class="type"><a href="qmimedata.html">QMimeData</a></span> <span class="operator">*</span>data <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qmimedata.html">QMimeData</a></span>;
 data<span class="operator">-</span><span class="operator">&gt;</span>setImageData(image);
 clipboard<span class="operator">-</span><span class="operator">&gt;</span><a href="qclipboard.html#setMimeData">setMimeData</a>(data<span class="operator">,</span> mode);</pre>
<p><b>See also </b><a href="qclipboard.html#image">image</a>(), <a href="qclipboard.html#setPixmap">setPixmap</a>(), and <a href="qclipboard.html#setMimeData">setMimeData</a>().</p>
<!-- @@@setImage -->
<!-- $$$setMimeData[overload1]$$$setMimeDataQMimeData*Mode -->
<h3 class="fn"><a name="setMimeData"></a><span class="type">void</span> QClipboard::<span class="name">setMimeData</span> ( <span class="type"><a href="qmimedata.html">QMimeData</a></span> * <i>src</i>, <span class="type"><a href="qclipboard.html#Mode-enum">Mode</a></span> <i>mode</i> = Clipboard )</h3>
<p>Sets the clipboard data to <i>src</i>. Ownership of the data is transferred to the clipboard. If you want to remove the data either call <a href="qclipboard.html#clear">clear</a>() or call setMimeData() again with new data.</p>
<p>The <i>mode</i> argument is used to control which part of the system clipboard is used. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Clipboard</a>, the data is stored in the global clipboard. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Selection</a>, the data is stored in the global mouse selection. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::FindBuffer</a>, the data is stored in the search string buffer.</p>
<p>The <a href="qclipboard.html#setText">setText</a>(), <a href="qclipboard.html#setImage">setImage</a>() and <a href="qclipboard.html#setPixmap">setPixmap</a>() functions are simpler wrappers for setting text, image and pixmap data respectively.</p>
<p><b>See also </b><a href="qclipboard.html#mimeData">mimeData</a>().</p>
<!-- @@@setMimeData -->
<!-- $$$setPixmap[overload1]$$$setPixmapconstQPixmap&Mode -->
<h3 class="fn"><a name="setPixmap"></a><span class="type">void</span> QClipboard::<span class="name">setPixmap</span> ( const <span class="type"><a href="qpixmap.html">QPixmap</a></span> &amp; <i>pixmap</i>, <span class="type"><a href="qclipboard.html#Mode-enum">Mode</a></span> <i>mode</i> = Clipboard )</h3>
<p>Copies <i>pixmap</i> into the clipboard. Note that this is slower than <a href="qclipboard.html#setImage">setImage</a>() because it needs to convert the <a href="qpixmap.html">QPixmap</a> to a <a href="qimage.html">QImage</a> first.</p>
<p>The <i>mode</i> argument is used to control which part of the system clipboard is used. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Clipboard</a>, the pixmap is stored in the global clipboard. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Selection</a>, the pixmap is stored in the global mouse selection.</p>
<p><b>See also </b><a href="qclipboard.html#pixmap">pixmap</a>(), <a href="qclipboard.html#setImage">setImage</a>(), and <a href="qclipboard.html#setMimeData">setMimeData</a>().</p>
<!-- @@@setPixmap -->
<!-- $$$setText[overload1]$$$setTextconstQString&Mode -->
<h3 class="fn"><a name="setText"></a><span class="type">void</span> QClipboard::<span class="name">setText</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type"><a href="qclipboard.html#Mode-enum">Mode</a></span> <i>mode</i> = Clipboard )</h3>
<p>Copies <i>text</i> into the clipboard as plain text.</p>
<p>The <i>mode</i> argument is used to control which part of the system clipboard is used. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Clipboard</a>, the text is stored in the global clipboard. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Selection</a>, the text is stored in the global mouse selection. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::FindBuffer</a>, the text is stored in the search string buffer.</p>
<p><b>See also </b><a href="qclipboard.html#text">text</a>() and <a href="qclipboard.html#setMimeData">setMimeData</a>().</p>
<!-- @@@setText -->
<!-- $$$supportsFindBuffer[overload1]$$$supportsFindBuffer -->
<h3 class="fn"><a name="supportsFindBuffer"></a><span class="type">bool</span> QClipboard::<span class="name">supportsFindBuffer</span> () const</h3>
<p>Returns true if the clipboard supports a separate search buffer; otherwise returns false.</p>
<!-- @@@supportsFindBuffer -->
<!-- $$$supportsSelection[overload1]$$$supportsSelection -->
<h3 class="fn"><a name="supportsSelection"></a><span class="type">bool</span> QClipboard::<span class="name">supportsSelection</span> () const</h3>
<p>Returns true if the clipboard supports mouse selection; otherwise returns false.</p>
<!-- @@@supportsSelection -->
<!-- $$$text[overload1]$$$textMode -->
<h3 class="fn"><a name="text"></a><span class="type"><a href="qstring.html">QString</a></span> QClipboard::<span class="name">text</span> ( <span class="type"><a href="qclipboard.html#Mode-enum">Mode</a></span> <i>mode</i> = Clipboard ) const</h3>
<p>Returns the clipboard text as plain text, or an empty string if the clipboard does not contain any text.</p>
<p>The <i>mode</i> argument is used to control which part of the system clipboard is used. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Clipboard</a>, the text is retrieved from the global clipboard. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Selection</a>, the text is retrieved from the global mouse selection. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::FindBuffer</a>, the text is retrieved from the search string buffer.</p>
<p><b>See also </b><a href="qclipboard.html#setText">setText</a>() and <a href="qclipboard.html#mimeData">mimeData</a>().</p>
<!-- @@@text -->
<!-- $$$text$$$textQString&Mode -->
<h3 class="fn"><a name="text-2"></a><span class="type"><a href="qstring.html">QString</a></span> QClipboard::<span class="name">text</span> ( <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>subtype</i>, <span class="type"><a href="qclipboard.html#Mode-enum">Mode</a></span> <i>mode</i> = Clipboard ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the clipboard text in subtype <i>subtype</i>, or an empty string if the clipboard does not contain any text. If <i>subtype</i> is null, any subtype is acceptable, and <i>subtype</i> is set to the chosen subtype.</p>
<p>The <i>mode</i> argument is used to control which part of the system clipboard is used. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Clipboard</a>, the text is retrieved from the global clipboard. If <i>mode</i> is <a href="qclipboard.html#Mode-enum">QClipboard::Selection</a>, the text is retrieved from the global mouse selection.</p>
<p>Common values for <i>subtype</i> are &quot;plain&quot; and &quot;html&quot;.</p>
<p>Note that calling this function repeatedly, for instance from a key event handler, may be slow. In such cases, you should use the <tt>dataChanged()</tt> signal instead.</p>
<p><b>See also </b><a href="qclipboard.html#setText">setText</a>() and <a href="qclipboard.html#mimeData">mimeData</a>().</p>
<!-- @@@text -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. 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>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      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>