当前位置: 首页>>代码示例>>C++>>正文


C++ MessageComposer类代码示例

本文整理汇总了C++中MessageComposer的典型用法代码示例。如果您正苦于以下问题:C++ MessageComposer类的具体用法?C++ MessageComposer怎么用?C++ MessageComposer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了MessageComposer类的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
}
开发者ID:Naeren,项目名称:RetroShare,代码行数:26,代码来源:SecurityItem.cpp

示例2: newmessage

void MessageWindow::newmessage()
{
	MessageComposer *msgComposer = MessageComposer::newMsg();
	if (msgComposer == NULL) {
		return;
	}

	/* fill it in */
	msgComposer->show();
	msgComposer->activateWindow();

	/* window will destroy itself! */
}
开发者ID:Naeren,项目名称:RetroShare,代码行数:13,代码来源:MessageWindow.cpp

示例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! */
}
开发者ID:ShadowMyst,项目名称:RetroShare,代码行数:18,代码来源:MessageWidget.cpp

示例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! */
}
开发者ID:RedCraig,项目名称:retroshare,代码行数:18,代码来源:PeerItem.cpp

示例5: RsGxsId

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! */

}
开发者ID:rodneyrod,项目名称:RetroShare,代码行数:22,代码来源:IdDialog.cpp

示例6: copyLink

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! */
}
开发者ID:sehraf,项目名称:RetroShare,代码行数:22,代码来源:SharedFilesDialog.cpp

示例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! */
}
开发者ID:sehraf,项目名称:RetroShare,代码行数:23,代码来源:SharedFilesDialog.cpp

示例8: keyId

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();

}
开发者ID:ShadowMyst,项目名称:RetroShare,代码行数:24,代码来源:IdDetailsDialog.cpp

示例9: switch


//.........这里部分代码省略.........
                    channelUnknown.append(link.name());
                } else {
                    channelMsgUnknown.append(link.name());
                }
            }
            break;
        }

        case TYPE_SEARCH:
        {
#ifdef DEBUG_RSLINK
            std::cerr << " RetroShareLink::process SearchRequest : string : " << link.name().toStdString() << std::endl;
#endif

            MainWindow::showWindow(MainWindow::Search);
            SearchDialog *searchDialog = dynamic_cast<SearchDialog*>(MainWindow::getPage(MainWindow::Search));
            if (!searchDialog) {
                break;
            }

            searchDialog->searchKeywords(link.name());
            searchStarted.append(link.name());
            break;
        }

        case TYPE_MESSAGE:
        {
#ifdef DEBUG_RSLINK
            std::cerr << " RetroShareLink::process MessageRequest : id : " << link.hash().toStdString() << ", subject : " << link.name().toStdString() << std::endl;
#endif
            RsPeerDetails detail;
            if (rsPeers->getPeerDetails(link.hash().toStdString(), detail)) {
                if (detail.accept_connection || detail.id == rsPeers->getOwnId() || detail.id == rsPeers->getGPGOwnId()) {
                    MessageComposer *msg = MessageComposer::newMsg();
                    msg->addRecipient(MessageComposer::TO, detail.id, false);
                    if (link.subject().isEmpty() == false) {
                        msg->setTitleText(link.subject());
                    }
                    msg->show();
                    messageStarted.append(PeerDefs::nameWithLocation(detail));
                } else {
                    messageReceipientNotAccepted.append(PeerDefs::nameWithLocation(detail));
                }
            } else {
                messageReceipientUnknown.append(PeerDefs::rsidFromId(link.hash().toStdString()));
            }

            break;
        }

        default:
            std::cerr << " RetroShareLink::process unknown type: " << link.type() << std::endl;
            countUnknown++;
        }
    }

    int countProcessed = 0;
    int countError = 0;

    QList<QStringList*>::iterator listIt;
    for (listIt = processedList.begin(); listIt != processedList.end(); ++listIt) {
        countProcessed += (*listIt)->size();
    }
    for (listIt = errorList.begin(); listIt != errorList.end(); ++listIt) {
        countError += (*listIt)->size();
    }
开发者ID:kigeia,项目名称:retroshare,代码行数:67,代码来源:RetroShareLink.cpp


注:本文中的MessageComposer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。