org.kde.koala

Class KFileIconView

public class KFileIconView extends KIconView implements KFileViewInterface

An icon-view capable of showing KFileItem's. Used in the filedialog for example. Most of the documentation is in KFileView class. See KFileIconViewSignals for signals emitted by KFileIconView

See Also: KDirOperator KCombiView KFileDetailView

UNKNOWN: An icon-view capable of showing KFileItem's.

Constructor Summary
protected KFileIconView(Class dummy)
KFileIconView(QWidget parent, String name)
Method Summary
protected booleanacceptDrag(QDropEvent e)
KActionCollectionactionCollection()
voidaddItemList(ArrayList list)
inserts a list of items.
voidarrangeItemsInGrid(boolean updated)
Reimplemented for performance reasons.
voidarrangeItemsInGrid()
static intautoOpenDelay()
delay before auto opening a directory
StringclassName()
voidclear()
Clears the view and all item lists.
voidclearSelection()
voidclearView()
protected voidcontentsDragEnterEvent(QDragEnterEvent e)
protected voidcontentsDragLeaveEvent(QDragLeaveEvent e)
protected voidcontentsDragMoveEvent(QDragMoveEvent e)
protected voidcontentsDropEvent(QDropEvent ev)
intcount()
KFileItemcurrentFileItem()
voiddetermineIcon(KFileIconViewItem item)
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected QDragObjectdragObject()
intdropOptions()
Returns the DND options in effect.
voidensureItemVisible(KFileItem arg1)
booleaneventFilter(QObject o, QEvent e)
protected voidfinalize()
Deletes the wrapped C++ instance
KFileItemfirstFileItem()
protected voidhideEvent(QHideEvent arg1)
Reimplemented to remove an eventual tooltip
inticonSize()
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 i)
ArrayListitems()
protected voidkeyPressEvent(QKeyEvent arg1)
Reimplemented to not let QIconView eat return-key events
voidlistingCompleted()
QMetaObjectmetaObject()
voidmimeTypeDeterminationFinished()
KFileItemnextItem(KFileItem arg1)
intnumDirs()
intnumFiles()
booleanonlyDoubleClickSelectsFiles()
KFileItemprevItem(KFileItem arg1)
voidreadConfig(KConfig arg1, String group)
voidreadConfig(KConfig arg1)
voidremoveItem(KFileItem arg1)
QScrollViewscrollWidget()
voidselectAll()
ArrayListselectedItems()
voidsetAcceptDrops(boolean b)
voidsetAutoUpdate(boolean arg1)
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)
voidsetIconSize(int size)
Sets the size of the icons to show.
voidsetIgnoreMaximumSize(boolean ignoreSize)
Disables the "Maximum file size" configuration option for previews Set this before calling showPreviews()
voidsetIgnoreMaximumSize()
voidsetOnlyDoubleClickSelectsFiles(boolean enable)
This is a KFileDialog specific hack: we want to select directories with single click, but not files.
voidsetParentView(KFileViewInterface parent)
voidsetPreviewSize(int size)
Sets the size of the previews.
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.
voidshowEvent(QShowEvent arg1)
voidshowPreviews()
Starts loading previews for all files shown and shows them.
KFileViewSignalersignaler()
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)
voidzoomIn()
voidzoomOut()

Constructor Detail

KFileIconView

protected KFileIconView(Class dummy)

KFileIconView

public KFileIconView(QWidget parent, String name)

Method Detail

acceptDrag

protected boolean acceptDrag(QDropEvent e)

actionCollection

public KActionCollection actionCollection()

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:

addItemList

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

UNKNOWN: inserts a list of items.

arrangeItemsInGrid

public void arrangeItemsInGrid(boolean updated)
Reimplemented for performance reasons.

UNKNOWN: Reimplemented for performance reasons.

arrangeItemsInGrid

public void arrangeItemsInGrid()

autoOpenDelay

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

UNKNOWN:

className

public String className()

clear

public void clear()
Clears the view and all item lists.

UNKNOWN: Clears the view and all item lists.

clearSelection

public void clearSelection()

clearView

public void clearView()

contentsDragEnterEvent

protected void contentsDragEnterEvent(QDragEnterEvent e)

contentsDragLeaveEvent

protected void contentsDragLeaveEvent(QDragLeaveEvent e)

contentsDragMoveEvent

protected void contentsDragMoveEvent(QDragMoveEvent e)

contentsDropEvent

protected void contentsDropEvent(QDropEvent ev)

count

public int count()

Returns: the number of dirs and files

UNKNOWN:

currentFileItem

public KFileItem currentFileItem()

determineIcon

public void determineIcon(KFileIconViewItem item)

dispose

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

dragObject

protected QDragObject dragObject()

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()

hideEvent

protected void hideEvent(QHideEvent arg1)
Reimplemented to remove an eventual tooltip

UNKNOWN: Reimplemented to remove an eventual tooltip

iconSize

public int iconSize()

Returns: the current size used for icons.

UNKNOWN:

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 i)

items

public ArrayList items()

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

UNKNOWN:

keyPressEvent

protected void keyPressEvent(QKeyEvent arg1)
Reimplemented to not let QIconView eat return-key events

UNKNOWN: Reimplemented to not let QIconView eat return-key events

listingCompleted

public void listingCompleted()

metaObject

public QMetaObject metaObject()

mimeTypeDeterminationFinished

public void mimeTypeDeterminationFinished()

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

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)

scrollWidget

public QScrollView scrollWidget()

selectAll

public void selectAll()

selectedItems

public ArrayList selectedItems()

Returns: all currently highlighted items.

UNKNOWN:

setAcceptDrops

public void setAcceptDrops(boolean b)

setAutoUpdate

public void setAutoUpdate(boolean arg1)

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)

setIconSize

public void setIconSize(int size)
Sets the size of the icons to show. Defaults to KIcon.SizeSmall.

UNKNOWN: Sets the size of the icons to show.

setIgnoreMaximumSize

public void setIgnoreMaximumSize(boolean ignoreSize)
Disables the "Maximum file size" configuration option for previews Set this before calling showPreviews()

UNKNOWN: Disables the "Maximum file size" configuration option for previews

setIgnoreMaximumSize

public void setIgnoreMaximumSize()

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)

setPreviewSize

public void setPreviewSize(int size)
Sets the size of the previews. Defaults to KIcon.SizeLarge.

UNKNOWN: Sets the size of the previews.

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.

showEvent

public void showEvent(QShowEvent arg1)

showPreviews

public void showPreviews()
Starts loading previews for all files shown and shows them. Switches into 'large rows' mode, if that isn't the current mode yet.

UNKNOWN: setIgnoreMaximumSize Starts loading previews for all files shown and shows them.

signaler

public KFileViewSignaler signaler()

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

UNKNOWN:

widget

public QWidget widget()

writeConfig

public void writeConfig(KConfig arg1, String group)

writeConfig

public void writeConfig(KConfig arg1)

zoomIn

public void zoomIn()

zoomOut

public void zoomOut()