diff options
Diffstat (limited to 'kdejava/koala/org/kde/koala/KURLRequester.java')
-rw-r--r-- | kdejava/koala/org/kde/koala/KURLRequester.java | 224 |
1 files changed, 224 insertions, 0 deletions
diff --git a/kdejava/koala/org/kde/koala/KURLRequester.java b/kdejava/koala/org/kde/koala/KURLRequester.java new file mode 100644 index 00000000..f3aa6735 --- /dev/null +++ b/kdejava/koala/org/kde/koala/KURLRequester.java @@ -0,0 +1,224 @@ +//Auto-generated by kalyptus. DO NOT EDIT. +package org.kde.koala; + +import org.kde.qt.Qt; +import org.kde.qt.QMetaObject; +import org.kde.qt.QtSupport; +import org.kde.qt.QWidget; +import org.kde.qt.QHBox; + +/** + + 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 QHBox { + protected KURLRequester(Class dummy){super((Class) null);} + public native QMetaObject metaObject(); + public native String className(); + /** + Constructs a KURLRequester widget. + @short Constructs a KURLRequester widget. + */ + public KURLRequester(QWidget parent, String name) { + super((Class) null); + newKURLRequester(parent,name); + } + private native void newKURLRequester(QWidget parent, String name); + public KURLRequester(QWidget parent) { + super((Class) null); + newKURLRequester(parent); + } + private native void newKURLRequester(QWidget 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, QWidget parent, String name) { + super((Class) null); + newKURLRequester(url,parent,name); + } + private native void newKURLRequester(String url, QWidget parent, String name); + public KURLRequester(String url, QWidget parent) { + super((Class) null); + newKURLRequester(url,parent); + } + private native void newKURLRequester(String url, QWidget 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(QWidget editWidget, QWidget parent, String name) { + super((Class) null); + newKURLRequester(editWidget,parent,name); + } + private native void newKURLRequester(QWidget editWidget, QWidget parent, String name); + public KURLRequester(QWidget editWidget, QWidget parent) { + super((Class) null); + newKURLRequester(editWidget,parent); + } + private native void newKURLRequester(QWidget editWidget, QWidget 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(); +} |