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


C++ propertyValue函数代码示例

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


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


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