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.
tdebindings/kdejava/koala/org/kde/koala/KURLRequester.java

225 lines
7.5 KiB

//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;
import org.kde.qt.Qt;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.TQWidget;
import org.kde.qt.TQHBox;
/**
This class is a widget showing a lineedit and a button, which invokes a
filedialog. File name completion is available in the lineedit.
The defaults for the filedialog are to ask for one existing local file, i.e.
KFileDialog.setMode( KFile.File | KFile.ExistingOnly | KFile.LocalOnly )
The default filter is "*", i.e. show all files, and the start directory is
the current working directory, or the last directory where a file has been
selected.
You can change this behavior by using setMode() or setFilter().
\image html kurlrequester.png "KDE URL Requester"
See {@link KURLRequesterSignals} for signals emitted by KURLRequester
@author Carsten Pfeiffer <pfeiffer@kde.org>
@short A widget to request a filename/url from the user.
*/
public class KURLRequester extends TQHBox {
protected KURLRequester(Class dummy){super((Class) null);}
public native TQMetaObject metaObject();
public native String className();
/**
Constructs a KURLRequester widget.
@short Constructs a KURLRequester widget.
*/
public KURLRequester(TQWidget parent, String name) {
super((Class) null);
newKURLRequester(parent,name);
}
private native void newKURLRequester(TQWidget parent, String name);
public KURLRequester(TQWidget parent) {
super((Class) null);
newKURLRequester(parent);
}
private native void newKURLRequester(TQWidget parent);
public KURLRequester() {
super((Class) null);
newKURLRequester();
}
private native void newKURLRequester();
/**
Constructs a KURLRequester widget with the initial URL <code>url.</code>
// TODO KDE4: Use KURL instead
@short Constructs a KURLRequester widget with the initial URL <code>url.</code>
*/
public KURLRequester(String url, TQWidget parent, String name) {
super((Class) null);
newKURLRequester(url,parent,name);
}
private native void newKURLRequester(String url, TQWidget parent, String name);
public KURLRequester(String url, TQWidget parent) {
super((Class) null);
newKURLRequester(url,parent);
}
private native void newKURLRequester(String url, TQWidget parent);
public KURLRequester(String url) {
super((Class) null);
newKURLRequester(url);
}
private native void newKURLRequester(String url);
/**
Special constructor, which creates a KURLRequester widget with a custom
edit-widget. The edit-widget can be either a KComboBox or a KLineEdit
(or inherited thereof). Note: for geometry management reasons, the
edit-widget is reparented to have the KURLRequester as parent.
@short Special constructor, which creates a KURLRequester widget with a custom edit-widget.
*/
public KURLRequester(TQWidget editWidget, TQWidget parent, String name) {
super((Class) null);
newKURLRequester(editWidget,parent,name);
}
private native void newKURLRequester(TQWidget editWidget, TQWidget parent, String name);
public KURLRequester(TQWidget editWidget, TQWidget parent) {
super((Class) null);
newKURLRequester(editWidget,parent);
}
private native void newKURLRequester(TQWidget editWidget, TQWidget parent);
/**
@return the current url in the lineedit. May be malformed, if the user
entered something weird. ~user or environment variables are substituted
for local files.
// TODO KDE4: Use KURL so that the result is properly defined
@short
*/
public native String url();
/**
Enables/disables showing file:/ in the lineedit, when a local file has
been selected in the filedialog or was set via setURL().
Default is false, not showing file:/
@short Enables/disables showing file:/ in the lineedit, when a local file has been selected in the filedialog or was set via setURL().
@see #showLocalProtocol
*/
public native void setShowLocalProtocol(boolean b);
/**
Sets the mode of the file dialog.
Note: you can only select one file with the filedialog,
so KFile.Files doesn't make much sense.
@short Sets the mode of the file dialog.
@see KFileDialog#setMode
*/
public native void setMode(int m);
/**
Returns the current mode
@short Returns the current mode
@see KFileDialog#mode
*/
public native int mode();
/**
Sets the filter for the file dialog.
@short Sets the filter for the file dialog.
@see KFileDialog#setFilter
*/
public native void setFilter(String filter);
/**
Returns the current filter for the file dialog.
@short Returns the current filter for the file dialog.
@see KFileDialog#filter
*/
public native String filter();
/**
@return whether local files will be prefixed with file:/ in the
lineedit
@short
@see #setShowLocalProtocol
*/
public native boolean showLocalProtocol();
/**
Remove in KDE4? KURLRequester should use KDirSelectDialog for
(mode & KFile.Directory) && !(mode & KFile.File)
@return a pointer to the filedialog
You can use this to customize the dialog, e.g. to specify a filter.
Never returns 0L.
@short
*/
public native KFileDialog fileDialog();
/**
It is provided so that you can e.g. set an own completion object
(e.g. KShellCompletion) into it.
@return a pointer to the lineedit, either the default one, or the
special one, if you used the special constructor.
@short
*/
public native KLineEdit lineEdit();
/**
@return a pointer to the combobox, in case you have set one using the
special constructor. Returns 0L otherwise.
@short
*/
public native KComboBox comboBox();
/**
@return a pointer to the pushbutton. It is provided so that you can
specify an own pixmap or a text, if you really need to.
@short
*/
public native KPushButton button();
/**
@return the KURLCompletion object used in the lineedit/combobox.
@short
*/
public native KURLCompletion completionObject();
/**
@return an object, suitable for use with KEditListBox. It allows you
to put this KURLRequester into a KEditListBox.
Basically, do it like this:
<pre>
KURLRequester *req = new KURLRequester( someWidget );
[...]
KEditListBox *editListBox = new KEditListBox( i18n("Some Title"), req.customEditor(), someWidget );
</pre>
@short
*/
// KEditListBox::CustomEditor customEditor(); >>>> NOT CONVERTED
/**
Sets the url in the lineedit to <code>url.</code> Depending on the state of
showLocalProtocol(), file:/ on local files will be shown or not.
@short Sets the url in the lineedit to <code>url.</code>
*/
public native void setURL(String url);
/**
Sets the url in the lineedit to <code>url.</code>
@short Sets the url in the lineedit to <code>url.</code>
*/
public native void setKURL(KURL url);
/**
Sets the caption of the file dialog.
@short Sets the caption of the file dialog.
*/
public native void setCaption(String caption);
/**
Clears the lineedit/combobox.
@short Clears the lineedit/combobox.
*/
public native void clear();
protected native void init();
/**
Called when the button is pressed to open the filedialog.
Also called when KStdAccel.Open (default is Ctrl-O) is pressed.
@short Called when the button is pressed to open the filedialog.
*/
protected native void slotOpenDialog();
/** 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();
}