kdecore Library API Documentation

kinstance.h

00001 /* This file is part of the KDE libraries
00002    Copyright (C) 1999 Torben Weis <weis@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 #ifndef _KINSTANCE_H
00019 #define _KINSTANCE_H
00020 
00021 class KStandardDirs;
00022 class KAboutData;
00023 class KConfig;
00024 class KIconLoader;
00025 class KCharsets;
00026 class QFont;
00027 class KInstancePrivate;
00028 class KMimeSourceFactory;
00029 class KSharedConfig;
00030 
00031 #include <qstring.h>
00032 
00033 
00034 
00044 class KInstance
00045 {
00046     friend class KStandardDirs;
00047 
00048  public:
00053     KInstance( const QCString& instanceName) ;
00054 
00065     KInstance( const KAboutData * aboutData );
00066 
00067     /*
00068      * @internal
00069      * Only for K(Unique)Application
00070      * Initialize from src and delete it.
00071      */
00072      
00073     KInstance( KInstance* src );
00074 
00078     virtual ~KInstance();
00079 
00084     KStandardDirs   *dirs() const;
00085 
00090     KConfig            *config() const;
00091 
00096     KSharedConfig      *sharedConfig() const;
00097 
00102     KIconLoader        *iconLoader() const;
00103 
00107     void newIconLoader() const;
00108 
00115     const KAboutData *aboutData() const;
00116 
00122     QCString          instanceName() const;
00123 
00129     KMimeSourceFactory* mimeSourceFactory () const;
00130 
00131 protected:
00135     KInstance( const KInstance& );
00136 
00142     void setConfigName(const QString &name);
00143 
00144 private:
00145     mutable KStandardDirs       *_dirs;
00146 
00147     mutable KConfig             *_config;
00148     mutable KIconLoader         *_iconLoader;
00149 
00150     QCString                     _name;
00151     const KAboutData            *_aboutData;
00152 
00153 protected:
00154     virtual void virtual_hook( int id, void* data );
00155 private:
00156     KInstancePrivate *d;
00157 };
00158 
00159 #endif
00160 
KDE Logo
This file is part of the documentation for kdecore Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Aug 4 05:23:02 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2003