lib

#include <KoQueryTrader.h>

Public Member Functions

 KoDocumentEntry (KService::Ptr service)
KService::Ptr service () const
bool isEmpty () const
TQString name () const
TQStringList mimeTypes () const
bool supportsMimeType (const TQString &_mimetype) const
KoDocument * createDoc (KoDocument *parent=0, const char *name=0) const

Static Public Member Functions

static TQValueList< KoDocumentEntry > query (const TQString &_constr=TQString())
static TQValueList< KoDocumentEntry > query (bool _onlyDocEmb, const TQString &_constr)
static KoDocumentEntry queryByMimeType (const TQString &mimetype)

Detailed Description

Represents an available KOffice component that supports the document interface.

Definition at line 38 of file KoQueryTrader.h.

Constructor & Destructor Documentation

◆ KoDocumentEntry() [1/2]

KoDocumentEntry::KoDocumentEntry ( )
inline

Definition at line 42 of file KoQueryTrader.h.

◆ KoDocumentEntry() [2/2]

KoDocumentEntry::KoDocumentEntry ( KService::Ptr service)

Port from KOffice Trader to TDETrader/KActivator (kded) by Simon Hausmann (c) 1999 Simon Hausmann hausm.nosp@m.ann@.nosp@m.kde.o.nosp@m.rg Port to KService and simplifications by David Faure faure.nosp@m.@kde.nosp@m..org.

Definition at line 46 of file KoQueryTrader.cpp.

◆ ~KoDocumentEntry()

KoDocumentEntry::~KoDocumentEntry ( )
inline

Definition at line 44 of file KoQueryTrader.h.

Member Function Documentation

◆ createDoc()

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.cpp.

◆ isEmpty()

bool KoDocumentEntry::isEmpty ( ) const
inline
Returns
true if the service pointer is null

Definition at line 51 of file KoQueryTrader.h.

◆ mimeTypes()

TQStringList KoDocumentEntry::mimeTypes ( ) const
inline

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

Definition at line 61 of file KoQueryTrader.h.

◆ name()

TQString KoDocumentEntry::name ( ) const
inline
Returns
name of the associated service

Definition at line 56 of file KoQueryTrader.h.

◆ query() [1/2]

TQValueList< KoDocumentEntry > KoDocumentEntry::query ( bool _onlyDocEmb,
const TQString & _constr )
static

This function will query the system to find all available filters.

Parameters
_onlyDocEmbspecifies if only KOffice Parts should be listed which are embeddable into other koDocuments, or all (if false) (eg.: it makes no sense to embed Kexi into KWord, but it makes sense to embed it into KoShell)
_constris 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.cpp.

◆ query() [2/2]

TQValueList< KoDocumentEntry > KoDocumentEntry::query ( const TQString & _constr = TQString())
static

This function will query tdesycoca to find all available components.

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

Parameters
_constris a constraint expression as used by TDETrader. You can use it to set additional restrictions on the available components.

Definition at line 108 of file KoQueryTrader.cpp.

◆ queryByMimeType()

KoDocumentEntry KoDocumentEntry::queryByMimeType ( const TQString & mimetype)
static

This is 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.cpp.

◆ service()

KService::Ptr KoDocumentEntry::service ( ) const
inline

Definition at line 46 of file KoQueryTrader.h.

◆ supportsMimeType()

bool KoDocumentEntry::supportsMimeType ( const TQString & _mimetype) const
inline
Returns
true if the document can handle the requested mimetype.

Definition at line 66 of file KoQueryTrader.h.


The documentation for this class was generated from the following files: