lib Library API Documentation

KoDocumentEntry Class Reference

Represents an available KOffice component that supports the document interface. More...

#include <koQueryTrader.h>

List of all members.

Public Member Functions

 KoDocumentEntry (KService::Ptr service)
KService::Ptr service () const
bool isEmpty () const
QString name () const
QStringList mimeTypes () const
bool supportsMimeType (const QString &_mimetype) const
KoDocumentcreateDoc (KoDocument *parent=0, const char *name=0) const

Static Public Member Functions

QValueList< KoDocumentEntryquery (const QString &_constr=QString::null)
QValueList< KoDocumentEntryquery (bool _onlyDocEmb, const QString &_constr)
KoDocumentEntry queryByMimeType (const QString &mimetype)


Detailed Description

Represents an available KOffice component that supports the document interface.

Definition at line 37 of file koQueryTrader.h.


Constructor & Destructor Documentation

KoDocumentEntry::KoDocumentEntry KService::Ptr  service  ) 
 

Port from KOffice Trader to KTrader/KActivator (kded) by Simon Hausmann (c) 1999 Simon Hausmann <hausmann@kde.org> Port to KService and simplifications by David Faure <faure@kde.org>.

Definition at line 46 of file koQueryTrader.cc.

Referenced by queryByMimeType().


Member Function Documentation

bool KoDocumentEntry::isEmpty  )  const [inline]
 

Returns:
TRUE if the service pointer is null

Definition at line 50 of file koQueryTrader.h.

Referenced by KoDocumentChild::loadDocument(), and KoApplication::start().

QString KoDocumentEntry::name  )  const [inline]
 

Returns:
name of the associated service

Definition at line 55 of file koQueryTrader.h.

QStringList KoDocumentEntry::mimeTypes  )  const [inline]
 

Mimetypes (and other service types) which this document can handle.

Definition at line 60 of file koQueryTrader.h.

bool KoDocumentEntry::supportsMimeType const QString _mimetype  )  const [inline]
 

Returns:
TRUE if the document can handle the requested mimetype.

Definition at line 65 of file koQueryTrader.h.

KoDocument * KoDocumentEntry::createDoc KoDocument parent = 0,
const char *  name = 0
const
 

Uses the factory of the component to create a document.

If that is not possible, 0 is returned.

Definition at line 51 of file koQueryTrader.cc.

Referenced by KoMainWindow::createDoc(), and KoApplication::start().

QValueList< KoDocumentEntry > KoDocumentEntry::query const QString _constr = QString::null  )  [static]
 

This function will query ksycoca to find all available components.

The result will only contain parts, which are embeddable into a document

Parameters:
_constr is a constraint expression as used by KTrader. You can use it to set additional restrictions on the available components.

Definition at line 108 of file koQueryTrader.cc.

Referenced by KoPartSelectDia::KoPartSelectDia(), and queryByMimeType().

QValueList< KoDocumentEntry > KoDocumentEntry::query bool  _onlyDocEmb,
const QString _constr
[static]
 

This function will query KDED to find all available filters.

Parameters:
_onlyDocEmb specifies if only KOffice Parts should be listed which are embeddable into other koDocuments, or all (if false) (eg.: it makes no sense to embedd Kexi into KWord, but it makes sense to embedd it into KoShell)
_constr is a constraint expression as used by KDEDs trader interface. You can use it to set additional restrictions on the available components.

Definition at line 113 of file koQueryTrader.cc.

KoDocumentEntry KoDocumentEntry::queryByMimeType const QString mimetype  )  [static]
 

This is only a convenience function.

Returns:
a document entry for the KOffice component that supports the requested mimetype and fits the user best.

Definition at line 77 of file koQueryTrader.cc.

References KoDocumentEntry(), and query().

Referenced by KoMainWindow::createDoc(), KoDocumentChild::loadDocument(), and KoApplication::start().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.5.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Mar 11 11:48:45 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003