org.kde.koala
public class KFileView extends Object implements QtSupport, KFileViewInterface
UNKNOWN: A base class for views of the KDE file selector.
Field Summary | |
---|---|
static int | All |
static int | AutoOpenDirs
Various options for drag and drop support.
|
static int | Directories |
static int | Files |
static int | VIRTUAL_SET_DROP_OPTIONS |
Constructor Summary | |
---|---|
protected | KFileView(Class dummy) |
Method Summary | |
---|---|
KActionCollection | actionCollection() |
void | addItemList(ArrayList list)
inserts a list of items. |
static int | autoOpenDelay()
delay before auto opening a directory |
void | clear()
Clears the view and all item lists. |
void | clearSelection()
Clears any selection, unhighlights everything. |
void | clearView()
pure function, that should be implemented to clear
the view. |
int | count() |
KFileItem | currentFileItem() |
int | dropOptions()
Returns the DND options in effect.
|
void | ensureItemVisible(KFileItem i)
pure function, that should be implemented to make item i
visible, i.e. by scrolling the view appropriately. |
KFileItem | firstFileItem() |
void | insertItem(KFileItem i)
The derived view must implement this function to add
the file in the widget.
|
void | invertSelection()
Inverts the current selection, i.e. selects all items, that were up to
now not selected and deselects the other. |
boolean | isReversed()
Tells whether the current items are in reversed order (shortcut to
sorting() & QDir.Reversed). |
boolean | isSelected(KFileItem arg1) |
ArrayList | items() |
void | listingCompleted()
This hook is called when all items of the currently listed directory
are listed and inserted into the view, i.e. there won't come any new
items anymore. |
KFileItem | nextItem(KFileItem arg1) |
int | numDirs() |
int | numFiles() |
boolean | onlyDoubleClickSelectsFiles() |
KFileItem | prevItem(KFileItem arg1) |
void | readConfig(KConfig arg1, String group) |
void | readConfig(KConfig arg1) |
void | removeItem(KFileItem item)
Removes an item from the list; has to be implemented by the view.
|
void | selectAll()
Selects all items. |
ArrayList | selectedItems() |
void | setCurrentItem(String filename)
Sets filename the current item in the view, if available. |
void | setCurrentItem(KFileItem item)
Reimplement this to set item the current item in the view, e.g.
the item having focus. |
void | setDropOptions(int options)
Specify DND options. |
void | setOnlyDoubleClickSelectsFiles(boolean enable)
This is a KFileDialog specific hack: we want to select directories with
single click, but not files. |
void | setParentView(KFileViewInterface parent) |
void | setSelected(KFileItem arg1, boolean enable)
Tells the view that it should highlight the item.
|
void | setSelectionMode(int sm) |
void | setSorting(int sort)
Sets the sorting order of the view.
|
void | setViewMode(int vm) |
void | setViewName(String name)
Sets the name of the view, which could be displayed somewhere.
|
KFileViewSignaler | signaler() |
int | sorting()
Returns the sorting order of the internal list. |
static String | sortingKey(String value, boolean isDir, int sortSpec)
This method calculates a String from the given parameters, that is
suitable for sorting with e.g. |
static String | sortingKey(long value, boolean isDir, int sortSpec)
An overloaded method that takes not a String, but a number as sort
criterion. |
void | sortReversed() |
boolean | updateNumbers(KFileItem i)
increases the number of dirs and files. |
void | updateView(boolean f)
does a repaint of the view.
|
void | updateView() |
void | updateView(KFileItem arg1) |
int | viewMode() |
String | viewName() |
QWidget | widget()
a pure function to get a QWidget, that can be added to
other widgets. |
void | writeConfig(KConfig arg1, String group) |
void | writeConfig(KConfig arg1) |
AutoOpenDirs
Automatically open directory after hovering above it
for a short while while dragging.
UNKNOWN: Various options for drag and drop support.
Returns: the view-specific action-collection. Every view should add its actions here (if it has any) to make them available to e.g. the KDirOperator's popup-menu.
UNKNOWN:
UNKNOWN: inserts a list of items.
UNKNOWN:
UNKNOWN: Clears the view and all item lists.
UNKNOWN: Clears any selection, unhighlights everything.
UNKNOWN: pure virtual function, that should be implemented to clear the view.
Returns: the number of dirs and files
UNKNOWN:
Returns: the "current" KFileItem, e.g. where the cursor is. Returns 0L when there is no current item (e.g. in an empty view). Subclasses have to implement this.
UNKNOWN:
UNKNOWN: Returns the DND options in effect.
UNKNOWN: pure virtual function, that should be implemented to make item i visible, i.
UNKNOWN: The derived view must implement this function to add the file in the widget.
UNKNOWN: Inverts the current selection, i.
UNKNOWN: Tells whether the current items are in reversed order (shortcut to sorting() & QDir.Reversed).
Returns: whether the given item is currently selected. Must be implemented by the view.
UNKNOWN:
Returns: all items currently available in the current sort-order
UNKNOWN:
UNKNOWN: This hook is called when all items of the currently listed directory are listed and inserted into the view, i.
Returns: the number of directories
UNKNOWN:
Returns: the number of files.
UNKNOWN:
Returns: whether files (not directories) should only be select()ed by double-clicks.
See Also: KFileView
UNKNOWN:
UNKNOWN: Removes an item from the list; has to be implemented by the view.
UNKNOWN: Selects all items.
Returns: all currently highlighted items.
UNKNOWN:
filename
the current item in the view, if available.UNKNOWN: Sets filename
the current item in the view, if available.
item
the current item in the view, e.g.
the item having focus.UNKNOWN: Reimplement this to set item
the current item in the view, e.
UNKNOWN: Specify DND options.
UNKNOWN: This is a KFileDialog specific hack: we want to select directories with single click, but not files.
UNKNOWN: Tells the view that it should highlight the item.
See Also: KFileView
UNKNOWN: Sets the sorting order of the view.
UNKNOWN: Sets the name of the view, which could be displayed somewhere.
UNKNOWN: Returns the sorting order of the internal list.
Parameters: value Any string that should be used as sort criterion isDir Tells whether the key is computed for an item representing a directory (directories are usually sorted before files) sortSpec An ORed combination of QDir.SortSpec flags. Currently, the values IgnoreCase, Reversed and DirsFirst are taken into account.
UNKNOWN: This method calculates a String from the given parameters, that is suitable for sorting with e.
UNKNOWN: An overloaded method that takes not a String, but a number as sort criterion.
Returns: true if the item fits the view mode
UNKNOWN: increases the number of dirs and files.
widget().repaint(f)
UNKNOWN: does a repaint of the view.
Returns: the localized name of the view, which could be displayed somewhere, e.g. in a menu, where the user can choose between views.
See Also: KFileView
UNKNOWN:
UNKNOWN: a pure virtual function to get a QWidget, that can be added to other widgets.