本文整理汇总了C++中BuildFocusList函数的典型用法代码示例。如果您正苦于以下问题:C++ BuildFocusList函数的具体用法?C++ BuildFocusList怎么用?C++ BuildFocusList使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了BuildFocusList函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: locker
bool RSSEditor::Create(void)
{
QMutexLocker locker(&m_lock);
// Load the theme for this screen
bool foundtheme = LoadWindowFromXML("netvision-ui.xml", "rsseditor", this);
if (!foundtheme)
return false;
bool err = false;
UIUtilE::Assign(this, m_sites, "sites", &err);
UIUtilE::Assign(this, m_new, "new", &err);
UIUtilE::Assign(this, m_delete, "delete", &err);
UIUtilE::Assign(this, m_edit, "edit", &err);
UIUtilW::Assign(this, m_image, "preview");
UIUtilW::Assign(this, m_title, "title");
UIUtilW::Assign(this, m_desc, "description");
UIUtilW::Assign(this, m_url, "url");
UIUtilW::Assign(this, m_author, "author");
if (err)
{
LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'rsseditor'");
return false;
}
connect(m_sites, SIGNAL(itemClicked(MythUIButtonListItem*)),
this, SLOT(slotEditSite(void)));
connect(m_delete, SIGNAL(Clicked(void)),
SLOT(slotDeleteSite(void)));
connect(m_edit, SIGNAL(Clicked(void)),
SLOT(slotEditSite(void)));
connect(m_new, SIGNAL(Clicked(void)),
SLOT(slotNewSite(void)));
connect(m_sites, SIGNAL(itemSelected(MythUIButtonListItem *)),
SLOT(slotItemChanged(void)));
BuildFocusList();
loadData();
if (m_sites->GetCount() == 0)
SetFocusWidget(m_new);
else
slotItemChanged();
return true;
}
示例2: LoadWindowFromXML
bool ImportIconsWizard::Create()
{
if (!initialLoad(m_strChannelname))
return false;
bool foundtheme = false;
// Load the theme for this screen
foundtheme = LoadWindowFromXML("config-ui.xml", "iconimport", this);
if (!foundtheme)
return false;
m_iconsList = dynamic_cast<MythUIButtonList *>(GetChild("icons"));
m_manualEdit = dynamic_cast<MythUITextEdit *>(GetChild("manualsearch"));
m_nameText = dynamic_cast<MythUIText *>(GetChild("name"));
m_manualButton = dynamic_cast<MythUIButton *>(GetChild("search"));
m_skipButton = dynamic_cast<MythUIButton *>(GetChild("skip"));
m_statusText = dynamic_cast<MythUIText *>(GetChild("status"));
m_preview = dynamic_cast<MythUIImage *>(GetChild("preview"));
m_previewtitle = dynamic_cast<MythUIText *>(GetChild("previewtitle"));
if (!m_iconsList || !m_manualEdit || !m_nameText || !m_manualButton ||
!m_skipButton || !m_statusText)
{
LOG(VB_GENERAL, LOG_ERR,
"Unable to load window 'iconimport', missing required element(s)");
return false;
}
m_nameText->SetEnabled(false);
m_nameText->SetHelpText(tr("Name of the icon file"));
m_iconsList->SetHelpText(tr("List of possible icon files"));
m_manualEdit->SetHelpText(tr("Enter text here for the manual search"));
m_manualButton->SetHelpText(tr("Manually search for the text"));
m_skipButton->SetHelpText(tr("Skip this icon"));
connect(m_manualButton, SIGNAL(Clicked()), SLOT(manualSearch()));
connect(m_skipButton, SIGNAL(Clicked()), SLOT(skip()));
connect(m_iconsList, SIGNAL(itemClicked(MythUIButtonListItem *)),
SLOT(menuSelection(MythUIButtonListItem *)));
connect(m_iconsList, SIGNAL(itemSelected(MythUIButtonListItem *)),
SLOT(itemChanged(MythUIButtonListItem *)));
BuildFocusList();
enableControls(STATE_NORMAL);
return true;
}
示例3: QString
void ZMEvents::setGridLayout(int layout)
{
if (layout < 1 || layout > 3)
layout = 1;
if (layout == m_layout)
return;
if (m_eventGrid)
m_eventGrid->Reset();
m_layout = layout;
// iterate though the children showing/hiding them as appropriate
QString name;
QString layoutName = QString("layout%1").arg(layout);
QList<MythUIType *> *children = GetAllChildren();
for (int x = 0; x < children->size(); x++)
{
MythUIType *type = children->at(x);
name = type->objectName();
if (name.startsWith("layout"))
{
if (name.startsWith(layoutName))
type->SetVisible(true);
else
type->SetVisible(false);
}
}
// get the correct grid
m_eventGrid = dynamic_cast<MythUIButtonList *> (GetChild(layoutName + "_eventlist"));
if (m_eventGrid)
{
connect(m_eventGrid, SIGNAL(itemSelected( MythUIButtonListItem*)),
this, SLOT(eventChanged(MythUIButtonListItem*)));
connect(m_eventGrid, SIGNAL(itemClicked( MythUIButtonListItem*)),
this, SLOT(playPressed()));
connect(m_eventGrid, SIGNAL(itemVisible(MythUIButtonListItem*)),
this, SLOT(eventVisible(MythUIButtonListItem*)));
updateUIList();
BuildFocusList();
SetFocusWidget(m_eventGrid);
}
else
{
示例4: VERBOSE
bool EditRomInfoDialog::Create()
{
if (!LoadWindowFromXML("game-ui.xml", "edit_metadata", this))
return false;
bool err = false;
UIUtilE::Assign(this, m_gamenameEdit, "title_edit", &err);
UIUtilE::Assign(this, m_genreEdit, "genre_edit", &err);
UIUtilE::Assign(this, m_yearEdit, "year_edit", &err);
UIUtilE::Assign(this, m_countryEdit, "country_edit", &err);
UIUtilE::Assign(this, m_plotEdit, "description_edit", &err);
UIUtilE::Assign(this, m_publisherEdit, "publisher_edit", &err);
UIUtilE::Assign(this, m_favoriteCheck, "favorite_check", &err);
UIUtilE::Assign(this, m_screenshotButton, "screenshot_button", &err);
UIUtilE::Assign(this, m_screenshotText, "screenshot_text", &err);
UIUtilE::Assign(this, m_fanartButton, "fanart_button", &err);
UIUtilE::Assign(this, m_fanartText, "fanart_text", &err);
UIUtilE::Assign(this, m_boxartButton, "coverart_button", &err);
UIUtilE::Assign(this, m_boxartText, "coverart_text", &err);
UIUtilE::Assign(this, m_doneButton, "done_button", &err);
if (err)
{
VERBOSE(VB_IMPORTANT, "Cannot load screen 'edit_metadata'");
return false;
}
fillWidgets();
BuildFocusList();
connect(m_gamenameEdit, SIGNAL(valueChanged()), SLOT(SetGamename()));
connect(m_genreEdit, SIGNAL(valueChanged()), SLOT(SetGenre()));
connect(m_yearEdit, SIGNAL(valueChanged()), SLOT(SetYear()));
connect(m_countryEdit, SIGNAL(valueChanged()), SLOT(SetCountry()));
connect(m_plotEdit, SIGNAL(valueChanged()), SLOT(SetPlot()));
connect(m_publisherEdit, SIGNAL(valueChanged()), SLOT(SetPublisher()));
connect(m_favoriteCheck, SIGNAL(valueChanged()), SLOT(ToggleFavorite()));
connect(m_screenshotButton, SIGNAL(Clicked()), SLOT(FindScreenshot()));
connect(m_fanartButton, SIGNAL(Clicked()), SLOT(FindFanart()));
connect(m_boxartButton, SIGNAL(Clicked()), SLOT(FindBoxart()));
connect(m_doneButton, SIGNAL(Clicked()), SLOT(SaveAndExit()));
return true;
}
示例5: LoadWindowFromXML
bool ScreenSetup::Create()
{
bool foundtheme = false;
// Load the theme for this screen
foundtheme = LoadWindowFromXML("weather-ui.xml", "screen-setup", this);
if (!foundtheme)
return false;
m_helpText = dynamic_cast<MythUIText *> (GetChild("helptxt"));
m_activeList = dynamic_cast<MythUIButtonList *> (GetChild("activelist"));
m_inactiveList = dynamic_cast<MythUIButtonList *> (GetChild("inactivelist"));
m_finishButton = dynamic_cast<MythUIButton *> (GetChild("finishbutton"));
MythUIText *activeheader = dynamic_cast<MythUIText *> (GetChild("activehdr"));
if (activeheader)
activeheader->SetText(tr("Active Screens"));
MythUIText *inactiveheader = dynamic_cast<MythUIText *> (GetChild("inactivehdr"));
if (inactiveheader)
inactiveheader->SetText(tr("Inactive Screens"));
if (!m_activeList || !m_inactiveList || !m_finishButton || !m_helpText)
{
LOG(VB_GENERAL, LOG_ERR, "Theme is missing required elements.");
return false;
}
BuildFocusList();
connect(m_activeList, SIGNAL(itemSelected(MythUIButtonListItem *)),
this, SLOT(updateHelpText()));
connect(m_activeList, SIGNAL(itemClicked(MythUIButtonListItem *)),
this, SLOT(doListSelect(MythUIButtonListItem *)));
connect(m_inactiveList, SIGNAL(itemSelected(MythUIButtonListItem *)),
this, SLOT(updateHelpText()));
connect(m_inactiveList, SIGNAL(itemClicked(MythUIButtonListItem *)),
this, SLOT(doListSelect(MythUIButtonListItem *)));
SetFocusWidget(m_inactiveList);
m_finishButton->SetText(tr("Finish"));
connect(m_finishButton, SIGNAL(Clicked()), this, SLOT(saveData()));
loadData();
return true;
}
示例6: LoadWindowFromXML
bool RecordingSelector::Create(void)
{
bool foundtheme = false;
// Load the theme for this screen
foundtheme = LoadWindowFromXML("mytharchive-ui.xml", "recording_selector", this);
if (!foundtheme)
return false;
bool err = false;
UIUtilE::Assign(this, m_okButton, "ok_button", &err);
UIUtilE::Assign(this, m_cancelButton, "cancel_button", &err);
UIUtilE::Assign(this, m_categorySelector, "category_selector", &err);
UIUtilE::Assign(this, m_recordingButtonList, "recordinglist", &err);
UIUtilW::Assign(this, m_titleText, "progtitle", &err);
UIUtilW::Assign(this, m_datetimeText, "progdatetime", &err);
UIUtilW::Assign(this, m_descriptionText, "progdescription", &err);
UIUtilW::Assign(this, m_filesizeText, "filesize", &err);
UIUtilW::Assign(this, m_previewImage, "preview_image", &err);
UIUtilW::Assign(this, m_cutlistImage, "cutlist_image", &err);
if (err)
{
LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'recording_selector'");
return false;
}
connect(m_okButton, SIGNAL(Clicked()), this, SLOT(OKPressed()));
connect(m_cancelButton, SIGNAL(Clicked()), this, SLOT(cancelPressed()));
new MythUIButtonListItem(m_categorySelector, tr("All Recordings"));
connect(m_categorySelector, SIGNAL(itemSelected(MythUIButtonListItem *)),
this, SLOT(setCategory(MythUIButtonListItem *)));
connect(m_recordingButtonList, SIGNAL(itemSelected(MythUIButtonListItem *)),
this, SLOT(titleChanged(MythUIButtonListItem *)));
connect(m_recordingButtonList, SIGNAL(itemClicked(MythUIButtonListItem *)),
this, SLOT(toggleSelected(MythUIButtonListItem *)));
if (m_cutlistImage)
m_cutlistImage->Hide();
BuildFocusList();
SetFocusWidget(m_recordingButtonList);
return true;
}
示例7: connect
bool VisualizationSettings::Create()
{
bool err = false;
// Load the theme for this screen
if (!LoadWindowFromXML("musicsettings-ui.xml", "visualizationsettings", this))
return false;
UIUtilE::Assign(this, m_changeOnSongChange, "cycleonsongchange", &err);
UIUtilE::Assign(this, m_randomizeOrder, "randomizeorder", &err);
UIUtilE::Assign(this, m_scaleWidth, "scalewidth", &err);
UIUtilE::Assign(this, m_scaleHeight, "scaleheight", &err);
UIUtilE::Assign(this, m_saveButton, "save", &err);
UIUtilE::Assign(this, m_cancelButton, "cancel", &err);
int changeOnSongChange = gCoreContext->GetNumSetting("VisualCycleOnSongChange", 0);
if (changeOnSongChange == 1)
m_changeOnSongChange->SetCheckState(MythUIStateType::Full);
int randomizeorder = gCoreContext->GetNumSetting("VisualRandomize", 0);
if (randomizeorder == 1)
m_randomizeOrder->SetCheckState(MythUIStateType::Full);
m_scaleWidth->SetRange(1,2,1);
m_scaleWidth->SetValue(gCoreContext->GetNumSetting("VisualScaleWidth"));
m_scaleHeight->SetRange(1,2,1);
m_scaleHeight->SetValue(gCoreContext->GetNumSetting("VisualScaleHeight"));
m_changeOnSongChange->SetHelpText(tr("Change the visualizer when the song changes."));
m_randomizeOrder->SetHelpText(tr("On changing the visualizer pick a new one at random."));
m_scaleWidth->SetHelpText(tr("If set to \"2\", visualizations will be "
"scaled in half. Currently only used by "
"the goom visualization. Reduces CPU load "
"on slower machines."));
m_scaleHeight->SetHelpText(tr("If set to \"2\", visualizations will be "
"scaled in half. Currently only used by "
"the goom visualization. Reduces CPU load "
"on slower machines."));
m_cancelButton->SetHelpText(tr("Exit without saving settings"));
m_saveButton->SetHelpText(tr("Save settings and Exit"));
connect(m_saveButton, SIGNAL(Clicked()), this, SLOT(slotSave()));
connect(m_cancelButton, SIGNAL(Clicked()), this, SLOT(Close()));
BuildFocusList();
SetFocusWidget(m_cancelButton);
return true;
}
示例8: LoadWindowFromXML
bool VideoSetupWizard::Create()
{
bool foundtheme = false;
// Load the theme for this screen
foundtheme = LoadWindowFromXML("config-ui.xml", "videowizard", this);
if (!foundtheme)
return false;
m_playbackProfileButtonList =
dynamic_cast<MythUIButtonList *> (GetChild("playbackprofiles"));
m_testSDButton = dynamic_cast<MythUIButton *> (GetChild("testsd"));
m_testHDButton = dynamic_cast<MythUIButton *> (GetChild("testhd"));
m_nextButton = dynamic_cast<MythUIButton *> (GetChild("next"));
m_prevButton = dynamic_cast<MythUIButton *> (GetChild("previous"));
if (!m_playbackProfileButtonList || !m_testSDButton ||
!m_testHDButton ||!m_nextButton || !m_prevButton)
{
LOG(VB_GENERAL, LOG_ERR, "Theme is missing critical theme elements.");
return false;
}
m_playbackProfileButtonList->SetHelpText( tr("Select from one of the "
"preconfigured playback profiles. When "
"satisfied, you can test Standard Definition "
"and High Definition playback with the selected "
"profile before moving on.") );
m_testSDButton->SetHelpText( tr("Test your playback settings with Standard "
"Definition content. (480p)") );
m_testHDButton->SetHelpText( tr("Test your playback settings with High "
"Definition content (1080p).") );
m_nextButton->SetHelpText( tr("Save these changes and move on to the "
"next configuration step.") );
m_prevButton->SetHelpText(tr("Return to the previous configuration step."));
connect(m_testSDButton, SIGNAL(Clicked()), this, SLOT(testSDVideo()));
connect(m_testHDButton, SIGNAL(Clicked()), this, SLOT(testHDVideo()));
connect(m_nextButton, SIGNAL(Clicked()), this, SLOT(slotNext()));
connect(m_prevButton, SIGNAL(Clicked()), this, SLOT(slotPrevious()));
BuildFocusList();
loadData();
return true;
}
示例9: LoadWindowFromXML
bool TeaTime::Create(void)
{
bool foundtheme = false;
// Load the theme for this screen
foundtheme = LoadWindowFromXML("teatime-ui.xml", "teatime", this);
if (!foundtheme)
{
LOG_Tea(LOG_WARNING, "window teatime in teatime-ui.xml is missing.");
return false;
}
UIUtilW::Assign(this, m_CancelButton, "cancel");
UIUtilW::Assign(this, m_InfoText, "infotext");
m_InfoText->SetText(tr("Please select a timeout value."));
bool err = false;
UIUtilE::Assign(this, m_OkButton, "ok", &err);
UIUtilE::Assign(this, m_Setup, "setup", &err);
UIUtilE::Assign(this, m_TimeSpinbox, "time_span", &err);
if (err)
{
LOG_Tea(LOG_WARNING, "Theme is missing required elements.");
return false;
}
connect(m_CancelButton, SIGNAL(Clicked()), SLOT(Close()));
connect(m_OkButton, SIGNAL(Clicked()), SLOT(OkClicked()));
connect(m_Setup, SIGNAL(Clicked()), SLOT(Setup()));
int minutes = gCoreContext->GetSetting("Teatime_Minutes", "5").toInt();
m_TimeSpinbox->SetRange(0, 600, 1, 5);
m_TimeSpinbox->SetValue(minutes);
m_TimeSpinbox->SetVisible(true);
if (m_TimeData->hasActiveTimer())
{
startTimer(100);
}
BuildFocusList();
return true;
}
示例10: LOG
bool CustomPriority::Create()
{
if (!LoadWindowFromXML("schedule-ui.xml", "custompriority", this))
return false;
m_ruleList = dynamic_cast<MythUIButtonList *>(GetChild("rules"));
m_clauseList = dynamic_cast<MythUIButtonList *>(GetChild("clauses"));
m_prioritySpin = dynamic_cast<MythUISpinBox *>(GetChild("priority"));
m_titleEdit = dynamic_cast<MythUITextEdit *>(GetChild("title"));
m_descriptionEdit = dynamic_cast<MythUITextEdit *>(GetChild("description"));
m_addButton = dynamic_cast<MythUIButton *>(GetChild("add"));
m_installButton = dynamic_cast<MythUIButton *>(GetChild("install"));
m_testButton = dynamic_cast<MythUIButton *>(GetChild("test"));
m_deleteButton = dynamic_cast<MythUIButton *>(GetChild("delete"));
m_cancelButton = dynamic_cast<MythUIButton *>(GetChild("cancel"));
if (!m_ruleList || !m_clauseList || !m_prioritySpin || !m_titleEdit ||
!m_descriptionEdit || !m_addButton || !m_installButton ||
!m_testButton || !m_deleteButton || !m_cancelButton)
{
LOG(VB_GENERAL, LOG_ERR,
"CustomPriority, theme is missing required elements");
return false;
}
connect(m_ruleList, SIGNAL(itemSelected(MythUIButtonListItem *)),
SLOT(ruleChanged(MythUIButtonListItem *)));
connect(m_titleEdit, SIGNAL(valueChanged()), SLOT(textChanged()));
m_titleEdit->SetMaxLength(128);
connect(m_descriptionEdit, SIGNAL(valueChanged()), SLOT(textChanged()));
m_descriptionEdit->SetMaxLength(0);
connect(m_addButton, SIGNAL(Clicked()), SLOT(addClicked()));
connect(m_testButton, SIGNAL(Clicked()), SLOT(testClicked()));
connect(m_installButton, SIGNAL(Clicked()), SLOT(installClicked()));
connect(m_deleteButton, SIGNAL(Clicked()), SLOT(deleteClicked()));
connect(m_cancelButton, SIGNAL(Clicked()), SLOT(Close()));
loadData();
BuildFocusList();
return true;
}
示例11: LOG
bool FunctionDialog::Create()
{
if (!LoadWindowFromXML("zoneminder-ui.xml", "functionpopup", this))
return false;
bool err = false;
UIUtilE::Assign(this, m_captionText, "caption_text", &err);
UIUtilE::Assign(this, m_functionList, "function_list", &err);
UIUtilE::Assign(this, m_enabledCheck, "enable_check", &err);
UIUtilE::Assign(this, m_notificationCheck, "notification_check", &err);
UIUtilE::Assign(this, m_okButton, "ok_button", &err);
if (err)
{
LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'functionpopup'");
return false;
}
new MythUIButtonListItem(m_functionList, "Monitor");
new MythUIButtonListItem(m_functionList, "Modect");
new MythUIButtonListItem(m_functionList, "Nodect");
new MythUIButtonListItem(m_functionList, "Record");
new MythUIButtonListItem(m_functionList, "Mocord");
new MythUIButtonListItem(m_functionList, "None");
m_functionList->MoveToNamedPosition(m_monitor->function);
m_captionText->SetText(m_monitor->name);
connect(m_okButton, SIGNAL(Clicked()), this, SLOT(setMonitorFunction()));
if (m_monitor->enabled)
m_enabledCheck->SetCheckState(MythUIStateType::Full);
else
m_enabledCheck->SetCheckState(MythUIStateType::Off);
if (m_monitor->showNotifications)
m_notificationCheck->SetCheckState(MythUIStateType::Full);
else
m_notificationCheck->SetCheckState(MythUIStateType::Off);
BuildFocusList();
SetFocusWidget(m_functionList);
return true;
}
示例12: VERBOSE
/**
* \copydoc MythUIType::CopyFrom()
*/
void MythScreenType::CopyFrom(MythUIType *base)
{
MythScreenType *st = dynamic_cast<MythScreenType *>(base);
if (!st)
{
VERBOSE(VB_IMPORTANT, "ERROR, bad parsing");
return;
}
m_FullScreen = st->m_FullScreen;
m_IsDeleting = false;
MythUIType::CopyFrom(base);
BuildFocusList();
};
示例13: LoadWindowFromXML
bool ProgDetails::Create(void)
{
// Load the theme for this screen
bool foundtheme = LoadWindowFromXML("schedule-ui.xml", "programdetails", this);
if (!foundtheme)
return false;
// Initialise details list
if (!m_infoList.Create(true))
{
LOG(VB_GENERAL, LOG_ERR, "Cannot load 'Info buttonlist'");
return false;
}
BuildFocusList();
return true;
}
示例14: LOG
/**
* \copydoc MythUIType::CopyFrom()
*/
void MythScreenType::CopyFrom(MythUIType *base)
{
MythScreenType *st = dynamic_cast<MythScreenType *>(base);
if (!st)
{
LOG(VB_GENERAL, LOG_ERR, "ERROR, bad parsing");
return;
}
m_FullScreen = st->m_FullScreen;
m_IsDeleting = false;
MythUIType::CopyFrom(base);
ConnectDependants(true);
BuildFocusList();
};
示例15: LOG
bool ThemeChooser::Create(void)
{
// Load the theme for this screen
if (!LoadWindowFromXML("settings-ui.xml", "themechooser", this))
return false;
bool err = false;
UIUtilE::Assign(this, m_themes, "themes", &err);
UIUtilW::Assign(this, m_preview, "preview");
UIUtilW::Assign(this, m_fullPreviewStateType, "fullpreviewstate");
if (m_fullPreviewStateType)
{
MythUIGroup *state =
dynamic_cast<MythUIGroup*>
(m_fullPreviewStateType->GetChild("fullscreen"));
if (state)
{
m_fullScreenName =
dynamic_cast<MythUIText*>(state->GetChild("fullscreenname"));
m_fullScreenPreview =
dynamic_cast<MythUIImage*>(state->GetChild("fullscreenpreview"));
}
}
if (err)
{
LOG(VB_GENERAL, LOG_ERR, LOC + "Cannot load screen 'themechooser'");
return false;
}
connect(m_themes, SIGNAL(itemClicked(MythUIButtonListItem*)),
this, SLOT(saveAndReload(MythUIButtonListItem*)));
connect(m_themes, SIGNAL(itemSelected(MythUIButtonListItem*)),
this, SLOT(itemChanged(MythUIButtonListItem*)));
BuildFocusList();
LoadInBackground();
return true;
}