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


C++ PropertyPtr::getValue方法代码示例

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


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

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

		if (_sender->getOwner()->getType()->getName() == "Group")
		{
			if (_sender->getType()->getName() == "Texture")
				mControl->setTextureValue(_sender->getValue());
			else if (_sender->getType()->getName() == "Size")
				updateCoords(_sender->getValue());
		}
	}
开发者ID:Anomalous-Software,项目名称:mygui,代码行数:13,代码来源:GroupTextureController.cpp

示例3: 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

示例4: updateProperty

	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

示例5: 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

示例6: 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

示例7: notifyChangeDataSelector

	void IndexTextureController::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, &IndexTextureController::notifyChangeProperty))
				property->eventChangeProperty.connect(this, &IndexTextureController::notifyChangeProperty);
		}

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

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

		if (mParentData != nullptr)
		{
			for (Data::VectorData::const_iterator child = mParentData->getChilds().begin(); child != mParentData->getChilds().end(); child ++)
			{
				property = (*child)->getProperty("Point");
				if (!property->eventChangeProperty.exist(this, &IndexTextureController::notifyChangeProperty))
					property->eventChangeProperty.connect(this, &IndexTextureController::notifyChangeProperty);
			}
		}

		mControl->setTextureValue(texture);
		updateCoords(coord);
	}
开发者ID:2asoft,项目名称:MMO-Framework,代码行数:39,代码来源:IndexTextureController.cpp

示例8: updateProperty

	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

示例9: 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


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