本文整理汇总了C++中MessageComposer::show方法的典型用法代码示例。如果您正苦于以下问题:C++ MessageComposer::show方法的具体用法?C++ MessageComposer::show怎么用?C++ MessageComposer::show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MessageComposer
的用法示例。
在下文中一共展示了MessageComposer::show方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sendMsg
void SecurityItem::sendMsg()
{
#ifdef DEBUG_ITEM
std::cerr << "SecurityItem::sendMsg()";
std::cerr << std::endl;
#endif
std::cerr << __PRETTY_FUNCTION__ << ": suspended for now." << std::endl;
#ifdef SUSPENDED
MessageComposer *nMsgDialog = MessageComposer::newMsg();
if (nMsgDialog == NULL) {
return;
}
RsPeerId peerId ;
if(rsMsgs->getDistantMessagePeerId(mGpgId,peerId))
{
nMsgDialog->addRecipient(MessageComposer::TO, peerId, mGpgId);
nMsgDialog->show();
nMsgDialog->activateWindow();
}
/* window will destroy itself! */
#endif
}
示例2: newmessage
void MessageWindow::newmessage()
{
MessageComposer *msgComposer = MessageComposer::newMsg();
if (msgComposer == NULL) {
return;
}
/* fill it in */
msgComposer->show();
msgComposer->activateWindow();
/* window will destroy itself! */
}
示例3: forward
void MessageWidget::forward()
{
/* put msg on msgBoard, and switch to it. */
if (currMsgId.empty()) {
return;
}
MessageComposer *msgComposer = MessageComposer::forwardMsg(currMsgId);
if (msgComposer == NULL) {
return;
}
msgComposer->show();
msgComposer->activateWindow();
/* window will destroy itself! */
}
示例4: sendMsg
void PeerItem::sendMsg()
{
#ifdef DEBUG_ITEM
std::cerr << "PeerItem::sendMsg()";
std::cerr << std::endl;
#endif
MessageComposer *nMsgDialog = MessageComposer::newMsg();
if (nMsgDialog == NULL) {
return;
}
nMsgDialog->addRecipient(MessageComposer::TO, mPeerId, false);
nMsgDialog->show();
nMsgDialog->activateWindow();
/* window will destroy itself! */
}
示例5: sendMsg
void IdDialog::sendMsg()
{
QTreeWidgetItem *item = ui->idTreeWidget->currentItem();
if (!item)
{
return;
}
MessageComposer *nMsgDialog = MessageComposer::newMsg();
if (nMsgDialog == NULL) {
return;
}
std::string keyId = item->text(RSID_COL_KEYID).toStdString();
nMsgDialog->addRecipient(MessageComposer::TO, RsGxsId(keyId));
nMsgDialog->show();
nMsgDialog->activateWindow();
/* window will destroy itself! */
}
示例6: 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! */
}
示例7: 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! */
}
示例8: 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();
}
示例9: mb
//.........这里部分代码省略.........
personFailed.append(PeerDefs::rsid(link.name().toUtf8().constData(), link.hash().toStdString()));
break;
}
personNotFound.append(PeerDefs::rsid(link.name().toUtf8().constData(), link.hash().toStdString()));
break;
}
case TYPE_FORUM:
{
#ifdef DEBUG_RSLINK
std::cerr << " RetroShareLink::process ForumRequest : name : " << link.name().toStdString() << ". id : " << link.hash().toStdString() << ". msgId : " << link.msgId().toStdString() << std::endl;
#endif
ForumInfo fi;
if (!rsForums->getForumInfo(link.id().toStdString(), fi)) {
if (link.msgId().isEmpty()) {
forumUnknown.append(link.name());
} else {
forumMsgUnknown.append(link.name());
}
break;
}
ForumMsgInfo msg;
if (!link.msgId().isEmpty()) {
if (!rsForums->getForumMessage(fi.forumId, link.msgId().toStdString(), msg)) {
forumMsgUnknown.append(link.name());
break;
}
}
MainWindow::showWindow(MainWindow::Forums);
ForumsDialog *forumsDialog = dynamic_cast<ForumsDialog*>(MainWindow::getPage(MainWindow::Forums));
if (!forumsDialog) {
return false;
}
if (forumsDialog->navigate(fi.forumId, msg.msgId)) {
if (link.msgId().isEmpty()) {
forumFound.append(link.name());
} else {
forumMsgFound.append(link.name());
}
} else {
if (link.msgId().isEmpty()) {
forumUnknown.append(link.name());
} else {
forumMsgUnknown.append(link.name());
}
}
break;
}
case TYPE_CHANNEL:
{
#ifdef DEBUG_RSLINK
std::cerr << " RetroShareLink::process ChannelRequest : name : " << link.name().toStdString() << ". id : " << link.hash().toStdString() << ". msgId : " << link.msgId().toStdString() << std::endl;
#endif
ChannelInfo ci;
if (!rsChannels->getChannelInfo(link.id().toStdString(), ci)) {
if (link.msgId().isEmpty()) {
channelUnknown.append(link.name());
} else {