本文整理汇总了C++中DialogCompletionEvent::GetId方法的典型用法代码示例。如果您正苦于以下问题:C++ DialogCompletionEvent::GetId方法的具体用法?C++ DialogCompletionEvent::GetId怎么用?C++ DialogCompletionEvent::GetId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DialogCompletionEvent
的用法示例。
在下文中一共展示了DialogCompletionEvent::GetId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: customEvent
// does not need locking
void MythNews::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
QString resultid = dce->GetId();
int buttonnum = dce->GetResult();
if (resultid == "options")
{
if (m_NewsSites.size() > 0)
{
if (buttonnum == 0)
ShowFeedManager();
else if (buttonnum == 1)
ShowEditDialog(false);
else if (buttonnum == 2)
ShowEditDialog(true);
else if (buttonnum == 3)
deleteNewsSite();
}
else
if (buttonnum == 0)
ShowEditDialog(false);
}
m_menuPopup = NULL;
}
}
示例2: customEvent
void ExitPrompter::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
QString resultid= dce->GetId();
int buttonnum = dce->GetResult();
if (resultid == "mythfillprompt")
{
quit();
}
else if (resultid == "problemprompt")
{
switch (buttonnum)
{
case 0 :
break;
case 1 :
masterPromptExit();
break;
}
}
}
}
示例3: customEvent
void MythThemedMenu::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
QString resultid = dce->GetId();
//int buttonnum = dce->GetResult();
QString halt_cmd = GetMythDB()->GetSetting("HaltCommand");
QString reboot_cmd = GetMythDB()->GetSetting("RebootCommand");
if (resultid == "popmenu")
{
QString action = dce->GetData().toString();
if (action == "shutdown")
{
if (!halt_cmd.isEmpty())
myth_system(halt_cmd);
}
else if (action == "reboot")
{
if (!reboot_cmd.isEmpty())
myth_system(reboot_cmd);
}
else if (action == "about")
{
aboutScreen();
}
else if (action == "standby")
{
QString arg("standby_mode");
m_state->m_callback(m_state->m_callbackdata, arg);
}
}
else if (resultid == "password")
{
QString text = dce->GetResultText();
MythUIButtonListItem *item = m_buttonList->GetItemCurrent();
ThemedButton button = item->GetData().value<ThemedButton>();
QString password = GetMythDB()->GetSetting(button.password);
if (text == password)
{
QString timestamp_setting = QString("%1Time").arg(button.password);
QDateTime curr_time = QDateTime::currentDateTime();
QString last_time_stamp = curr_time.toString(Qt::TextDate);
GetMythDB()->SetSetting(timestamp_setting, last_time_stamp);
GetMythDB()->SaveSetting(timestamp_setting, last_time_stamp);
buttonAction(item, true);
}
}
m_menuPopup = NULL;
}
}
示例4: customEvent
void ImportMusicDialog::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
if (dce->GetId() == "locationchange")
{
m_locationEdit->SetText(dce->GetResultText());
startScan();
}
}
}
示例5: customEvent
void RSSEditPopup::customEvent(QEvent *levent)
{
if (levent->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(levent);
if (dce->GetId() == CEID_NEWIMAGE)
{
m_thumbImage->SetFilename(dce->GetResultText());
m_thumbImage->Load();
m_thumbImage->Show();
}
}
}
示例6: customEvent
void EditRomInfoDialog::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
const QString resultid = dce->GetId();
if (resultid == CEID_FANARTFILE)
SetFanart(dce->GetResultText());
else if (resultid == CEID_SCREENSHOTFILE)
SetScreenshot(dce->GetResultText());
else if (resultid == CEID_BOXARTFILE)
SetBoxart(dce->GetResultText());
}
}
示例7: customEvent
void BackendSelection::customEvent(QEvent *event)
{
if (((MythEvent::Type)(event->type())) == MythEvent::MythEventMessage)
{
MythEvent *me = (MythEvent *)event;
QString message = me->Message();
QString URI = me->ExtraData(0);
QString URN = me->ExtraData(1);
QString URL = me->ExtraData(2);
VERBOSE(VB_UPNP, QString("BackendSelection::customEvent(%1, %2, %3, %4)")
.arg(message).arg(URI).arg(URN).arg(URL));
if (message.startsWith("SSDP_ADD") &&
URI.startsWith("urn:schemas-mythtv-org:device:MasterMediaServer:"))
{
DeviceLocation *devLoc = SSDP::Instance()->Find(URI, URN);
if (devLoc)
{
devLoc->AddRef();
AddItem(devLoc); // this does a Release()
}
}
else if (message.startsWith("SSDP_REMOVE"))
{
//-=>Note: This code will never get executed until
// SSDPCache is changed to handle NotifyRemove correctly
RemoveItem(URN);
}
}
else if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = dynamic_cast<DialogCompletionEvent*>(event);
if (!dce)
return;
QString resultid = dce->GetId();
if (resultid == "password")
{
m_pinCode = dce->GetResultText();
Accept();
}
}
}
示例8: customEvent
/**
* \brief Handle custom events
* \param event The custom event
*/
void GallerySlideView::customEvent(QEvent *event)
{
if ((MythEvent::Type)(event->type()) == MythEvent::MythEventMessage)
{
MythEvent *me = (MythEvent *)event;
QString message = me->Message();
QStringList extra = me->ExtraDataList();
if (message == "IMAGE_METADATA" && !extra.isEmpty())
{
int id = extra[0].toInt();
ImagePtrK selected = m_view->GetSelected();
if (selected && selected->m_id == id)
m_infoList.Display(*selected, extra.mid(1));
}
else if (message == "THUMB_AVAILABLE")
{
if (!extra.isEmpty() && m_view->Update(extra[0].toInt()))
ShowSlide(0);
}
}
else if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent *)(event);
QString resultid = dce->GetId();
int buttonnum = dce->GetResult();
if (resultid == "metadatamenu")
{
switch (buttonnum)
{
case 0: Transform(kRotateCW); break;
case 1: Transform(kRotateCCW); break;
case 2: Transform(kFlipHorizontal); break;
case 3: Transform(kFlipVertical); break;
case 4: Transform(kResetToExif); break;
case 5: Zoom(10); break;
case 6: Zoom(-10); break;
}
}
}
}
示例9: customEvent
void GameHandler::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
QString resultid = dce->GetId();
QString resulttext = dce->GetResultText();
if (resultid == "removalPopup")
{
int buttonNum = dce->GetResult();
GameScan scan = qVariantValue<GameScan>(dce->GetData());
switch (buttonNum)
{
case 1:
m_KeepAll = true;
break;
case 2:
purgeGameDB(scan.Rom() , scan.RomFullPath());
break;
case 3:
m_RemoveAll = true;
purgeGameDB(scan.Rom() , scan.RomFullPath());
break;
default:
break;
};
}
else if (resultid == "clearAllPopup")
{
int buttonNum = dce->GetResult();
switch (buttonNum)
{
case 1:
clearAllMetadata();
break;
default:
break;
}
}
}
}
示例10: customEvent
void ChannelRecPriority::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
QString resultid = dce->GetId();
int buttonnum = dce->GetResult();
if (resultid == "options")
{
switch (buttonnum)
{
case 0:
upcoming();
break;
}
}
}
}
示例11: customEvent
void ScreenWizard::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
QString resultid = dce->GetId();
int buttonnum = dce->GetResult();
if (resultid == "save")
{
if (buttonnum == 0)
slotSaveSettings();
else if (buttonnum == 1)
slotResetSettings();
else if (buttonnum == 2)
slotChangeCoarseFine();
}
else if (resultid == "nosave")
{
if (buttonnum == 0)
slotResetSettings();
if (buttonnum == 1)
slotChangeCoarseFine();
}
else if (resultid == "quit")
{
if (buttonnum == 0)
slotSaveSettings();
if (buttonnum == 1)
qApp->quit();
if (buttonnum == 2)
slotResetSettings();
}
m_menuPopup = nullptr;
}
}
示例12: customEvent
void Ripper::customEvent(QEvent* event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = static_cast<DialogCompletionEvent *>(event);
if (dce->GetId() == "conflictmenu")
{
int buttonNum = dce->GetResult();
RipTrack *track = dce->GetData().value<RipTrack *>();
switch (buttonNum)
{
case 0:
// Do nothing
break;
case 1:
if (deleteExistingTrack(track))
{
track->isNew = true;
toggleTrackActive(track);
}
break;
case 2:
deleteAllExistingTracks();
break;
default:
break;
}
}
return;
}
MythUIType::customEvent(event);
}
示例13: customEvent
void ImportIconsWizard::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
QString resultid = dce->GetId();
int buttonnum = dce->GetResult();
if (resultid == "submitresults")
{
switch (buttonnum)
{
case 0 :
Close();
break;
case 1 :
submit();
Close();
break;
}
}
}
}
示例14: 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)
//.........这里部分代码省略.........
示例15: customEvent
void ScheduleCommon::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
QString resultid = dce->GetId();
QString resulttext = dce->GetResultText();
if (resultid == "editrecording")
{
if (!dce->GetData().canConvert<RecordingInfo>())
return;
RecordingInfo recInfo = dce->GetData().value<RecordingInfo>();
if (resulttext == tr("Record this showing"))
{
if (recInfo.GetRecordingRuleType() == kNotRecording)
recInfo.ApplyRecordStateChange(kSingleRecord);
else
{
recInfo.ApplyRecordStateChange(kOverrideRecord);
if (recInfo.GetRecordingStartTime() < MythDate::current())
recInfo.ReactivateRecording();
}
}
else if (resulttext == tr("Record all showings"))
recInfo.ApplyRecordStateChange(kAllRecord);
else if (resulttext == tr("Record one showing (this episode)") ||
resulttext == tr("Record one showing"))
{
recInfo.ApplyRecordStateChange(kOneRecord, false);
recInfo.GetRecordingRule()->m_filter |= 64; // This episode
recInfo.GetRecordingRule()->Save();
}
else if (resulttext == tr("Record all showings (this channel)"))
{
recInfo.ApplyRecordStateChange(kAllRecord, false);
recInfo.GetRecordingRule()->m_filter |= 1024; // This channel
recInfo.GetRecordingRule()->Save();
}
else if (resulttext == tr("Stop this recording"))
{
RemoteStopRecording(&recInfo);
}
else if (resulttext == tr("Modify recording options") ||
resulttext == tr("Add override rule"))
{
if (recInfo.GetRecordingRuleType() == kSingleRecord ||
recInfo.GetRecordingRuleType() == kOverrideRecord ||
recInfo.GetRecordingRuleType() == kOneRecord)
EditScheduled(&recInfo);
else
MakeOverride(&recInfo);
}
else if (resulttext == tr("Restart this recording"))
recInfo.ReactivateRecording();
else if (resulttext == tr("Forget previous recording"))
recInfo.ForgetHistory();
else if (resulttext == tr("Don't record this showing"))
recInfo.ApplyRecordStateChange(kDontRecord);
else if (resulttext == tr("Never record this episode"))
{
recInfo.ApplyNeverRecord();
}
else if (resulttext == tr("Edit recording rule") ||
resulttext == tr("Edit override rule"))
EditScheduled(&recInfo);
else if (resulttext == tr("Delete recording rule") ||
resulttext == tr("Delete override rule"))
recInfo.ApplyRecordStateChange(kNotRecording);
}
}
}