本文整理汇总了C++中CGUIDialogYesNo::IsConfirmed方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIDialogYesNo::IsConfirmed方法的具体用法?C++ CGUIDialogYesNo::IsConfirmed怎么用?C++ CGUIDialogYesNo::IsConfirmed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIDialogYesNo
的用法示例。
在下文中一共展示了CGUIDialogYesNo::IsConfirmed方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StartRecordFile
bool CGUIWindowPVRCommon::StartRecordFile(CFileItem *item)
{
if (!item->HasEPGInfoTag())
return false;
CEpgInfoTag *tag = item->GetEPGInfoTag();
if (!tag || !tag->HasPVRChannel())
return false;
CPVRTimerInfoTag *timer = g_PVRTimers->GetMatch(item);
if (timer)
{
CGUIDialogOK::ShowAndGetInput(19033,19034,0,0);
return false;
}
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (!pDialog)
return false;
pDialog->SetHeading(264);
pDialog->SetLine(0, tag->PVRChannelName());
pDialog->SetLine(1, "");
pDialog->SetLine(2, tag->Title());
pDialog->DoModal();
if (!pDialog->IsConfirmed())
return false;
CPVRTimerInfoTag *newtimer = CPVRTimerInfoTag::CreateFromEpg(*tag);
CFileItem *newTimerItem = new CFileItem(*newtimer);
return g_PVRTimers->AddTimer(*newTimerItem);
}
示例2: yesno
bool Dialog::yesno(const String& heading, const String& line1,
const String& line2,
const String& line3,
const String& nolabel,
const String& yeslabel) throw (WindowException)
{
DelayedCallGuard dcguard(languageHook);
const int window = WINDOW_DIALOG_YES_NO;
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(window);
if (pDialog == NULL)
throw WindowException("Error: Window is NULL, this is not possible :-)");
// get lines, last 4 lines are optional.
if (!heading.empty())
pDialog->SetHeading(heading);
if (!line1.empty())
pDialog->SetLine(0, line1);
if (!line2.empty())
pDialog->SetLine(1, line2);
if (!line3.empty())
pDialog->SetLine(2, line3);
if (!nolabel.empty())
pDialog->SetChoice(0,nolabel);
if (!yeslabel.empty())
pDialog->SetChoice(1,yeslabel);
//send message and wait for user input
XBMCWaitForThreadMessage(TMSG_DIALOG_DOMODAL, window, ACTIVE_WINDOW);
return pDialog->IsConfirmed();
}
示例3: ActionDeleteTimer
bool CGUIWindowPVRCommon::ActionDeleteTimer(CFileItem *item)
{
bool bReturn = false;
/* check if the timer tag is valid */
CPVRTimerInfoTag *timerTag = item->GetPVRTimerInfoTag();
if (!timerTag || timerTag->ClientIndex() < 0)
return bReturn;
/* show a confirmation dialog */
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (!pDialog)
return false;
pDialog->SetHeading(122);
pDialog->SetLine(0, 19040);
pDialog->SetLine(1, "");
pDialog->SetLine(2, timerTag->Title());
pDialog->DoModal();
/* prompt for the user's confirmation */
if (!pDialog->IsConfirmed())
return bReturn;
/* delete the timer */
if (CPVRManager::GetTimers()->DeleteTimer(*item))
{
UpdateData();
bReturn = true;
}
return bReturn;
}
示例4: yesno
bool Dialog::yesno(const String& heading, const String& line1,
const String& line2,
const String& line3,
const String& nolabel,
const String& yeslabel,
int autoclose)
{
DelayedCallGuard dcguard(languageHook);
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (pDialog == NULL)
throw WindowException("Error: Window is NULL, this is not possible :-)");
// get lines, last 4 lines are optional.
if (!heading.empty())
pDialog->SetHeading(CVariant{heading});
if (!line1.empty())
pDialog->SetLine(0, CVariant{line1});
if (!line2.empty())
pDialog->SetLine(1, CVariant{line2});
if (!line3.empty())
pDialog->SetLine(2, CVariant{line3});
if (!nolabel.empty())
pDialog->SetChoice(0, CVariant{nolabel});
if (!yeslabel.empty())
pDialog->SetChoice(1, CVariant{yeslabel});
if (autoclose > 0)
pDialog->SetAutoClose(autoclose);
pDialog->Open();
return pDialog->IsConfirmed();
}
示例5: DeleteItem
bool CFileUtils::DeleteItem(const CFileItemPtr &item, bool force)
{
if (!item || item->IsParentFolder())
return false;
CGUIDialogYesNo* pDialog = g_windowManager.GetWindow<CGUIDialogYesNo>(WINDOW_DIALOG_YES_NO);
if (!force && pDialog)
{
pDialog->SetHeading(CVariant{122});
pDialog->SetLine(0, CVariant{125});
pDialog->SetLine(1, CVariant{CURL(item->GetPath()).GetWithoutUserDetails()});
pDialog->SetLine(2, CVariant{""});
pDialog->Open();
if (!pDialog->IsConfirmed()) return false;
}
// Create a temporary item list containing the file/folder for deletion
CFileItemPtr pItemTemp(new CFileItem(*item));
pItemTemp->Select(true);
CFileItemList items;
items.Add(pItemTemp);
// grab the real filemanager window, set up the progress bar,
// and process the delete action
CFileOperationJob op(CFileOperationJob::ActionDelete, items, "");
return op.DoWork();
}
示例6: ShowAndGetInput
int CGUIDialogYesNo::ShowAndGetInput(CVariant heading, CVariant text, CVariant noLabel, CVariant yesLabel, CVariant customLabel, unsigned int autoCloseTime)
{
CGUIDialogYesNo *dialog = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogYesNo>(WINDOW_DIALOG_YES_NO);
if (!dialog)
return false;
dialog->SetHeading(heading);
dialog->SetText(text);
if (autoCloseTime)
dialog->SetAutoClose(autoCloseTime);
dialog->m_bCanceled = false;
dialog->m_bCustom = false;
dialog->SetChoice(0, !noLabel.empty() ? noLabel : 106);
dialog->SetChoice(1, !yesLabel.empty() ? yesLabel : 107);
dialog->SetChoice(2, customLabel); // Button only visible when label is not empty
dialog->Open();
if (dialog->m_bCanceled)
return -1;
else if (dialog->m_bCustom)
return 2;
else if (dialog->IsConfirmed())
return 1;
else
return 0;
}
示例7: ActionButtonDeleteGroup
bool CGUIDialogPVRGroupManager::ActionButtonDeleteGroup(CGUIMessage &message)
{
bool bReturn = false;
unsigned int iControl = message.GetSenderId();
if (iControl == BUTTON_DELGROUP)
{
if (!m_selectedGroup)
return bReturn;
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (!pDialog)
return bReturn;
pDialog->SetHeading(117);
pDialog->SetLine(0, "");
pDialog->SetLine(1, m_selectedGroup->GroupName());
pDialog->SetLine(2, "");
pDialog->DoModal();
if (pDialog->IsConfirmed())
{
if (((CPVRChannelGroups *) g_PVRChannelGroups->Get(m_bIsRadio))->DeleteGroup(*m_selectedGroup))
Update();
}
bReturn = true;
}
return bReturn;
}
示例8: ActionButtonDeleteGroup
bool CGUIDialogPVRGroupManager::ActionButtonDeleteGroup(CGUIMessage &message)
{
bool bReturn = false;
unsigned int iControl = message.GetSenderId();
if (iControl == BUTTON_DELGROUP)
{
if (!m_selectedGroup)
return bReturn;
CGUIDialogYesNo* pDialog = g_windowManager.GetWindow<CGUIDialogYesNo>(WINDOW_DIALOG_YES_NO);
if (!pDialog)
return bReturn;
pDialog->SetHeading(CVariant{117});
pDialog->SetLine(0, CVariant{""});
pDialog->SetLine(1, CVariant{m_selectedGroup->GroupName()});
pDialog->SetLine(2, CVariant{""});
pDialog->Open();
if (pDialog->IsConfirmed())
{
if (static_cast<CPVRChannelGroups*>(CServiceBroker::GetPVRManager().ChannelGroups()->Get(m_bIsRadio))->DeleteGroup(*m_selectedGroup))
Update();
}
bReturn = true;
}
return bReturn;
}
示例9: OnClickButtonRadioTV
bool CGUIDialogPVRChannelManager::OnClickButtonRadioTV(CGUIMessage &message)
{
if (m_bContainsChanges)
{
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (!pDialog)
return true;
pDialog->SetHeading(20052);
pDialog->SetLine(0, "");
pDialog->SetLine(1, 19212);
pDialog->SetLine(2, 20103);
pDialog->DoModal();
if (pDialog->IsConfirmed())
SaveList();
}
m_iSelected = 0;
m_bMovingMode = false;
m_bAllowNewChannel = false;
m_bContainsChanges = false;
m_bIsRadio = !m_bIsRadio;
SetProperty("IsRadio", m_bIsRadio ? "true" : "");
Update();
SetData(m_iSelected);
return true;
}
示例10: ActionDeleteRecording
bool CGUIWindowPVRCommon::ActionDeleteRecording(CFileItem *item)
{
bool bReturn = false;
/* check if the recording tag is valid */
CPVRRecording *recTag = (CPVRRecording *) item->GetPVRRecordingInfoTag();
if (!recTag || recTag->m_strRecordingId.IsEmpty())
return bReturn;
/* show a confirmation dialog */
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (!pDialog)
return bReturn;
pDialog->SetHeading(122);
pDialog->SetLine(0, 19043);
pDialog->SetLine(1, "");
pDialog->SetLine(2, recTag->m_strTitle);
pDialog->DoModal();
/* prompt for the user's confirmation */
if (!pDialog->IsConfirmed())
return bReturn;
/* delete the recording */
if (g_PVRRecordings->DeleteRecording(*item))
{
g_PVRManager.TriggerRecordingsUpdate();
bReturn = true;
}
return bReturn;
}
示例11: ActionDeleteChannel
bool CGUIWindowPVRCommon::ActionDeleteChannel(CFileItem *item)
{
CPVRChannel *channel = item->GetPVRChannelInfoTag();
/* check if the channel tag is valid */
if (!channel || channel->ChannelNumber() <= 0)
return false;
/* show a confirmation dialog */
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*) g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (pDialog)
return false;
pDialog->SetHeading(19039);
pDialog->SetLine(0, "");
pDialog->SetLine(1, channel->ChannelName());
pDialog->SetLine(2, "");
pDialog->DoModal();
/* prompt for the user's confirmation */
if (!pDialog->IsConfirmed())
return false;
g_PVRChannelGroups->GetGroupAll(channel->IsRadio())->RemoveFromGroup(*channel);
UpdateData();
return true;
}
示例12: DeleteItem
bool CFileUtils::DeleteItem(const CFileItemPtr &item, bool force)
{
if (!item || item->IsParentFolder())
return false;
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (!force && pDialog)
{
pDialog->SetHeading(122);
pDialog->SetLine(0, 125);
pDialog->SetLine(1, URIUtils::GetFileName(item->GetPath()));
pDialog->SetLine(2, "");
pDialog->DoModal();
if (!pDialog->IsConfirmed()) return false;
}
// Create a temporary item list containing the file/folder for deletion
CFileItemPtr pItemTemp(new CFileItem(*item));
pItemTemp->Select(true);
CFileItemList items;
items.Add(pItemTemp);
// grab the real filemanager window, set up the progress bar,
// and process the delete action
CFileOperationJob op(CFileOperationJob::ActionDelete, items, "");
return op.DoWork();
}
示例13: DeleteItem
bool CGUIWindowFileManager::DeleteItem(const CFileItem *pItem)
{
if (!pItem) return false;
CLog::Log(LOGDEBUG,"FileManager::DeleteItem: %s",pItem->GetLabel().c_str());
// prompt user for confirmation of file/folder deletion
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)m_gWindowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (pDialog)
{
pDialog->SetHeading(122);
pDialog->SetLine(0, 125);
pDialog->SetLine(1, CUtil::GetFileName(pItem->m_strPath));
pDialog->SetLine(2, "");
pDialog->DoModal();
if (!pDialog->IsConfirmed()) return false;
}
// Create a temporary item list containing the file/folder for deletion
CFileItemPtr pItemTemp(new CFileItem(*pItem));
pItemTemp->Select(true);
CFileItemList items;
items.Add(pItemTemp);
// grab the real filemanager window, set up the progress bar,
// and process the delete action
CGUIWindowFileManager *pFileManager = (CGUIWindowFileManager *)m_gWindowManager.GetWindow(WINDOW_FILES);
if (pFileManager)
{
pFileManager->m_dlgProgress = (CGUIDialogProgress *)m_gWindowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
pFileManager->ResetProgressBar(false);
pFileManager->DoProcess(ACTION_DELETE, items, "");
if (pFileManager->m_dlgProgress) pFileManager->m_dlgProgress->Close();
}
return true;
}
示例14: ActionStartTimer
bool CGUIDialogPVRGuideInfo::ActionStartTimer(const CEpgInfoTag *tag)
{
bool bReturn = false;
// prompt user for confirmation of channel record
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (pDialog)
{
pDialog->SetHeading(264);
pDialog->SetLine(0, "");
pDialog->SetLine(1, tag->Title());
pDialog->SetLine(2, "");
pDialog->DoModal();
if (pDialog->IsConfirmed())
{
Close();
CPVRTimerInfoTag *newTimer = CPVRTimerInfoTag::CreateFromEpg(*tag);
bReturn = CPVRTimers::AddTimer(*newTimer);
delete newTimer;
}
}
return bReturn;
}
示例15: ActionDeleteRecording
bool CGUIWindowPVRBase::ActionDeleteRecording(CFileItem *item)
{
bool bReturn = false;
if (!item->IsPVRRecording() && !item->m_bIsFolder)
return bReturn;
/* show a confirmation dialog */
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (!pDialog)
return bReturn;
pDialog->SetHeading(122); // Confirm delete
pDialog->SetLine(0, item->m_bIsFolder ? 19113 : 19112); // Are you sure?
pDialog->SetLine(1, "");
pDialog->SetLine(2, item->GetLabel());
pDialog->SetChoice(1, 117); // Delete
/* prompt for the user's confirmation */
pDialog->DoModal();
if (!pDialog->IsConfirmed())
return bReturn;
/* delete the recording */
if (g_PVRRecordings->Delete(*item))
{
g_PVRManager.TriggerRecordingsUpdate();
bReturn = true;
}
return bReturn;
}