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 
00030 #include <qstring.h>
00031 
00032 
00042 class KInstance
00043 {
00044     friend class KStandardDirs;
00045 
00046  public:
00051     KInstance( const QCString& instanceName) ;
00052 
00063     KInstance( const KAboutData * aboutData );
00064 
00065     /*
00066      * @internal
00067      * Only for K(Unique)Application
00068      * Initialize from src and delete it.
00069      */
00070      
00071     KInstance( KInstance* src );
00072 
00076     virtual ~KInstance();
00077 
00082     KStandardDirs   *dirs() const;
00083 
00088     KConfig            *config() const;
00089 
00094     KIconLoader        *iconLoader() const;
00095 
00099     void newIconLoader() const;
00100 
00101     KCharsets        *charsets() const;
00102 
00109     const KAboutData *aboutData() const;
00110 
00116     QCString          instanceName() const;
00117 
00123     KMimeSourceFactory* mimeSourceFactory () const;
00124 
00125 protected:
00129     KInstance( const KInstance& );
00130 
00136     void setConfigName(const QString &name);
00137 
00138 private:
00139     mutable KStandardDirs       *_dirs;
00140 
00141     mutable KConfig             *_config;
00142     mutable KIconLoader         *_iconLoader;
00143 
00144     QCString                     _name;
00145     const KAboutData            *_aboutData;
00146 
00147 protected:
00148     virtual void virtual_hook( int id, void* data );
00149 private:
00150     KInstancePrivate *d;
00151 };
00152 
00153 #endif
00154 
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:20:41 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001