本文整理汇总了C++中LLFloaterReporter::close方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFloaterReporter::close方法的具体用法?C++ LLFloaterReporter::close怎么用?C++ LLFloaterReporter::close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFloaterReporter
的用法示例。
在下文中一共展示了LLFloaterReporter::close方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onClickSend
// static
void LLFloaterReporter::onClickSend(void *userdata)
{
LLFloaterReporter *self = (LLFloaterReporter *)userdata;
if (self->mPicking)
{
closePickTool(self);
}
if(self->validateReport())
{
// only show copyright alert for abuse reports
if ( self->mReportType != BUG_REPORT )
{
if ( ! self->mCopyrightWarningSeen )
{
std::string details_lc = self->childGetText("details_edit");
LLStringUtil::toLower( details_lc );
std::string summary_lc = self->childGetText("summary_edit");
LLStringUtil::toLower( summary_lc );
if ( details_lc.find( "copyright" ) != std::string::npos ||
summary_lc.find( "copyright" ) != std::string::npos )
{
gViewerWindow->alertXml("HelpReportAbuseContainsCopyright");
self->mCopyrightWarningSeen = TRUE;
return;
};
};
};
LLUploadDialog::modalUploadDialog("Uploading...\n\nReport");
// *TODO don't upload image if checkbox isn't checked
std::string url = gAgent.getRegion()->getCapability("SendUserReport");
std::string sshot_url = gAgent.getRegion()->getCapability("SendUserReportWithScreenshot");
if(!url.empty() || !sshot_url.empty())
{
self->sendReportViaCaps(url, sshot_url, self->gatherReport());
self->close();
}
else
{
if(self->childGetValue("screen_check"))
{
self->childDisable("send_btn");
self->childDisable("cancel_btn");
// the callback from uploading the image calls sendReportViaLegacy()
self->uploadImage();
}
else
{
self->sendReportViaLegacy(self->gatherReport());
LLUploadDialog::modalUploadFinished();
self->close();
}
}
}
}
示例2: onClickCancel
// static
void LLFloaterReporter::onClickCancel(void *userdata)
{
LLFloaterReporter *self = (LLFloaterReporter *)userdata;
// reset flag in case the next report also contains this text
self->mCopyrightWarningSeen = FALSE;
if (self->mPicking)
{
closePickTool(self);
}
self->close();
}
示例3: uploadDoneCallback
// static
void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLUploadDialog::modalUploadFinished();
LLResourceData* data = (LLResourceData*)user_data;
if(result < 0)
{
LLStringUtil::format_map_t args;
std::string reason = std::string(LLAssetStorage::getErrorString(result));
args["[REASON]"] = reason;
gViewerWindow->alertXml("ErrorUploadingReportScreenshot", args);
std::string err_msg("There was a problem uploading a report screenshot");
err_msg += " due to the following reason: " + reason;
llwarns << err_msg << llendl;
return;
}
EReportType report_type = UNKNOWN_REPORT;
if (data->mPreferredLocation == -1)
{
report_type = BUG_REPORT;
}
else if (data->mPreferredLocation == -2)
{
report_type = COMPLAINT_REPORT;
}
else
{
llwarns << "Unknown report type : " << data->mPreferredLocation << llendl;
}
LLFloaterReporter *self = getReporter(report_type);
if (self)
{
self->mScreenID = uuid;
llinfos << "Got screen shot " << uuid << llendl;
self->sendReportViaLegacy(self->gatherReport());
self->close();
}
}
示例4: uploadDoneCallback
// static
void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLUploadDialog::modalUploadFinished();
LLResourceData* data = (LLResourceData*)user_data;
if(result < 0)
{
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(result));
LLNotificationsUtil::add("ErrorUploadingReportScreenshot", args);
std::string err_msg("There was a problem uploading a report screenshot");
err_msg += " due to the following reason: " + args["REASON"].asString();
llwarns << err_msg << llendl;
return;
}
EReportType report_type = UNKNOWN_REPORT;
if (data->mPreferredLocation == LLResourceData::INVALID_LOCATION)
{
report_type = COMPLAINT_REPORT;
}
else
{
llwarns << "Unknown report type : " << data->mPreferredLocation << llendl;
}
LLFloaterReporter *self = getInstance();
if (self)
{
self->mScreenID = uuid;
llinfos << "Got screen shot " << uuid << llendl;
self->sendReportViaLegacy(self->gatherReport());
self->close();
}
}
示例5: onClickSend
// static
void LLFloaterReporter::onClickSend(void *userdata)
{
LLFloaterReporter *self = (LLFloaterReporter *)userdata;
if (self->mPicking)
{
closePickTool(self);
}
if(self->validateReport())
{
const int IP_CONTENT_REMOVAL = 66;
const int IP_PERMISSONS_EXPLOIT = 37;
LLComboBox* combo = self->getChild<LLComboBox>( "category_combo");
int category_value = combo->getSelectedValue().asInteger();
if ( ! self->mCopyrightWarningSeen )
{
std::string details_lc = self->getChild<LLUICtrl>("details_edit")->getValue().asString();
LLStringUtil::toLower( details_lc );
std::string summary_lc = self->getChild<LLUICtrl>("summary_edit")->getValue().asString();
LLStringUtil::toLower( summary_lc );
if ( details_lc.find( "copyright" ) != std::string::npos ||
summary_lc.find( "copyright" ) != std::string::npos ||
category_value == IP_CONTENT_REMOVAL ||
category_value == IP_PERMISSONS_EXPLOIT)
{
LLNotificationsUtil::add("HelpReportAbuseContainsCopyright");
self->mCopyrightWarningSeen = TRUE;
return;
}
}
else if (category_value == IP_CONTENT_REMOVAL)
{
// IP_CONTENT_REMOVAL *always* shows the dialog -
// ergo you can never send that abuse report type.
LLNotificationsUtil::add("HelpReportAbuseContainsCopyright");
return;
}
LLUploadDialog::modalUploadDialog(LLTrans::getString("uploading_abuse_report"));
// *TODO don't upload image if checkbox isn't checked
std::string url = gAgent.getRegion()->getCapability("SendUserReport");
std::string sshot_url = gAgent.getRegion()->getCapability("SendUserReportWithScreenshot");
if(!url.empty() || !sshot_url.empty())
{
self->sendReportViaCaps(url, sshot_url, self->gatherReport());
self->close();
}
else
{
if(self->getChild<LLUICtrl>("screen_check")->getValue())
{
self->getChildView("send_btn")->setEnabled(FALSE);
self->getChildView("cancel_btn")->setEnabled(FALSE);
// the callback from uploading the image calls sendReportViaLegacy()
self->uploadImage();
}
else
{
self->sendReportViaLegacy(self->gatherReport());
LLUploadDialog::modalUploadFinished();
self->close();
}
}
}
}