kio Library API Documentation

KPreviewWidgetBase Class Reference

Abstract baseclass for all preview widgets which shall be used via KFileDialog::setPreviewWidget(const KPreviewWidgetBase *). Abstract baseclass for all preview widgets. More...

#include <kpreviewwidgetbase.h>

Inheritance diagram for KPreviewWidgetBase:

QWidget KImageFilePreview List of all members.

Public Slots

virtual void showPreview (const KURL &url)=0
virtual void clearPreview ()=0

Public Methods

 KPreviewWidgetBase (QWidget *parent, const char *name=0)

Detailed Description

Abstract baseclass for all preview widgets which shall be used via KFileDialog::setPreviewWidget(const KPreviewWidgetBase *). Abstract baseclass for all preview widgets.

Ownership will be transferred to KFileDialog, so you have to create the preview with "new" and let KFileDialog delete it.

Just derive your custom preview widget from KPreviewWidgetBase and implement all the pure virtual methods. The slot showPreview(const KURL &) is called every time the file selection changes.

Author:
Frerich Raabe <raabe@kde.org>

Definition at line 42 of file kpreviewwidgetbase.h.


Constructor & Destructor Documentation

KPreviewWidgetBase::KPreviewWidgetBase QWidget   parent,
const char *    name = 0
 

Constructor.

Construct the user interface of your preview widget here and pass the KFileDialog this preview widget is going to be used in as the parent.

Parameters:
parent  The KFileDialog this preview widget is going to be used in

Definition at line 20 of file kpreviewwidgetbase.cpp.

References QPtrDict< KPreviewWidgetBasePrivate >::insert().


Member Function Documentation

virtual void KPreviewWidgetBase::showPreview const KURL   url [pure virtual, slot]
 

This slot is called every time the user selects another file in the file dialog.

Implement the stuff necessary to reflect the change here.

Parameters:
url  The URL of the currently selected file.

Implemented in KImageFilePreview.

virtual void KPreviewWidgetBase::clearPreview   [pure virtual, slot]
 

Reimplement this to clear the preview.

This is called when e.g. the selection is cleared or when multiple selections exist, or the directory is changed.

Implemented in KImageFilePreview.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kio Library Version 3.2.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 4 12:35:14 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003