katefactory.h
/* This file is part of the KDE libraries
Copyright (C) 2001-2004 Christoph Cullmann <cullmann@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef __KATE_FACTORY_H__
#define __KATE_FACTORY_H__
#include "katejscript.h"
#include <kparts/factory.h>
#include <ktrader.h>
#include <kinstance.h>
#include <kaboutdata.h>
// katepart version must be a string in double quotes, format: "x.x"
#define KATEPART_VERSION "2.5"
class KateCmd;
class KateFileTypeManager;
class KateSchemaManager;
class KateDocumentConfig;
class KateViewConfig;
class KateRendererConfig;
class KateDocument;
class KateRenderer;
class KateView;
class KateJScript;
class KateJScriptManager;
class KateIndentScriptManagerAbstract;
class KDirWatch;
class KVMAllocator;
namespace Kate {
class Command;
}
class KateFactory
{
private:
KateFactory ();
public:
~KateFactory ();
static KateFactory *self ();
KParts::Part *createPartObject ( QWidget *parentWidget, const char *widgetName,
QObject *parent, const char *name, const char *classname,
const QStringList &args );
inline KInstance *instance () { return &m_instance; };
void registerDocument ( KateDocument *doc );
void deregisterDocument ( KateDocument *doc );
void registerView ( KateView *view );
void deregisterView ( KateView *view );
void registerRenderer ( KateRenderer *renderer );
void deregisterRenderer ( KateRenderer *renderer );
inline QPtrList<KateDocument> *documents () { return &m_documents; };
inline QPtrList<KateView> *views () { return &m_views; };
inline QPtrList<KateRenderer> *renderers () { return &m_renderers; };
inline const KTrader::OfferList &plugins () { return m_plugins; };
inline KDirWatch *dirWatch () { return m_dirWatch; };
inline KateFileTypeManager *fileTypeManager () { return m_fileTypeManager; };
inline KateSchemaManager *schemaManager () { return m_schemaManager; };
inline KateDocumentConfig *documentConfig () { return m_documentConfig; }
inline KateViewConfig *viewConfig () { return m_viewConfig; }
inline KateRendererConfig *rendererConfig () { return m_rendererConfig; }
inline KVMAllocator *vm () { return m_vm; }
KateJScript *jscript ();
KateJScriptManager *jscriptManager () { return m_jscriptManager; }
KateIndentScript indentScript (const QString &scriptname);
private:
static KateFactory *s_self;
KAboutData m_aboutData;
KInstance m_instance;
QPtrList<KateDocument> m_documents;
QPtrList<KateView> m_views;
QPtrList<KateRenderer> m_renderers;
KDirWatch *m_dirWatch;
KateFileTypeManager *m_fileTypeManager;
KateSchemaManager *m_schemaManager;
KTrader::OfferList m_plugins;
KateDocumentConfig *m_documentConfig;
KateViewConfig *m_viewConfig;
KateRendererConfig *m_rendererConfig;
KVMAllocator *m_vm;
QValueList<Kate::Command *> m_cmds;
KateJScript *m_jscript;
KateJScriptManager *m_jscriptManager;
QPtrList<KateIndentScriptManagerAbstract> m_indentScriptManagers;
};
#endif
// kate: space-indent on; indent-width 2; replace-tabs on;
KParts::Part
KateRenderer
Handles all of the work of rendering the text (used for the views and printing)
Definition: katerenderer.h:42
KInstance
KAboutData
KateJScript
Whole Kate Part scripting in one classs Allow subclassing to allow specialized scripting engine for i...
Definition: katejscript.h:52
KVMAllocator
KNotifyClient::instance
KInstance * instance()

KDE Home | KDE Accessibility Home | Description of Access Keys