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


C++ PropertyPtr类代码示例

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


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

示例1: notifyChangeDataSelector

	void GroupTextureController::notifyChangeDataSelector(DataPtr _data, bool _changeOnlySelection)
	{
		mParentData = _data;
		if (mParentData != nullptr && mParentData->getType()->getName() != mParentTypeName)
			mParentData = nullptr;

		std::string texture;
		PropertyPtr property = PropertyUtility::getPropertyByName("Group", "Texture");
		if (property != nullptr)
		{
			texture = property->getValue();

			if (!property->eventChangeProperty.exist(this, &GroupTextureController::notifyChangeProperty))
				property->eventChangeProperty.connect(this, &GroupTextureController::notifyChangeProperty);
		}

		std::string coord;
		property = PropertyUtility::getPropertyByName("Group", "Size");
		if (property != nullptr)
		{
			coord = property->getValue();

			if (!property->eventChangeProperty.exist(this, &GroupTextureController::notifyChangeProperty))
				property->eventChangeProperty.connect(this, &GroupTextureController::notifyChangeProperty);
		}

		mControl->setTextureValue(texture);
		updateCoords(coord);
	}
开发者ID:Anomalous-Software,项目名称:mygui,代码行数:29,代码来源:GroupTextureController.cpp

示例2: InitialiseProperty

	void PropertyPanelControl::InitialiseProperty(PropertyPtr _property, int& _height)
	{
		std::string type = _property->getType()->getType();
		PropertyControl* control = nullptr;

		for (VectorPairControl::iterator child = mPropertyControls.begin(); child != mPropertyControls.end(); child ++)
		{
			if ((*child).first == type && !(*child).second->getRoot()->getVisible())
			{
				control = (*child).second;
				control->getRoot()->setVisible(true);
				break;
			}
		}

		if (control == nullptr)
		{
			control = components::FactoryManager::GetInstance().CreateItem<PropertyControl>(_property->getType()->getType());
			if (control != nullptr)
			{
				control->Initialise(this, mScrollView, "");

				mPropertyControls.push_back(std::make_pair(_property->getType()->getType(), control));
			}
		}

		if (control != nullptr)
		{
			control->setProperty(_property);
			control->getRoot()->setPosition(0, _height);

			_height += control->getRoot()->getHeight() + mDistance;
		}
	}
开发者ID:Altren,项目名称:mygui,代码行数:34,代码来源:PropertyPanelControl.cpp

示例3: populateGuiFromConfiguration

void ImageSyncApp::populateGuiFromConfiguration()
{
   PropertyPtr property = configurationFile_->value( "destinationDirectory", DESTINATION_DIRECTORY );
   mainWindowContent_->textEditDestination->setText( !property ? "" : property->asString() );
   property = configurationFile_->value( "sourceDirectory", SOURCE_DIRECTORY );
   mainWindowContent_->textEditSource->setText( !property ? "" : property->asString() );
   
}
开发者ID:BackupTheBerlios,项目名称:imagesync-svn,代码行数:8,代码来源:ImageSyncApp.cpp

示例4: initialise

	void UniqueNamePropertyInitialisator::initialise(PropertyPtr _property)
	{
		DataPtr parent = DataUtility::getSelectedParentDataByType(_property->getOwner()->getType()->getName());
		if (parent == nullptr)
			return;

		std::string name = DataUtility::getUniqueName(parent, "unnamed_");
		_property->setValue(name);
	}
开发者ID:2asoft,项目名称:MMO-Framework,代码行数:9,代码来源:UniqueNamePropertyInitialisator.cpp

示例5: onServiceAdded

void UsReconstructionImplService::onServiceAdded(ReconstructionMethodService* service)
{
	QStringList range = mParams->getAlgorithmAdapter()->getValueRange();
	range << service->getName();
	mParams->getAlgorithmAdapter()->setValueRange(range);

	// select algo if none selected
	PropertyPtr algoName = mParams->getParameter("Algorithm");
	if (algoName->getValueAsVariant().value<QString>().isEmpty())
		algoName->setValueFromVariant(service->getName());
}
开发者ID:SINTEFMedtek,项目名称:CustusX,代码行数:11,代码来源:cxUsReconstructionImplService.cpp

示例6: notifyChangeProperty

	void FontTextureController::notifyChangeProperty(PropertyPtr _sender)
	{
		if (!mActivated || !PropertyUtility::isDataSelected(_sender->getOwner()))
			return;

		if (_sender->getOwner()->getType()->getName() == "Font")
		{
			if (_sender->getType()->getName() == "FontName")
				updateTexture(_sender->getValue());
		}
	}
开发者ID:Anomalous-Software,项目名称:mygui,代码行数:11,代码来源:FontTextureController.cpp

示例7: storeRegionValues

	void ChangeSkinSizeAction::storeRegionValues(DataPtr _skinData, VectorPairProperty& _store)
	{
		const Data::VectorData& childs = _skinData->getChilds();
		for (Data::VectorData::const_iterator child = childs.begin(); child != childs.end(); child++)
		{
			if ((*child)->getType()->getName() != "Region")
				continue;

			PropertyPtr property = (*child)->getProperty("Coord");
			_store.push_back(std::make_pair(property, property->getValue()));
		}
	}
开发者ID:Anomalous-Software,项目名称:mygui,代码行数:12,代码来源:ChangeSkinSizeAction.cpp

示例8: PropertyMatching

PageProgression Package::PageProgressionDirection() const
{
    PropertyPtr prop = PropertyMatching("page-progression-direction");
    if ( prop )
    {
        if ( prop->Value() == "ltr" )
            return PageProgression::LeftToRight;
        else if ( prop->Value() == "rtl" )
            return PageProgression::RightToLeft;
    }
    return PageProgression::Default;
}
开发者ID:becka11y,项目名称:readium-sdk,代码行数:12,代码来源:package.cpp

示例9: getProperty

	void PropertyBoolControl::updateProperty()
	{
		PropertyPtr proper = getProperty();
		if (proper != nullptr)
		{
			mComboBox->setEnabled(!proper->getType()->getReadOnly());
			size_t index = getComboIndex(proper->getValue());
			mComboBox->setIndexSelected(index);
		}
		else
		{
			mComboBox->setIndexSelected(MyGUI::ITEM_NONE);
			mComboBox->setEnabled(false);
		}
	}
开发者ID:chhawk,项目名称:MyGUI,代码行数:15,代码来源:PropertyBoolControl.cpp

示例10: notifyChangeDataSelector

	void FontTextureController::notifyChangeDataSelector(DataPtr _data, bool _changeOnlySelection)
	{
		mParentData = _data;
		if (mParentData != nullptr && mParentData->getType()->getName() != mParentTypeName)
			mParentData = nullptr;

		std::string texture;
		PropertyPtr property = PropertyUtility::getPropertyByName("Font", "FontName");
		if (property != nullptr)
		{
			texture = property->getValue();
		}

		updateTexture(texture);
	}
开发者ID:Anomalous-Software,项目名称:mygui,代码行数:15,代码来源:FontTextureController.cpp

示例11: getProperty

 void PropertyInt2ListControl::updateProperty()
 {
   PropertyPtr proper = getProperty();
   if (proper != nullptr)
   {
     mList->setEnabled(!proper->getType()->getReadOnly());
     std::string value = getValue();
     if (value != proper->getValue())
       setValue(proper->getValue());
   }
   else
   {
     mList->removeAllItems();
     mList->setEnabled(false);
   }
 }
开发者ID:retrydev,项目名称:MMO-Framework,代码行数:16,代码来源:PropertyInt2ListControl.cpp

示例12: initialise

	void TexturePropertyInitialisator::initialise(PropertyPtr _property)
	{
		if (SettingsManager::getInstance().getValue<bool>("Settings/SaveLastTexture"))
		{
			std::string texture = SettingsManager::getInstance().getValue("Resources/LastTextureName");
			_property->setValue(texture);
		}
	}
开发者ID:Anomalous-Software,项目名称:mygui,代码行数:8,代码来源:TexturePropertyInitialisator.cpp

示例13: d

Statement::Statement(ResourcePtr subject, PropertyPtr predicate,
                        NodePtr object) : d(new StatementPrivate)
{
    d->model = subject->model().d;
    d->subjectID = subject->id();
    d->predicateID = predicate->id();
    d->objectID = object->id();
}
开发者ID:pvuorela,项目名称:kcalcore,代码行数:8,代码来源:statement.cpp

示例14: setType

	void Data::setType(DataTypePtr _value)
	{
		mType = _value;

		mProperties.clear();

		if (mType != nullptr)
		{
			const DataType::VectorProperty& properties = mType->getProperties();
			for (DataType::VectorProperty::const_iterator property = properties.begin(); property != properties.end(); property++)
			{
				PropertyPtr data = Property::CreateInstance(*property, mWeakThis.lock());
				data->initialise();

				mProperties[(*property)->getName()] = data;
			}
		}
	}
开发者ID:Altren,项目名称:mygui,代码行数:18,代码来源:Data.cpp

示例15: getProperty

	void PropertyIntControl::updateProperty()
	{
		PropertyPtr proper = getProperty();
		if (proper != nullptr)
		{
			mEdit->setEnabled(!proper->getType()->getReadOnly());
			if (mEdit->getOnlyText() != proper->getValue())
				mEdit->setCaption(proper->getValue());

			bool validate = isValidate();
			setColour(validate);
		}
		else
		{
			mEdit->setCaption("");
			mEdit->setEnabled(false);
		}
	}
开发者ID:2asoft,项目名称:MMO-Framework,代码行数:18,代码来源:PropertyIntControl.cpp


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