• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ propertyValue函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中propertyValue函数的典型用法代码示例。如果您正苦于以下问题:C++ propertyValue函数的具体用法?C++ propertyValue怎么用?C++ propertyValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了propertyValue函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Q_CHECK_PTR

bool IqOrmSqlManyToOnePropertyDescriptionProcessor::postInsert(IqOrmDataSourceOperationResult *result) const
{
    Q_CHECK_PTR(result);
    Q_CHECK_PTR(propertyDescription());
    Q_CHECK_PTR(object());
    Q_CHECK_PTR(object()->ormMetaModel());

    if (propertyValue().isNull()) {
        result->setError("");
        return true;
    }

    qint64 associatedObjectId = propertyValue().toLongLong();

    if (associatedPropertyDescription()) {
        IqOrmOneToManyPropertyChanges *changes = result->changes(associatedOrmModel(), associatedObjectId)->propertyChanges(associatedPropertyDescription());
        changes->addNewObjectId(object()->objectId());
    }

    IqOrmManyToOnePropertyChanges *changes = result->changes(ormModel(), object()->objectId())->propertyChanges(propertyDescription());
    changes->setOperation(IqOrmManyToOnePropertyChanges::Set);
    changes->setNewObjectId(associatedObjectId);

    result->setError("");
    return true;
}
开发者ID:ItQuasarOrg,项目名称:IqOrm,代码行数:26,代码来源:iqormsqlmanytoonepropertydescriptionprocessor.cpp


示例2: object

void FontAttribPropItem::setModelData(QWidget *propertyEditor , QAbstractItemModel *model, const QModelIndex &index)
{
    model->setData(index,qobject_cast<CheckBoxEditor*>(propertyEditor)->isChecked());
    QFont font = object()->property(parent()->propertyName().toLatin1()).value<QFont>();
    if (propertyName()=="bold"){
        font.setBold(propertyValue().toBool());
    }
    if (propertyName()=="italic"){
        font.setItalic(propertyValue().toBool());
    }
    if (propertyName()=="underline"){
        font.setUnderline(propertyValue().toBool());
    }
    setValueToObject(parent()->propertyName(),font);
}
开发者ID:fralx,项目名称:LimeReport,代码行数:15,代码来源:lrfontpropitem.cpp


示例3: FontAttribPropItem

FontPropItem::FontPropItem(QObject *object, ObjectPropItem::ObjectsList *objects, const QString &name, const QString &displayName, const QVariant &value, ObjectPropItem *parent, bool readonly)
    :ObjectPropItem(object, objects, name, displayName, value, parent, readonly)
{

    m_bold = new FontAttribPropItem(object,objects,"bold",tr("bold"),propertyValue().value<QFont>().bold(),this,false);
    m_italic = new FontAttribPropItem(object,objects,"italic",tr("italic"),propertyValue().value<QFont>().italic(),this,false);
    m_underline = new FontAttribPropItem(object,objects,"underline",tr("underline"),propertyValue().value<QFont>().underline(),this,false);
    m_pointSize = new FontPointSizePropItem(object,0,"pointSize",tr("size"),propertyValue().value<QFont>().pointSize(),this,false);
    m_family = new FontFamilyPropItem(object,0,"family",tr("family"),propertyValue().value<QFont>(),this,false);

    this->appendItem(m_family);
    this->appendItem(m_pointSize);
    this->appendItem(m_bold);
    this->appendItem(m_italic);
    this->appendItem(m_underline);
}
开发者ID:fralx,项目名称:LimeReport,代码行数:16,代码来源:lrfontpropitem.cpp


示例4: setPropertyEditorData

void BoolPropItem::setPropertyEditorData(QWidget *propertyEditor, const QModelIndex &) const
{
    CheckBoxEditor *editor =qobject_cast<CheckBoxEditor *>(propertyEditor);
    editor->setEditing(true);
    editor->setChecked(propertyValue().toBool());
    editor->setEditing(false);
}
开发者ID:vanger13,项目名称:LimeReport,代码行数:7,代码来源:lrboolpropitem.cpp


示例5: ReadAcceptLanguages

bool ChromeProfile::IsAcceptLanguagesOk() 
{
	bool acceptLanguagesFound, bRslt;
	wstring langcode, firstlang;

	bRslt = false;
	acceptLanguagesFound = ReadAcceptLanguages(langcode);

	if (acceptLanguagesFound)
	{
		LanguageList propertyValue(langcode);
		firstlang = propertyValue.GetFirstLanguage();
		std::transform(firstlang.begin(), firstlang.end(), firstlang.begin(), ::tolower);
		
		if (firstlang.compare(CHROME_ACCEPT_LANGUAGECODE_1) == 0
			|| firstlang.compare(CHROME_ACCEPT_LANGUAGECODE_2)  == 0)
		{
			bRslt = true;
		}
	}
	else
	{
		if (IsUiLocaleOk())
		{
			bRslt = true;
		}
	}

	g_log.Log(L"ChromeProfile::IsAcceptLanguagesOk: %u", (wchar_t*) bRslt);
	return bRslt;
}
开发者ID:Softcatala,项目名称:Catalanitzador,代码行数:31,代码来源:ChromeProfile.cpp


示例6: parent

void UmlArtifact::genpro() {
  UmlPackage * pack = (UmlPackage *) parent()->parent();
  
  Q3CString path;

  if (! propertyValue("genpro path", path)) {

    path = pack->cppSrcDir();
  
    if (path.isEmpty())
      path = root_dir();
    else if (QDir::isRelativePath(path)) {
      QDir d(root_dir());
      
      d.cd(path);
      path = d.absPath();
    }
  }

  if (stereotype() == "executable") {
    gen_app(path);
  }
  else
    UmlCom::trace(stereotype() + " : not managed");
}
开发者ID:SciBoy,项目名称:douml,代码行数:25,代码来源:UmlArtifact.cpp


示例7: FontFamilyEditor

QWidget *FontFamilyPropItem::createProperyEditor(QWidget *parent) const
{
    FontFamilyEditor* editor = new FontFamilyEditor(parent);
//    QFontComboBox* editor = new QFontComboBox(parent);
    editor->setAutoFillBackground(true);
    editor->setFont(propertyValue().value<QFont>());
    return editor;
}
开发者ID:fralx,项目名称:LimeReport,代码行数:8,代码来源:lrfontpropitem.cpp


示例8: m_propertyValue

IntSetCellRenderer::IntSetCellRenderer() :
    Glib::ObjectBase(typeid(IntSetCellRenderer)),
    Gtk::CellRendererText(),
    m_propertyValue(*this, "stdintset", std::set<int>())
{
    propertyValue().signal_changed().connect(
        sigc::mem_fun(*this, &IntSetCellRenderer::valueChanged)
    );
}
开发者ID:svn2github,项目名称:linuxsampler,代码行数:9,代码来源:dimensionmanager.cpp


示例9: propertyValue

void IntSetCellRenderer::valueChanged() {
    Glib::ustring s;
    std::set<int> v = propertyValue();
    for (std::set<int>::const_iterator it = v.begin(); it != v.end(); ++it) {
        s += ToString(*it);
        if (*it != *v.rbegin()) s += "|";
    }
    property_text() = s;
    property_foreground() = (v.size() > 1) ? "gray" : "black";
}
开发者ID:svn2github,项目名称:linuxsampler,代码行数:10,代码来源:dimensionmanager.cpp


示例10: NS_NewPresState

NS_IMETHODIMP
nsBoxObject::SetProperty(const PRUnichar* aPropertyName, const PRUnichar* aPropertyValue)
{
  if (!mPresState)
    NS_NewPresState(getter_Transfers(mPresState));

  nsDependentString propertyName(aPropertyName);
  nsDependentString propertyValue(aPropertyValue);
  return mPresState->SetStateProperty(propertyName, propertyValue);
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:10,代码来源:nsBoxObject.cpp


示例11: GetPreferencesRelPathAndFile

bool ChromeProfile::WriteSpellAndAcceptLanguages()
{
	Json::Value root;
	wstring path = m_installLocation + GetPreferencesRelPathAndFile();
	std::ifstream in(path.c_str());
	Json::Reader reader;
	Json::FastWriter writer;
	string acceptLanguages;
	wstring wLang;
	bool rslt;

	if (in.fail())
	{
		g_log.Log(L"ChromeProfile::WriteSpellAndAcceptLanguages. Cannot open for reading %s", (wchar_t*) path.c_str());
		return false;
	}

	rslt = reader.parse(in, root);
	in.close();

	if (rslt == false)
	{
		g_log.Log(L"ChromeProfile::WriteSpellAndAcceptLanguages. Cannot parse %s", (wchar_t*) path.c_str());
		return false;
	}

	if (m_setCatalanAsAcceptLanguage)
	{	
		acceptLanguages = root["intl"]["accept_languages"].asString();
		StringConversion::ToWideChar(acceptLanguages, wLang);

		LanguageList propertyValue(wLang);
		wLang = propertyValue.GetWithCatalanAdded();
		StringConversion::ToMultiByte(wLang, acceptLanguages);
		root["intl"]["accept_languages"] = acceptLanguages;
	}

	if (m_setCatalanAsSpellLanguage)
	{
		root["spellcheck"]["dictionary"] = CHROME_SPELLCHECKER_LANGUAGECODE_STR;
	}

	std::ofstream out(path.c_str());
	if (out.fail())
	{
		g_log.Log(L"ChromeProfile::WriteAcceptLanguageCode. Cannot open for writing %s", (wchar_t*) path.c_str());
		return false;
	}

	m_prefCacheIsValid = false;
	std::string jsonMessage = writer.write(root);
	out << jsonMessage;
	out.close();
	return true;
}
开发者ID:Softcatala,项目名称:Catalanitzador,代码行数:55,代码来源:ChromeProfile.cpp


示例12: setUseless

void UmlItem::setUseless()
{
    QByteArray dummy;

    if (propertyValue("STM generated", dummy))
        set_PropertyValue("STM generated", "0");

    const QVector<UmlItem*> v = children();

    for (unsigned index = v.count(); index != 0; index -= 1)
        v[index - 1]->setUseless();
}
开发者ID:gilbertoca,项目名称:douml,代码行数:12,代码来源:UmlItem.cpp


示例13: loadFromProfile

void UmlItem::loadFromProfile()
{
    WrapperStr id;

    if (propertyValue("xmiId", id) && (All.find(id) == All.end()))
        All.insert(id, this);

    const Q3PtrVector<UmlItem> ch = children();
    unsigned n = ch.size();

    for (unsigned u = 0; u != n; u += 1)
        ch[u]->loadFromProfile();
}
开发者ID:daniel7solis,项目名称:douml,代码行数:13,代码来源:UmlItem.cpp


示例14: deleteUseless

void UmlItem::deleteUseless()
{
    QByteArray v;

    if (propertyValue("STM generated", v) && (v == "0"))
        // useless
        deleteIt();
    else {
        const QVector<UmlItem*> v = children();

        for (unsigned index = v.count(); index != 0; index -= 1)
            v[index - 1]->deleteUseless();
    }
}
开发者ID:gilbertoca,项目名称:douml,代码行数:14,代码来源:UmlItem.cpp


示例15: propertyValue

bool BoolPropItem::paint(QPainter *painter, const QStyleOptionViewItemV4 &option, const QModelIndex &index)
{
    if (index.column()==1) {
        QStyleOptionButton so;
        int border = (option.rect.height() - QApplication::style()->pixelMetric(QStyle::PM_IndicatorWidth))/2;
        so.rect = option.rect.adjusted(border,border,0,-border);
        so.rect.setWidth(QApplication::style()->pixelMetric(QStyle::PM_IndicatorWidth));

        if (!isValueReadonly())
            so.state = QStyle::State_Enabled;
        else
            so.state &= ~QStyle::State_Enabled;

        so.state |= propertyValue().toBool() ? QStyle::State_On : QStyle::State_Off;

        option.widget->style()->drawPrimitive(QStyle::PE_IndicatorCheckBox,&so,painter);

        return true;
    } else return false;
}
开发者ID:vanger13,项目名称:LimeReport,代码行数:20,代码来源:lrboolpropitem.cpp


示例16: children

UmlPackage * UmlPackage::findProfile(WrapperStr xmiId)
{
    if (stereotype() == "profile") {
        WrapperStr id;

        if (propertyValue("xmiId", id) && (id == xmiId))
            return this;
    }

    const Q3PtrVector<UmlItem> ch = children();
    unsigned n = ch.size();
    UmlPackage * r;

    for (unsigned u = 0; u != n; u += 1) {
        if ((ch[u]->kind() == aPackage) &&
            ((r = ((UmlPackage *) ch[u])->findProfile(xmiId)) != 0))
            return r;
    }

    return 0;
}
开发者ID:bleakxanadu,项目名称:douml,代码行数:21,代码来源:UmlPackage.cpp


示例17: propertyValue

QVariant QgsProperty::value( const QgsExpressionContext &context, const QVariant &defaultValue, bool *ok ) const
{
  if ( ok )
    *ok = false;

  bool valOk = false;
  QVariant val = propertyValue( context, defaultValue, &valOk );
  if ( !d->transformer && !valOk ) // if transformer present, let it handle null values
    return defaultValue;

  if ( d->transformer )
  {
    if ( !valOk )
      val = QVariant();
    val = d->transformer->transform( context, val );
  }

  if ( ok )
    *ok = true;

  return val;
}
开发者ID:enzogis,项目名称:QGIS,代码行数:22,代码来源:qgsproperty.cpp


示例18: currentLink

 std::string currentLink() const {
     return boost::get<std::string>(propertyValue("CURRENTLINK"));
 }
开发者ID:AAthresh,项目名称:quantlib,代码行数:3,代码来源:handle.hpp


示例19: adoptPtrWillBeNoop

PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> StringKeyframe::createPropertySpecificKeyframe(CSSPropertyID property) const
{
    return adoptPtrWillBeNoop(new PropertySpecificKeyframe(offset(), easing(), propertyValue(property), composite()));
}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:4,代码来源:StringKeyframe.cpp


示例20: propertyValue

JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft) const
{
    JSRetainPtr<JSStringRef> propertyValue(Adopt, JSStringCreateWithUTF8CString(DumpRenderTreeSupportGtk::pageSizeAndMarginsInPixels(mainFrame, pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft).data()));
    return propertyValue;
}
开发者ID:Spencerx,项目名称:webkit,代码行数:5,代码来源:LayoutTestControllerGtk.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ prot_printf函数代码示例发布时间:2022-05-30
下一篇:
C++ propertyName函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap