本文整理汇总了C++中BMenuField::SetLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ BMenuField::SetLabel方法的具体用法?C++ BMenuField::SetLabel怎么用?C++ BMenuField::SetLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BMenuField
的用法示例。
在下文中一共展示了BMenuField::SetLabel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: languageChanged
/**
* @brief Called when language setting is changed by LocaleKit.
*/
void BePreferencesDlg::languageChanged()
{
NativeStringLoader* nsl = CoveredCalcApp::GetInstance();
// dialog title
SetTitle(nsl->LoadNativeString(NSID_PREFERENCES_TITLE));
// LangBox
BBox* langBox = dynamic_cast<BBox*>(FindView(PREFERENCES_DIALOG_VIEW_LANG_BOX));
if (NULL != langBox)
{
langBox->SetLabel(nsl->LoadNativeString(NSID_PREFERENCES_GROUP_LANGUAGE));
}
// LangPopup
BMenuField* langPopup = dynamic_cast<BMenuField*>(FindView(PREFERENCES_DIALOG_VIEW_LANG_POPUP));
if (NULL != langPopup)
{
langPopup->SetLabel(nsl->LoadNativeString(NSID_PREFERENCES_LANGUAGE));
}
// LangNotice
BTextView* langNotice = dynamic_cast<BTextView*>(FindView(PREFERENCES_DIALOG_VIEW_LANG_NOTICE));
if (NULL != langNotice)
{
langNotice->SetText(nsl->LoadNativeString(NSID_PREFERENCES_LANGUAGE_MESSAGE));
}
// KeyMappingBox
BBox* keyMappingBox = dynamic_cast<BBox*>(FindView(PREFERENCES_DIALOG_VIEW_KEYMAPPING_BOX));
if (NULL != keyMappingBox)
{
keyMappingBox->SetLabel(nsl->LoadNativeString(NSID_PREFERENCES_GROUP_KEYMAP));
}
// KeyMappingPopup
BMenuField* keyMappingPopup = dynamic_cast<BMenuField*>(FindView(PREFERENCES_DIALOG_VIEW_KEYMAPPING_POPUP));
if (NULL != keyMappingPopup)
{
keyMappingPopup->SetLabel(nsl->LoadNativeString(NSID_PREFERENCES_KEYMAP));
}
// EditKeyMappingButton
BButton* editKeymapButton = dynamic_cast<BButton*>(FindView(PREFERENCES_DIALOG_VIEW_EDIT_KEYMAPPING_BUTTON));
if (NULL != editKeymapButton)
{
editKeymapButton->SetLabel(nsl->LoadNativeString(NSID_PREFERENCES_EDIT_KEYMAP));
}
// DuplicateKeyMappingButton
BButton* dupKeymapButton = dynamic_cast<BButton*>(FindView(PREFERENCES_DIALOG_VIEW_DUPLICATE_KEYMAPPING_BUTTON));
if (NULL != dupKeymapButton)
{
dupKeymapButton->SetLabel(nsl->LoadNativeString(NSID_PREFERENCES_DUPLICATE_KEYMAP));
}
// DeleteKeyMappingButton
BButton* delKeymapButton = dynamic_cast<BButton*>(FindView(PREFERENCES_DIALOG_VIEW_DELETE_KEYMAPPING_BUTTON));
if (NULL != delKeymapButton)
{
delKeymapButton->SetLabel(nsl->LoadNativeString(NSID_PREFERENCES_DELETE_KEYMAP));
}
// CancelButton
BButton* cancelButton = dynamic_cast<BButton*>(FindView(PREFERENCES_DIALOG_VIEW_CANCEL));
if (NULL != cancelButton)
{
cancelButton->SetLabel(nsl->LoadNativeString(NSID_PREFERENCES_OK));
}
// OKButton
BButton* okButton = dynamic_cast<BButton*>(FindView(PREFERENCES_DIALOG_VIEW_OK));
if (NULL != okButton)
{
okButton->SetLabel(nsl->LoadNativeString(NSID_PREFERENCES_CANCEL));
}
}