kate Library API Documentation

katefactory.h

00001 /* This file is part of the KDE libraries
00002    Copyright (C) 2001-2003 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 class KateCmd;
00029 class KateFileTypeManager;
00030 class KateSchemaManager;
00031 class KateDocumentConfig;
00032 class KateViewConfig;
00033 class KateRendererConfig;
00034 
00035 class KDirWatch;
00036 
00037 class KateFactory
00038 {
00039   private:
00040     KateFactory ();
00041     
00042   public:
00043     ~KateFactory ();
00044 
00045     static KateFactory *self ();
00046     
00047     KParts::Part *createPartObject ( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *classname, const QStringList &args );
00048 
00049     inline KInstance *instance () { return &m_instance; };
00050 
00051     void registerDocument ( class KateDocument *doc );
00052     void deregisterDocument ( class KateDocument *doc );
00053 
00054     void registerView ( class KateView *view );
00055     void deregisterView ( class KateView *view );
00056 
00057     void registerRenderer ( class KateRenderer  *renderer );
00058     void deregisterRenderer ( class KateRenderer  *renderer );
00059 
00060     inline QPtrList<class KateDocument> *documents () { return &m_documents; };
00061 
00062     inline QPtrList<class KateView> *views () { return &m_views; };
00063 
00064     inline QPtrList<class KateRenderer> *renderers () { return &m_renderers; };
00065     
00066     inline const KTrader::OfferList &plugins () { return m_plugins; };
00067 
00068     inline KDirWatch *dirWatch () { return m_dirWatch; };
00069 
00070     inline KateFileTypeManager *fileTypeManager () { return m_fileTypeManager; };
00071 
00072     inline KateSchemaManager *schemaManager () { return m_schemaManager; };
00073 
00074     inline KateDocumentConfig *documentConfig () { return m_documentConfig; }
00075     inline KateViewConfig *viewConfig () { return m_viewConfig; }
00076     inline KateRendererConfig *rendererConfig () { return m_rendererConfig; }
00077 
00078   private:
00079     static KateFactory *s_self;
00080     
00081     KAboutData m_aboutData;
00082     KInstance m_instance;
00083     
00084     QPtrList<class KateDocument> m_documents;
00085     QPtrList<class KateView> m_views;
00086     QPtrList<class KateRenderer> m_renderers;
00087     
00088     KDirWatch *m_dirWatch;  
00089   
00090     KateFileTypeManager *m_fileTypeManager;
00091     KateSchemaManager *m_schemaManager;
00092 
00093     KTrader::OfferList m_plugins;
00094 
00095     KateDocumentConfig *m_documentConfig;
00096     KateViewConfig *m_viewConfig;
00097     KateRendererConfig *m_rendererConfig;
00098 };
00099 
00100 #endif
00101 
00102 // kate: space-indent on; indent-width 2; replace-tabs on;
KDE Logo
This file is part of the documentation for kate Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed May 5 07:18:44 2004 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003