You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pytde/sip/tdecore/kconfigskeleton.sip

1147 lines
37 KiB

//
// Copyright 2006 Jim Bublitz <jbublitz@nwinternet.com>
// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson
// may also apply
// Generated by preSip
// module tdecore version KDE 3.5.3
// This software is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// This software 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 library; see the file COPYING.
// If not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%If ( KDE_3_2_0 - )
class KConfigSkeletonItem
{
%TypeHeaderCode
#include <typeinfo>
#include <kconfigskeleton.h>
%End
public:
typedef TQValueList<KConfigSkeletonItem*> List;
//ig typedef TQDict<KConfigSkeletonItem> Dict;
//ig typedef TQDictIterator<KConfigSkeletonItem> DictIterator;
KConfigSkeletonItem (const TQString&, const TQString&);
void setGroup (const TQString&);
TQString group () const;
void setKey (const TQString&);
TQString key () const;
void setName (const TQString&);
TQString name () const;
void setLabel (const TQString&);
TQString label () const;
void setWhatsThis (const TQString&);
TQString whatsThis () const;
virtual void readConfig (KConfig*) = 0;
virtual void writeConfig (KConfig*) = 0;
virtual void readDefault (KConfig*) = 0;
virtual void setProperty (const TQVariant&) = 0;
virtual TQVariant property () const = 0;
virtual TQVariant minValue () const;
virtual TQVariant maxValue () const;
virtual void setDefault () = 0;
virtual void swapDefault () = 0;
bool isImmutable () const;
protected:
void readImmutability (KConfig*);
//force
%ConvertToSubClassCode
if (dynamic_cast<KConfigSkeleton::ItemBool*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemBool;
else if (dynamic_cast<KConfigSkeleton::ItemColor*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemColor;
else if (dynamic_cast<KConfigSkeleton::ItemDateTime*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemDateTime;
else if (dynamic_cast<KConfigSkeleton::ItemDouble*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemDouble;
else if (dynamic_cast<KConfigSkeleton::ItemEnum*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemEnum;
else if (dynamic_cast<KConfigSkeleton::ItemFont*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemFont;
else if (dynamic_cast<KConfigSkeleton::ItemInt*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemInt;
else if (dynamic_cast<KConfigSkeleton::ItemInt64*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemInt64;
else if (dynamic_cast<KConfigSkeleton::ItemIntList*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemIntList;
else if (dynamic_cast<KConfigSkeleton::ItemLong*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemLong;
else if (dynamic_cast<KConfigSkeleton::ItemPassword*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemPassword;
else if (dynamic_cast<KConfigSkeleton::ItemPath*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemPath;
else if (dynamic_cast<KConfigSkeleton::ItemPoint*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemPoint;
else if (dynamic_cast<KConfigSkeleton::ItemProperty*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemProperty;
else if (dynamic_cast<KConfigSkeleton::ItemRect*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemRect;
else if (dynamic_cast<KConfigSkeleton::ItemSize*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemSize;
else if (dynamic_cast<KConfigSkeleton::ItemString*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemString;
else if (dynamic_cast<KConfigSkeleton::ItemStringList*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemStringList;
else if (dynamic_cast<KConfigSkeleton::ItemUInt*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemUInt;
else if (dynamic_cast<KConfigSkeleton::ItemUInt64*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemUInt64;
else if (dynamic_cast<KConfigSkeleton::ItemULong*>(sipCpp))
sipClass = sipClass_KConfigSkeleton_ItemULong;
else
sipClass = NULL;
%End
//end
}; // class KConfigSkeletonItem
%End
%If ( KDE_3_2_0 - )
class KConfigSkeleton
{
%TypeHeaderCode
#include <kconfigskeleton.h>
typedef TQValueList<int> IntList;
%End
public:
class ItemPassword : KConfigSkeleton::ItemString
{
public:
ItemPassword (const TQString&, const TQString&, TQString&, const TQString& = TQString ::fromLatin1 ("" ));
}; // class ItemPassword
public:
class ItemPath : KConfigSkeleton::ItemString
{
public:
ItemPath (const TQString&, const TQString&, TQString&, const TQString& = TQString ::null );
}; // class ItemPath
public:
class ItemEnum : KConfigSkeleton::ItemInt
{
public:
class Choice
{
public:
TQString name;
TQString label;
TQString whatsThis;
}; // class Choice
public:
ItemEnum (const TQString&, const TQString&, int, const TQValueList<KConfigSkeleton::ItemEnum::Choice>&, int = 0) [(const TQString&, const TQString&, int&, const TQValueList<KConfigSkeleton::ItemEnum::Choice>&, int = 0)];
%MethodCode
//takes group | (TQString) | key | (TQString) | reference | (int) | choices | (TQValueList<KConfigSkeleton::ItemEnum::Choice>) |defaultValue | (int = 1)
class PyItemEnum : public KConfigSkeleton::ItemEnum
{
public:
PyItemEnum (const TQString& group, const TQString& key, int& val, const TQValueList<KConfigSkeleton::ItemEnum::Choice>& choices, int defaultValue = 0) :
KConfigSkeleton::ItemEnum(group, key, this->value, choices, defaultValue)
{
value = val;
};
private:
int value;
};
Py_BEGIN_ALLOW_THREADS
sipCpp = (sipKConfigSkeleton_ItemEnum *) new PyItemEnum (*a0, *a1, a2, *a3, a4);
Py_END_ALLOW_THREADS
%End
TQValueList<KConfigSkeleton::ItemEnum::Choice> choices () const;
void readConfig (KConfig*);
void writeConfig (KConfig*);
public:
//force
void setValue (const int&);
int value ();
virtual void setDefaultValue (const int&);
virtual void setDefault ();
void swapDefault ();
//end
}; // class ItemEnum
public:
%If ( KDE_3_4_0 - )
class ItemPathList : KConfigSkeleton::ItemStringList
{
public:
ItemPathList (const TQString&, const TQString&, TQStringList&, const TQStringList& = TQStringList ());
void readConfig (KConfig*);
void writeConfig (KConfig*);
}; // class ItemPathList
public:
%End
public:
KConfigSkeleton (const TQString& = TQString ::null );
KConfigSkeleton (KSharedConfig::Ptr);
void setDefaults ();
void readConfig ();
void writeConfig ();
void setCurrentGroup (const TQString&);
TQString currentGroup ();
void addItem (KConfigSkeletonItem*, const TQString& = TQString ::null );
ItemString* addItemString (const TQString&, TQString&, const TQString& = TQString ::fromLatin1 ("" ), const TQString& = TQString ::null );
KConfigSkeleton::ItemPassword* addItemPassword (const TQString&, TQString&, const TQString& = TQString ::fromLatin1 ("" ), const TQString& = TQString ::null );
KConfigSkeleton::ItemPath* addItemPath (const TQString&, TQString&, const TQString& = TQString ::fromLatin1 ("" ), const TQString& = TQString ::null );
ItemProperty* addItemProperty (const TQString&, TQVariant&, const TQVariant& = TQVariant (), const TQString& = TQString ::null );
ItemBool* addItemBool (const TQString&, bool&, bool = 0, const TQString& = TQString ::null );
%MethodCode
//takes name | (TQString) | value | (bool) | defaultValue | (bool) | key | (TQString = TQString::null)
class PyItemBool : public KConfigSkeleton::ItemBool
{
public:
PyItemBool (const TQString &group, const TQString &key, bool val, bool defaultValue = 0) :
KConfigSkeleton::ItemBool (group, key, this->value, defaultValue)
{
value = val;
}
private:
bool value;
};
Py_BEGIN_ALLOW_THREADS
sipRes = new PyItemBool (sipCpp->currentGroup(), a3->isNull() ? *a0 : *a3, a1, a2);
sipCpp->addItem(sipRes, *a0);
Py_END_ALLOW_THREADS
%End
ItemInt* addItemInt (const TQString&, int&, int = 0, const TQString& = TQString ::null );
%MethodCode
//takes name | (TQString) | value | (int) | defaultValue | (int) | key | (TQString = TQString::null)
class PyItemInt : public KConfigSkeleton::ItemInt
{
public:
PyItemInt(const TQString &group, const TQString &key, int val, int defaultValue=0) :
KConfigSkeleton::ItemInt (group, key, this->value, defaultValue)
{
value = val;
}
private:
int value;
};
Py_BEGIN_ALLOW_THREADS
sipRes = new PyItemInt(sipCpp->currentGroup(), a3->isNull() ? *a0 : *a3, a1, a2);
sipCpp->addItem(sipRes, *a0);
Py_END_ALLOW_THREADS
%End
ItemUInt* addItemUInt (const TQString&, uint&, uint = 0, const TQString& = TQString ::null );
%MethodCode
//takes name | (TQString) | value | (uint) | defaultValue | (uint) | key | (TQString = TQString::null)
class PyItemUInt : public KConfigSkeleton::ItemUInt
{
public:
PyItemUInt(const TQString &group, const TQString &key, uint val, uint defaultValue = 0) :
KConfigSkeleton::ItemUInt (group, key, this->value, defaultValue)
{
value = val;
}
private:
uint value;
};
Py_BEGIN_ALLOW_THREADS
sipRes = new PyItemUInt(sipCpp->currentGroup(), a3->isNull() ? *a0 : *a3, a1, a2);
sipCpp->addItem(sipRes, *a0);
Py_END_ALLOW_THREADS
%End
ItemLong* addItemLong (const TQString&, long&, long = 0, const TQString& = TQString ::null );
%MethodCode
//takes name | (TQString) | value | (long) | defaultValue | (long) | key | (TQString = TQString::null)
class PyItemLong : public KConfigSkeleton::ItemLong
{
public:
PyItemLong(const TQString &group, const TQString &key, long val, long defaultValue=0) :
KConfigSkeleton::ItemLong (group, key, this->value, defaultValue)
{
value = val;
}
private:
long value;
};
Py_BEGIN_ALLOW_THREADS
sipRes = new PyItemLong(sipCpp->currentGroup(), a3->isNull() ? *a0 : *a3, a1, a2);
sipCpp->addItem(sipRes, *a0);
Py_END_ALLOW_THREADS
%End
ItemULong* addItemULong (const TQString&, ulong&, ulong = 0, const TQString& = TQString ::null );
%MethodCode
//takes name | (TQString) | value | (ulong) | defaultValue | (ulong) | key | (TQString = TQString::null)
class PyItemULong : public KConfigSkeleton::ItemULong
{
public:
PyItemULong(const TQString &group, const TQString &key, ulong val, ulong defaultValue = 0) :
KConfigSkeleton::ItemULong (group, key, this->value, defaultValue)
{
value = val;
}
private:
ulong value;
};
Py_BEGIN_ALLOW_THREADS
sipRes = new PyItemULong(sipCpp->currentGroup(), a3->isNull() ? *a0 : *a3, a1, a2);
sipCpp->addItem(sipRes, *a0);
Py_END_ALLOW_THREADS
%End
KConfigSkeleton::ItemInt64* addItemInt64 (const TQString&, longlong&, longlong = 0, const TQString& = TQString ::null );
KConfigSkeleton::ItemUInt64* addItemUInt64 (const TQString&, ulonglong&, ulonglong = 0, const TQString& = TQString ::null );
ItemDouble* addItemDouble (const TQString&, double&, double = 0.0, const TQString& = TQString ::null );
%MethodCode
//takes name | (TQString) | value | (double) | defaultValue | (double) | key | (TQString = TQString::null)
class PyItemDouble : public KConfigSkeleton::ItemDouble
{
public:
PyItemDouble(const TQString &group, const TQString &key, double val, double defaultValue=0.0) :
KConfigSkeleton::ItemDouble(group, key, this->value, defaultValue)
{
value = val;
};
private:
double value;
};
Py_BEGIN_ALLOW_THREADS
sipRes = new PyItemDouble(sipCpp->currentGroup(), a3->isNull() ? *a0 : *a3, a1, a2);
sipCpp->addItem(sipRes, *a0);
Py_END_ALLOW_THREADS
%End
ItemColor* addItemColor (const TQString&, TQColor&, const TQColor& = TQColor (128 ,128 ,128 ), const TQString& = TQString ::null );
ItemFont* addItemFont (const TQString&, TQFont&, const TQFont& = KGlobalSettings ::generalFont (), const TQString& = TQString ::null );
ItemRect* addItemRect (const TQString&, TQRect&, const TQRect& = TQRect (), const TQString& = TQString ::null );
ItemPoint* addItemPoint (const TQString&, TQPoint&, const TQPoint& = TQPoint (), const TQString& = TQString ::null );
ItemSize* addItemSize (const TQString&, TQSize&, const TQSize& = TQSize (), const TQString& = TQString ::null );
ItemDateTime* addItemDateTime (const TQString&, TQDateTime&, const TQDateTime& = TQDateTime (), const TQString& = TQString ::null );
KConfigSkeleton::ItemStringList* addItemStringList (const TQString&, TQStringList&, const TQStringList& = TQStringList (), const TQString& = TQString ::null );
KConfigSkeleton::ItemIntList* addItemIntList (const TQString&, TQValueList<int>&, const TQValueList<int>& = IntList (), const TQString& = TQString ::null );
%MethodCode
//returns a Python list of int
//takes name | (TQString) | reference | (a Python list of int) | defaultValue | (a Python list of int = []) | key | (TQString = TQString::null)
if (a2 == NULL) *(TQValueList<int> *)a2 = TQValueList<int>();
Py_BEGIN_ALLOW_THREADS
sipRes = sipCpp->addItemIntList (*a0, *a1, *a2, *a3);
Py_END_ALLOW_THREADS
%End
KConfig* config () const;
SIP_PYLIST items () const [KConfigSkeletonItem::List ()];
%MethodCode
//returns (a Python list of Items)
KConfigSkeletonItem::List list;
Py_BEGIN_ALLOW_THREADS
list = sipCpp->items ();
Py_END_ALLOW_THREADS
int n = list.count ();
if (n > 0)
for (int i = 0; i < n; i++)
PyList_Append (sipRes, sipConvertFromInstance (&(list [i]), sipClass_KConfigSkeletonItem, NULL));
%End
bool isImmutable (const TQString&);
KConfigSkeletonItem* findItem (const TQString&);
bool useDefaults (bool);
protected:
virtual void usrUseDefaults (bool);
virtual void usrSetDefaults ();
virtual void usrReadConfig ();
virtual void usrWriteConfig ();
public:
//force
class ItemString : KConfigSkeletonItem
{
public:
enum Type
{
Normal,
Password,
Path
};
ItemString (const TQString&, const TQString&, TQString&, const TQString& = TQString ::fromLatin1 ("" ), KConfigSkeleton::ItemString::Type = KConfigSkeleton ::ItemString ::Normal );
void setValue (const TQString&);
TQString& value ();
virtual void setDefaultValue (const TQString&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
}; // class ItemString
public:
//end
public:
//force
class ItemProperty : KConfigSkeletonItem
{
public:
ItemProperty (const TQString&, const TQString&, TQVariant, TQVariant = 0) [(const TQString&, const TQString&, TQVariant&, TQVariant = 0)];
%MethodCode
//takes group | (TQString) | key | (TQString) | reference | (TQVariant) | defaultValue | (TQVariant = 0)
Py_BEGIN_ALLOW_THREADS
sipCpp = (sipKConfigSkeleton_ItemProperty *) new KConfigSkeleton::ItemProperty (*a0, *a1, *a2, *a3);
Py_END_ALLOW_THREADS
%End
void setValue (const TQVariant&);
TQVariant& value ();
virtual void setDefaultValue (const TQVariant&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
}; // class ItemProperty
public:
//end
public:
//force
class ItemBool : KConfigSkeletonItem
{
public:
ItemBool (const TQString&, const TQString&, bool, bool = 1) [(const TQString&, const TQString&, bool&, bool = 1)];
%MethodCode
//takes group | (TQString) | key | (TQString) | reference | (bool) | defaultValue | (bool = 1)
class PyItemBool : public KConfigSkeleton::ItemBool
{
public:
PyItemBool(const TQString &group, const TQString &key, bool val, bool defaultValue = false) :
KConfigSkeleton::ItemBool(group, key, this->value, defaultValue)
{
value = val;
};
private:
bool value;
};
Py_BEGIN_ALLOW_THREADS
sipCpp = (sipKConfigSkeleton_ItemBool *) new PyItemBool (*a0, *a1, a2);
Py_END_ALLOW_THREADS
%End
void setValue (const bool&);
bool value ();
virtual void setDefaultValue (const bool&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
}; // class ItemBool
public:
//end
public:
//force
class ItemInt : KConfigSkeletonItem
{
public:
ItemInt (const TQString&, const TQString&, int, int = 1) [(const TQString&, const TQString&, int&, int = 1)];
%MethodCode
//takes group | (TQString) | key | (TQString) | reference | (int) | defaultValue | (int = 1)
class PyItemInt : public KConfigSkeleton::ItemInt
{
public:
PyItemInt(const TQString &group, const TQString &key, int val, int defaultValue = 0) :
KConfigSkeleton::ItemInt(group, key, this->value, defaultValue)
{
value = val;
};
private:
int value;
};
Py_BEGIN_ALLOW_THREADS
sipCpp = (sipKConfigSkeleton_ItemInt *) new PyItemInt (*a0, *a1, a2);
Py_END_ALLOW_THREADS
%End
void setValue (const int&);
int value ();
virtual void setDefaultValue (const int&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
TQVariant minValue () const;
TQVariant maxValue () const;
void setMinValue (int);
void setMaxValue (int);
}; // class ItemInt
public:
//end
public:
//force
class ItemInt64 : KConfigSkeletonItem
{
public:
ItemInt64 (const TQString&, const TQString&, longlong&, longlong = 0);
%MethodCode
//takes group | (TQString) | key | (TQString) | reference | (longlong) | defaultValue | (longlong = 0)
class PyItemInt64 : public KConfigSkeleton::ItemInt64
{
public:
PyItemInt64(const TQString &group, const TQString &key, TQ_INT64 val, TQ_INT64 defaultValue=0) :
KConfigSkeleton::ItemInt64(group, key, this->value, defaultValue)
{
value = val;
};
private:
TQ_INT64 value;
};
Py_BEGIN_ALLOW_THREADS
sipCpp = (sipKConfigSkeleton_ItemInt64 *) new PyItemInt64 (*a0, *a1, *a2, *a3);
Py_END_ALLOW_THREADS
%End
void setValue (const longlong&);
longlong& value ();
virtual void setDefaultValue (const longlong&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
TQVariant minValue () const;
TQVariant maxValue () const;
void setMinValue (longlong);
void setMaxValue (longlong);
}; // class ItemInt64
public:
//end
public:
//force
class ItemUInt : KConfigSkeletonItem
{
public:
ItemUInt (const TQString&, const TQString&, uint, uint = 0) [(const TQString&, const TQString&, uint&, uint = 0)];
%MethodCode
//takes group | (TQString) | key | (TQString) | reference | (uint) | defaultValue | (uint = 1)
class PyItemUInt : public KConfigSkeleton::ItemUInt
{
public:
PyItemUInt(const TQString &group, const TQString &key, uint val, uint defaultValue = 0) :
KConfigSkeleton::ItemUInt(group, key, this->value, defaultValue)
{
value = val;
};
private:
uint value;
};
Py_BEGIN_ALLOW_THREADS
sipCpp = (sipKConfigSkeleton_ItemUInt *) new PyItemUInt (*a0, *a1, a2);
Py_END_ALLOW_THREADS
%End
void setValue (const uint&);
uint value ();
virtual void setDefaultValue (const uint&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
TQVariant minValue () const;
TQVariant maxValue () const;
void setMinValue (uint);
void setMaxValue (uint);
}; // class ItemUInt
public:
public:
class ItemLong : KConfigSkeletonItem
{
public:
ItemLong (const TQString&, const TQString&, long&, long = 0) [(const TQString&, const TQString&, long&, long = 0)];
%MethodCode
//takes group | (TQString) | key | (TQString) | reference | (long) | defaultValue | (long = 1)
class PyItemLong : public KConfigSkeleton::ItemLong
{
public:
PyItemLong(const TQString &group, const TQString &key, long val, long defaultValue = 0) :
KConfigSkeleton::ItemLong(group, key, this->value, defaultValue)
{
value = val;
};
private:
long value;
};
Py_BEGIN_ALLOW_THREADS
sipCpp = (sipKConfigSkeleton_ItemLong *) new PyItemLong (*a0, *a1, a2);
Py_END_ALLOW_THREADS
%End
void setValue (const long&);
long value ();
virtual void setDefaultValue (const long&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
TQVariant minValue () const;
TQVariant maxValue () const;
void setMinValue (long);
void setMaxValue (long);
}; // class ItemLong
public:
//end
public:
//force
class ItemULong : KConfigSkeletonItem
{
public:
ItemULong (const TQString&, const TQString&, ulong, ulong = 0) [(const TQString&, const TQString&, ulong&, ulong = 0)];
%MethodCode
//takes group | (TQString) | key | (TQString) | reference | (ulong) | defaultValue | (ulong = 1)
class PyItemULong : public KConfigSkeleton::ItemULong
{
public:
PyItemULong(const TQString &group, const TQString &key, ulong val, ulong defaultValue = 0) :
KConfigSkeleton::ItemULong(group, key, this->value, defaultValue)
{
value = val;
};
private:
ulong value;
};
Py_BEGIN_ALLOW_THREADS
sipCpp = (sipKConfigSkeleton_ItemULong *) new PyItemULong (*a0, *a1, a2);
Py_END_ALLOW_THREADS
%End
void setValue (const ulong&);
ulong value ();
virtual void setDefaultValue (const ulong&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
TQVariant minValue () const;
TQVariant maxValue () const;
void setMinValue (ulong);
void setMaxValue (ulong);
}; // class ItemULong
public:
//end
public:
//force
class ItemUInt64 : KConfigSkeletonItem
{
public:
ItemUInt64 (const TQString&, const TQString&, ulonglong&, ulonglong = 0);
%MethodCode
//takes group | (TQString) | key | (TQString) | reference | (ulonglong) | defaultValue | (ulonglong = 0)
class PyItemUInt64 : public KConfigSkeleton::ItemUInt64
{
public:
PyItemUInt64(const TQString &group, const TQString &key, TQ_UINT64 val, TQ_UINT64 defaultValue = 0) :
KConfigSkeleton::ItemUInt64(group, key, this->value, defaultValue)
{
value = val;
};
private:
TQ_UINT64 value;
};
Py_BEGIN_ALLOW_THREADS
sipCpp = (sipKConfigSkeleton_ItemUInt64 *) new PyItemUInt64 (*a0, *a1, *a2, *a3);
Py_END_ALLOW_THREADS
%End
void setValue (const ulonglong&);
ulonglong value ();
virtual void setDefaultValue (const ulonglong&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
TQVariant minValue () const;
TQVariant maxValue () const;
void setMinValue (ulonglong);
void setMaxValue (ulonglong);
}; // class ItemUInt64
public:
//end
public:
//force
class ItemDouble : KConfigSkeletonItem
{
public:
ItemDouble (const TQString&, const TQString&, double, double = 0) [(const TQString&, const TQString&, double&, double = 0)];
%MethodCode
//takes group | (TQString) | key | (TQString) | reference | (double) | defaultValue | (double = 0)
class PyItemDouble : public KConfigSkeleton::ItemDouble
{
public:
PyItemDouble(const TQString &group, const TQString &key, double val, double defaultValue=0.0) :
KConfigSkeleton::ItemDouble(group, key, this->value, defaultValue)
{
value = val;
};
private:
double value;
};
Py_BEGIN_ALLOW_THREADS
sipCpp = (sipKConfigSkeleton_ItemDouble *) new PyItemDouble (*a0, *a1, a2, a3);
Py_END_ALLOW_THREADS
%End
void setValue (const double&);
double value ();
virtual void setDefaultValue (const double&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
TQVariant minValue () const;
TQVariant maxValue () const;
void setMinValue (double);
void setMaxValue (double);
}; // class ItemDouble
public:
//end
public:
//force
class ItemColor : KConfigSkeletonItem
{
public:
ItemColor (const TQString&, const TQString&, TQColor&, const TQColor& = TQColor (128 ,128 ,128 ));
void setValue (const TQColor&);
TQColor& value ();
virtual void setDefaultValue (const TQColor&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
}; // class ItemColor
public:
//end
public:
//force
class ItemFont : KConfigSkeletonItem
{
public:
ItemFont (const TQString&, const TQString&, TQFont&, const TQFont& = KGlobalSettings ::generalFont ());
void setValue (const TQFont&);
TQFont& value ();
virtual void setDefaultValue (const TQFont&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
}; // class ItemFont
public:
//end
public:
//force
class ItemRect : KConfigSkeletonItem
{
public:
ItemRect (const TQString&, const TQString&, TQRect&, const TQRect& = TQRect ());
void setValue (const TQRect&);
TQRect& value ();
virtual void setDefaultValue (const TQRect&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
}; // class ItemRect
public:
//end
public:
//force
class ItemPoint : KConfigSkeletonItem
{
public:
ItemPoint (const TQString&, const TQString&, TQPoint&, const TQPoint& = TQPoint ());
void setValue (const TQPoint&);
TQPoint& value ();
virtual void setDefaultValue (const TQPoint&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
}; // class ItemPoint
public:
//end
public:
//force
class ItemSize : KConfigSkeletonItem
{
public:
ItemSize (const TQString&, const TQString&, TQSize&, const TQSize& = TQSize ());
void setValue (const TQSize&);
TQSize& value ();
virtual void setDefaultValue (const TQSize&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
}; // class ItemSize
public:
//end
public:
//force
class ItemDateTime : KConfigSkeletonItem
{
public:
ItemDateTime (const TQString&, const TQString&, TQDateTime&, const TQDateTime& = TQDateTime ());
void setValue (const TQDateTime&);
TQDateTime& value ();
virtual void setDefaultValue (const TQDateTime&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
}; // class ItemDateTime
public:
//end
public:
//force
class ItemStringList : KConfigSkeletonItem
{
public:
ItemStringList (const TQString&, const TQString&, TQStringList&, const TQStringList& = TQStringList ());
void setValue (const TQStringList&);
TQStringList& value ();
virtual void setDefaultValue (const TQStringList&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
}; // class ItemStringList
public:
//end
public:
//force
class ItemIntList : KConfigSkeletonItem
{
public:
ItemIntList (const TQString&, const TQString&, TQValueList<int>&, const TQValueList<int>& = IntList ());
%MethodCode
//takes group | (TQString) | key | (TQString) | reference | (a Python list of int) | defaultValue | (a Python list of int = 0)
if (a3 == NULL) *(TQValueList<int> *)a3 = TQValueList<int>();
Py_BEGIN_ALLOW_THREADS
sipCpp = (sipKConfigSkeleton_ItemIntList *) new KConfigSkeleton::ItemIntList (*a0, *a1, *a2, *a3);
Py_END_ALLOW_THREADS
%End
void setValue (const TQValueList<int>&);
TQValueList<int>& value ();
virtual void setDefaultValue (const TQValueList<int>&);
virtual void setDefault ();
void swapDefault ();
void writeConfig (KConfig*);
void readConfig (KConfig*);
void setProperty (const TQVariant&);
TQVariant property () const;
}; // class ItemIntList
public:
//end
}; // class KConfigSkeleton
%End
%If (KDE_3_2_0 - )
%MappedType TQValueList<KConfigSkeleton::ItemEnum::Choice>
{
%TypeHeaderCode
#include <kconfigskeleton.h>
%End
%ConvertFromTypeCode
if (!sipCpp)
return PyList_New(0);
// Create the list
PyObject *pylist;
if ((pylist = PyList_New(0)) == NULL)
return NULL;
TQValueList<KConfigSkeleton::ItemEnum::Choice> *cpplist = (TQValueList<KConfigSkeleton::ItemEnum::Choice> *)sipCpp;
PyObject *inst;
// Get it.
TQValueList<KConfigSkeleton::ItemEnum::Choice>::Iterator it;
for( it = cpplist->begin(); it != cpplist->end(); ++it )
{
if (((inst = sipConvertFromNewType(new KConfigSkeleton::ItemEnum::Choice(*it), sipType_KConfigSkeleton_ItemEnum_Choice, NULL)) == NULL)
|| PyList_Append (pylist, inst) < 0)
{
Py_DECREF (pylist);
return NULL;
}
}
return pylist;
%End
%ConvertToTypeCode
if (sipIsErr == NULL)
return PyList_Check(sipPy);
TQValueList<KConfigSkeleton::ItemEnum::Choice> *cpplist = new TQValueList<KConfigSkeleton::ItemEnum::Choice>;
PyObject *elem;
KConfigSkeleton::ItemEnum::Choice *cpp;
int iserr = 0;
for (int i = 0; i < PyList_Size (sipPy); i++)
{
elem = PyList_GET_ITEM (sipPy, i);
cpp = (KConfigSkeleton::ItemEnum::Choice *)sipForceConvertToType(elem, sipType_KConfigSkeleton_ItemEnum_Choice, sipTransferObj, SIP_NOT_NONE|SIP_NO_CONVERTORS, NULL, &iserr);
if (iserr)
{
*sipIsErr = 1;
delete cpplist;
return 0;
}
cpplist->append (*cpp);
}
*sipCppPtr = cpplist;
return 1;
%End
};
%End