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.3"
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 
00043 class KateFactory
00044 {
00045   private:
00049     KateFactory ();
00050     
00051   public:
00055     ~KateFactory ();
00056 
00061     static KateFactory *self ();
00062     
00072     KParts::Part *createPartObject ( QWidget *parentWidget, const char *widgetName,
00073                                      QObject *parent, const char *name, const char *classname,
00074                                      const QStringList &args );
00075 
00080     inline KInstance *instance () { return &m_instance; };
00081 
00087     void registerDocument ( KateDocument *doc );
00088     
00093     void deregisterDocument ( KateDocument *doc );
00094 
00100     void registerView ( KateView *view );
00101     
00106     void deregisterView ( KateView *view );
00107 
00113     void registerRenderer ( KateRenderer  *renderer );
00114     
00119     void deregisterRenderer ( KateRenderer  *renderer );
00120 
00125     inline QPtrList<KateDocument> *documents () { return &m_documents; };
00126 
00131     inline QPtrList<KateView> *views () { return &m_views; };
00132 
00137     inline QPtrList<KateRenderer> *renderers () { return &m_renderers; };
00138     
00143     inline const KTrader::OfferList &plugins () { return m_plugins; };
00144 
00149     inline KDirWatch *dirWatch () { return m_dirWatch; };
00150 
00156     inline KateFileTypeManager *fileTypeManager () { return m_fileTypeManager; };
00157 
00162     inline KateSchemaManager *schemaManager () { return m_schemaManager; };
00163 
00168     inline KateDocumentConfig *documentConfig () { return m_documentConfig; }
00169     
00174     inline KateViewConfig *viewConfig () { return m_viewConfig; }
00175     
00180     inline KateRendererConfig *rendererConfig () { return m_rendererConfig; }
00181 
00182   private:
00186     static KateFactory *s_self;
00187     
00191     KAboutData m_aboutData;
00192     
00196     KInstance m_instance;
00197     
00201     QPtrList<KateDocument> m_documents;
00202     
00206     QPtrList<KateView> m_views;
00207     
00211     QPtrList<KateRenderer> m_renderers;
00212     
00216     KDirWatch *m_dirWatch;  
00217   
00221     KateFileTypeManager *m_fileTypeManager;
00222     
00226     KateSchemaManager *m_schemaManager;
00227 
00231     KTrader::OfferList m_plugins;
00232 
00236     KateDocumentConfig *m_documentConfig;
00237     
00241     KateViewConfig *m_viewConfig;
00242     
00246     KateRendererConfig *m_rendererConfig;
00247 };
00248 
00249 #endif
00250 
00251 // kate: space-indent on; indent-width 2; replace-tabs on;
KDE Logo
This file is part of the documentation for kate Library Version 3.3.90.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 30 10:24:43 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003