本文整理汇总了C++中LLFloaterProperties::findItem方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFloaterProperties::findItem方法的具体用法?C++ LLFloaterProperties::findItem怎么用?C++ LLFloaterProperties::findItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFloaterProperties
的用法示例。
在下文中一共展示了LLFloaterProperties::findItem方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onClickCopy
// static
void LLFloaterProperties::onClickCopy(void* user_data)
{
LLFloaterProperties* floaterp = (LLFloaterProperties*)user_data;
if(floaterp)
{
LLViewerInventoryItem* item = (LLViewerInventoryItem*)floaterp->findItem();
if(item)
{
std::string str(floaterp->childGetValue("item_text").asString());
std::string::size_type pos;
while((pos = str.find(" ")) != std::string::npos)
{
str.replace(pos, 4, "\t");
}
std::istringstream strm(str);
LLViewerInventoryItem* temp = new LLViewerInventoryItem();
temp->importLegacyStream(strm);
std::ostringstream strm2;
temp->exportLegacyStream(strm2, TRUE);
LLWString wstr(utf8str_to_wstring(strm2.str()));
gClipboard.copyFromSubstring(wstr, 0, wstr.length());
//delete temp;
}
}
}
示例2: onClickCreator
// static
void LLFloaterProperties::onClickCreator(void* data)
{
LLFloaterProperties* self = (LLFloaterProperties*)data;
if(!self) return;
LLInventoryItem* item = self->findItem();
if(!item) return;
if(!item->getCreatorUUID().isNull())
{
LLFloaterAvatarInfo::showFromObject(item->getCreatorUUID());
}
}
示例3: onClickOwner
// static
void LLFloaterProperties::onClickOwner(void* data)
{
LLFloaterProperties* self = (LLFloaterProperties*)data;
if(!self) return;
LLInventoryItem* item = self->findItem();
if(!item) return;
if(item->getPermissions().isGroupOwned())
{
LLFloaterGroupInfo::showFromUUID(item->getPermissions().getGroup());
}
else
{
if(!item->getPermissions().getOwner().isNull())
{
LLFloaterAvatarInfo::showFromObject(item->getPermissions().getOwner());
}
}
}
示例4: onClickUpdate
// static
void LLFloaterProperties::onClickUpdate(void* user_data)
{
LLFloaterProperties* floaterp = (LLFloaterProperties*)user_data;
if(floaterp)
{
LLViewerInventoryItem* item = (LLViewerInventoryItem*)floaterp->findItem();
if(item)
{
std::string str(floaterp->childGetValue("item_text").asString());
std::string::size_type pos;
while((pos = str.find(" ")) != std::string::npos)
{
str.replace(pos, 4, "\t");
}
std::istringstream strm(str);
item->importLegacyStream(strm);
if(floaterp->mObjectID.isNull())
{
// This is in the agent's inventory.
item->updateServer(FALSE);
gInventory.updateItem(item);
gInventory.notifyObservers();
item->setComplete(FALSE);
item->fetchFromServer();
}
else
{
// This is in an object's contents.
LLViewerObject* object = gObjectList.findObject(floaterp->mObjectID);
if(object)
{
object->updateInventory(
item,
TASK_INVENTORY_ITEM_KEY,
false);
object->fetchInventoryFromServer();
}
}
}
}
}
示例5: onClickOwner
// static
void LLFloaterProperties::onClickOwner(void* data)
{
LLFloaterProperties* self = (LLFloaterProperties*)data;
if(!self) return;
LLInventoryItem* item = self->findItem();
if(!item) return;
if(item->getPermissions().isGroupOwned())
{
LLFloaterGroupInfo::showFromUUID(item->getPermissions().getGroup());
}
else
{
// if(!item->getPermissions().getOwner().isNull())
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
if ( (!item->getPermissions().getOwner().isNull()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
// [/RLVa:KB]
{
LLFloaterAvatarInfo::showFromObject(item->getPermissions().getOwner());
}
}
}
示例6: onCommitName
// static
void LLFloaterProperties::onCommitName(LLUICtrl* ctrl, void* data)
{
//llinfos << "LLFloaterProperties::onCommitName()" << llendl;
LLFloaterProperties* self = (LLFloaterProperties*)data;
if(!self)
{
return;
}
LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->findItem();
if(!item)
{
return;
}
LLLineEditor* labelItemName = self->getChild<LLLineEditor>("LabelItemName");
if(labelItemName&&
(item->getName() != labelItemName->getText()) &&
(gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE)) )
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->rename(labelItemName->getText());
if(self->mObjectID.isNull())
{
new_item->updateServer(FALSE);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
}
else
{
LLViewerObject* object = gObjectList.findObject(self->mObjectID);
if(object)
{
object->updateInventory(
new_item,
TASK_INVENTORY_ITEM_KEY,
false);
}
}
}
}
示例7: onCommitPermissions
// static
void LLFloaterProperties::onCommitPermissions(LLUICtrl* ctrl, void* data)
{
//llinfos << "LLFloaterProperties::onCommitPermissions()" << llendl;
LLFloaterProperties* self = (LLFloaterProperties*)data;
if(!self) return;
LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->findItem();
if(!item) return;
LLPermissions perm(item->getPermissions());
LLCheckBoxCtrl* CheckShareWithGroup = self->getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(CheckShareWithGroup)
{
perm.setGroupBits(gAgent.getID(), gAgent.getGroupID(),
CheckShareWithGroup->get(),
PERM_MODIFY | PERM_MOVE | PERM_COPY);
}
LLCheckBoxCtrl* CheckEveryoneCopy = self->getChild<LLCheckBoxCtrl>("CheckEveryoneCopy");
if(CheckEveryoneCopy)
{
perm.setEveryoneBits(gAgent.getID(), gAgent.getGroupID(),
CheckEveryoneCopy->get(), PERM_COPY);
}
LLCheckBoxCtrl* CheckNextOwnerModify = self->getChild<LLCheckBoxCtrl>("CheckNextOwnerModify");
if(CheckNextOwnerModify)
{
perm.setNextOwnerBits(gAgent.getID(), gAgent.getGroupID(),
CheckNextOwnerModify->get(), PERM_MODIFY);
}
LLCheckBoxCtrl* CheckNextOwnerCopy = self->getChild<LLCheckBoxCtrl>("CheckNextOwnerCopy");
if(CheckNextOwnerCopy)
{
perm.setNextOwnerBits(gAgent.getID(), gAgent.getGroupID(),
CheckNextOwnerCopy->get(), PERM_COPY);
}
LLCheckBoxCtrl* CheckNextOwnerTransfer = self->getChild<LLCheckBoxCtrl>("CheckNextOwnerTransfer");
if(CheckNextOwnerTransfer)
{
perm.setNextOwnerBits(gAgent.getID(), gAgent.getGroupID(),
CheckNextOwnerTransfer->get(), PERM_TRANSFER);
}
if(perm != item->getPermissions()
&& item->isComplete())
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->setPermissions(perm);
U32 flags = new_item->getFlags();
// If next owner permissions have changed (and this is an object)
// then set the slam permissions flag so that they are applied on rez.
if((perm.getMaskNextOwner()!=item->getPermissions().getMaskNextOwner())
&& (item->getType() == LLAssetType::AT_OBJECT))
{
flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM;
}
// If everyone permissions have changed (and this is an object)
// then set the overwrite everyone permissions flag so they
// are applied on rez.
if ((perm.getMaskEveryone()!=item->getPermissions().getMaskEveryone())
&& (item->getType() == LLAssetType::AT_OBJECT))
{
flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
}
// If group permissions have changed (and this is an object)
// then set the overwrite group permissions flag so they
// are applied on rez.
if ((perm.getMaskGroup()!=item->getPermissions().getMaskGroup())
&& (item->getType() == LLAssetType::AT_OBJECT))
{
flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
}
new_item->setFlags(flags);
if(self->mObjectID.isNull())
{
new_item->updateServer(FALSE);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
}
else
{
LLViewerObject* object = gObjectList.findObject(self->mObjectID);
if(object)
{
object->updateInventory(
new_item,
TASK_INVENTORY_ITEM_KEY,
false);
}
}
}
else
{
// need to make sure we don't just follow the click
self->refresh();
}
}