91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

以前網(wǎng)上找到的一份源代碼,但是忘記下載鏈接了。。我自己完美運(yùn)行,所以上傳分享給大家。供大家參考,互相討論學(xué)習(xí)。

資源截圖

代碼片段和文件信息

#include?“addFriend.h“

AddFriendBox::AddFriendBox(links?*tlink
???const?QString?&myAccount
???QWidget?*parent/*?=0?*/)
???:?tempBox(2?parent)?link(tlink)
{
setWindowtitle(?tr(“add?Friend“)?);
setFixedSize(200?150);

message.kind?=?REQUEST_FRIEND;
//發(fā)送者是自己(這是廢話,呵呵)
message.sender?=?myAccount;

//setLabelName(“對(duì)方帳號(hào)“?“驗(yàn)證信息“);
setLabelName(tr(“other‘s?account“)?tr(“Authentication?information“));
connect(link?SIGNAL(newReplySignal(qint32))?this?SLOT(result(qint32)));
}

AddFriendBox::~AddFriendBox()
{

}

void?AddFriendBox::clickedOKButton()
{
TempStrings?temp;
temp?=?getInformation();

if(temp.one.isEmpty())
{
//QMessageBox::critical(this?“ERROR“?“對(duì)方帳號(hào)不能為空“);
QMessageBox::critical(this?tr(“Error“)
tr(“The?other‘s?account?can?not?be?empty“));
return;
}

message.receiver?=?temp.one;
message.text?=?temp.two;
//好友不能是你自己
if(message.sender?==?message.receiver)
{
QMessageBox::critical(this?tr(“Error“)
tr(“Your?friends?can‘t?be?your?own“));
return;
}
link->addFriendRequest(message);
setAllEnabled(false);
}

void?AddFriendBox::result(qint32?replyKind)
{
if(FRIEDN_NO_ACCOUNT?==?replyKind)
//QMessageBox::critical(this?“錯(cuò)誤“?“沒有這個(gè)用戶名“);
QMessageBox::critical(this?tr(“Error“)?
tr(“No?this?user?please?try?again“));

else?if(ALREAD_FRIENDS?==?replyKind)
//QMessageBox::critical(this?“錯(cuò)誤“?“他(她)們已經(jīng)是好友了或已經(jīng)發(fā)送了好友請求“);
QMessageBox::critical(this?tr(“Error“)?
tr(“They?are?already?good?friends?or?have?sended?the?friend?request“));
else?if(FRIEND_REQUESTED?==?replyKind)
{
//QMessageBox::critical(this?“恭喜“?“好友請求已經(jīng)發(fā)送,正在等待對(duì)方回復(fù)“);
QMessageBox::information(this?tr(“Congratulations“)
tr(“The?friend‘s?requestion?have?been?sended?is?waiting?for?reply“));
close();
}
setAllEnabled(true);
}

void?AddFriendBox::closeEvent(QCloseEvent?*event)
{
//因?yàn)閘ink的parent不是AddFriendBox,所以不會(huì)隨著的關(guān)閉而斷開連接,
//所以要手動(dòng)斷開連接
disconnect(link?SIGNAL(newReplySignal(qint32))?this?SLOT(result(qint32)));
}

評(píng)論

共有 條評(píng)論