• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

KMimeTypeResolver< IconItem, Parent > Class Template Reference

This class implements the "delayed-mimetype-determination" feature, for konqueror's directory views (and KFileDialog's :). More...

#include <kmimetyperesolver.h>

Inheritance diagram for KMimeTypeResolver< IconItem, Parent >:

Inheritance graph
[legend]

List of all members.


Public Member Functions

 KMimeTypeResolver (Parent *parent)
virtual void slotProcessMimeIcons ()
virtual void slotViewportAdjusted ()
void start (uint delayNonVisibleIcons=10)
virtual ~KMimeTypeResolver ()

Public Attributes

QPtrList< IconItem > m_lstPendingMimeIconItems

Detailed Description

template<class IconItem, class Parent>
class KMimeTypeResolver< IconItem, Parent >

This class implements the "delayed-mimetype-determination" feature, for konqueror's directory views (and KFileDialog's :).

It determines the mimetypes of the icons in the background, but giving preferrence to the visible icons.

It is implemented as a template, so that it can work with both QPtrListViewItem and QIconViewItem, without requiring hacks such as void * or QPtrDict lookups.

Here's what the parent must implement :

  • void mimeTypeDeterminationFinished();
  • QScrollView * scrollWidget();
  • void determineIcon( IconItem * item ), which should call
  • KFileItem::determineMimeType on the fileItem, and update the icon, etc.

Definition at line 118 of file kmimetyperesolver.h.


Constructor & Destructor Documentation

template<class IconItem, class Parent>
KMimeTypeResolver< IconItem, Parent >::KMimeTypeResolver ( Parent *  parent  )  [inline]

Creates a new KMimeTypeResolver with the given parent.

Parameters:
parent the parent's resolver

Definition at line 125 of file kmimetyperesolver.h.

template<class IconItem, class Parent>
virtual KMimeTypeResolver< IconItem, Parent >::~KMimeTypeResolver (  )  [inline, virtual]

Definition at line 131 of file kmimetyperesolver.h.


Member Function Documentation

template<class IconItem , class Parent >
void KMimeTypeResolver< IconItem, Parent >::slotProcessMimeIcons (  )  [inline, virtual]

"Connected" to the timer

Implements KMimeTypeResolverBase.

Definition at line 180 of file kmimetyperesolver.h.

template<class IconItem , class Parent >
void KMimeTypeResolver< IconItem, Parent >::slotViewportAdjusted (  )  [inline, virtual]

"Connected" to the viewportAdjusted signal of the scrollview

Implements KMimeTypeResolverBase.

Definition at line 217 of file kmimetyperesolver.h.

template<class IconItem, class Parent>
void KMimeTypeResolver< IconItem, Parent >::start ( uint  delayNonVisibleIcons = 10  )  [inline]

Start the mimetype-determination.

Call this when the listing is completed.

Parameters:
delayNonVisibleIcons the delay to use between icons not on screen. Usually 10, but should be set to 0 when the image preview feature is activated, because image preview can only start once we know the mimetypes

Definition at line 141 of file kmimetyperesolver.h.


Member Data Documentation

template<class IconItem, class Parent>
QPtrList<IconItem> KMimeTypeResolver< IconItem, Parent >::m_lstPendingMimeIconItems

The list of items to process.

The view is free to clear it, insert new items into it, remove items, etc.

Returns:
the list of items to process

Definition at line 152 of file kmimetyperesolver.h.


The documentation for this class was generated from the following file:
  • kmimetyperesolver.h

kio

Skip menu "kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal