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

kio

KPreviewWidgetBase Class Reference

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

#include <kpreviewwidgetbase.h>

Inheritance diagram for KPreviewWidgetBase:

Inheritance graph
[legend]

List of all members.


Public Slots

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

Public Member Functions

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

Protected Member Functions

void setSupportedMimeTypes (const QStringList &mimeTypes)
virtual void virtual_hook (int, void *)

Detailed Description

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

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.

Abstract baseclass for all preview widgets.

Author:
Frerich Raabe <raabe@kde.org>

Definition at line 44 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
name The internal name of this object

Definition at line 20 of file kpreviewwidgetbase.cpp.

KPreviewWidgetBase::~KPreviewWidgetBase (  ) 

Definition at line 29 of file kpreviewwidgetbase.cpp.


Member Function Documentation

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 KFileMetaPreview, and KImageFilePreview.

void KPreviewWidgetBase::setSupportedMimeTypes ( const QStringList &  mimeTypes  )  [protected]

Definition at line 39 of file kpreviewwidgetbase.cpp.

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 KFileMetaPreview, and KImageFilePreview.

QStringList KPreviewWidgetBase::supportedMimeTypes (  )  const [slot]

Definition at line 44 of file kpreviewwidgetbase.cpp.

virtual void KPreviewWidgetBase::virtual_hook ( int  ,
void *   
) [inline, protected, virtual]

Reimplemented in KFileMetaPreview, and KImageFilePreview.

Definition at line 82 of file kpreviewwidgetbase.h.


The documentation for this class was generated from the following files:
  • kpreviewwidgetbase.h
  • kpreviewwidgetbase.cpp

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