本文整理汇总了C++中Account::GetAccountName方法的典型用法代码示例。如果您正苦于以下问题:C++ Account::GetAccountName方法的具体用法?C++ Account::GetAccountName怎么用?C++ Account::GetAccountName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Account
的用法示例。
在下文中一共展示了Account::GetAccountName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnInit
void SignatureEditor::OnInit()
{
m_rich_text_editor = static_cast<RichTextEditor*>(GetWidgetByName("rich_text_editor"));
if (!m_rich_text_editor)
{
// no point in continuing
return Close();
}
Account* account = g_m2_engine->GetAccountById(m_account_id);
if (!account)
{
SetWidgetValue("apply_for_all_accounts", TRUE);
SetWidgetEnabled("apply_for_all_accounts", FALSE);
account = g_m2_engine->GetAccountById(g_m2_engine->GetAccountManager()->GetDefaultAccountId(AccountTypes::TYPE_CATEGORY_MAIL));
}
if (account)
{
// get the stored signature
BOOL isHTML;
OpString signature_content;
account->GetSignature(signature_content,isHTML);
// initialize the rich text editor
m_rich_text_editor->Init(this, isHTML, this, 0);
m_rich_text_editor->SetDirection(account->GetDefaultDirection(),FALSE);
m_rich_text_editor->SetMailContentAndUpdateView(signature_content, TRUE);
m_rich_text_editor->SetEmbeddedInDialog();
// change the explanation to contain the account name
OpMultilineEdit *explanation = static_cast<OpMultilineEdit*>(GetWidgetByName("explanation_label"));
if (explanation)
{
if (m_account_id != 0)
{
OpString explanation_text, account_name, final_text;
g_languageManager->GetString(Str::D_MAIL_SIGNATURE_EXPLANATION, explanation_text);
final_text.AppendFormat(explanation_text.CStr(), account->GetAccountName().CStr());
explanation->SetText(final_text.CStr());
explanation->SetWrapping(TRUE);
}
else
{
explanation->SetVisibility(FALSE);
}
}
}
else
{
Close();
}
}