org.kde.koala
public class KURLComboBox extends KComboBox
UNKNOWN: A combo box showing a number of recent URLs/directories.
Field Summary | |
---|---|
static int | Both |
static int | Directories |
static int | Files
This enum describes which kind of items is shown in the combo box. |
static int | RemoveBottom |
static int | RemoveTop
This Enumeration is used in setURL() to determine which items
will be removed when the given list is larger than maxItems().
|
Constructor Summary | |
---|---|
protected | KURLComboBox(Class dummy) |
KURLComboBox(int mode, QWidget parent, String name)
Constructs a KURLComboBox. | |
KURLComboBox(int mode, QWidget parent) | |
KURLComboBox(int mode) | |
KURLComboBox(int mode, boolean rw, QWidget parent, String name) | |
KURLComboBox(int mode, boolean rw, QWidget parent) | |
KURLComboBox(int mode, boolean rw) |
Method Summary | |
---|---|
void | addDefaultURL(KURL url, String text)
Adds a url that will always be shown in the combobox, it can't be
"rotated away". |
void | addDefaultURL(KURL url) |
void | addDefaultURL(KURL url, QPixmap pix, String text)
Adds a url that will always be shown in the combobox, it can't be
"rotated away". |
void | addDefaultURL(KURL url, QPixmap pix) |
String | className() |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
protected void | finalize() Deletes the wrapped C++ instance |
protected QPixmap | getPixmap(KURL url)
Uses KMimeType.pixmapForURL() to return a proper pixmap for url.
In directory mode, a folder icon is always returned. |
protected void | init(int mode) |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
int | maxItems() |
QMetaObject | metaObject() |
void | removeURL(KURL url, boolean checkDefaultURLs)
Removes any occurrence of url. If checkDefaultURLs is false
default-urls won't be removed. |
void | removeURL(KURL url) |
void | setDefaults()
Clears all items and inserts the default urls into the combo. |
void | setMaxItems(int arg1)
Sets how many items should be handled and displayed by the combobox. |
void | setURL(KURL url)
Sets the current url. |
void | setURLs(String[] urls)
Inserts urls into the combobox below the "default urls" (see
addDefaultURL).
|
void | setURLs(String[] urls, int remove)
Inserts urls into the combobox below the "default urls" (see
addDefaultURL).
|
protected void | slotActivated(int arg1)
Updates item with pixmap and sets the url instead of the text
of the KURLComboItem.
|
ArrayList | urls() |
UNKNOWN: This enum describes which kind of items is shown in the combo box.
Parameters: mode is either Files, Directories or Both and controls the
following behavior:
UNKNOWN: Constructs a KURLComboBox.
UNKNOWN: Adds a url that will always be shown in the combobox, it can't be "rotated away".
UNKNOWN: Adds a url that will always be shown in the combobox, it can't be "rotated away".
url.
In directory mode, a folder icon is always returned.UNKNOWN: Uses KMimeType.pixmapForURL() to return a proper pixmap for url.
url.
If checkDefaultURLs
is false
default-urls won't be removed.UNKNOWN: Removes any occurrence of url.
See Also: KURLComboBox
UNKNOWN: Clears all items and inserts the default urls into the combo.
See Also: KURLComboBox
UNKNOWN: Sets how many items should be handled and displayed by the combobox.
url
is already in the combo, the last item will stay there
and the existing item becomes the current item.
The current item will always have the open-directory-pixmap as icon.
Note that you won't receive any signals, e.g. textChanged(),
returnPressed() or activated() upon calling this method.UNKNOWN: Sets the current url.
urls
into the combobox below the "default urls" (see
addDefaultURL).
If the list of urls contains more items than maxItems, the first items
will be stripped.UNKNOWN: Inserts urls
into the combobox below the "default urls" (see addDefaultURL).
urls
into the combobox below the "default urls" (see
addDefaultURL).
If the list of urls contains more items than maxItems, the remove
parameter determines whether the first or last items will be stripped.UNKNOWN: Inserts urls
into the combobox below the "default urls" (see addDefaultURL).
item
with pixmap
and sets the url instead of the text
of the KURLComboItem.
Also works around a Qt bug.UNKNOWN: Updates item
with pixmap
and sets the url instead of the text of the KURLComboItem.
Returns: a list of all urls currently handled. The list contains at most maxItems() items. Use this to save the list of urls in a config-file and reinsert them via setURLs() next time. Note that all default urls set via addDefaultURL() are not returned, they will automatically be set via setURLs() or setURL(). You will always get fully qualified urls, i.e. with protocol like file:/
UNKNOWN: