org.kde.koala

Class KCombiView

public class KCombiView extends QSplitter implements KFileViewInterface

This view is designed to combine two KFileViews into one widget, to show directories on the left side and files on the right side. Methods like selectedItems() to query status _only_ work on the right side, i.e. on the files. After creating the KCombiView, you need to supply the view shown in the right, (see setRight()). Available KFileView implementations are KFileIconView and KFileDetailView. Most of the below methods are just implementations of the baseclass KFileView, so look there for documentation.

See Also: KFileView KFileIconView KFileDetailView KDirOperator

UNKNOWN: This view is designed to combine two KFileViews into one widget, to show directories on the left side and files on the right side.

Constructor Summary
protected KCombiView(Class dummy)
KCombiView(QWidget parent, String name)
Method Summary
KActionCollectionactionCollection()
voidaddItemList(ArrayList list)
inserts a list of items.
static intautoOpenDelay()
delay before auto opening a directory
StringclassName()
voidclear()
voidclearSelection()
voidclearView()
intcount()
KFileItemcurrentFileItem()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
intdropOptions()
Returns the DND options in effect.
voidensureItemVisible(KFileItem arg1)
booleaneventFilter(QObject o, QEvent e)
protected voidfinalize()
Deletes the wrapped C++ instance
KFileItemfirstFileItem()
voidinsertItem(KFileItem i)
voidinvertSelection()
booleanisDisposed()
Has the wrapped C++ instance been deleted?
booleanisReversed()
Tells whether the current items are in reversed order (shortcut to sorting() & QDir.Reversed).
booleanisSelected(KFileItem arg1)
ArrayListitems()
voidlistingCompleted()
QMetaObjectmetaObject()
KFileItemnextItem(KFileItem arg1)
intnumDirs()
intnumFiles()
booleanonlyDoubleClickSelectsFiles()
KFileItemprevItem(KFileItem arg1)
voidreadConfig(KConfig arg1, String group)
voidreadConfig(KConfig arg1)
voidremoveItem(KFileItem arg1)
voidselectAll()
ArrayListselectedItems()
voidsetAcceptDrops(boolean b)
voidsetCurrentItem(KFileItem arg1)
voidsetCurrentItem(String filename)
Sets filename the current item in the view, if available.
voidsetDropOptions(int options)
Specify DND options.
protected voidsetDropOptions_impl(int options)
voidsetOnlyDoubleClickSelectsFiles(boolean enable)
This is a KFileDialog specific hack: we want to select directories with single click, but not files.
voidsetParentView(KFileViewInterface parent)
voidsetRight(KFileViewInterface view)
Sets the view to be shown in the right.
voidsetSelected(KFileItem arg1, boolean arg2)
voidsetSelectionMode(int sm)
voidsetSorting(int sort)
voidsetViewMode(int vm)
voidsetViewName(String name)
Sets the name of the view, which could be displayed somewhere.
KFileViewSignalersignaler()
protected voidslotSortingChanged(int arg1)
intsorting()
Returns the sorting order of the internal list.
static StringsortingKey(String value, boolean isDir, int sortSpec)
This method calculates a String from the given parameters, that is suitable for sorting with e.g.
static StringsortingKey(long value, boolean isDir, int sortSpec)
An overloaded method that takes not a String, but a number as sort criterion.
voidsortReversed()
booleanupdateNumbers(KFileItem i)
increases the number of dirs and files.
voidupdateView(boolean arg1)
voidupdateView(KFileItem arg1)
voidupdateView()
intviewMode()
StringviewName()
QWidgetwidget()
voidwriteConfig(KConfig arg1, String group)
voidwriteConfig(KConfig arg1)

Constructor Detail

KCombiView

protected KCombiView(Class dummy)

KCombiView

public KCombiView(QWidget parent, String name)

Method Detail

actionCollection

public KActionCollection actionCollection()

addItemList

public void addItemList(ArrayList list)
inserts a list of items.

UNKNOWN: inserts a list of items.

autoOpenDelay

public static int autoOpenDelay()
delay before auto opening a directory

UNKNOWN:

className

public String className()

clear

public void clear()

clearSelection

public void clearSelection()

clearView

public void clearView()

count

public int count()

Returns: the number of dirs and files

UNKNOWN:

currentFileItem

public KFileItem currentFileItem()

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

dropOptions

public int dropOptions()
Returns the DND options in effect. See DropOptions for details.

UNKNOWN: Returns the DND options in effect.

ensureItemVisible

public void ensureItemVisible(KFileItem arg1)

eventFilter

public boolean eventFilter(QObject o, QEvent e)

finalize

protected void finalize()
Deletes the wrapped C++ instance

firstFileItem

public KFileItem firstFileItem()

insertItem

public void insertItem(KFileItem i)

invertSelection

public void invertSelection()

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

isReversed

public boolean isReversed()
Tells whether the current items are in reversed order (shortcut to sorting() & QDir.Reversed).

UNKNOWN: Tells whether the current items are in reversed order (shortcut to sorting() & QDir.Reversed).

isSelected

public boolean isSelected(KFileItem arg1)

items

public ArrayList items()

Returns: all items currently available in the current sort-order

UNKNOWN:

listingCompleted

public void listingCompleted()

metaObject

public QMetaObject metaObject()

nextItem

public KFileItem nextItem(KFileItem arg1)

numDirs

public int numDirs()

Returns: the number of directories

UNKNOWN:

numFiles

public int numFiles()

Returns: the number of files.

UNKNOWN:

onlyDoubleClickSelectsFiles

public boolean onlyDoubleClickSelectsFiles()

Returns: whether files (not directories) should only be select()ed by double-clicks.

See Also: KCombiView

UNKNOWN:

prevItem

public KFileItem prevItem(KFileItem arg1)

readConfig

public void readConfig(KConfig arg1, String group)

readConfig

public void readConfig(KConfig arg1)

removeItem

public void removeItem(KFileItem arg1)

selectAll

public void selectAll()

selectedItems

public ArrayList selectedItems()

Returns: all currently highlighted items.

UNKNOWN:

setAcceptDrops

public void setAcceptDrops(boolean b)

setCurrentItem

public void setCurrentItem(KFileItem arg1)

setCurrentItem

public void setCurrentItem(String filename)
Sets filename the current item in the view, if available.

UNKNOWN: Sets filename the current item in the view, if available.

setDropOptions

public void setDropOptions(int options)
Specify DND options. See DropOptions for details. All options are disabled by default.

UNKNOWN: Specify DND options.

setDropOptions_impl

protected void setDropOptions_impl(int options)

setOnlyDoubleClickSelectsFiles

public void setOnlyDoubleClickSelectsFiles(boolean enable)
This is a KFileDialog specific hack: we want to select directories with single click, but not files. But as a generic class, we have to be able to select files on single click as well. This gives us the opportunity to do both. Every view has to decide when to call select( item ) when a file was single-clicked, based on onlyDoubleClickSelectsFiles().

UNKNOWN: This is a KFileDialog specific hack: we want to select directories with single click, but not files.

setParentView

public void setParentView(KFileViewInterface parent)

setRight

public void setRight(KFileViewInterface view)
Sets the view to be shown in the right. You need to call this before doing anything else with this widget.

UNKNOWN: Sets the view to be shown in the right.

setSelected

public void setSelected(KFileItem arg1, boolean arg2)

setSelectionMode

public void setSelectionMode(int sm)

setSorting

public void setSorting(int sort)

setViewMode

public void setViewMode(int vm)

setViewName

public void setViewName(String name)
Sets the name of the view, which could be displayed somewhere. E.g. "Image Preview".

UNKNOWN: Sets the name of the view, which could be displayed somewhere.

signaler

public KFileViewSignaler signaler()

slotSortingChanged

protected void slotSortingChanged(int arg1)

sorting

public int sorting()
Returns the sorting order of the internal list. Newly added files are added through this sorting.

UNKNOWN: Returns the sorting order of the internal list.

sortingKey

public 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. QIconView or QListView. Their Item-classes usually have a setKey( String ) method or a virtual method String key() that is used for sorting.

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.

sortingKey

public static String sortingKey(long value, boolean isDir, int sortSpec)
An overloaded method that takes not a String, but a number as sort criterion. You can use this for file-sizes or dates/times for example. If you use a time_t, you need to cast that to KIO.filesize_t because of ambiguity problems.

UNKNOWN: An overloaded method that takes not a String, but a number as sort criterion.

sortReversed

public void sortReversed()

updateNumbers

public boolean updateNumbers(KFileItem i)
increases the number of dirs and files.

Returns: true if the item fits the view mode

UNKNOWN: increases the number of dirs and files.

updateView

public void updateView(boolean arg1)

updateView

public void updateView(KFileItem arg1)

updateView

public void updateView()

viewMode

public int viewMode()

viewName

public String viewName()

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: KCombiView

UNKNOWN:

widget

public QWidget widget()

writeConfig

public void writeConfig(KConfig arg1, String group)

writeConfig

public void writeConfig(KConfig arg1)