本文整理汇总了C++中MythTextInputDialog::Create方法的典型用法代码示例。如果您正苦于以下问题:C++ MythTextInputDialog::Create方法的具体用法?C++ MythTextInputDialog::Create怎么用?C++ MythTextInputDialog::Create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythTextInputDialog
的用法示例。
在下文中一共展示了MythTextInputDialog::Create方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleMkDir
void IconView::HandleMkDir(void)
{
QString folderName = tr("New Folder");
QString message = tr("Create New Folder");
MythTextInputDialog *dialog = new MythTextInputDialog(m_popupStack, message);
if (dialog->Create())
m_popupStack->AddScreen(dialog);
connect(dialog, SIGNAL(haveResult(QString)),
SLOT(DoMkDir(QString)), Qt::QueuedConnection);
}
示例2: slotEnterURL
void MythBrowser::slotEnterURL(void)
{
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
QString message = tr("Enter URL");
MythTextInputDialog *dialog = new MythTextInputDialog(popupStack, message);
if (dialog->Create())
popupStack->AddScreen(dialog);
connect(dialog, SIGNAL(haveResult(QString)),
SLOT(slotOpenURL(QString)), Qt::QueuedConnection);
}
示例3: checkPinCode
/** \brief Queries the user for a password to enter a part of MythTV
* restricted by a password.
*
* \param timestamp_setting time settings to be checked
* \param password_setting password to be checked
* \param text the message text to be displayed
* \return true if password checks out or is not needed.
*/
bool MythThemedMenu::checkPinCode(const QString &password_setting)
{
QString timestamp_setting = QString("%1Time").arg(password_setting);
QDateTime curr_time = QDateTime::currentDateTime();
QString last_time_stamp = GetMythDB()->GetSetting(timestamp_setting);
QString password = GetMythDB()->GetSetting(password_setting);
// Password empty? Then skip asking for it
if (password.isEmpty())
return true;
if (last_time_stamp.length() < 1)
{
LOG(VB_GENERAL, LOG_ERR,
"MythThemedMenu: Could not read password/pin time stamp.\n"
"This is only an issue if it happens repeatedly.");
}
else
{
QDateTime last_time = QDateTime::fromString(last_time_stamp,
Qt::TextDate);
if (last_time.secsTo(curr_time) < 120)
{
last_time_stamp = curr_time.toString(Qt::TextDate);
GetMythDB()->SetSetting(timestamp_setting, last_time_stamp);
GetMythDB()->SaveSetting(timestamp_setting, last_time_stamp);
return true;
}
}
LOG(VB_GENERAL, LOG_INFO, QString("Using Password: %1")
.arg(password_setting));
QString text = tr("Enter password:");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythTextInputDialog *dialog =
new MythTextInputDialog(popupStack, text, FilterNone, true);
if (dialog->Create())
{
dialog->SetReturnEvent(this, "password");
popupStack->AddScreen(dialog);
}
else
delete dialog;
return false;
}
示例4: NewCategoryPopup
void EditMetadataDialog::NewCategoryPopup()
{
QString message = tr("Enter new category");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythTextInputDialog *categorydialog =
new MythTextInputDialog(popupStack,message);
if (categorydialog->Create())
{
categorydialog->SetReturnEvent(this, CEID_NEWCATEGORY);
popupStack->AddScreen(categorydialog);
}
}
示例5: PromptForPassword
void BackendSelection::PromptForPassword(void)
{
QString message = tr("Please enter the backend access PIN");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythTextInputDialog *pwDialog = new MythTextInputDialog(popupStack,
message,
FilterNone,
true);
if (pwDialog->Create())
{
pwDialog->SetReturnEvent(this, "password");
popupStack->AddScreen(pwDialog);
}
else
delete pwDialog;
}
示例6: HandleRename
void IconView::HandleRename(void)
{
ThumbItem *thumbitem = GetCurrentThumb();
if (!thumbitem)
return;
QString folderName = thumbitem->GetName();
QString message = tr("Rename");
MythTextInputDialog *dialog = new MythTextInputDialog(m_popupStack,
message, FilterNone, false, folderName);
if (dialog->Create())
m_popupStack->AddScreen(dialog);
connect(dialog, SIGNAL(haveResult(QString)),
SLOT(DoRename(QString)), Qt::QueuedConnection);
}
示例7: customEvent
void ProgramRecPriority::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
QString resultid = dce->GetId();
QString resulttext = dce->GetResultText();
int buttonnum = dce->GetResult();
if (resultid == "menu")
{
if (resulttext == tr("Increase Priority"))
{
changeRecPriority(1);
}
else if (resulttext == tr("Decrease Priority"))
{
changeRecPriority(-1);
}
else if (resulttext == tr("Sort"))
{
showSortMenu();
}
else if (resulttext == tr("Program Details"))
{
ShowDetails();
}
else if (resulttext == tr("Upcoming"))
{
saveRecPriority();
ShowUpcoming();
}
else if (resulttext == tr("Custom Edit"))
{
saveRecPriority();
EditCustom();
}
else if (resulttext == tr("Delete Rule"))
{
saveRecPriority();
remove();
}
else if (resulttext == tr("New Template"))
{
MythScreenStack *popupStack =
GetMythMainWindow()->GetStack("popup stack");
MythTextInputDialog *textInput =
new MythTextInputDialog(popupStack,
tr("Template Name"));
if (textInput->Create())
{
textInput->SetReturnEvent(this, "templatecat");
popupStack->AddScreen(textInput);
}
}
}
else if (resultid == "sortmenu")
{
if (resulttext == tr("Reverse Sort Order"))
{
m_reverseSort = !m_reverseSort;
SortList();
}
else if (resulttext == tr("Sort By Title"))
{
if (m_sortType != byTitle)
{
m_sortType = byTitle;
m_reverseSort = false;
}
else
m_reverseSort = !m_reverseSort;
SortList();
}
else if (resulttext == tr("Sort By Priority"))
{
if (m_sortType != byRecPriority)
{
m_sortType = byRecPriority;
m_reverseSort = false;
}
else
m_reverseSort = !m_reverseSort;
SortList();
}
else if (resulttext == tr("Sort By Type"))
{
if (m_sortType != byRecType)
{
m_sortType = byRecType;
m_reverseSort = false;
}
else
m_reverseSort = !m_reverseSort;
SortList();
}
else if (resulttext == tr("Sort By Count"))
{
if (m_sortType != byCount)
//.........这里部分代码省略.........