KTextTemplate::TagLibraryInterface

Search for usage in LXR

KTextTemplate::TagLibraryInterface Class Reference

#include <KTextTemplate/TagLibraryInterface>

Public Member Functions

virtual QHash< QString, Filter * > filters (const QString &name={})
 
virtual QHash< QString, AbstractNodeFactory * > nodeFactories (const QString &name={})
 

Detailed Description

The TagLibraryInterface returns available tags and filters from libraries.

This interface must be implemented in tag and filter libraries.

The implementation will usually be very simple.

class MyTagLibrary : public QObject, public TagLibraryInterface
{
public:
MyTagLibrary( QObject *parent = {} )
: QObject( parent ) {
}
nodeFactories(const QString &name = {}) {
Q_UNUSED( name );
nodeFactories.insert( "mytag1", new MyTag1() );
nodeFactories.insert( "mytag2", new MyTag2() );
return nodeFactories;
}
QHash<QString, Filter*> filters( const QString &name = {} ) {
Q_UNUSED( name );
filters.insert( "myfilter1", new MyFilter1() );
filters.insert( "myfilter2", new MyFilter2() );
return filters;
}
};
The TagLibraryInterface returns available tags and filters from libraries.
virtual QHash< QString, AbstractNodeFactory * > nodeFactories(const QString &name={})
Returns the AbstractNodeFactory implementations available in this library.
virtual QHash< QString, Filter * > filters(const QString &name={})
Returns the Filter implementations available in this library.
iterator insert(const Key &key, const T &value)
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
QObject * parent() const const
Author
Stephen Kelly steve.nosp@m.ire@.nosp@m.gmail.nosp@m..com

Definition at line 67 of file taglibraryinterface.h.

Constructor & Destructor Documentation

◆ ~TagLibraryInterface()

virtual KTextTemplate::TagLibraryInterface::~TagLibraryInterface ( )
inlinevirtual

Definition at line 70 of file taglibraryinterface.h.

Member Function Documentation

◆ filters()

virtual QHash< QString, Filter * > KTextTemplate::TagLibraryInterface::filters ( const QString & name = {})
inlinevirtual

Returns the Filter implementations available in this library.

Definition at line 87 of file taglibraryinterface.h.

◆ nodeFactories()

virtual QHash< QString, AbstractNodeFactory * > KTextTemplate::TagLibraryInterface::nodeFactories ( const QString & name = {})
inlinevirtual

Returns the AbstractNodeFactory implementations available in this library.

Definition at line 77 of file taglibraryinterface.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.