本文整理汇总了C++中LLParcel::getMediaURLTimeout方法的典型用法代码示例。如果您正苦于以下问题:C++ LLParcel::getMediaURLTimeout方法的具体用法?C++ LLParcel::getMediaURLTimeout怎么用?C++ LLParcel::getMediaURLTimeout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLParcel
的用法示例。
在下文中一共展示了LLParcel::getMediaURLTimeout方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: refresh
// public
void LLPanelLandMedia::refresh()
{
LLParcel *parcel = mParcel->getParcel();
if (!parcel)
{
clearCtrls();
}
else
{
// something selected, hooray!
// Display options
BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA);
mMediaURLEdit->setText(parcel->getMediaURL());
mMediaURLEdit->setEnabled( FALSE );
childSetText("current_url", parcel->getMediaCurrentURL());
mMediaDescEdit->setText(parcel->getMediaDesc());
mMediaDescEdit->setEnabled( can_change_media );
std::string mime_type = parcel->getMediaType();
if (mime_type.empty())
{
mime_type = LLMIMETypes::getDefaultMimeType();
}
setMediaType(mime_type);
mMediaTypeCombo->setEnabled( can_change_media );
childSetText("mime_type", mime_type);
mMediaAutoScaleCheck->set( parcel->getMediaAutoScale () );
mMediaAutoScaleCheck->setEnabled ( can_change_media );
// Special code to disable looping checkbox for HTML MIME type
// (DEV-10042 -- Parcel Media: "Loop Media" should be disabled for static media types)
bool allow_looping = LLMIMETypes::findAllowLooping( mime_type );
if ( allow_looping )
mMediaLoopCheck->set( parcel->getMediaLoop () );
else
mMediaLoopCheck->set( false );
mMediaLoopCheck->setEnabled ( can_change_media && allow_looping );
mMediaResetCtrl->set( parcel->getMediaURLTimeout() );
mMediaResetCtrl->setEnabled( can_change_media );
mMediaResetCtrlLabel->setEnabled( can_change_media );
// disallow media size change for mime types that don't allow it
bool allow_resize = LLMIMETypes::findAllowResize( mime_type );
if ( allow_resize )
mMediaWidthCtrl->setValue( parcel->getMediaWidth() );
else
mMediaWidthCtrl->setValue( 0 );
mMediaWidthCtrl->setEnabled ( can_change_media && allow_resize );
if ( allow_resize )
mMediaHeightCtrl->setValue( parcel->getMediaHeight() );
else
mMediaHeightCtrl->setValue( 0 );
mMediaHeightCtrl->setEnabled ( can_change_media && allow_resize );
// enable/disable for text label for completeness
mMediaSizeCtrlLabel->setEnabled( can_change_media && allow_resize );
LLUUID tmp = parcel->getMediaID();
mMediaTextureCtrl->setImageAssetID ( parcel->getMediaID() );
mMediaTextureCtrl->setEnabled( can_change_media );
mSetURLButton->setEnabled( can_change_media );
mResetURLButton->setEnabled( can_change_media );
/*LLFloaterURLEntry* floater_url_entry = (LLFloaterURLEntry*)mURLEntryFloater.get();
if (floater_url_entry)
{
floater_url_entry->updateFromLandMediaPanel();
}*/
}
}
示例2: refresh
// public
void LLPanelLandMedia::refresh()
{
LLParcel *parcel = mParcel->getParcel();
if (!parcel)
{
clearCtrls();
}
else
{
// something selected, hooray!
// Display options
BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA);
mMediaURLEdit->setText(parcel->getMediaURL());
mMediaURLEdit->setEnabled( FALSE );
childSetText("current_url", parcel->getMediaCurrentURL());
mMediaDescEdit->setText(parcel->getMediaDesc());
mMediaDescEdit->setEnabled( can_change_media );
std::string mime_type = parcel->getMediaType();
if (mime_type.empty())
{
mime_type = "none/none";
}
setMediaType(mime_type);
mMediaTypeCombo->setEnabled( can_change_media );
childSetText("mime_type", mime_type);
mMediaAutoScaleCheck->set( parcel->getMediaAutoScale () );
mMediaAutoScaleCheck->setEnabled ( can_change_media );
// Special code to disable looping checkbox for HTML MIME type
// (DEV-10042 -- Parcel Media: "Loop Media" should be disabled for static media types)
bool allow_looping = LLMIMETypes::findAllowLooping( mime_type );
if ( allow_looping )
mMediaLoopCheck->set( parcel->getMediaLoop () );
else
mMediaLoopCheck->set( false );
mMediaLoopCheck->setEnabled ( can_change_media && allow_looping );
mMediaResetCtrl->set( parcel->getMediaURLTimeout() );
mMediaResetCtrl->setEnabled( can_change_media );
mMediaResetCtrlLabel->setEnabled( can_change_media );
// disallow media size change for mime types that don't allow it
bool allow_resize = LLMIMETypes::findAllowResize( mime_type );
if ( allow_resize )
mMediaWidthCtrl->setValue( parcel->getMediaWidth() );
else
mMediaWidthCtrl->setValue( 0 );
mMediaWidthCtrl->setEnabled ( can_change_media && allow_resize );
if ( allow_resize )
mMediaHeightCtrl->setValue( parcel->getMediaHeight() );
else
mMediaHeightCtrl->setValue( 0 );
mMediaHeightCtrl->setEnabled ( can_change_media && allow_resize );
// enable/disable for text label for completeness
mMediaSizeCtrlLabel->setEnabled( can_change_media && allow_resize );
LLUUID tmp = parcel->getMediaID();
mMediaTextureCtrl->setImageAssetID ( parcel->getMediaID() );
mMediaTextureCtrl->setEnabled( can_change_media );
mSetURLButton->setEnabled( can_change_media );
mResetURLButton->setEnabled( can_change_media );
mMediaURLFilterCheck->set( parcel->getMediaURLFilterEnable() );
mMediaURLFilterCheck->setEnabled( can_change_media );
LLFloaterURLEntry* floater_url_entry = (LLFloaterURLEntry*)mURLEntryFloater.get();
if (floater_url_entry)
{
floater_url_entry->updateFromLandMediaPanel();
}
// This radial control is really just an inverse mapping to the boolean allow_navigate value.
// It is set as a radial merely for user readability.
mRadioNavigateControl->setSelectedIndex(! parcel->getMediaAllowNavigate());
mRadioNavigateControl->setEnabled( can_change_media );
mMediaURLFilterDomainEdit->setEnabled( can_change_media );
mMediaURLFilterAddButton->setEnabled( can_change_media );
mMediaURLFilterRemoveButton->setEnabled( can_change_media );
if (mURLFilterList)
{
mURLFilterList->setEnabled( can_change_media );
mURLFilterList->deleteAllItems();
LLSD list = parcel->getMediaURLFilterList();
for (LLSD::array_iterator i = list.beginArray(); i != list.endArray(); ++i)
//.........这里部分代码省略.........