本文整理汇总了C++中MythUISearchDialog::Create方法的典型用法代码示例。如果您正苦于以下问题:C++ MythUISearchDialog::Create方法的具体用法?C++ MythUISearchDialog::Create怎么用?C++ MythUISearchDialog::Create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythUISearchDialog
的用法示例。
在下文中一共展示了MythUISearchDialog::Create方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: searchStart
void GameUI::searchStart(void)
{
MythGenericTree *parent = m_gameUITree->GetCurrentNode()->getParent();
if (parent != NULL)
{
QStringList childList;
QList<MythGenericTree*>::iterator it;
QList<MythGenericTree*> *children = parent->getAllChildren();
for (it = children->begin(); it != children->end(); ++it)
{
MythGenericTree *child = *it;
childList << child->GetText();
}
MythScreenStack *popupStack =
GetMythMainWindow()->GetStack("popup stack");
MythUISearchDialog *searchDialog = new MythUISearchDialog(popupStack,
tr("Game Search"), childList, true, "");
if (searchDialog->Create())
{
connect(searchDialog, SIGNAL(haveResult(QString)),
SLOT(searchComplete(QString)));
popupStack->AddScreen(searchDialog);
}
else
delete searchDialog;
}
}
示例2: searchGenre
void EditMetadataDialog::searchGenre()
{
QString msg = tr("Select a Genre");
QStringList searchList = Metadata::fillFieldList("genre");
// load genre list
/*
searchList.clear();
for (int x = 0; x < genre_table_size; x++)
searchList.push_back(QString(genre_table[x]));
searchList.sort();
*/
QString s = m_metadata->Genre();
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythUISearchDialog *searchDlg = new MythUISearchDialog(popupStack, msg, searchList, false, s);
if (!searchDlg->Create())
{
delete searchDlg;
return;
}
connect(searchDlg, SIGNAL(haveResult(QString)), SLOT(setGenre(QString)));
popupStack->AddScreen(searchDlg);
}
示例3: searchAlbum
void Ripper::searchAlbum()
{
QString msg = tr("Select an Album");
QStringList searchList = MusicMetadata::fillFieldList("album");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythUISearchDialog *searchDlg = new MythUISearchDialog(popupStack, msg, searchList, false, "");
if (!searchDlg->Create())
{
delete searchDlg;
return;
}
connect(searchDlg, SIGNAL(haveResult(QString)), SLOT(setAlbum(QString)));
popupStack->AddScreen(searchDlg);
}
示例4: showList
void ImportNative::showList(const QString &caption, QString &value,
const char *slot)
{
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythUISearchDialog *searchDialog = new
MythUISearchDialog(popupStack, caption, m_searchList, true, value);
if (!searchDialog->Create())
{
delete searchDialog;
searchDialog = NULL;
return;
}
connect(searchDialog, SIGNAL(haveResult(QString)), this, slot);
popupStack->AddScreen(searchDialog);
}
示例5: searchCompilationArtist
void EditMetadataDialog::searchCompilationArtist()
{
QString msg = tr("Select a Compilation Artist");
QStringList searchList = Metadata::fillFieldList("compilation_artist");
QString s = m_metadata->CompilationArtist();
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythUISearchDialog *searchDlg = new MythUISearchDialog(popupStack, msg, searchList, false, s);
if (!searchDlg->Create())
{
delete searchDlg;
return;
}
connect(searchDlg, SIGNAL(haveResult(QString)), SLOT(setCompArtist(QString)));
popupStack->AddScreen(searchDlg);
}
示例6: chooseBackend
void Ripper::chooseBackend(void)
{
QStringList hostList;
// get a list of hosts with a directory defined for the 'Music' storage group
MSqlQuery query(MSqlQuery::InitCon());
QString sql = "SELECT DISTINCT hostname "
"FROM storagegroup "
"WHERE groupname = 'Music'";
if (!query.exec(sql) || !query.isActive())
MythDB::DBError("Ripper::chooseBackend get host list", query);
else
{
while(query.next())
{
hostList.append(query.value(0).toString());
}
}
if (hostList.isEmpty())
{
LOG(VB_GENERAL, LOG_ERR, "Ripper::chooseBackend: No backends found");
return;
}
QString msg = tr("Select where to save tracks");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythUISearchDialog *searchDlg = new MythUISearchDialog(popupStack, msg, hostList, false, "");
if (!searchDlg->Create())
{
delete searchDlg;
return;
}
connect(searchDlg, SIGNAL(haveResult(QString)), SLOT(setSaveHost(QString)));
popupStack->AddScreen(searchDlg);
}