本文整理汇总了C++中LLFloaterProperties类的典型用法代码示例。如果您正苦于以下问题:C++ LLFloaterProperties类的具体用法?C++ LLFloaterProperties怎么用?C++ LLFloaterProperties使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LLFloaterProperties类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onCommitSaleType
// static
void LLFloaterProperties::onCommitSaleType(LLUICtrl* ctrl, void* data)
{
//llinfos << "LLFloaterProperties::onCommitSaleType()" << llendl;
LLFloaterProperties* self = (LLFloaterProperties*)data;
if(!self) return;
self->updateSaleInfo();
}
示例2: 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;
}
}
}
示例3: find
void LLFloaterProperties::closeByID(const LLUUID& item_id, const LLUUID &object_id)
{
LLFloaterProperties* floaterp = find(item_id, object_id);
if (floaterp)
{
floaterp->close();
}
}
示例4: 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());
}
}
示例5: onClickLess
void LLFloaterProperties::onClickLess(void* user_data)
{
LLFloaterProperties* floaterp = (LLFloaterProperties*)user_data;
if(floaterp)
{
LLMultiProperties* host = (LLMultiProperties*)floaterp->getHost();
if(host)
host->setExpanded(FALSE);
else
floaterp->setExpanded(FALSE);
}
}
示例6: dirtyAll
//static
void LLFloaterProperties::dirtyAll()
{
LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("properties");
for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin();
iter != inst_list.end(); ++iter)
{
LLFloaterProperties* floater = dynamic_cast<LLFloaterProperties*>(*iter);
llassert(floater); // else cast failed - wrong type D:
if (floater)
{
floater->dirty();
}
}
}
示例7: 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());
}
}
}
示例8: 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();
}
}
}
}
}
示例9: 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());
}
}
}
示例10: 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);
}
}
}
}
示例11: getRect
void LLMultiProperties::setExpanded(BOOL expanded)
{
mExpanded = expanded;
LLRect rect = getRect();
LLRect tab_rect = mTabContainer->getRect();
if(expanded)
{
rect.setOriginAndSize(rect.mLeft, rect.mBottom, 800, rect.getHeight());
tab_rect.setOriginAndSize(tab_rect.mLeft, tab_rect.mBottom, 800, tab_rect.getHeight());
}
else
{
rect.setOriginAndSize(rect.mLeft, rect.mBottom, 350, rect.getHeight());
tab_rect.setOriginAndSize(tab_rect.mLeft, tab_rect.mBottom, 350, tab_rect.getHeight());
}
setRect(rect);
mTabContainer->setRect(tab_rect);
for (S32 i = 0; i < mTabContainer->getTabCount(); i++)
{
LLFloaterProperties* floaterp = (LLFloaterProperties*)mTabContainer->getPanelByIndex(i);
floaterp->setExpanded(expanded);
}
}
示例12: 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();
}
}
示例13: changed
void LLPropertiesObserver::changed(U32 mask)
{
// if there's a change we're interested in.
if((mask & (LLInventoryObserver::LABEL | LLInventoryObserver::INTERNAL | LLInventoryObserver::REMOVE)) != 0)
{
mFloater->dirty();
}
}