// // Copyright 2008 Jim Bublitz // Earlier copyrights 1998 - 2007 Jim Bublitz also apply // Generated by twine // This file is part of PyKDE4. // PyKDE4 is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // PyKDE4 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 General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see . %ModuleHeaderCode //ctscc #include #include #include #include #include %End class KConfig : KConfigBase { %TypeHeaderCode #include %End public: enum OpenFlag { IncludeGlobals, CascadeConfig, SimpleConfig, NoCascade, NoGlobals, FullConfig }; typedef QFlags OpenFlags; explicit KConfig (const QString& file = QString(), KConfig::OpenFlags mode = KConfig::FullConfig, const char* resourceType = "config"); explicit KConfig (const KComponentData& componentData, const QString& file = QString(), KConfig::OpenFlags mode = KConfig::FullConfig, const char* resourceType = "config"); KConfig (const QString& file, const QString& backend, const char* resourceType = "config"); const KComponentData& componentData () const; QString name () const; void sync (); void markAsClean (); KConfigBase::AccessMode accessMode () const; bool isConfigWritable (bool warnUser); KConfig* copyTo (const QString& file, KConfig* config = 0) const; void checkUpdate (const QString& id, const QString& updateFile); void reparseConfiguration (); void addConfigSources (const QStringList& sources); QString locale () const; bool setLocale (const QString& aLocale); void setReadDefaults (bool b); bool readDefaults () const; bool isImmutable () const; QStringList groupList () const; QMap entryMap (const QString& aGroup = QString()) const; protected: virtual bool hasGroupImpl (const QByteArray& group) const; virtual KConfigGroup groupImpl (const QByteArray& b); //ig virtual const KConfigGroup groupImpl (const QByteArray& b) const; virtual void deleteGroupImpl (const QByteArray& group, KConfigBase::WriteConfigFlags flags = KConfigBase::Normal); virtual bool isGroupImmutableImpl (const QByteArray& aGroup) const; //ig KConfig (KConfigPrivate& d); private: //force KConfig (const KConfig&); // Subclasses of KConfigBase //end %ConvertToSubClassCode // CTSCC for subclasses of 'KConfigBase' sipType = NULL; if (dynamic_cast(sipCpp)) { sipType = sipType_KConfig; if (dynamic_cast(sipCpp)) sipType = sipType_KDesktopFile; else if (dynamic_cast(sipCpp)) sipType = sipType_KSharedConfig; } else if (dynamic_cast(sipCpp)) sipType = sipType_KConfigGroup; %End public: ~KConfig (); }; // KConfig