//Auto-generated by kalyptus. DO NOT EDIT. package org.kde.koala; import org.kde.qt.Qt; import org.kde.qt.QMimeSourceInterface; import org.kde.qt.QtSupport; import java.util.ArrayList; import org.kde.qt.QMimeSource; import org.kde.qt.QWidget; import org.kde.qt.QUriDrag; /** This class is to be used instead of QUriDrag when using KURL. The reason is: QUriDrag (and the XDND/W3C standards) expect URLs to be encoded in UTF-8 (unicode), but KURL uses the current locale by default. The other reasons for using this class are:
  • it exports text/plain (for dropping/pasting into lineedits, mails etc.)
  • it has support for metadata, shipped as part of the dragobject This is important, for instance to set a correct HTTP referrer (some websites require it for downloading e.g. an image).
  • To create a drag object, use the KURLDrag constructor. To handle drops, use QUriDrag.canDecode() and KURLDrag.decode() @short This class is to be used instead of QUriDrag when using KURL. */ public class KURLDrag extends QUriDrag { protected KURLDrag(Class dummy){super((Class) null);} /** Constructs an object to drag the list of URLs in urls. The dragSource and name arguments are passed on to QUriDrag, and the list of urls is converted to UTF-8 before being passed to QUriDrag. @param urls the list of URLs @param dragSource the parent of the QObject. Should be set when doing drag-n-drop, but should be 0 when copying to the clipboard @param name the name of the QObject @short Constructs an object to drag the list of URLs in urls. */ public KURLDrag(ArrayList urls, QWidget dragSource, String name) { super((Class) null); newKURLDrag(urls,dragSource,name); } private native void newKURLDrag(ArrayList urls, QWidget dragSource, String name); public KURLDrag(ArrayList urls, QWidget dragSource) { super((Class) null); newKURLDrag(urls,dragSource); } private native void newKURLDrag(ArrayList urls, QWidget dragSource); public KURLDrag(ArrayList urls) { super((Class) null); newKURLDrag(urls); } private native void newKURLDrag(ArrayList urls); /** Constructs an object to drag the list of URLs in urls. This version also includes metadata. @param urls the list of URLs @param metaData a map containing meta data @param dragSource the parent of the QObject. Should be set when doing drag-n-drop, but should be 0 when copying to the clipboard @param name the name of the QObject @short Constructs an object to drag the list of URLs in urls. @see #metaData */ // KURLDrag* KURLDrag(const KURL::List& arg1,const QMap& arg2,QWidget* arg3,const char* arg4); >>>> NOT CONVERTED // KURLDrag* KURLDrag(const KURL::List& arg1,const QMap& arg2,QWidget* arg3); >>>> NOT CONVERTED // KURLDrag* KURLDrag(const KURL::List& arg1,const QMap& arg2); >>>> NOT CONVERTED /** By default, KURLDrag also exports the URLs as plain text, for e.g. dropping onto a text editor. But in some cases this might not be wanted, e.g. if using the KURLDrag in a KMultipleDrag and another component of the multiple-drag provides better plain text data. In such a case, setExportAsText( false ) should be called. @short By default, KURLDrag also exports the URLs as plain text, for e. */ public native void setExportAsText(boolean exp); /** Meta-data to associate with those URLs. This is an alternative way of setting the metadata: either use the constructor to pass it all at once, or use drag.metaData()["key"] = data; @short Meta-data to associate with those URLs. @see TransferJob */ // QMap& metaData(); >>>> NOT CONVERTED public native String format(int i); public native byte[] encodedData(String mime); /** Convenience method that decodes the contents of e into a list of KURLs. Decoding will fail if at least one decoded value is not a valid KURL. @param e the mime source @param urls the list of urls will be written here @return true if successful, false otherwise @short Convenience method that decodes the contents of e into a list of KURLs. */ public static native boolean decode(QMimeSourceInterface e, ArrayList urls); /** Convenience method that decodes the contents of e into a list of KURLs and a set of metadata. Decoding will fail if at least one decoded value is not a valid KURL. You should be using this one, if possible. @param e the mime source @param urls the list of urls will be written here @param metaData the metadata map will be written here @return true if successful, false otherwise @short Convenience method that decodes the contents of e into a list of KURLs and a set of metadata. */ // bool decode(const QMimeSource* arg1,KURL::List& arg2,QMap& arg3); >>>> NOT CONVERTED /** Converts a URL to a string representation suitable for dragging. @short Converts a URL to a string representation suitable for dragging. */ public static native String urlToString(KURL url); /** Converts a string used for dragging to a URL. @short Converts a string used for dragging to a URL. */ public static native KURL stringToUrl(String s); /** Deletes the wrapped C++ instance */ protected native void finalize() throws InternalError; /** Delete the wrapped C++ instance ahead of finalize() */ public native void dispose(); /** Has the wrapped C++ instance been deleted? */ public native boolean isDisposed(); }