kate Library API Documentation

katefactory.h

00001 /* This file is part of the KDE libraries
00002    Copyright (C) 2001-2004 Christoph Cullmann <cullmann@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00016    Boston, MA 02111-1307, USA.
00017 */
00018 
00019 #ifndef __KATE_FACTORY_H__
00020 #define __KATE_FACTORY_H__
00021 
00022 #include <kparts/factory.h>
00023 
00024 #include <ktrader.h>
00025 #include <kinstance.h>
00026 #include <kaboutdata.h>
00027 
00028 // katepart version must be a string in double quotes, format: "x.x"
00029 #define KATEPART_VERSION "2.4"
00030 
00031 class KateCmd;
00032 class KateFileTypeManager;
00033 class KateSchemaManager;
00034 class KateDocumentConfig;
00035 class KateViewConfig;
00036 class KateRendererConfig;
00037 class KateDocument;
00038 class KateRenderer;
00039 class KateView;
00040 
00041 class KDirWatch;
00042 class KVMAllocator;
00043 
00044 namespace Kate {
00045   class Command;
00046 }
00047 
00048 class KateFactory
00049 {
00050   private:
00054     KateFactory ();
00055 
00056   public:
00060     ~KateFactory ();
00061 
00066     static KateFactory *self ();
00067 
00077     KParts::Part *createPartObject ( QWidget *parentWidget, const char *widgetName,
00078                                      QObject *parent, const char *name, const char *classname,
00079                                      const QStringList &args );
00080 
00085     inline KInstance *instance () { return &m_instance; };
00086 
00092     void registerDocument ( KateDocument *doc );
00093 
00098     void deregisterDocument ( KateDocument *doc );
00099 
00105     void registerView ( KateView *view );
00106 
00111     void deregisterView ( KateView *view );
00112 
00118     void registerRenderer ( KateRenderer  *renderer );
00119 
00124     void deregisterRenderer ( KateRenderer  *renderer );
00125 
00130     inline QPtrList<KateDocument> *documents () { return &m_documents; };
00131 
00136     inline QPtrList<KateView> *views () { return &m_views; };
00137 
00142     inline QPtrList<KateRenderer> *renderers () { return &m_renderers; };
00143 
00148     inline const KTrader::OfferList &plugins () { return m_plugins; };
00149 
00154     inline KDirWatch *dirWatch () { return m_dirWatch; };
00155 
00161     inline KateFileTypeManager *fileTypeManager () { return m_fileTypeManager; };
00162 
00167     inline KateSchemaManager *schemaManager () { return m_schemaManager; };
00168 
00173     inline KateDocumentConfig *documentConfig () { return m_documentConfig; }
00174 
00179     inline KateViewConfig *viewConfig () { return m_viewConfig; }
00180 
00185     inline KateRendererConfig *rendererConfig () { return m_rendererConfig; }
00186 
00191     inline KVMAllocator *vm () { return m_vm; }
00192 
00193   private:
00197     static KateFactory *s_self;
00198 
00202     KAboutData m_aboutData;
00203 
00207     KInstance m_instance;
00208 
00212     QPtrList<KateDocument> m_documents;
00213 
00217     QPtrList<KateView> m_views;
00218 
00222     QPtrList<KateRenderer> m_renderers;
00223 
00227     KDirWatch *m_dirWatch;
00228 
00232     KateFileTypeManager *m_fileTypeManager;
00233 
00237     KateSchemaManager *m_schemaManager;
00238 
00242     KTrader::OfferList m_plugins;
00243 
00247     KateDocumentConfig *m_documentConfig;
00248 
00252     KateViewConfig *m_viewConfig;
00253 
00257     KateRendererConfig *m_rendererConfig;
00258 
00262     KVMAllocator *m_vm;
00263 
00267     QValueList<Kate::Command *> m_cmds;
00268 };
00269 
00270 #endif
00271 
00272 // kate: space-indent on; indent-width 2; replace-tabs on;
KDE Logo
This file is part of the documentation for kate Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed May 4 06:57:12 2005 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003