本文整理汇总了C++中kjs::Identifier::qstring方法的典型用法代码示例。如果您正苦于以下问题:C++ Identifier::qstring方法的具体用法?C++ Identifier::qstring怎么用?C++ Identifier::qstring使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kjs::Identifier
的用法示例。
在下文中一共展示了Identifier::qstring方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addBindingsClass
void JSObjectProxy::addBindingsClass( KJS::ExecState *exec, KJS::Object & /*object*/ ) {
KJS::Identifier clazzid;
QObject *o = obj;
Bindings::BindingObject *bo = dynamic_cast<Bindings::BindingObject *>( o );
if ( bo ) {
clazzid = KJS::Identifier( bo->jsClassName() ? bo->jsClassName() : obj->className() );
} else {
clazzid = KJS::Identifier( obj->className() );
}
KJS::Object global = js->globalObject();
if ( global.hasProperty( exec, clazzid ) ) {
kdDebug( 80001 ) << "addBindingsClass() " << clazzid.qstring() << " already known" << endl;
KJS::Object clazz = global.get( exec, clazzid ).toObject( exec );
Bindings::JSFactoryImp *imp = dynamic_cast<Bindings::JSFactoryImp *>( clazz.imp() );
if ( !imp ) {
kdWarning() << "addBindingsClass() Class was not created by normal means" << endl;
return ;
}
kdDebug( 80001 ) << "addBindingsClass() Adding enums" << endl;
imp->setDefaultValue( js->builtinObject().construct( exec, KJS::List() ) );
addBindingsEnum( exec, clazz );
} else {
kdWarning() << "addBindingsClass() " << clazzid.qstring() << " not known" << endl;
}
}
示例2: extract
KJS::Value KstBindPluginModuleCollection::extract(KJS::ExecState *exec, const KJS::Identifier& item) const {
QString plugin = item.qstring();
const QMap<QString,Plugin::Data>& pluginList = PluginCollection::self()->pluginList();
for (QMap<QString,Plugin::Data>::ConstIterator it = pluginList.begin(); it != pluginList.end(); ++it) {
if (it.data()._name == plugin) {
return KJS::Object(new KstBindPluginModule(exec, it.data()));
}
}
const KstPluginInfoList pluginInfo = KstDataObject::pluginInfoList();
for (KstPluginInfoList::ConstIterator it = pluginInfo.begin(); it != pluginInfo.end(); ++it) {
if (it.key() == plugin) {
KstDataObjectPtr ptr = KstDataObject::plugin(it.key());
if (ptr) {
KstBasicPluginPtr bp = kst_cast<KstBasicPlugin>(ptr);
if (bp) {
return KJS::Object(new KstBindPluginModule(exec, bp));
}
}
}
}
return KJS::Undefined();
}
示例3: extract
KJS::Value KstBindWindowCollection::extract(KJS::ExecState *exec, const KJS::Identifier& item) const {
KstViewWindow *w = dynamic_cast<KstViewWindow*>(KstApp::inst()->findWindow(item.qstring()));
if (w) {
return KJS::Object(new KstBindWindow(exec, w));
}
return KJS::Undefined();
}
示例4: extract
KJS::Value KstBindDataObjectCollection::extract(KJS::ExecState *exec, const KJS::Identifier& item) const {
KstReadLocker rl(&KST::dataObjectList.lock());
KstDataObjectPtr d = *KST::dataObjectList.findTag(item.qstring());
if (d) {
return KJS::Object(KstBindDataObject::bind(exec, d));
}
return KJS::Undefined();
}
示例5: extract
KJS::Value KstBindPluginModuleCollection::extract(KJS::ExecState *exec, const KJS::Identifier& item) const {
const QMap<QString,Plugin::Data>& pluginList = PluginCollection::self()->pluginList();
QString i = item.qstring();
for (QMap<QString,Plugin::Data>::ConstIterator it = pluginList.begin(); it != pluginList.end(); ++it) {
if (it.data()._name == i) {
return KJS::Object(new KstBindPluginModule(exec, it.data()));
}
}
return KJS::Undefined();
}
示例6: hasProperty
bool KstBindDataObjectCollection::hasProperty(KJS::ExecState *exec, const KJS::Identifier& propertyName) const {
QString prop = propertyName.qstring();
for (int i = 0; dataObjectCollectionProperties[i].name; ++i) {
if (prop == dataObjectCollectionProperties[i].name) {
return true;
}
}
return KstBindCollection::hasProperty(exec, propertyName);
}
示例7: hasProperty
bool KstBindTimeInterpretation::hasProperty(KJS::ExecState *exec, const KJS::Identifier& propertyName) const {
QString prop = propertyName.qstring();
for (int i = 0; timeInterpretationProperties[i].name; ++i) {
if (prop == timeInterpretationProperties[i].name) {
return true;
}
}
return KstBinding::hasProperty(exec, propertyName);
}
示例8: hasProperty
bool KstBindPoint::hasProperty(KJS::ExecState *exec, const KJS::Identifier& propertyName) const {
QString prop = propertyName.qstring();
for (int i = 0; pointProperties[i].name; ++i) {
if (prop == pointProperties[i].name) {
return true;
}
}
return KstBinding::hasProperty(exec, propertyName);
}
示例9: hasProperty
bool KstBindEllipse::hasProperty(KJS::ExecState *exec, const KJS::Identifier& propertyName) const {
QString prop = propertyName.qstring();
for (int i = 0; ellipseProperties[i].name; ++i) {
if (prop == ellipseProperties[i].name) {
return true;
}
}
return KstBindViewObject::hasProperty(exec, propertyName);
}
示例10: get
KJS::Value KstBindKst::get(KJS::ExecState *exec, const KJS::Identifier& propertyName) const {
if (propertyName.qstring() == "version") {
return KJS::String(KSTVERSION);
}
if (propertyName.qstring() == "scriptVersion") {
return KJS::Number(1);
}
QString prop = propertyName.qstring();
for (int i = 0; kstProperties[i].name; ++i) {
if (prop == kstProperties[i].name) {
if (!kstProperties[i].get) {
break;
}
return (this->*kstProperties[i].get)(exec);
}
}
return KstBinding::get(exec, propertyName);
}
示例11: get
KJS::Value KstBindTimeInterpretation::get(KJS::ExecState *exec, const KJS::Identifier& propertyName) const {
QString prop = propertyName.qstring();
for (int i = 0; timeInterpretationProperties[i].name; ++i) {
if (prop == timeInterpretationProperties[i].name) {
if (!timeInterpretationProperties[i].get) {
break;
}
return (this->*timeInterpretationProperties[i].get)(exec);
}
}
return KstBinding::get(exec, propertyName);
}
示例12: get
KJS::Value KstBindPoint::get(KJS::ExecState *exec, const KJS::Identifier& propertyName) const {
QString prop = propertyName.qstring();
for (int i = 0; pointProperties[i].name; ++i) {
if (prop == pointProperties[i].name) {
if (!pointProperties[i].get) {
break;
}
return (this->*pointProperties[i].get)(exec);
}
}
return KstBinding::get(exec, propertyName);
}
示例13: put
void KstBindTimeInterpretation::put(KJS::ExecState *exec, const KJS::Identifier& propertyName, const KJS::Value& value, int attr) {
QString prop = propertyName.qstring();
for (int i = 0; timeInterpretationProperties[i].name; ++i) {
if (prop == timeInterpretationProperties[i].name) {
if (!timeInterpretationProperties[i].set) {
break;
}
(this->*timeInterpretationProperties[i].set)(exec, value);
return;
}
}
KstBinding::put(exec, propertyName, value, attr);
}
示例14: hasProperty
bool KstBindKst::hasProperty(KJS::ExecState *exec, const KJS::Identifier& propertyName) const {
QString prop = propertyName.qstring();
for (int i = 0; kstProperties[i].name; ++i) {
if (prop == kstProperties[i].name) {
return true;
}
}
if (prop == "version" || prop == "scriptVersion") {
return true;
}
return KstBinding::hasProperty(exec, propertyName);
}
示例15: get
KJS::Value KstBindDataObjectCollection::get(KJS::ExecState *exec, const KJS::Identifier& propertyName) const {
if (id() > 0) {
return KstBindCollection::get(exec, propertyName);
}
QString prop = propertyName.qstring();
for (int i = 0; dataObjectCollectionProperties[i].name; ++i) {
if (prop == dataObjectCollectionProperties[i].name) {
if (!dataObjectCollectionProperties[i].get) {
break;
}
return (this->*dataObjectCollectionProperties[i].get)(exec);
}
}
return KstBindCollection::get(exec, propertyName);
}