You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
136 lines
5.6 KiB
136 lines
5.6 KiB
//Auto-generated by kalyptus. DO NOT EDIT.
|
|
package org.kde.koala;
|
|
|
|
import org.kde.qt.Qt;
|
|
import org.kde.qt.TQMimeSourceInterface;
|
|
import org.kde.qt.QtSupport;
|
|
import java.util.ArrayList;
|
|
import org.kde.qt.TQMimeSource;
|
|
import org.kde.qt.TQWidget;
|
|
import org.kde.qt.TQUriDrag;
|
|
|
|
/**
|
|
|
|
This class is to be used instead of TQUriDrag when using KURL.
|
|
The reason is: TQUriDrag (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:
|
|
|
|
<li>
|
|
it exports text/plain (for dropping/pasting into lineedits, mails etc.)
|
|
</li>
|
|
|
|
<li>
|
|
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).
|
|
</li>
|
|
To create a drag object, use the KURLDrag constructor.
|
|
To handle drops, use TQUriDrag.canDecode() and KURLDrag.decode()
|
|
@short This class is to be used instead of TQUriDrag when using KURL.
|
|
|
|
*/
|
|
public class KURLDrag extends TQUriDrag {
|
|
protected KURLDrag(Class dummy){super((Class) null);}
|
|
/**
|
|
Constructs an object to drag the list of URLs in <code>urls.</code>
|
|
The <code>dragSource</code> and <code>name</code> arguments are passed on to TQUriDrag,
|
|
and the list of urls is converted to UTF-8 before being passed
|
|
to TQUriDrag.
|
|
@param urls the list of URLs
|
|
@param dragSource the parent of the TQObject. Should be set when doing drag-n-drop,
|
|
but should be 0 when copying to the clipboard
|
|
@param name the name of the TQObject
|
|
@short Constructs an object to drag the list of URLs in <code>urls.</code>
|
|
*/
|
|
public KURLDrag(ArrayList urls, TQWidget dragSource, String name) {
|
|
super((Class) null);
|
|
newKURLDrag(urls,dragSource,name);
|
|
}
|
|
private native void newKURLDrag(ArrayList urls, TQWidget dragSource, String name);
|
|
public KURLDrag(ArrayList urls, TQWidget dragSource) {
|
|
super((Class) null);
|
|
newKURLDrag(urls,dragSource);
|
|
}
|
|
private native void newKURLDrag(ArrayList urls, TQWidget 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 <code>urls.</code>
|
|
This version also includes metadata.
|
|
@param urls the list of URLs
|
|
@param metaData a map containing meta data
|
|
@param dragSource the parent of the TQObject. Should be set when doing drag-n-drop,
|
|
but should be 0 when copying to the clipboard
|
|
@param name the name of the TQObject
|
|
@short Constructs an object to drag the list of URLs in <code>urls.</code>
|
|
@see #metaData
|
|
*/
|
|
// KURLDrag* KURLDrag(const KURL::List& arg1,const TQMap<TQString, TQString>& arg2,TQWidget* arg3,const char* arg4); >>>> NOT CONVERTED
|
|
// KURLDrag* KURLDrag(const KURL::List& arg1,const TQMap<TQString, TQString>& arg2,TQWidget* arg3); >>>> NOT CONVERTED
|
|
// KURLDrag* KURLDrag(const KURL::List& arg1,const TQMap<TQString, TQString>& 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
|
|
*/
|
|
// TQMap<TQString, TQString>& metaData(); >>>> NOT CONVERTED
|
|
public native String format(int i);
|
|
public native byte[] encodedData(String mime);
|
|
/**
|
|
Convenience method that decodes the contents of <code>e</code>
|
|
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 <code>e</code> into a list of KURLs.
|
|
*/
|
|
public static native boolean decode(TQMimeSourceInterface e, ArrayList urls);
|
|
/**
|
|
Convenience method that decodes the contents of <code>e</code>
|
|
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 <code>e</code> into a list of KURLs and a set of metadata.
|
|
*/
|
|
// bool decode(const TQMimeSource* arg1,KURL::List& arg2,TQMap<TQString, TQString>& 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();
|
|
}
|