//
//     Copyright 2008 Jim Bublitz <jbublitz@nwinternet.com>
//     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 <http://www.gnu.org/licenses/>.



%ModuleHeaderCode
//ctscc
#include <kconfig.h>
#include <kconfigbase.h>
#include <kconfiggroup.h>
#include <kdesktopfile.h>
#include <ksharedconfig.h>
%End

class KConfig : KConfigBase
{
%TypeHeaderCode
#include <kconfig.h>
%End



public:
    enum OpenFlag
    {
        IncludeGlobals,
        CascadeConfig,
        SimpleConfig,
        NoCascade,
        NoGlobals,
        FullConfig
    };

    typedef QFlags<KConfig::OpenFlag> 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;
    void                    setForceGlobal (bool force);
    bool                    forceGlobal () const;
    QStringList             groupList () const;
    QMap<QString,QString>   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    virtual void            virtual_hook (int id, void* data);
//ig                            KConfig (KConfigPrivate& d);

private:
//force
                            KConfig (const KConfig&);


//  Subclasses of KConfigBase

//end
%ConvertToSubClassCode
    // CTSCC for subclasses of 'KConfigBase'
    sipType = NULL;

    if (dynamic_cast<KConfig*>(sipCpp))
        {
        sipType = sipType_KConfig;
        if (dynamic_cast<KDesktopFile*>(sipCpp))
            sipType = sipType_KDesktopFile;
        else if (dynamic_cast<KSharedConfig*>(sipCpp))
            sipType = sipType_KSharedConfig;
        }
    else if (dynamic_cast<KConfigGroup*>(sipCpp))
        sipType = sipType_KConfigGroup;
%End

public:
    ~KConfig ();
};
// KConfig




