当前位置: 首页>>代码示例>>C++>>正文


C++ Identifier::qstring方法代码示例

本文整理汇总了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;
        }
    }
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:28,代码来源:jsobjectproxy.cpp

示例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();
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:27,代码来源:bind_pluginmodulecollection.cpp

示例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();
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:7,代码来源:bind_windowcollection.cpp

示例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();
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:8,代码来源:bind_dataobjectcollection.cpp

示例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();
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:10,代码来源:bind_pluginmodulecollection.cpp

示例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);
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:10,代码来源:bind_dataobjectcollection.cpp

示例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);
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:10,代码来源:bind_timeinterpretation.cpp

示例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);
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:10,代码来源:bind_point.cpp

示例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);
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:10,代码来源:bind_ellipse.cpp

示例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);
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:21,代码来源:bind_kst.cpp

示例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);
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:13,代码来源:bind_timeinterpretation.cpp

示例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);
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:13,代码来源:bind_point.cpp

示例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);
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:14,代码来源:bind_timeinterpretation.cpp

示例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);
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:14,代码来源:bind_kst.cpp

示例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);
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:17,代码来源:bind_dataobjectcollection.cpp


注:本文中的kjs::Identifier::qstring方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。