23 #include <QtCore/QSettings>
26 using namespace KJSEmbed;
29 QStringList
keys =
object->allKeys();
42 if( args.size() == 2 )
72 {
"allKeys", 0, KJS::DontDelete|KJS::ReadOnly, &callAllKeys },
73 {
"setValue", 2, KJS::DontDelete|KJS::ReadOnly, &callSetValue },
74 {
"value", 1, KJS::DontDelete|KJS::ReadOnly, &callValue },
75 {
"clear", 0,KJS::DontDelete|KJS::ReadOnly, &callClear },
76 {
"sync", 0,KJS::DontDelete|KJS::ReadOnly, &callSync },
77 {
"remove", 1,KJS::DontDelete|KJS::ReadOnly, &callRemove }
81 {
"NativeFormat", QSettings::NativeFormat},
82 {
"IniFormat", QSettings::IniFormat},
84 {
"UserScope", QSettings::UserScope},
85 {
"SystemScope", QSettings::SystemScope}
89 {
"setPath", 3, KJS::DontDelete|KJS::ReadOnly, &callSetPath }
99 QObject *
parent = KJSEmbed::extractObject<QObject>(exec,args,0);
100 settings =
new QSettings(parent);
102 else if ( args.size() == 3 )
105 QSettings::Format format = (QSettings::Format) KJSEmbed::extractVariant<uint>(exec, args, 1);
106 QObject *
parent = KJSEmbed::extractObject<QObject>(exec,args,2);
107 settings =
new QSettings(fileName,format,parent);
109 else if( args.size() == 4 )
111 QSettings::Scope scope = (QSettings::Scope) KJSEmbed::extractVariant<uint>(exec, args, 0);
114 QObject *
parent = KJSEmbed::extractObject<QObject>(exec,args,3);
115 settings =
new QSettings(scope, organization, application, parent);