[KLF Application][KLF Tools][KLF Backend][KLF Home]
KLatexFormula Project
Public Member Functions | Static Public Member Functions | List of all members
KLFLibViewFactory Class Referenceabstract

#include <klflibview.h>

Inheritance diagram for KLFLibViewFactory:
Inheritance graph
[legend]
Collaboration diagram for KLFLibViewFactory:
Collaboration graph
[legend]

Public Member Functions

 KLFLibViewFactory (const QStringList &viewTypeIdentifiers, QObject *parent=NULL)
 
virtual ~KLFLibViewFactory ()
 
virtual QStringList viewTypeIdentifiers ()
 
virtual QString viewTypeTitle (const QString &viewTypeIdent) const =0
 
virtual bool canCreateLibView (const QString &viewTypeIdent, KLFLibResourceEngine *engine)=0
 
virtual KLFAbstractLibViewcreateLibView (const QString &viewTypeIdent, QWidget *parent, KLFLibResourceEngine *resourceEngine)=0
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent=0)
 
 blockSignals (bool block)
 
 childEvent (QChildEvent *event)
 
 children ()
 
 connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type=Qt::AutoCompatConnection)
 
 connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type=Qt::AutoCompatConnection)
 
 connectNotify (const char *signal)
 
 customEvent (QEvent *event)
 
 deleteLater ()
 
 destroyed (QObject *obj=0)
 
 disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
 disconnect (const char *signal=0, const QObject *receiver=0, const char *method=0)
 
 disconnect (const QObject *receiver, const char *method=0)
 
 disconnectNotify (const char *signal)
 
 dumpObjectInfo ()
 
 dumpObjectTree ()
 
 dynamicPropertyNames ()
 
 event (QEvent *e)
 
 eventFilter (QObject *watched, QEvent *event)
 
 findChild (const QString &name=QString()
 
 findChildren (const QString &name=QString()
 
 findChildren (const QRegExp &regExp)
 
 inherits (const char *className)
 
 installEventFilter (QObject *filterObj)
 
 isWidgetType ()
 
 killTimer (int id)
 
 metaObject ()
 
 moveToThread (QThread *targetThread)
 
 parent ()
 
 property (const char *name)
 
 receivers (const char *signal)
 
 removeEventFilter (QObject *obj)
 
 sender ()
 
 setParent (QObject *parent)
 
 setProperty (const char *name, const QVariant &value)
 
 signalsBlocked ()
 
 startTimer (int interval)
 
 thread ()
 
 timerEvent (QTimerEvent *event)
 
 tr (const char *sourceText, const char *comment=0, int n=-1)
 
 trUtf8 (const char *sourceText, const char *comment=0, int n=-1)
 
 staticMetaObject
 
 QObject (QObject *parent, const char *name)
 
 checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
 child (const char *objName, const char *inheritsClass=0, bool recursiveSearch=true)
 
 className ()
 
 insertChild (QObject *object)
 
 isA (const char *className)
 
 name ()
 
 name (const char *defaultName)
 
 normalizeSignalSlot (const char *signalSlot)
 
 removeChild (QObject *object)
 
 setName (const char *name)
 

Static Public Member Functions

static QString defaultViewTypeIdentifier ()
 
static KLFLibViewFactoryfindFactoryFor (const QString &viewTypeIdentifier)
 
static QStringList allSupportedViewTypeIdentifiers ()
 
static QList< KLFLibViewFactory * > allFactories ()
 

Detailed Description

Definition at line 261 of file klflibview.h.

Constructor & Destructor Documentation

KLFLibViewFactory::KLFLibViewFactory ( const QStringList viewTypeIdentifiers,
QObject parent = NULL 
)

Definition at line 213 of file klflibview.cpp.

KLFLibViewFactory::~KLFLibViewFactory ( )
virtual

Definition at line 219 of file klflibview.cpp.

Member Function Documentation

static QList<KLFLibViewFactory*> KLFLibViewFactory::allFactories ( )
inlinestatic

Returns the full list of installed factories.

Definition at line 303 of file klflibview.h.

QStringList KLFLibViewFactory::allSupportedViewTypeIdentifiers ( )
static

Returns a combined list of all view type identifiers that the installed factories support. ie. returns a list of all view type idents. we're capable of creating.

Definition at line 249 of file klflibview.cpp.

References QList::size(), and viewTypeIdentifiers().

Referenced by KLFLibBrowserViewContainer::KLFLibBrowserViewContainer().

virtual bool KLFLibViewFactory::canCreateLibView ( const QString viewTypeIdent,
KLFLibResourceEngine engine 
)
pure virtual
Returns
Whether this factory can create the given view widget for the given engine.

This function may return false, for example if this widget factory creates a specialized kind of widget that can only work with a given engine.

Implemented in KLFLibDefaultViewFactory.

Referenced by KLFLibBrowserViewContainer::KLFLibBrowserViewContainer(), and KLFLibBrowser::openResource().

virtual KLFAbstractLibView* KLFLibViewFactory::createLibView ( const QString viewTypeIdent,
QWidget parent,
KLFLibResourceEngine resourceEngine 
)
pure virtual

Create a library view with the given widget parent. The view should reflect the contents given by the resource engine resourceEngine .

Implemented in KLFLibDefaultViewFactory.

Referenced by KLFLibBrowserViewContainer::openView().

QString KLFLibViewFactory::defaultViewTypeIdentifier ( )
static

Returns the default view type identifier. Create this view if you don't have any idea which view you prefer.

This actually returns the first view type identifier of the first registered factory.

Definition at line 225 of file klflibview.cpp.

References QList::size().

Referenced by KLFLibBrowser::openResource().

KLFLibViewFactory * KLFLibViewFactory::findFactoryFor ( const QString viewTypeIdentifier)
static

Returns the factory that can handle the URL scheme urlScheme, or NULL if no such factory exists (ie. has been registered).

Definition at line 232 of file klflibview.cpp.

References QStringList::contains(), QString::isEmpty(), QList::size(), and viewTypeIdentifiers().

Referenced by KLFLibBrowserViewContainer::KLFLibBrowserViewContainer(), KLFLibBrowser::openResource(), and KLFLibBrowserViewContainer::openView().

virtual QStringList KLFLibViewFactory::viewTypeIdentifiers ( )
inlinevirtual

A list of view type identifiers that this factory can create.

Individual view widget types are identified by their "view type identifiers". They are not meant to be human-readable (eg. "LibModel+CategoryTree" or whatever)

Definition at line 272 of file klflibview.h.

Referenced by allSupportedViewTypeIdentifiers(), and findFactoryFor().

virtual QString KLFLibViewFactory::viewTypeTitle ( const QString viewTypeIdent) const
pure virtual

A translated string to be shown to user (in a choice box for ex.) for the given view widget type. (eg. tr("Tree View"))

Implemented in KLFLibDefaultViewFactory.

Referenced by KLFLibBrowserViewContainer::KLFLibBrowserViewContainer().


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

Generated by doxygen 1.8.8