本文整理汇总了C++中MessageComposer::setMsgText方法的典型用法代码示例。如果您正苦于以下问题:C++ MessageComposer::setMsgText方法的具体用法?C++ MessageComposer::setMsgText怎么用?C++ MessageComposer::setMsgText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MessageComposer
的用法示例。
在下文中一共展示了MessageComposer::setMsgText方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sendLinkTo
void SharedFilesDialog::sendLinkTo()
{
copyLink();
/* create a message */
MessageComposer *nMsgDialog = MessageComposer::newMsg();
if (nMsgDialog == NULL) {
return;
}
/* fill it in
* files are receommended already
* just need to set peers
*/
std::cerr << "SharedFilesDialog::sendLinkTo()" << std::endl;
nMsgDialog->setTitleText(tr("RetroShare Link"));
nMsgDialog->setMsgText(RSLinkClipboard::toHtml(), true);
nMsgDialog->show();
/* window will destroy itself! */
}
示例2: recommendFilesToMsg
void SharedFilesDialog::recommendFilesToMsg()
{
std::list<DirDetails> files_info ;
model->getFileInfoFromIndexList(getSelected(),files_info);
if(files_info.empty())
return ;
/* create a message */
MessageComposer *nMsgDialog = MessageComposer::newMsg();
if (nMsgDialog == NULL) {
return;
}
nMsgDialog->setFileList(files_info) ;
nMsgDialog->setTitleText(tr("Recommendation(s)"));
nMsgDialog->setMsgText(tr("Recommendation(s)"));
nMsgDialog->show();
/* window will destroy itself! */
}
示例3: sendInvite
void IdDetailsDialog::sendInvite()
{
/* create a message */
MessageComposer *composer = MessageComposer::newMsg();
composer->setTitleText(tr("You have a friend invite"));
RsPeerId ownId = rsPeers->getOwnId();
RetroShareLink link = RetroShareLink::createCertificate(ownId);
RsGxsId keyId(ui->lineEdit_KeyId->text().toStdString());
QString sMsgText = inviteMessage();
sMsgText += "<br><br>";
sMsgText += tr("Respond now:") + "<br>";
sMsgText += link.toHtml() + "<br>";
sMsgText += "<br>";
sMsgText += tr("Thanks, <br>") + QString::fromUtf8(rsPeers->getGPGName(rsPeers->getGPGOwnId()).c_str());
composer->setMsgText(sMsgText);
composer->addRecipient(MessageComposer::TO, RsGxsId(keyId));
composer->show();
}