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

C++ removeProperty函数代码示例

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

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



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

示例1: findDev

/* delete the property in the given device, including widgets and data structs.
 * when last property is deleted, delete the device too.
 * if no property name attribute at all, delete the whole device regardless.
 * return 0 if ok, else -1 with reason in errmsg[].
 */
int INDI::BaseClientQt::delPropertyCmd (XMLEle * root, char * errmsg)
{
    XMLAtt * ap;
    INDI::BaseDevice * dp;

    /* dig out device and optional property name */
    dp = findDev (root, 0, errmsg);
    if (!dp)
        return INDI_DEVICE_NOT_FOUND;

    dp->checkMessage(root);

    ap = findXMLAtt (root, "name");

    /* Delete property if it exists, otherwise, delete the whole device */
    if (ap)
    {
        INDI::Property * rProp = dp->getProperty(valuXMLAtt(ap));
        removeProperty(rProp);
        int errCode = dp->removeProperty(valuXMLAtt(ap), errmsg);

        return errCode;
    }
    // delete the whole device
    else
        return deleteDevice(dp->getDeviceName(), errmsg);
}
开发者ID:mp77,项目名称:indi,代码行数:32,代码来源:baseclientqt.cpp


示例2: getPropertyCountMap

/**
 * Synchronize properties with scatterer members
 *
 * This method synchronizes the properties of CompositeBraggScatterer with the
 * properties of the contained BraggScatterer instances. It adds new properties
 * if required and removed properties that are no longer used (for example
 * because the member that introduced the property has been removed).
 */
void CompositeBraggScatterer::redeclareProperties() {
  std::map<std::string, size_t> propertyUseCount = getPropertyCountMap();

  for (auto &scatterer : m_scatterers) {
    // Check if any of the declared properties is in this scatterer (and set
    // value if that's the case)
    for (auto &prop : propertyUseCount) {
      if (scatterer->existsProperty(prop.first)) {
        prop.second += 1;

        propagatePropertyToScatterer(scatterer, prop.first,
                                     getPropertyValue(prop.first));
      }
    }

    // Use the properties of this scatterer which have been marked as exposed to
    // composite
    std::vector<Property *> properties =
        scatterer->getPropertiesInGroup(getPropagatingGroupName());
    for (auto &property : properties) {
      const std::string &propertyName = property->name();
      if (!existsProperty(propertyName)) {
        declareProperty(std::unique_ptr<Property>(property->clone()));
      }
    }
  }

  // Remove unused properties
  for (auto &property : propertyUseCount) {
    if (property.second == 0) {
      removeProperty(property.first);
    }
  }
}
开发者ID:samueljackson92,项目名称:mantid,代码行数:42,代码来源:CompositeBraggScatterer.cpp


示例3: cssPropertyID

String CSSStyleDeclaration::removeProperty(const String& propertyName, ExceptionCode& ec)
{
    int propID = cssPropertyID(propertyName);
    if (!propID)
        return String();
    return removeProperty(propID, ec);
}
开发者ID:Chingliu,项目名称:EAWebkit,代码行数:7,代码来源:CSSStyleDeclaration.cpp


示例4: set

void ToDo::setClass(iCalProperty& p) {
    set(&classEvent, p);
    removeProperty(TEXT("CLASS"));
    if(classEvent) {
        insertProperty(getVPropertyFromiCalProperty(TEXT("CLASS"), classEvent));
    }
}
开发者ID:pohly,项目名称:funambol-cpp-client-api,代码行数:7,代码来源:ToDo.cpp


示例5: removeProperty

void ContextPaneWidgetImage::onFileNameChanged()
{
    if (m_fileWidget->fileName().isNull())
        emit removeProperty(QLatin1String("source"));
    else
        emit propertyChanged(QLatin1String("source"), QString(QLatin1Char('\"') + m_fileWidget->fileName() + QLatin1Char('\"')));
}
开发者ID:anchowee,项目名称:QtCreator,代码行数:7,代码来源:contextpanewidgetimage.cpp


示例6: removeProperty

void ContextPaneTextWidget::onStyleComboBoxChanged(const QString &style)
{
    if (style == QLatin1String("Normal"))
        emit removeProperty(QLatin1String("style"));
    else
        emit propertyChanged(QLatin1String("style"), QVariant(QLatin1String("Text.") + style));
}
开发者ID:ProDataLab,项目名称:qt-creator,代码行数:7,代码来源:contextpanetextwidget.cpp


示例7: getProperty

void PoldiTruncateData::exec()
{
    MatrixWorkspace_sptr inputWorkspace = getProperty("InputWorkspace");

    setChopperFromWorkspace(inputWorkspace);
    setTimeBinWidthFromWorkspace(inputWorkspace);

    try {
        MatrixWorkspace_sptr cropped = getCroppedWorkspace(inputWorkspace);
        setProperty("OutputWorkspace", cropped);

        if(!getPointerToProperty("ExtraCountsWorkspaceName")->isDefault()) {
            try {
                MatrixWorkspace_sptr extraCounts = getExtraCountsWorkspace(inputWorkspace);

                std::string extraCountsWorkspaceName = getProperty("ExtraCountsWorkspaceName");
                declareProperty(new WorkspaceProperty<MatrixWorkspace>("ExtraCountsWorkspace", extraCountsWorkspaceName, Direction::Output));
                setProperty("ExtraCountsWorkspace", extraCounts);
            } catch(std::invalid_argument) {
                m_log.warning() << "Extra count information was requested, but there are no extra bins." << std::endl;
            }
        }
    } catch(std::invalid_argument) {
        m_log.error() << "Cannot crop workspace. Please check the timing information." << std::endl;
        m_log.error() << "  Calculated bin count: " << getCalculatedBinCount() << std::endl;
        m_log.error() << "  Bin count in the workspace: " << getActualBinCount() << std::endl;

        removeProperty("OutputWorkspace");
    }
}
开发者ID:BigShows,项目名称:mantid,代码行数:30,代码来源:PoldiTruncateData.cpp


示例8: propertyChanged

void ContextPaneTextWidget::onUnderlineCheckedChanged(bool value)
{
    if (value)
        emit propertyChanged(QLatin1String("font.underline"), value);
    else
        emit removeProperty(QLatin1String("font.underline"));
}
开发者ID:ProDataLab,项目名称:qt-creator,代码行数:7,代码来源:contextpanetextwidget.cpp


示例9: setAutoFillBackground

Uint32Edit::Uint32Edit(Uint32Property* property, Model& model,QWidget* parent):QWidget(parent),property_(property),model_(model),entity_(property->owner()){
	QPalette palette;
	palette.setColor(QPalette::Base,QColor(170, 170,0));
	setAutoFillBackground(true);
	setPalette(palette);

	QFont font;
	font.setPointSize(7);

	toplayout_ = new QHBoxLayout(this);
	label_ = new QLabel(this);
	nameEdit_ = new QLineEdit(this);
	valEdit_ = new QLineEdit(this);
	del_ = new QPushButton(this);
	del_->setText("X");
	del_->setMaximumSize(QSize(20,20));
	del_->setStyleSheet("background-color: #EE6666;");

	label_->setText("unsigned int");
	nameEdit_->setPlaceholderText("Name");
	valEdit_->setPlaceholderText("Value");
	valEdit_->setValidator( new QRegExpValidator(QRegExp("[0-9]{,10}"), this));

	nameEdit_->setText(property_->name.c_str());
	valEdit_->setText(std::to_string(property_->value).c_str());

	toplayout_->addWidget(label_);
	toplayout_->addWidget(nameEdit_);
	toplayout_->addWidget(valEdit_);
	toplayout_->addWidget(del_);

	connect(nameEdit_, SIGNAL(textChanged(const QString&)), this, SLOT(changeName(const QString&)));
	connect(valEdit_, SIGNAL(textChanged(const QString&)), this, SLOT(changeValue(const QString&)));
	connect(del_, SIGNAL(clicked()), this, SLOT(removeProperty()));
}
开发者ID:EmeraldGit,项目名称:elias_broschin_tup,代码行数:35,代码来源:Uint32Edit.cpp


示例10: foreach

/**
 * Update the browser when minimizer changes.
 */
void FitOptionsBrowser::updateMinimizer() {
  int i = m_enumManager->value(m_minimizer);
  QString minimizerName = m_enumManager->enumNames(m_minimizer)[i];
  m_minimizerGroup->setPropertyName("Minimizer " + minimizerName);

  // Remove properties of the old minimizer
  auto subProperties = m_minimizerGroup->subProperties();
  foreach (QtProperty *prop, subProperties) {
    if (prop != m_minimizer) {
      m_minimizerGroup->removeSubProperty(prop);
      removeProperty(prop->propertyName());
    }
  }

  // Check if the new minimizer has its own properties
  auto minimizer =
      Mantid::API::FuncMinimizerFactory::Instance().createMinimizer(
          minimizerName.toStdString());

  // Create and add properties to the minimizer group
  auto minimizerProperties = minimizer->getProperties();
  for (auto property = minimizerProperties.begin();
       property != minimizerProperties.end(); ++property) {
    auto prop = createPropertyProperty(*property);
    if (!*property)
      continue;
    m_minimizerGroup->addSubProperty(prop);
  }
}
开发者ID:peterfpeterson,项目名称:mantid,代码行数:32,代码来源:FitOptionsBrowser.cpp


示例11: removeProperty

void ContextPaneTextWidget::onWarpModeComboBoxChanged(const QString &warpMode)
{
    if (warpMode == QLatin1String("NoWrap"))
        emit removeProperty(QLatin1String("wrapMode"));
    else
        emit propertyChanged(QLatin1String("wrapMode"), QVariant(QLatin1String("Text.") + warpMode));
}
开发者ID:188080501,项目名称:QmlDesignerPlus,代码行数:7,代码来源:contextpanetextwidget.cpp


示例12: tvc

void PropertyOwner::deserialize(Deserializer& d) {
    // This is for finding renamed composites, and moving old properties to new composites.
    NodeVersionConverter tvc(this, &PropertyOwner::findPropsForComposites);
    d.convertVersion(&tvc);

    
    std::vector<std::string> ownedIdentifiers;
    d.deserialize("OwnedPropertyIdentifiers", ownedIdentifiers, "PropertyIdentifier");

    auto des = util::IdentifiedDeserializer<std::string, Property*>("Properties", "Property")
                   .setGetId([](Property* const& p) { return p->getIdentifier(); })
                   .setMakeNew([]() { return nullptr; })
                   .setNewFilter([&](const std::string& id, size_t ind) {
                       return util::contains(ownedIdentifiers, id);
                   })
                   .onNew([&](Property*& p) { addProperty(p, true); })
                   .onRemove([&](const std::string& id) {
                       if (util::contains_if(ownedProperties_, [&](std::unique_ptr<Property>& op) {
                               return op->getIdentifier() == id;
                           })) {
                           delete removeProperty(id);
                       }
                   });

    des(d, properties_);
}
开发者ID:david12345678901,项目名称:inviwo,代码行数:26,代码来源:propertyowner.cpp


示例13: propertyChanged

void ContextPaneWidgetImage::onTopMarginsChanged()
{
    if (previewDialog()->previewLabel()->topMarging())
        propertyChanged(QLatin1String("border.top"), previewDialog()->previewLabel()->topMarging());
    else
        emit removeProperty(QLatin1String("border.top"));
}
开发者ID:anchowee,项目名称:QtCreator,代码行数:7,代码来源:contextpanewidgetimage.cpp


示例14: attachChat

void TabsManager::attachChat(ChatWidget *chatWidget)
{
    auto chat = chatWidget->chat();
    chat.removeProperty("tabs:detached");
    chat.addProperty("tabs:attached", true, CustomProperties::Storable);

    emit chatAcceptanceChanged(chat);
}
开发者ID:vogel,项目名称:kadu,代码行数:8,代码来源:tabs.cpp


示例15: transaction

void Style::unsetLooseness()
{
    if (propertySet(s_looseness)) {
        ConfigTransaction transaction(this);
        removeProperty(s_looseness);
        d->looseness = 1.0;
    }
}
开发者ID:dhaumann,项目名称:tikzkit,代码行数:8,代码来源:Style.cpp


示例16: removeProperty

void VObject::removeAllProperies(WCHAR* propName) {
    for(int i = 0, m = propertiesCount(); i < m ; i++)
        if(!wcscmp(getProperty(i)->getName(), propName)) {
            removeProperty(i);
            --i;
            --m;
        }
}
开发者ID:ruphy,项目名称:kfunambol,代码行数:8,代码来源:VObject.cpp


示例17: removeProperty

bool CSSMutableStyleDeclaration::setProperty(int propertyID, int value, bool important, bool notifyChanged)
{
    removeProperty(propertyID);
    m_values.append(CSSProperty(propertyID, CSSPrimitiveValue::createIdentifier(value), important));
    if (notifyChanged)
        setChanged();
    return true;
}
开发者ID:Czerrr,项目名称:ISeeBrowser,代码行数:8,代码来源:CSSMutableStyleDeclaration.cpp


示例18: setOnlineStatus

void AIMContact::userOffline( const QString& userId )
{
	if ( Oscar::normalize( userId ) == Oscar::normalize( contactId() ) )
	{
		setOnlineStatus( mProtocol->statusOffline );
		removeProperty( mProtocol->awayMessage );
	}
}
开发者ID:serghei,项目名称:kde3-kdenetwork,代码行数:8,代码来源:aimcontact.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ removeRow函数代码示例发布时间:2022-05-30
下一篇:
C++ removeObject函数代码示例发布时间: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