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


Public Member Functions | |
KMimeTypeResolver (Parent *parent) | |
virtual | ~KMimeTypeResolver () |
void | start (uint delayNonVisibleIcons=10) |
virtual void | slotViewportAdjusted () |
virtual void | slotProcessMimeIcons () |
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
|
Creates a new KMimeTypeResolver with the given parent.
Definition at line 125 of file kmimetyperesolver.h. |
Member Function Documentation
|
Start the mimetype-determination. Call this when the listing is completed.
Definition at line 141 of file kmimetyperesolver.h. Referenced by KFileIconView::listingCompleted(), and KFileDetailView::listingCompleted(). |
|
"Connected" to the viewportAdjusted signal of the scrollview
Implements KMimeTypeResolverBase. Definition at line 217 of file kmimetyperesolver.h. References QPtrList::isEmpty(), KMimeTypeResolver< IconItem, Parent >::m_lstPendingMimeIconItems, QPtrList::remove(), and KMimeTypeResolverHelper::start(). |
|
"Connected" to the timer
Implements KMimeTypeResolverBase. Definition at line 180 of file kmimetyperesolver.h. References QPtrList::count(), QPtrList::first(), KMimeTypeResolver< IconItem, Parent >::m_lstPendingMimeIconItems, QPtrList::remove(), and KMimeTypeResolverHelper::start(). |
Member Data Documentation
|
The list of items to process. The view is free to clear it, insert new items into it, remove items, etc.
Definition at line 152 of file kmimetyperesolver.h. Referenced by KFileIconView::clearView(), KFileDetailView::clearView(), KFileIconView::insertItem(), KFileDetailView::insertItem(), KFileIconView::removeItem(), KFileDetailView::removeItem(), KMimeTypeResolver< IconItem, Parent >::slotProcessMimeIcons(), and KMimeTypeResolver< IconItem, Parent >::slotViewportAdjusted(). |
The documentation for this class was generated from the following file: