diff options
Diffstat (limited to 'extra')
81 files changed, 1407 insertions, 1407 deletions
diff --git a/extra/kde300/konsole_part.h b/extra/kde300/konsole_part.h index fcbd612..8fbf1b6 100644 --- a/extra/kde300/konsole_part.h +++ b/extra/kde300/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde300/ksycocafactory.h b/extra/kde300/tdesycocafactory.h index ff1d43c..2be0e58 100644 --- a/extra/kde300/ksycocafactory.h +++ b/extra/kde300/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.12 2002/03/03 21:20:26 lunakl Exp $" +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.12 2002/03/03 21:20:26 lunakl Exp $" -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde301/konsole_part.h b/extra/kde301/konsole_part.h index fcbd612..8fbf1b6 100644 --- a/extra/kde301/konsole_part.h +++ b/extra/kde301/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde301/ksycocafactory.h b/extra/kde301/tdesycocafactory.h index ff1d43c..2be0e58 100644 --- a/extra/kde301/ksycocafactory.h +++ b/extra/kde301/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.12 2002/03/03 21:20:26 lunakl Exp $" +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.12 2002/03/03 21:20:26 lunakl Exp $" -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde303/konsole_part.h b/extra/kde303/konsole_part.h index fcbd612..8fbf1b6 100644 --- a/extra/kde303/konsole_part.h +++ b/extra/kde303/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde303/ksycocafactory.h b/extra/kde303/tdesycocafactory.h index ff1d43c..2be0e58 100644 --- a/extra/kde303/ksycocafactory.h +++ b/extra/kde303/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.12 2002/03/03 21:20:26 lunakl Exp $" +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.12 2002/03/03 21:20:26 lunakl Exp $" -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde310/konsole_part.h b/extra/kde310/konsole_part.h index fcbd612..8fbf1b6 100644 --- a/extra/kde310/konsole_part.h +++ b/extra/kde310/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde311/ksycocafactory.h b/extra/kde310/tdesycocafactory.h index 1959edd..1b3bdf3 100644 --- a/extra/kde311/ksycocafactory.h +++ b/extra/kde310/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $" +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $" -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde311/konsole_part.h b/extra/kde311/konsole_part.h index fcbd612..8fbf1b6 100644 --- a/extra/kde311/konsole_part.h +++ b/extra/kde311/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde312/ksycocafactory.h b/extra/kde311/tdesycocafactory.h index 1959edd..1b3bdf3 100644 --- a/extra/kde312/ksycocafactory.h +++ b/extra/kde311/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $" +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $" -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde312/konsole_part.h b/extra/kde312/konsole_part.h index fcbd612..8fbf1b6 100644 --- a/extra/kde312/konsole_part.h +++ b/extra/kde312/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde313/ksycocafactory.h b/extra/kde312/tdesycocafactory.h index 1959edd..1b3bdf3 100644 --- a/extra/kde313/ksycocafactory.h +++ b/extra/kde312/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $" +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $" -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde313/konsole_part.h b/extra/kde313/konsole_part.h index fcbd612..8fbf1b6 100644 --- a/extra/kde313/konsole_part.h +++ b/extra/kde313/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde310/ksycocafactory.h b/extra/kde313/tdesycocafactory.h index 1959edd..1b3bdf3 100644 --- a/extra/kde310/ksycocafactory.h +++ b/extra/kde313/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $" +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $" -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde314/konsole_part.h b/extra/kde314/konsole_part.h index fcbd612..8fbf1b6 100644 --- a/extra/kde314/konsole_part.h +++ b/extra/kde314/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde314/ksycocafactory.h b/extra/kde314/ksycocafactory.h deleted file mode 100644 index 1959edd..0000000 --- a/extra/kde314/ksycocafactory.h +++ /dev/null @@ -1,137 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $" - -#include "ksycocatype.h" -#include "ksycocaentry.h" - -#include <tqdict.h> -#include <tqptrlist.h> -class KSycoca; -class TQStringList; -class TQString; -class KSycocaDict; -class KSycocaResourceList; - -typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; - -/** - * @internal - * Base class for sycoca factories - */ -class KSycocaFactory -{ -public: - virtual KSycocaFactoryId factoryId() const = 0; - -protected: // virtual class - /** - * Create a factory which can be used to lookup from/create a database - * (depending on KSycoca::isBuilding()) - */ - KSycocaFactory( KSycocaFactoryId factory_id ); - -public: - virtual ~KSycocaFactory(); - - /** - * @return the position of the factory in the sycoca file - */ - int offset() { return mOffset; } - - /** - * @return the dict, for special use by KBuildSycoca - */ - KSycocaEntryDict * entryDict() { return m_entryDict; } - - /** - * Construct an entry from a config file. - * To be implemented in the real factories. - */ - virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; - - /** - * Add an entry - */ - virtual void addEntry(KSycocaEntry *newEntry, const char *resource); - - /** - * Read an entry from the database - */ - virtual KSycocaEntry *createEntry(int offset)=0; - - /** - * Get a list of all entries from the database. - */ - KSycocaEntry::List allEntries(); - - /** - * Saves all entries it maintains as well as index files - * for these entries to the stream 'str'. - * - * Also sets mOffset to the starting position. - * - * The stream is positioned at the end of the last index. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void save(TQDataStream &str); - - /** - * Writes out a header to the stream 'str'. - * The baseclass positions the stream correctly. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void saveHeader(TQDataStream &str); - - /** - * @return the resources for which this factory is responsible. - */ - virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } - -private: - int mOffset; - -protected: - int m_sycocaDictOffset; - int m_beginEntryOffset; - int m_endEntryOffset; - TQDataStream *m_str; - - KSycocaResourceList *m_resourceList; - KSycocaEntryDict *m_entryDict; - KSycocaDict *m_sycocaDict; -protected: - virtual void virtual_hook( int id, void* data ); -}; - -/** This, instead of a typedef, allows to declare "class ..." in header files - * @internal - */ -class KSycocaFactoryList : public TQPtrList<KSycocaFactory> -{ -public: - KSycocaFactoryList() { } -}; - -#endif diff --git a/extra/kde314/tdesycocafactory.h b/extra/kde314/tdesycocafactory.h new file mode 100644 index 0000000..1b3bdf3 --- /dev/null +++ b/extra/kde314/tdesycocafactory.h @@ -0,0 +1,137 @@ +/* This file is part of the KDE libraries + * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License version 2 as published by the Free Software Foundation; + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + **/ + +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $" + +#include "tdesycocatype.h" +#include "tdesycocaentry.h" + +#include <tqdict.h> +#include <tqptrlist.h> +class KSycoca; +class TQStringList; +class TQString; +class KSycocaDict; +class KSycocaResourceList; + +typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; + +/** + * @internal + * Base class for sycoca factories + */ +class KSycocaFactory +{ +public: + virtual KSycocaFactoryId factoryId() const = 0; + +protected: // virtual class + /** + * Create a factory which can be used to lookup from/create a database + * (depending on KSycoca::isBuilding()) + */ + KSycocaFactory( KSycocaFactoryId factory_id ); + +public: + virtual ~KSycocaFactory(); + + /** + * @return the position of the factory in the sycoca file + */ + int offset() { return mOffset; } + + /** + * @return the dict, for special use by KBuildSycoca + */ + KSycocaEntryDict * entryDict() { return m_entryDict; } + + /** + * Construct an entry from a config file. + * To be implemented in the real factories. + */ + virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; + + /** + * Add an entry + */ + virtual void addEntry(KSycocaEntry *newEntry, const char *resource); + + /** + * Read an entry from the database + */ + virtual KSycocaEntry *createEntry(int offset)=0; + + /** + * Get a list of all entries from the database. + */ + KSycocaEntry::List allEntries(); + + /** + * Saves all entries it maintains as well as index files + * for these entries to the stream 'str'. + * + * Also sets mOffset to the starting position. + * + * The stream is positioned at the end of the last index. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void save(TQDataStream &str); + + /** + * Writes out a header to the stream 'str'. + * The baseclass positions the stream correctly. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void saveHeader(TQDataStream &str); + + /** + * @return the resources for which this factory is responsible. + */ + virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } + +private: + int mOffset; + +protected: + int m_sycocaDictOffset; + int m_beginEntryOffset; + int m_endEntryOffset; + TQDataStream *m_str; + + KSycocaResourceList *m_resourceList; + KSycocaEntryDict *m_entryDict; + KSycocaDict *m_sycocaDict; +protected: + virtual void virtual_hook( int id, void* data ); +}; + +/** This, instead of a typedef, allows to declare "class ..." in header files + * @internal + */ +class KSycocaFactoryList : public TQPtrList<KSycocaFactory> +{ +public: + KSycocaFactoryList() { } +}; + +#endif diff --git a/extra/kde315/konsole_part.h b/extra/kde315/konsole_part.h index fcbd612..8fbf1b6 100644 --- a/extra/kde315/konsole_part.h +++ b/extra/kde315/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde315/ksycocafactory.h b/extra/kde315/ksycocafactory.h deleted file mode 100644 index 1959edd..0000000 --- a/extra/kde315/ksycocafactory.h +++ /dev/null @@ -1,137 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $" - -#include "ksycocatype.h" -#include "ksycocaentry.h" - -#include <tqdict.h> -#include <tqptrlist.h> -class KSycoca; -class TQStringList; -class TQString; -class KSycocaDict; -class KSycocaResourceList; - -typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; - -/** - * @internal - * Base class for sycoca factories - */ -class KSycocaFactory -{ -public: - virtual KSycocaFactoryId factoryId() const = 0; - -protected: // virtual class - /** - * Create a factory which can be used to lookup from/create a database - * (depending on KSycoca::isBuilding()) - */ - KSycocaFactory( KSycocaFactoryId factory_id ); - -public: - virtual ~KSycocaFactory(); - - /** - * @return the position of the factory in the sycoca file - */ - int offset() { return mOffset; } - - /** - * @return the dict, for special use by KBuildSycoca - */ - KSycocaEntryDict * entryDict() { return m_entryDict; } - - /** - * Construct an entry from a config file. - * To be implemented in the real factories. - */ - virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; - - /** - * Add an entry - */ - virtual void addEntry(KSycocaEntry *newEntry, const char *resource); - - /** - * Read an entry from the database - */ - virtual KSycocaEntry *createEntry(int offset)=0; - - /** - * Get a list of all entries from the database. - */ - KSycocaEntry::List allEntries(); - - /** - * Saves all entries it maintains as well as index files - * for these entries to the stream 'str'. - * - * Also sets mOffset to the starting position. - * - * The stream is positioned at the end of the last index. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void save(TQDataStream &str); - - /** - * Writes out a header to the stream 'str'. - * The baseclass positions the stream correctly. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void saveHeader(TQDataStream &str); - - /** - * @return the resources for which this factory is responsible. - */ - virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } - -private: - int mOffset; - -protected: - int m_sycocaDictOffset; - int m_beginEntryOffset; - int m_endEntryOffset; - TQDataStream *m_str; - - KSycocaResourceList *m_resourceList; - KSycocaEntryDict *m_entryDict; - KSycocaDict *m_sycocaDict; -protected: - virtual void virtual_hook( int id, void* data ); -}; - -/** This, instead of a typedef, allows to declare "class ..." in header files - * @internal - */ -class KSycocaFactoryList : public TQPtrList<KSycocaFactory> -{ -public: - KSycocaFactoryList() { } -}; - -#endif diff --git a/extra/kde315/tdesycocafactory.h b/extra/kde315/tdesycocafactory.h new file mode 100644 index 0000000..1b3bdf3 --- /dev/null +++ b/extra/kde315/tdesycocafactory.h @@ -0,0 +1,137 @@ +/* This file is part of the KDE libraries + * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License version 2 as published by the Free Software Foundation; + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + **/ + +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $" + +#include "tdesycocatype.h" +#include "tdesycocaentry.h" + +#include <tqdict.h> +#include <tqptrlist.h> +class KSycoca; +class TQStringList; +class TQString; +class KSycocaDict; +class KSycocaResourceList; + +typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; + +/** + * @internal + * Base class for sycoca factories + */ +class KSycocaFactory +{ +public: + virtual KSycocaFactoryId factoryId() const = 0; + +protected: // virtual class + /** + * Create a factory which can be used to lookup from/create a database + * (depending on KSycoca::isBuilding()) + */ + KSycocaFactory( KSycocaFactoryId factory_id ); + +public: + virtual ~KSycocaFactory(); + + /** + * @return the position of the factory in the sycoca file + */ + int offset() { return mOffset; } + + /** + * @return the dict, for special use by KBuildSycoca + */ + KSycocaEntryDict * entryDict() { return m_entryDict; } + + /** + * Construct an entry from a config file. + * To be implemented in the real factories. + */ + virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; + + /** + * Add an entry + */ + virtual void addEntry(KSycocaEntry *newEntry, const char *resource); + + /** + * Read an entry from the database + */ + virtual KSycocaEntry *createEntry(int offset)=0; + + /** + * Get a list of all entries from the database. + */ + KSycocaEntry::List allEntries(); + + /** + * Saves all entries it maintains as well as index files + * for these entries to the stream 'str'. + * + * Also sets mOffset to the starting position. + * + * The stream is positioned at the end of the last index. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void save(TQDataStream &str); + + /** + * Writes out a header to the stream 'str'. + * The baseclass positions the stream correctly. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void saveHeader(TQDataStream &str); + + /** + * @return the resources for which this factory is responsible. + */ + virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } + +private: + int mOffset; + +protected: + int m_sycocaDictOffset; + int m_beginEntryOffset; + int m_endEntryOffset; + TQDataStream *m_str; + + KSycocaResourceList *m_resourceList; + KSycocaEntryDict *m_entryDict; + KSycocaDict *m_sycocaDict; +protected: + virtual void virtual_hook( int id, void* data ); +}; + +/** This, instead of a typedef, allows to declare "class ..." in header files + * @internal + */ +class KSycocaFactoryList : public TQPtrList<KSycocaFactory> +{ +public: + KSycocaFactoryList() { } +}; + +#endif diff --git a/extra/kde320/configwidget.h b/extra/kde320/configwidget.h index afe677e..3c2052c 100644 --- a/extra/kde320/configwidget.h +++ b/extra/kde320/configwidget.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde320/konsole_part.h b/extra/kde320/konsole_part.h index fcbd612..8fbf1b6 100644 --- a/extra/kde320/konsole_part.h +++ b/extra/kde320/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde320/selectdialog.h b/extra/kde320/selectdialog.h index 680d48e..4fc3685 100644 --- a/extra/kde320/selectdialog.h +++ b/extra/kde320/selectdialog.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde320/ksycocafactory.h b/extra/kde320/tdesycocafactory.h index 2a114ee..97d2e19 100644 --- a/extra/kde320/ksycocafactory.h +++ b/extra/kde320/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde321/configwidget.h b/extra/kde321/configwidget.h index afe677e..3c2052c 100644 --- a/extra/kde321/configwidget.h +++ b/extra/kde321/configwidget.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde321/konsole_part.h b/extra/kde321/konsole_part.h index fcbd612..8fbf1b6 100644 --- a/extra/kde321/konsole_part.h +++ b/extra/kde321/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde321/selectdialog.h b/extra/kde321/selectdialog.h index 680d48e..4fc3685 100644 --- a/extra/kde321/selectdialog.h +++ b/extra/kde321/selectdialog.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde321/ksycocafactory.h b/extra/kde321/tdesycocafactory.h index 2a114ee..97d2e19 100644 --- a/extra/kde321/ksycocafactory.h +++ b/extra/kde321/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde322/configwidget.h b/extra/kde322/configwidget.h index afe677e..3c2052c 100644 --- a/extra/kde322/configwidget.h +++ b/extra/kde322/configwidget.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde322/konsole_part.h b/extra/kde322/konsole_part.h index fcbd612..8fbf1b6 100644 --- a/extra/kde322/konsole_part.h +++ b/extra/kde322/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde322/selectdialog.h b/extra/kde322/selectdialog.h index 680d48e..4fc3685 100644 --- a/extra/kde322/selectdialog.h +++ b/extra/kde322/selectdialog.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde322/ksycocafactory.h b/extra/kde322/tdesycocafactory.h index 2a114ee..97d2e19 100644 --- a/extra/kde322/ksycocafactory.h +++ b/extra/kde322/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde323/configwidget.h b/extra/kde323/configwidget.h index afe677e..3c2052c 100644 --- a/extra/kde323/configwidget.h +++ b/extra/kde323/configwidget.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde323/konsole_part.h b/extra/kde323/konsole_part.h index fcbd612..8fbf1b6 100644 --- a/extra/kde323/konsole_part.h +++ b/extra/kde323/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde323/selectdialog.h b/extra/kde323/selectdialog.h index 680d48e..4fc3685 100644 --- a/extra/kde323/selectdialog.h +++ b/extra/kde323/selectdialog.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde323/ksycocafactory.h b/extra/kde323/tdesycocafactory.h index 2a114ee..97d2e19 100644 --- a/extra/kde323/ksycocafactory.h +++ b/extra/kde323/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde330/configwidget.h b/extra/kde330/configwidget.h index afe677e..3c2052c 100644 --- a/extra/kde330/configwidget.h +++ b/extra/kde330/configwidget.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde330/konsole_part.h b/extra/kde330/konsole_part.h index 94847b1..88da3f9 100644 --- a/extra/kde330/konsole_part.h +++ b/extra/kde330/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde330/ksycocafactory.h b/extra/kde330/ksycocafactory.h deleted file mode 100644 index 2a114ee..0000000 --- a/extra/kde330/ksycocafactory.h +++ /dev/null @@ -1,143 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" - -#include "ksycocatype.h" -#include "ksycocaentry.h" - -#include <tqdict.h> -#include <tqptrlist.h> -class KSycoca; -class TQStringList; -class TQString; -class KSycocaDict; -class KSycocaResourceList; - -typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; - -/** - * @internal - * Base class for sycoca factories - */ -class KSycocaFactory -{ -public: - virtual KSycocaFactoryId factoryId() const = 0; - -protected: // virtual class - /** - * Create a factory which can be used to lookup from/create a database - * (depending on KSycoca::isBuilding()) - */ - KSycocaFactory( KSycocaFactoryId factory_id ); - -public: - virtual ~KSycocaFactory(); - - /** - * @return the position of the factory in the sycoca file - */ - int offset() { return mOffset; } - - /** - * @return the dict, for special use by KBuildSycoca - */ - KSycocaEntryDict * entryDict() { return m_entryDict; } - - /** - * Construct an entry from a config file. - * To be implemented in the real factories. - */ - virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; - - /** - * Add an entry - */ - virtual void addEntry(KSycocaEntry *newEntry, const char *resource); - - /** - * Remove an entry - * Not very fast, use with care. O(N) - */ - void removeEntry(KSycocaEntry *newEntry); - - /** - * Read an entry from the database - */ - virtual KSycocaEntry *createEntry(int offset)=0; - - /** - * Get a list of all entries from the database. - */ - KSycocaEntry::List allEntries(); - - /** - * Saves all entries it maintains as well as index files - * for these entries to the stream 'str'. - * - * Also sets mOffset to the starting position. - * - * The stream is positioned at the end of the last index. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void save(TQDataStream &str); - - /** - * Writes out a header to the stream 'str'. - * The baseclass positions the stream correctly. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void saveHeader(TQDataStream &str); - - /** - * @return the resources for which this factory is responsible. - */ - virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } - -private: - int mOffset; - -protected: - int m_sycocaDictOffset; - int m_beginEntryOffset; - int m_endEntryOffset; - TQDataStream *m_str; - - KSycocaResourceList *m_resourceList; - KSycocaEntryDict *m_entryDict; - KSycocaDict *m_sycocaDict; -protected: - virtual void virtual_hook( int id, void* data ); -}; - -/** This, instead of a typedef, allows to declare "class ..." in header files - * @internal - */ -class KSycocaFactoryList : public TQPtrList<KSycocaFactory> -{ -public: - KSycocaFactoryList() { } -}; - -#endif diff --git a/extra/kde330/selectdialog.h b/extra/kde330/selectdialog.h index 680d48e..4fc3685 100644 --- a/extra/kde330/selectdialog.h +++ b/extra/kde330/selectdialog.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde330/tdesycocafactory.h b/extra/kde330/tdesycocafactory.h new file mode 100644 index 0000000..97d2e19 --- /dev/null +++ b/extra/kde330/tdesycocafactory.h @@ -0,0 +1,143 @@ +/* This file is part of the KDE libraries + * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License version 2 as published by the Free Software Foundation; + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + **/ + +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" + +#include "tdesycocatype.h" +#include "tdesycocaentry.h" + +#include <tqdict.h> +#include <tqptrlist.h> +class KSycoca; +class TQStringList; +class TQString; +class KSycocaDict; +class KSycocaResourceList; + +typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; + +/** + * @internal + * Base class for sycoca factories + */ +class KSycocaFactory +{ +public: + virtual KSycocaFactoryId factoryId() const = 0; + +protected: // virtual class + /** + * Create a factory which can be used to lookup from/create a database + * (depending on KSycoca::isBuilding()) + */ + KSycocaFactory( KSycocaFactoryId factory_id ); + +public: + virtual ~KSycocaFactory(); + + /** + * @return the position of the factory in the sycoca file + */ + int offset() { return mOffset; } + + /** + * @return the dict, for special use by KBuildSycoca + */ + KSycocaEntryDict * entryDict() { return m_entryDict; } + + /** + * Construct an entry from a config file. + * To be implemented in the real factories. + */ + virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; + + /** + * Add an entry + */ + virtual void addEntry(KSycocaEntry *newEntry, const char *resource); + + /** + * Remove an entry + * Not very fast, use with care. O(N) + */ + void removeEntry(KSycocaEntry *newEntry); + + /** + * Read an entry from the database + */ + virtual KSycocaEntry *createEntry(int offset)=0; + + /** + * Get a list of all entries from the database. + */ + KSycocaEntry::List allEntries(); + + /** + * Saves all entries it maintains as well as index files + * for these entries to the stream 'str'. + * + * Also sets mOffset to the starting position. + * + * The stream is positioned at the end of the last index. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void save(TQDataStream &str); + + /** + * Writes out a header to the stream 'str'. + * The baseclass positions the stream correctly. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void saveHeader(TQDataStream &str); + + /** + * @return the resources for which this factory is responsible. + */ + virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } + +private: + int mOffset; + +protected: + int m_sycocaDictOffset; + int m_beginEntryOffset; + int m_endEntryOffset; + TQDataStream *m_str; + + KSycocaResourceList *m_resourceList; + KSycocaEntryDict *m_entryDict; + KSycocaDict *m_sycocaDict; +protected: + virtual void virtual_hook( int id, void* data ); +}; + +/** This, instead of a typedef, allows to declare "class ..." in header files + * @internal + */ +class KSycocaFactoryList : public TQPtrList<KSycocaFactory> +{ +public: + KSycocaFactoryList() { } +}; + +#endif diff --git a/extra/kde331/configwidget.h b/extra/kde331/configwidget.h index afe677e..3c2052c 100644 --- a/extra/kde331/configwidget.h +++ b/extra/kde331/configwidget.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde331/konsole_part.h b/extra/kde331/konsole_part.h index 94847b1..88da3f9 100644 --- a/extra/kde331/konsole_part.h +++ b/extra/kde331/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde331/ksycocafactory.h b/extra/kde331/ksycocafactory.h deleted file mode 100644 index 2a114ee..0000000 --- a/extra/kde331/ksycocafactory.h +++ /dev/null @@ -1,143 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" - -#include "ksycocatype.h" -#include "ksycocaentry.h" - -#include <tqdict.h> -#include <tqptrlist.h> -class KSycoca; -class TQStringList; -class TQString; -class KSycocaDict; -class KSycocaResourceList; - -typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; - -/** - * @internal - * Base class for sycoca factories - */ -class KSycocaFactory -{ -public: - virtual KSycocaFactoryId factoryId() const = 0; - -protected: // virtual class - /** - * Create a factory which can be used to lookup from/create a database - * (depending on KSycoca::isBuilding()) - */ - KSycocaFactory( KSycocaFactoryId factory_id ); - -public: - virtual ~KSycocaFactory(); - - /** - * @return the position of the factory in the sycoca file - */ - int offset() { return mOffset; } - - /** - * @return the dict, for special use by KBuildSycoca - */ - KSycocaEntryDict * entryDict() { return m_entryDict; } - - /** - * Construct an entry from a config file. - * To be implemented in the real factories. - */ - virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; - - /** - * Add an entry - */ - virtual void addEntry(KSycocaEntry *newEntry, const char *resource); - - /** - * Remove an entry - * Not very fast, use with care. O(N) - */ - void removeEntry(KSycocaEntry *newEntry); - - /** - * Read an entry from the database - */ - virtual KSycocaEntry *createEntry(int offset)=0; - - /** - * Get a list of all entries from the database. - */ - KSycocaEntry::List allEntries(); - - /** - * Saves all entries it maintains as well as index files - * for these entries to the stream 'str'. - * - * Also sets mOffset to the starting position. - * - * The stream is positioned at the end of the last index. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void save(TQDataStream &str); - - /** - * Writes out a header to the stream 'str'. - * The baseclass positions the stream correctly. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void saveHeader(TQDataStream &str); - - /** - * @return the resources for which this factory is responsible. - */ - virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } - -private: - int mOffset; - -protected: - int m_sycocaDictOffset; - int m_beginEntryOffset; - int m_endEntryOffset; - TQDataStream *m_str; - - KSycocaResourceList *m_resourceList; - KSycocaEntryDict *m_entryDict; - KSycocaDict *m_sycocaDict; -protected: - virtual void virtual_hook( int id, void* data ); -}; - -/** This, instead of a typedef, allows to declare "class ..." in header files - * @internal - */ -class KSycocaFactoryList : public TQPtrList<KSycocaFactory> -{ -public: - KSycocaFactoryList() { } -}; - -#endif diff --git a/extra/kde331/selectdialog.h b/extra/kde331/selectdialog.h index 680d48e..4fc3685 100644 --- a/extra/kde331/selectdialog.h +++ b/extra/kde331/selectdialog.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde331/tdesycocafactory.h b/extra/kde331/tdesycocafactory.h new file mode 100644 index 0000000..97d2e19 --- /dev/null +++ b/extra/kde331/tdesycocafactory.h @@ -0,0 +1,143 @@ +/* This file is part of the KDE libraries + * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License version 2 as published by the Free Software Foundation; + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + **/ + +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" + +#include "tdesycocatype.h" +#include "tdesycocaentry.h" + +#include <tqdict.h> +#include <tqptrlist.h> +class KSycoca; +class TQStringList; +class TQString; +class KSycocaDict; +class KSycocaResourceList; + +typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; + +/** + * @internal + * Base class for sycoca factories + */ +class KSycocaFactory +{ +public: + virtual KSycocaFactoryId factoryId() const = 0; + +protected: // virtual class + /** + * Create a factory which can be used to lookup from/create a database + * (depending on KSycoca::isBuilding()) + */ + KSycocaFactory( KSycocaFactoryId factory_id ); + +public: + virtual ~KSycocaFactory(); + + /** + * @return the position of the factory in the sycoca file + */ + int offset() { return mOffset; } + + /** + * @return the dict, for special use by KBuildSycoca + */ + KSycocaEntryDict * entryDict() { return m_entryDict; } + + /** + * Construct an entry from a config file. + * To be implemented in the real factories. + */ + virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; + + /** + * Add an entry + */ + virtual void addEntry(KSycocaEntry *newEntry, const char *resource); + + /** + * Remove an entry + * Not very fast, use with care. O(N) + */ + void removeEntry(KSycocaEntry *newEntry); + + /** + * Read an entry from the database + */ + virtual KSycocaEntry *createEntry(int offset)=0; + + /** + * Get a list of all entries from the database. + */ + KSycocaEntry::List allEntries(); + + /** + * Saves all entries it maintains as well as index files + * for these entries to the stream 'str'. + * + * Also sets mOffset to the starting position. + * + * The stream is positioned at the end of the last index. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void save(TQDataStream &str); + + /** + * Writes out a header to the stream 'str'. + * The baseclass positions the stream correctly. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void saveHeader(TQDataStream &str); + + /** + * @return the resources for which this factory is responsible. + */ + virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } + +private: + int mOffset; + +protected: + int m_sycocaDictOffset; + int m_beginEntryOffset; + int m_endEntryOffset; + TQDataStream *m_str; + + KSycocaResourceList *m_resourceList; + KSycocaEntryDict *m_entryDict; + KSycocaDict *m_sycocaDict; +protected: + virtual void virtual_hook( int id, void* data ); +}; + +/** This, instead of a typedef, allows to declare "class ..." in header files + * @internal + */ +class KSycocaFactoryList : public TQPtrList<KSycocaFactory> +{ +public: + KSycocaFactoryList() { } +}; + +#endif diff --git a/extra/kde332/configwidget.h b/extra/kde332/configwidget.h index afe677e..3c2052c 100644 --- a/extra/kde332/configwidget.h +++ b/extra/kde332/configwidget.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde332/konsole_part.h b/extra/kde332/konsole_part.h index 94847b1..88da3f9 100644 --- a/extra/kde332/konsole_part.h +++ b/extra/kde332/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde332/ksycocafactory.h b/extra/kde332/ksycocafactory.h deleted file mode 100644 index 2a114ee..0000000 --- a/extra/kde332/ksycocafactory.h +++ /dev/null @@ -1,143 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" - -#include "ksycocatype.h" -#include "ksycocaentry.h" - -#include <tqdict.h> -#include <tqptrlist.h> -class KSycoca; -class TQStringList; -class TQString; -class KSycocaDict; -class KSycocaResourceList; - -typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; - -/** - * @internal - * Base class for sycoca factories - */ -class KSycocaFactory -{ -public: - virtual KSycocaFactoryId factoryId() const = 0; - -protected: // virtual class - /** - * Create a factory which can be used to lookup from/create a database - * (depending on KSycoca::isBuilding()) - */ - KSycocaFactory( KSycocaFactoryId factory_id ); - -public: - virtual ~KSycocaFactory(); - - /** - * @return the position of the factory in the sycoca file - */ - int offset() { return mOffset; } - - /** - * @return the dict, for special use by KBuildSycoca - */ - KSycocaEntryDict * entryDict() { return m_entryDict; } - - /** - * Construct an entry from a config file. - * To be implemented in the real factories. - */ - virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; - - /** - * Add an entry - */ - virtual void addEntry(KSycocaEntry *newEntry, const char *resource); - - /** - * Remove an entry - * Not very fast, use with care. O(N) - */ - void removeEntry(KSycocaEntry *newEntry); - - /** - * Read an entry from the database - */ - virtual KSycocaEntry *createEntry(int offset)=0; - - /** - * Get a list of all entries from the database. - */ - KSycocaEntry::List allEntries(); - - /** - * Saves all entries it maintains as well as index files - * for these entries to the stream 'str'. - * - * Also sets mOffset to the starting position. - * - * The stream is positioned at the end of the last index. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void save(TQDataStream &str); - - /** - * Writes out a header to the stream 'str'. - * The baseclass positions the stream correctly. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void saveHeader(TQDataStream &str); - - /** - * @return the resources for which this factory is responsible. - */ - virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } - -private: - int mOffset; - -protected: - int m_sycocaDictOffset; - int m_beginEntryOffset; - int m_endEntryOffset; - TQDataStream *m_str; - - KSycocaResourceList *m_resourceList; - KSycocaEntryDict *m_entryDict; - KSycocaDict *m_sycocaDict; -protected: - virtual void virtual_hook( int id, void* data ); -}; - -/** This, instead of a typedef, allows to declare "class ..." in header files - * @internal - */ -class KSycocaFactoryList : public TQPtrList<KSycocaFactory> -{ -public: - KSycocaFactoryList() { } -}; - -#endif diff --git a/extra/kde332/selectdialog.h b/extra/kde332/selectdialog.h index 680d48e..4fc3685 100644 --- a/extra/kde332/selectdialog.h +++ b/extra/kde332/selectdialog.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde332/tdesycocafactory.h b/extra/kde332/tdesycocafactory.h new file mode 100644 index 0000000..97d2e19 --- /dev/null +++ b/extra/kde332/tdesycocafactory.h @@ -0,0 +1,143 @@ +/* This file is part of the KDE libraries + * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License version 2 as published by the Free Software Foundation; + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + **/ + +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $" + +#include "tdesycocatype.h" +#include "tdesycocaentry.h" + +#include <tqdict.h> +#include <tqptrlist.h> +class KSycoca; +class TQStringList; +class TQString; +class KSycocaDict; +class KSycocaResourceList; + +typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; + +/** + * @internal + * Base class for sycoca factories + */ +class KSycocaFactory +{ +public: + virtual KSycocaFactoryId factoryId() const = 0; + +protected: // virtual class + /** + * Create a factory which can be used to lookup from/create a database + * (depending on KSycoca::isBuilding()) + */ + KSycocaFactory( KSycocaFactoryId factory_id ); + +public: + virtual ~KSycocaFactory(); + + /** + * @return the position of the factory in the sycoca file + */ + int offset() { return mOffset; } + + /** + * @return the dict, for special use by KBuildSycoca + */ + KSycocaEntryDict * entryDict() { return m_entryDict; } + + /** + * Construct an entry from a config file. + * To be implemented in the real factories. + */ + virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; + + /** + * Add an entry + */ + virtual void addEntry(KSycocaEntry *newEntry, const char *resource); + + /** + * Remove an entry + * Not very fast, use with care. O(N) + */ + void removeEntry(KSycocaEntry *newEntry); + + /** + * Read an entry from the database + */ + virtual KSycocaEntry *createEntry(int offset)=0; + + /** + * Get a list of all entries from the database. + */ + KSycocaEntry::List allEntries(); + + /** + * Saves all entries it maintains as well as index files + * for these entries to the stream 'str'. + * + * Also sets mOffset to the starting position. + * + * The stream is positioned at the end of the last index. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void save(TQDataStream &str); + + /** + * Writes out a header to the stream 'str'. + * The baseclass positions the stream correctly. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void saveHeader(TQDataStream &str); + + /** + * @return the resources for which this factory is responsible. + */ + virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } + +private: + int mOffset; + +protected: + int m_sycocaDictOffset; + int m_beginEntryOffset; + int m_endEntryOffset; + TQDataStream *m_str; + + KSycocaResourceList *m_resourceList; + KSycocaEntryDict *m_entryDict; + KSycocaDict *m_sycocaDict; +protected: + virtual void virtual_hook( int id, void* data ); +}; + +/** This, instead of a typedef, allows to declare "class ..." in header files + * @internal + */ +class KSycocaFactoryList : public TQPtrList<KSycocaFactory> +{ +public: + KSycocaFactoryList() { } +}; + +#endif diff --git a/extra/kde340/configwidget.h b/extra/kde340/configwidget.h index 3a2fe3f..30ebf2a 100644 --- a/extra/kde340/configwidget.h +++ b/extra/kde340/configwidget.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde340/konsole_part.h b/extra/kde340/konsole_part.h index ed18ad6..ecc7924 100644 --- a/extra/kde340/konsole_part.h +++ b/extra/kde340/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde340/selectdialog.h b/extra/kde340/selectdialog.h index 987dcb6..1a6560d 100644 --- a/extra/kde340/selectdialog.h +++ b/extra/kde340/selectdialog.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde340/ksycocafactory.h b/extra/kde340/tdesycocafactory.h index 1000478..4569fff 100644 --- a/extra/kde340/ksycocafactory.h +++ b/extra/kde340/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde341/configwidget.h b/extra/kde341/configwidget.h index 3a2fe3f..30ebf2a 100644 --- a/extra/kde341/configwidget.h +++ b/extra/kde341/configwidget.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde341/konsole_part.h b/extra/kde341/konsole_part.h index ed18ad6..ecc7924 100644 --- a/extra/kde341/konsole_part.h +++ b/extra/kde341/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde341/selectdialog.h b/extra/kde341/selectdialog.h index 987dcb6..1a6560d 100644 --- a/extra/kde341/selectdialog.h +++ b/extra/kde341/selectdialog.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde341/ksycocafactory.h b/extra/kde341/tdesycocafactory.h index 1000478..4569fff 100644 --- a/extra/kde341/ksycocafactory.h +++ b/extra/kde341/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde342/configwidget.h b/extra/kde342/configwidget.h index 3a2fe3f..30ebf2a 100644 --- a/extra/kde342/configwidget.h +++ b/extra/kde342/configwidget.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde342/konsole_part.h b/extra/kde342/konsole_part.h index ed18ad6..ecc7924 100644 --- a/extra/kde342/konsole_part.h +++ b/extra/kde342/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde342/selectdialog.h b/extra/kde342/selectdialog.h index 987dcb6..1a6560d 100644 --- a/extra/kde342/selectdialog.h +++ b/extra/kde342/selectdialog.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde342/ksycocafactory.h b/extra/kde342/tdesycocafactory.h index 1000478..4569fff 100644 --- a/extra/kde342/ksycocafactory.h +++ b/extra/kde342/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde343/configwidget.h b/extra/kde343/configwidget.h index 3a2fe3f..30ebf2a 100644 --- a/extra/kde343/configwidget.h +++ b/extra/kde343/configwidget.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde343/konsole_part.h b/extra/kde343/konsole_part.h index ed18ad6..ecc7924 100644 --- a/extra/kde343/konsole_part.h +++ b/extra/kde343/konsole_part.h @@ -21,8 +21,8 @@ #ifndef __KONSOLE_PART_H__ #define __KONSOLE_PART_H__ -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde343/selectdialog.h b/extra/kde343/selectdialog.h index 987dcb6..1a6560d 100644 --- a/extra/kde343/selectdialog.h +++ b/extra/kde343/selectdialog.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde343/ksycocafactory.h b/extra/kde343/tdesycocafactory.h index 1000478..4569fff 100644 --- a/extra/kde343/ksycocafactory.h +++ b/extra/kde343/tdesycocafactory.h @@ -16,11 +16,11 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ -#include "ksycocatype.h" -#include "ksycocaentry.h" +#include "tdesycocatype.h" +#include "tdesycocaentry.h" #include <tqdict.h> #include <tqptrlist.h> diff --git a/extra/kde350/configwidget.h b/extra/kde350/configwidget.h index 3a2fe3f..30ebf2a 100644 --- a/extra/kde350/configwidget.h +++ b/extra/kde350/configwidget.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde350/konsole_part.h b/extra/kde350/konsole_part.h index 44b7588..a50b5af 100644 --- a/extra/kde350/konsole_part.h +++ b/extra/kde350/konsole_part.h @@ -21,8 +21,8 @@ #ifndef KONSOLE_PART_H #define KONSOLE_PART_H -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde350/ksycocafactory.h b/extra/kde350/ksycocafactory.h deleted file mode 100644 index 1000478..0000000 --- a/extra/kde350/ksycocafactory.h +++ /dev/null @@ -1,143 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ - -#include "ksycocatype.h" -#include "ksycocaentry.h" - -#include <tqdict.h> -#include <tqptrlist.h> -class KSycoca; -class TQStringList; -class TQString; -class KSycocaDict; -class KSycocaResourceList; - -typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; - -/** - * @internal - * Base class for sycoca factories - */ -class TDECORE_EXPORT KSycocaFactory -{ -public: - virtual KSycocaFactoryId factoryId() const = 0; - -protected: // virtual class - /** - * Create a factory which can be used to lookup from/create a database - * (depending on KSycoca::isBuilding()) - */ - KSycocaFactory( KSycocaFactoryId factory_id ); - -public: - virtual ~KSycocaFactory(); - - /** - * @return the position of the factory in the sycoca file - */ - int offset() { return mOffset; } - - /** - * @return the dict, for special use by KBuildSycoca - */ - KSycocaEntryDict * entryDict() { return m_entryDict; } - - /** - * Construct an entry from a config file. - * To be implemented in the real factories. - */ - virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; - - /** - * Add an entry - */ - virtual void addEntry(KSycocaEntry *newEntry, const char *resource); - - /** - * Remove an entry - * Not very fast, use with care. O(N) - */ - void removeEntry(KSycocaEntry *newEntry); - - /** - * Read an entry from the database - */ - virtual KSycocaEntry *createEntry(int offset)=0; - - /** - * Get a list of all entries from the database. - */ - KSycocaEntry::List allEntries(); - - /** - * Saves all entries it maintains as well as index files - * for these entries to the stream 'str'. - * - * Also sets mOffset to the starting position. - * - * The stream is positioned at the end of the last index. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void save(TQDataStream &str); - - /** - * Writes out a header to the stream 'str'. - * The baseclass positions the stream correctly. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void saveHeader(TQDataStream &str); - - /** - * @return the resources for which this factory is responsible. - */ - virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } - -private: - int mOffset; - -protected: - int m_sycocaDictOffset; - int m_beginEntryOffset; - int m_endEntryOffset; - TQDataStream *m_str; - - KSycocaResourceList *m_resourceList; - KSycocaEntryDict *m_entryDict; - KSycocaDict *m_sycocaDict; -protected: - virtual void virtual_hook( int id, void* data ); -}; - -/** This, instead of a typedef, allows to declare "class ..." in header files - * @internal - */ -class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory> -{ -public: - KSycocaFactoryList() { } -}; - -#endif diff --git a/extra/kde350/selectdialog.h b/extra/kde350/selectdialog.h index 987dcb6..1a6560d 100644 --- a/extra/kde350/selectdialog.h +++ b/extra/kde350/selectdialog.h @@ -1,5 +1,5 @@ /* - This file is part of libkresources. + This file is part of libtderesources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> diff --git a/extra/kde350/tdesycocafactory.h b/extra/kde350/tdesycocafactory.h new file mode 100644 index 0000000..4569fff --- /dev/null +++ b/extra/kde350/tdesycocafactory.h @@ -0,0 +1,143 @@ +/* This file is part of the KDE libraries + * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License version 2 as published by the Free Software Foundation; + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + **/ + +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ + +#include "tdesycocatype.h" +#include "tdesycocaentry.h" + +#include <tqdict.h> +#include <tqptrlist.h> +class KSycoca; +class TQStringList; +class TQString; +class KSycocaDict; +class KSycocaResourceList; + +typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; + +/** + * @internal + * Base class for sycoca factories + */ +class TDECORE_EXPORT KSycocaFactory +{ +public: + virtual KSycocaFactoryId factoryId() const = 0; + +protected: // virtual class + /** + * Create a factory which can be used to lookup from/create a database + * (depending on KSycoca::isBuilding()) + */ + KSycocaFactory( KSycocaFactoryId factory_id ); + +public: + virtual ~KSycocaFactory(); + + /** + * @return the position of the factory in the sycoca file + */ + int offset() { return mOffset; } + + /** + * @return the dict, for special use by KBuildSycoca + */ + KSycocaEntryDict * entryDict() { return m_entryDict; } + + /** + * Construct an entry from a config file. + * To be implemented in the real factories. + */ + virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; + + /** + * Add an entry + */ + virtual void addEntry(KSycocaEntry *newEntry, const char *resource); + + /** + * Remove an entry + * Not very fast, use with care. O(N) + */ + void removeEntry(KSycocaEntry *newEntry); + + /** + * Read an entry from the database + */ + virtual KSycocaEntry *createEntry(int offset)=0; + + /** + * Get a list of all entries from the database. + */ + KSycocaEntry::List allEntries(); + + /** + * Saves all entries it maintains as well as index files + * for these entries to the stream 'str'. + * + * Also sets mOffset to the starting position. + * + * The stream is positioned at the end of the last index. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void save(TQDataStream &str); + + /** + * Writes out a header to the stream 'str'. + * The baseclass positions the stream correctly. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void saveHeader(TQDataStream &str); + + /** + * @return the resources for which this factory is responsible. + */ + virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } + +private: + int mOffset; + +protected: + int m_sycocaDictOffset; + int m_beginEntryOffset; + int m_endEntryOffset; + TQDataStream *m_str; + + KSycocaResourceList *m_resourceList; + KSycocaEntryDict *m_entryDict; + KSycocaDict *m_sycocaDict; +protected: + virtual void virtual_hook( int id, void* data ); +}; + +/** This, instead of a typedef, allows to declare "class ..." in header files + * @internal + */ +class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory> +{ +public: + KSycocaFactoryList() { } +}; + +#endif diff --git a/extra/kde351/konsole_part.h b/extra/kde351/konsole_part.h index 44b7588..a50b5af 100644 --- a/extra/kde351/konsole_part.h +++ b/extra/kde351/konsole_part.h @@ -21,8 +21,8 @@ #ifndef KONSOLE_PART_H #define KONSOLE_PART_H -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde351/ksycocafactory.h b/extra/kde351/ksycocafactory.h deleted file mode 100644 index 1000478..0000000 --- a/extra/kde351/ksycocafactory.h +++ /dev/null @@ -1,143 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ - -#include "ksycocatype.h" -#include "ksycocaentry.h" - -#include <tqdict.h> -#include <tqptrlist.h> -class KSycoca; -class TQStringList; -class TQString; -class KSycocaDict; -class KSycocaResourceList; - -typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; - -/** - * @internal - * Base class for sycoca factories - */ -class TDECORE_EXPORT KSycocaFactory -{ -public: - virtual KSycocaFactoryId factoryId() const = 0; - -protected: // virtual class - /** - * Create a factory which can be used to lookup from/create a database - * (depending on KSycoca::isBuilding()) - */ - KSycocaFactory( KSycocaFactoryId factory_id ); - -public: - virtual ~KSycocaFactory(); - - /** - * @return the position of the factory in the sycoca file - */ - int offset() { return mOffset; } - - /** - * @return the dict, for special use by KBuildSycoca - */ - KSycocaEntryDict * entryDict() { return m_entryDict; } - - /** - * Construct an entry from a config file. - * To be implemented in the real factories. - */ - virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; - - /** - * Add an entry - */ - virtual void addEntry(KSycocaEntry *newEntry, const char *resource); - - /** - * Remove an entry - * Not very fast, use with care. O(N) - */ - void removeEntry(KSycocaEntry *newEntry); - - /** - * Read an entry from the database - */ - virtual KSycocaEntry *createEntry(int offset)=0; - - /** - * Get a list of all entries from the database. - */ - KSycocaEntry::List allEntries(); - - /** - * Saves all entries it maintains as well as index files - * for these entries to the stream 'str'. - * - * Also sets mOffset to the starting position. - * - * The stream is positioned at the end of the last index. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void save(TQDataStream &str); - - /** - * Writes out a header to the stream 'str'. - * The baseclass positions the stream correctly. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void saveHeader(TQDataStream &str); - - /** - * @return the resources for which this factory is responsible. - */ - virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } - -private: - int mOffset; - -protected: - int m_sycocaDictOffset; - int m_beginEntryOffset; - int m_endEntryOffset; - TQDataStream *m_str; - - KSycocaResourceList *m_resourceList; - KSycocaEntryDict *m_entryDict; - KSycocaDict *m_sycocaDict; -protected: - virtual void virtual_hook( int id, void* data ); -}; - -/** This, instead of a typedef, allows to declare "class ..." in header files - * @internal - */ -class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory> -{ -public: - KSycocaFactoryList() { } -}; - -#endif diff --git a/extra/kde351/tdesycocafactory.h b/extra/kde351/tdesycocafactory.h new file mode 100644 index 0000000..4569fff --- /dev/null +++ b/extra/kde351/tdesycocafactory.h @@ -0,0 +1,143 @@ +/* This file is part of the KDE libraries + * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License version 2 as published by the Free Software Foundation; + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + **/ + +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ + +#include "tdesycocatype.h" +#include "tdesycocaentry.h" + +#include <tqdict.h> +#include <tqptrlist.h> +class KSycoca; +class TQStringList; +class TQString; +class KSycocaDict; +class KSycocaResourceList; + +typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; + +/** + * @internal + * Base class for sycoca factories + */ +class TDECORE_EXPORT KSycocaFactory +{ +public: + virtual KSycocaFactoryId factoryId() const = 0; + +protected: // virtual class + /** + * Create a factory which can be used to lookup from/create a database + * (depending on KSycoca::isBuilding()) + */ + KSycocaFactory( KSycocaFactoryId factory_id ); + +public: + virtual ~KSycocaFactory(); + + /** + * @return the position of the factory in the sycoca file + */ + int offset() { return mOffset; } + + /** + * @return the dict, for special use by KBuildSycoca + */ + KSycocaEntryDict * entryDict() { return m_entryDict; } + + /** + * Construct an entry from a config file. + * To be implemented in the real factories. + */ + virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; + + /** + * Add an entry + */ + virtual void addEntry(KSycocaEntry *newEntry, const char *resource); + + /** + * Remove an entry + * Not very fast, use with care. O(N) + */ + void removeEntry(KSycocaEntry *newEntry); + + /** + * Read an entry from the database + */ + virtual KSycocaEntry *createEntry(int offset)=0; + + /** + * Get a list of all entries from the database. + */ + KSycocaEntry::List allEntries(); + + /** + * Saves all entries it maintains as well as index files + * for these entries to the stream 'str'. + * + * Also sets mOffset to the starting position. + * + * The stream is positioned at the end of the last index. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void save(TQDataStream &str); + + /** + * Writes out a header to the stream 'str'. + * The baseclass positions the stream correctly. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void saveHeader(TQDataStream &str); + + /** + * @return the resources for which this factory is responsible. + */ + virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } + +private: + int mOffset; + +protected: + int m_sycocaDictOffset; + int m_beginEntryOffset; + int m_endEntryOffset; + TQDataStream *m_str; + + KSycocaResourceList *m_resourceList; + KSycocaEntryDict *m_entryDict; + KSycocaDict *m_sycocaDict; +protected: + virtual void virtual_hook( int id, void* data ); +}; + +/** This, instead of a typedef, allows to declare "class ..." in header files + * @internal + */ +class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory> +{ +public: + KSycocaFactoryList() { } +}; + +#endif diff --git a/extra/kde352/konsole_part.h b/extra/kde352/konsole_part.h index 44b7588..a50b5af 100644 --- a/extra/kde352/konsole_part.h +++ b/extra/kde352/konsole_part.h @@ -21,8 +21,8 @@ #ifndef KONSOLE_PART_H #define KONSOLE_PART_H -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde352/ksycocafactory.h b/extra/kde352/ksycocafactory.h deleted file mode 100644 index 1000478..0000000 --- a/extra/kde352/ksycocafactory.h +++ /dev/null @@ -1,143 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ - -#include "ksycocatype.h" -#include "ksycocaentry.h" - -#include <tqdict.h> -#include <tqptrlist.h> -class KSycoca; -class TQStringList; -class TQString; -class KSycocaDict; -class KSycocaResourceList; - -typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; - -/** - * @internal - * Base class for sycoca factories - */ -class TDECORE_EXPORT KSycocaFactory -{ -public: - virtual KSycocaFactoryId factoryId() const = 0; - -protected: // virtual class - /** - * Create a factory which can be used to lookup from/create a database - * (depending on KSycoca::isBuilding()) - */ - KSycocaFactory( KSycocaFactoryId factory_id ); - -public: - virtual ~KSycocaFactory(); - - /** - * @return the position of the factory in the sycoca file - */ - int offset() { return mOffset; } - - /** - * @return the dict, for special use by KBuildSycoca - */ - KSycocaEntryDict * entryDict() { return m_entryDict; } - - /** - * Construct an entry from a config file. - * To be implemented in the real factories. - */ - virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; - - /** - * Add an entry - */ - virtual void addEntry(KSycocaEntry *newEntry, const char *resource); - - /** - * Remove an entry - * Not very fast, use with care. O(N) - */ - void removeEntry(KSycocaEntry *newEntry); - - /** - * Read an entry from the database - */ - virtual KSycocaEntry *createEntry(int offset)=0; - - /** - * Get a list of all entries from the database. - */ - KSycocaEntry::List allEntries(); - - /** - * Saves all entries it maintains as well as index files - * for these entries to the stream 'str'. - * - * Also sets mOffset to the starting position. - * - * The stream is positioned at the end of the last index. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void save(TQDataStream &str); - - /** - * Writes out a header to the stream 'str'. - * The baseclass positions the stream correctly. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void saveHeader(TQDataStream &str); - - /** - * @return the resources for which this factory is responsible. - */ - virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } - -private: - int mOffset; - -protected: - int m_sycocaDictOffset; - int m_beginEntryOffset; - int m_endEntryOffset; - TQDataStream *m_str; - - KSycocaResourceList *m_resourceList; - KSycocaEntryDict *m_entryDict; - KSycocaDict *m_sycocaDict; -protected: - virtual void virtual_hook( int id, void* data ); -}; - -/** This, instead of a typedef, allows to declare "class ..." in header files - * @internal - */ -class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory> -{ -public: - KSycocaFactoryList() { } -}; - -#endif diff --git a/extra/kde352/tdesycocafactory.h b/extra/kde352/tdesycocafactory.h new file mode 100644 index 0000000..4569fff --- /dev/null +++ b/extra/kde352/tdesycocafactory.h @@ -0,0 +1,143 @@ +/* This file is part of the KDE libraries + * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License version 2 as published by the Free Software Foundation; + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + **/ + +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ + +#include "tdesycocatype.h" +#include "tdesycocaentry.h" + +#include <tqdict.h> +#include <tqptrlist.h> +class KSycoca; +class TQStringList; +class TQString; +class KSycocaDict; +class KSycocaResourceList; + +typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; + +/** + * @internal + * Base class for sycoca factories + */ +class TDECORE_EXPORT KSycocaFactory +{ +public: + virtual KSycocaFactoryId factoryId() const = 0; + +protected: // virtual class + /** + * Create a factory which can be used to lookup from/create a database + * (depending on KSycoca::isBuilding()) + */ + KSycocaFactory( KSycocaFactoryId factory_id ); + +public: + virtual ~KSycocaFactory(); + + /** + * @return the position of the factory in the sycoca file + */ + int offset() { return mOffset; } + + /** + * @return the dict, for special use by KBuildSycoca + */ + KSycocaEntryDict * entryDict() { return m_entryDict; } + + /** + * Construct an entry from a config file. + * To be implemented in the real factories. + */ + virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; + + /** + * Add an entry + */ + virtual void addEntry(KSycocaEntry *newEntry, const char *resource); + + /** + * Remove an entry + * Not very fast, use with care. O(N) + */ + void removeEntry(KSycocaEntry *newEntry); + + /** + * Read an entry from the database + */ + virtual KSycocaEntry *createEntry(int offset)=0; + + /** + * Get a list of all entries from the database. + */ + KSycocaEntry::List allEntries(); + + /** + * Saves all entries it maintains as well as index files + * for these entries to the stream 'str'. + * + * Also sets mOffset to the starting position. + * + * The stream is positioned at the end of the last index. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void save(TQDataStream &str); + + /** + * Writes out a header to the stream 'str'. + * The baseclass positions the stream correctly. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void saveHeader(TQDataStream &str); + + /** + * @return the resources for which this factory is responsible. + */ + virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } + +private: + int mOffset; + +protected: + int m_sycocaDictOffset; + int m_beginEntryOffset; + int m_endEntryOffset; + TQDataStream *m_str; + + KSycocaResourceList *m_resourceList; + KSycocaEntryDict *m_entryDict; + KSycocaDict *m_sycocaDict; +protected: + virtual void virtual_hook( int id, void* data ); +}; + +/** This, instead of a typedef, allows to declare "class ..." in header files + * @internal + */ +class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory> +{ +public: + KSycocaFactoryList() { } +}; + +#endif diff --git a/extra/kde353/konsole_part.h b/extra/kde353/konsole_part.h index 44b7588..a50b5af 100644 --- a/extra/kde353/konsole_part.h +++ b/extra/kde353/konsole_part.h @@ -21,8 +21,8 @@ #ifndef KONSOLE_PART_H #define KONSOLE_PART_H -#include <kparts/browserextension.h> -#include <kparts/factory.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/factory.h> #include <kdialogbase.h> diff --git a/extra/kde353/ksycocafactory.h b/extra/kde353/ksycocafactory.h deleted file mode 100644 index 1000478..0000000 --- a/extra/kde353/ksycocafactory.h +++ /dev/null @@ -1,143 +0,0 @@ -/* This file is part of the KDE libraries - * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License version 2 as published by the Free Software Foundation; - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - **/ - -#ifndef __ksycocafactory_h__ -#define __ksycocafactory_h__ - -#include "ksycocatype.h" -#include "ksycocaentry.h" - -#include <tqdict.h> -#include <tqptrlist.h> -class KSycoca; -class TQStringList; -class TQString; -class KSycocaDict; -class KSycocaResourceList; - -typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; - -/** - * @internal - * Base class for sycoca factories - */ -class TDECORE_EXPORT KSycocaFactory -{ -public: - virtual KSycocaFactoryId factoryId() const = 0; - -protected: // virtual class - /** - * Create a factory which can be used to lookup from/create a database - * (depending on KSycoca::isBuilding()) - */ - KSycocaFactory( KSycocaFactoryId factory_id ); - -public: - virtual ~KSycocaFactory(); - - /** - * @return the position of the factory in the sycoca file - */ - int offset() { return mOffset; } - - /** - * @return the dict, for special use by KBuildSycoca - */ - KSycocaEntryDict * entryDict() { return m_entryDict; } - - /** - * Construct an entry from a config file. - * To be implemented in the real factories. - */ - virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; - - /** - * Add an entry - */ - virtual void addEntry(KSycocaEntry *newEntry, const char *resource); - - /** - * Remove an entry - * Not very fast, use with care. O(N) - */ - void removeEntry(KSycocaEntry *newEntry); - - /** - * Read an entry from the database - */ - virtual KSycocaEntry *createEntry(int offset)=0; - - /** - * Get a list of all entries from the database. - */ - KSycocaEntry::List allEntries(); - - /** - * Saves all entries it maintains as well as index files - * for these entries to the stream 'str'. - * - * Also sets mOffset to the starting position. - * - * The stream is positioned at the end of the last index. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void save(TQDataStream &str); - - /** - * Writes out a header to the stream 'str'. - * The baseclass positions the stream correctly. - * - * Don't forget to call the parent first when you override - * this function. - */ - virtual void saveHeader(TQDataStream &str); - - /** - * @return the resources for which this factory is responsible. - */ - virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } - -private: - int mOffset; - -protected: - int m_sycocaDictOffset; - int m_beginEntryOffset; - int m_endEntryOffset; - TQDataStream *m_str; - - KSycocaResourceList *m_resourceList; - KSycocaEntryDict *m_entryDict; - KSycocaDict *m_sycocaDict; -protected: - virtual void virtual_hook( int id, void* data ); -}; - -/** This, instead of a typedef, allows to declare "class ..." in header files - * @internal - */ -class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory> -{ -public: - KSycocaFactoryList() { } -}; - -#endif diff --git a/extra/kde353/tdesycocafactory.h b/extra/kde353/tdesycocafactory.h new file mode 100644 index 0000000..4569fff --- /dev/null +++ b/extra/kde353/tdesycocafactory.h @@ -0,0 +1,143 @@ +/* This file is part of the KDE libraries + * Copyright (C) 1999 Waldo Bastian <bastian@kde.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License version 2 as published by the Free Software Foundation; + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + **/ + +#ifndef __tdesycocafactory_h__ +#define __tdesycocafactory_h__ + +#include "tdesycocatype.h" +#include "tdesycocaentry.h" + +#include <tqdict.h> +#include <tqptrlist.h> +class KSycoca; +class TQStringList; +class TQString; +class KSycocaDict; +class KSycocaResourceList; + +typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict; + +/** + * @internal + * Base class for sycoca factories + */ +class TDECORE_EXPORT KSycocaFactory +{ +public: + virtual KSycocaFactoryId factoryId() const = 0; + +protected: // virtual class + /** + * Create a factory which can be used to lookup from/create a database + * (depending on KSycoca::isBuilding()) + */ + KSycocaFactory( KSycocaFactoryId factory_id ); + +public: + virtual ~KSycocaFactory(); + + /** + * @return the position of the factory in the sycoca file + */ + int offset() { return mOffset; } + + /** + * @return the dict, for special use by KBuildSycoca + */ + KSycocaEntryDict * entryDict() { return m_entryDict; } + + /** + * Construct an entry from a config file. + * To be implemented in the real factories. + */ + virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0; + + /** + * Add an entry + */ + virtual void addEntry(KSycocaEntry *newEntry, const char *resource); + + /** + * Remove an entry + * Not very fast, use with care. O(N) + */ + void removeEntry(KSycocaEntry *newEntry); + + /** + * Read an entry from the database + */ + virtual KSycocaEntry *createEntry(int offset)=0; + + /** + * Get a list of all entries from the database. + */ + KSycocaEntry::List allEntries(); + + /** + * Saves all entries it maintains as well as index files + * for these entries to the stream 'str'. + * + * Also sets mOffset to the starting position. + * + * The stream is positioned at the end of the last index. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void save(TQDataStream &str); + + /** + * Writes out a header to the stream 'str'. + * The baseclass positions the stream correctly. + * + * Don't forget to call the parent first when you override + * this function. + */ + virtual void saveHeader(TQDataStream &str); + + /** + * @return the resources for which this factory is responsible. + */ + virtual const KSycocaResourceList * resourceList() const { return m_resourceList; } + +private: + int mOffset; + +protected: + int m_sycocaDictOffset; + int m_beginEntryOffset; + int m_endEntryOffset; + TQDataStream *m_str; + + KSycocaResourceList *m_resourceList; + KSycocaEntryDict *m_entryDict; + KSycocaDict *m_sycocaDict; +protected: + virtual void virtual_hook( int id, void* data ); +}; + +/** This, instead of a typedef, allows to declare "class ..." in header files + * @internal + */ +class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory> +{ +public: + KSycocaFactoryList() { } +}; + +#endif |