本文整理汇总了C++中Email::setSubject方法的典型用法代码示例。如果您正苦于以下问题:C++ Email::setSubject方法的具体用法?C++ Email::setSubject怎么用?C++ Email::setSubject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Email
的用法示例。
在下文中一共展示了Email::setSubject方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addCommunications
void addCommunications(MobilePhone* mobilePhone)
{
Call* call;
SMS* sms;
Email* email;
PhoneNumber* phoneNumber;
EmailAddress* emailAddress;
call = new Call(1);
call->setDuration(QTime(0, 1, 0));
call->setDate(QDate::currentDate());
call->setStatus(AbstractCommunication::DIALLED_STATUS);
call->setIncoming(true);
phoneNumber = mobilePhone->getAddressBook().findPhoneNumber("0000000000");
if(phoneNumber != NULL)
call->addPhoneNumber(phoneNumber);
mobilePhone->getCommunicationManager().addCommunication(call);
sms = new SMS(2);
sms->setContent("Hello SMS !!");
sms->setDate(QDate::currentDate());
sms->setStatus(AbstractCommunication::SENT_STATUS);
sms->setIncoming(false);
sms->addPhoneNumber(new PhoneNumber("0000000001"));
mobilePhone->getCommunicationManager().addCommunication(sms);
email = new Email(3);
email->setSubject("Super Hello");
email->setBody("Hello Email !!");
email->setDate(QDate::currentDate());
email->setStatus(AbstractCommunication::RECEIVED_STATUS);
email->setIncoming(true);
emailAddress = mobilePhone->getAddressBook().findEmailAddress("[email protected]");
if(emailAddress != NULL)
email->addInFromList(emailAddress);
email->addInCCList(new EmailAddress("[email protected]"));
email->addInCCIList(new EmailAddress("[email protected]"));
email->addInToList(new EmailAddress("[email protected]"));
mobilePhone->getCommunicationManager().addCommunication(email);
}
示例2: main
int main() {
Email email;
email.setFromId("[email protected]");
email.setToId("[email protected]");
email.setSubject("hi there");
email.setBody("This is a test\nFucked up at that :v ");
email.setTimeNow();
email.serialiseEmail();
std::cout << email.getFromId() << " " << email.getToId() << " ";
printf("\n");
std::vector<Email> emailList;
fillEmail(emailList);
for(int i = 0; i < emailList.size(); i++) {
std::cout << emailList[i].getFromId() << "\n";
std::cout << emailList[i].getToId() << "\n";
std::cout << emailList[i].getSubject() << "\n";
std::cout << emailList[i].getBody() << "\n";
}
}