MythTV  master
mythcontrols.cpp
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
28 // Qt headers
29 #include <QCoreApplication>
30 #include <QStringList>
31 
32 // MythTV headers
36 #include "libmythui/mythuibutton.h"
38 #include "libmythui/mythuitext.h"
39 
40 // MythControls headers
41 #include "keygrabber.h"
42 #include "mythcontrols.h"
43 
44 #define LOC QString("MythControls: ")
45 #define LOC_ERR QString("MythControls, Error: ")
46 
48 {
49  Teardown();
50 }
51 
53 {
54  if (m_bindings)
55  {
56  delete m_bindings;
57  m_bindings = nullptr;
58  }
59 
60  m_contexts.clear();
61 }
62 
69 {
70  // Load the theme for this screen
71  bool foundtheme = LoadWindowFromXML("controls-ui.xml", "controls", this);
72  if (!foundtheme)
73  return false;
74 
75  m_description = dynamic_cast<MythUIText *>(GetChild("description"));
76  m_leftList = dynamic_cast<MythUIButtonList *>(GetChild("leftlist"));
77  m_rightList = dynamic_cast<MythUIButtonList *>(GetChild("rightlist"));
78  m_leftDescription = dynamic_cast<MythUIText *>(GetChild("leftdesc"));
79  m_rightDescription = dynamic_cast<MythUIText *>(GetChild("rightdesc"));
80 
81  if (!m_description || !m_leftList || !m_rightList ||
83  {
84  LOG(VB_GENERAL, LOG_ERR, "Theme is missing critical theme elements.");
85  return false;
86  }
87 
92 
99 
100  for (uint i = 0; i < Action::kMaximumNumberOfBindings; i++)
101  {
102  MythUIButton *button = dynamic_cast<MythUIButton *>
103  (GetChild(QString("action_%1").arg(i)));
104 
105  if (!button)
106  {
107  LOG(VB_GENERAL, LOG_ERR, LOC +
108  QString("Unable to load action button action_%1").arg(i));
109 
110  return false;
111  }
112 
114 
115  m_actionButtons.append(button);
116  }
117 
118  BuildFocusList();
119 
121 
122  /* start off with the actions by contexts view */
125  UpdateRightList();
126 
127  return true;
128 }
129 
136 {
138  return;
139 
140  if (direction == 0)
142 }
143 
148 {
149  NextPrevWidgetFocus(true);
150 }
151 
156 {
159 }
160 
165 {
166  QString key = GetCurrentKey();
167  if (!key.isEmpty())
168  {
169  QString label = tr("Modify Action");
170 
171  MythScreenStack *popupStack =
172  GetMythMainWindow()->GetStack("popup stack");
173 
174  m_menuPopup =
175  new MythDialogBox(label, popupStack, "actionmenu");
176 
177  if (m_menuPopup->Create())
178  popupStack->AddScreen(m_menuPopup);
179 
180  m_menuPopup->SetReturnEvent(this, "action");
181 
182  m_menuPopup->AddButton(tr("Set Binding"));
183  m_menuPopup->AddButton(tr("Remove Binding"));
184  }
185  else // for blank keys, no reason to ask what to do
186  GrabKey();
187 }
188 
193 {
194  QString label = tr("Change View");
195 
196  MythScreenStack *popupStack =
197  GetMythMainWindow()->GetStack("popup stack");
198 
199  m_menuPopup =
200  new MythDialogBox(label, popupStack, "mcviewmenu");
201 
202  if (m_menuPopup->Create())
203  popupStack->AddScreen(m_menuPopup);
204 
205  m_menuPopup->SetReturnEvent(this, "view");
206 
207  m_menuPopup->AddButton(tr("Actions By Context"));
208  m_menuPopup->AddButton(tr("Contexts By Key"));
209  m_menuPopup->AddButton(tr("Keys By Context"));
210 
211 }
212 
214 {
215  QString label = tr("Options");
216 
217  MythScreenStack *popupStack =
218  GetMythMainWindow()->GetStack("popup stack");
219 
220  m_menuPopup =
221  new MythDialogBox(label, popupStack, "optionmenu");
222 
223  if (m_menuPopup->Create())
224  popupStack->AddScreen(m_menuPopup);
225 
226  m_menuPopup->SetReturnEvent(this, "option");
227 
228  m_menuPopup->AddButton(tr("Save"));
229  m_menuPopup->AddButton(tr("Change View"));
230  m_menuPopup->AddButton(tr("Reset All Keys to Defaults"));
231 }
232 
234 {
235  if (m_bindings && m_bindings->HasChanges())
236  {
237  /* prompt user to save changes */
238  QString label = tr("Save changes?");
239 
240  MythScreenStack *popupStack =
241  GetMythMainWindow()->GetStack("popup stack");
242 
243  auto *confirmPopup = new MythConfirmationDialog(popupStack, label, true);
244 
245  if (confirmPopup->Create())
246  popupStack->AddScreen(confirmPopup);
247 
248  confirmPopup->SetReturnEvent(this, "exit");
249  }
250  else
252 }
253 
259 {
260  UpdateRightList();
261 }
262 
268 {
270 }
271 
272 
280  MythUIButtonList *uilist, const QStringList &contents, bool arrows)
281 {
282  // remove all strings from the current list
283  uilist->Reset();
284 
285  // add each new string
286  for (const auto & content : std::as_const(contents))
287  {
288  auto *item = new MythUIButtonListItem(uilist, content);
289  item->setDrawArrow(arrows);
290  }
291 }
292 
297 {
298  // get the selected item in the right list.
300 
301  if (!item)
302  return;
303 
304  QString rtstr = item->GetText();
305 
306  switch(m_currentView)
307  {
308  case kActionsByContext:
310  break;
311  case kKeysByContext:
313  break;
314  case kContextsByKey:
316  break;
317  }
318 }
319 
325 {
326  for (uint i = 0; i < Action::kMaximumNumberOfBindings; i++)
327  m_actionButtons.at(i)->SetText("");
328 
329  if (GetFocusWidget() == m_leftList)
330  {
331  m_description->Reset();
332  return;
333  }
334 
335  const QString context = GetCurrentContext();
336  const QString action = GetCurrentAction();
337 
338  QString desc = m_bindings->GetActionDescription(context, action);
339  m_description->SetText(tr(desc.toLatin1().constData()));
340 
341  QStringList keys = m_bindings->GetActionKeys(context, action);
342  for (int i = 0; (i < keys.count()) &&
343  (i < (int)Action::kMaximumNumberOfBindings); i++)
344  {
345  m_actionButtons.at(i)->SetText(keys[i]);
346  }
347 }
348 
349 
358 {
360  return m_leftList->GetItemCurrent()->GetText();
361 
362  if (GetFocusWidget() == m_leftList)
363  return {};
364 
365  QString desc = m_rightList->GetItemCurrent()->GetText();
366  int loc = desc.indexOf(" => ");
367  if (loc == -1)
368  return {}; // Should not happen
369 
371  return desc.left(loc);
372 
373  return desc.mid(loc + 4);
374 }
375 
384 {
386  {
388  {
389  return m_leftList->GetItemCurrent()->GetText();
390  }
391  return {};
392  }
393 
394  if (GetFocusWidget() == m_leftList)
395  return {};
396 
398  return {};
399 
400  QString desc = m_rightList->GetItemCurrent()->GetText();
401  if (kContextList == m_leftListType &&
403  {
404  return desc;
405  }
406 
407  int loc = desc.indexOf(" => ");
408  if (loc == -1)
409  return {}; // should not happen..
410 
412  return desc.left(loc);
413 
414  QString rv = desc.mid(loc+4);
415  if (rv == "<none>")
416  return {};
417 
418  return rv;
419 }
420 
426 {
427  for (uint i = 0; i < Action::kMaximumNumberOfBindings; i++)
428  {
429  MythUIButton *button = m_actionButtons.at(i);
430  MythUIType *uitype = GetFocusWidget();
431  if (uitype == button)
432  return i;
433  }
434 
436 }
437 
446 {
447  MythUIButtonListItem* currentButton = nullptr;
448  if (m_leftListType == kKeyList &&
449  (currentButton = m_leftList->GetItemCurrent()))
450  {
451  return currentButton->GetText();
452  }
453 
454  if (GetFocusWidget() == m_leftList)
455  return {};
456 
458  {
459  QString context = GetCurrentContext();
460  QString action = GetCurrentAction();
461  uint b = GetCurrentButton();
462  QStringList keys = m_bindings->GetActionKeys(context, action);
463 
464  if (b < (uint)keys.count())
465  return keys[b];
466 
467  return {};
468  }
469 
470  currentButton = m_rightList->GetItemCurrent();
471  QString desc;
472  if (currentButton)
473  desc = currentButton->GetText();
474 
475  int loc = desc.indexOf(" => ");
476  if (loc == -1)
477  return {}; // Should not happen
478 
479 
480  if (m_rightListType == kKeyList)
481  return desc.left(loc);
482 
483  return desc.mid(loc + 4);
484 }
485 
490 void MythControls::LoadData(const QString &hostname)
491 {
492  /* create the key bindings and the tree */
495 
496  /* Alphabetic order, but jump and global at the top */
497  m_sortedContexts.sort();
500  m_sortedContexts.insert(m_sortedContexts.begin(),
502  m_sortedContexts.insert(m_sortedContexts.begin(),
504 
505  for (const auto & ctx_name : std::as_const(m_sortedContexts))
506  {
507  QStringList actions = m_bindings->GetActions(ctx_name);
508  actions.sort();
509  m_contexts.insert(ctx_name, actions);
510  }
511 }
512 
520 {
521  QString context = GetCurrentContext();
522  QString key = GetCurrentKey();
523  QString action = GetCurrentAction();
524 
525  if (context.isEmpty() || key.isEmpty() || action.isEmpty())
526  {
527  LOG(VB_GENERAL, LOG_ERR,
528  "Unable to delete binding, missing information");
529  return;
530  }
531 
532  if (m_bindings->RemoveActionKey(context, action, key))
533  {
535  return;
536  }
537 
538  QString label = tr("This action is mandatory and needs at least one key "
539  "bound to it. Instead, try rebinding with another key.");
540 
541  MythScreenStack *popupStack =
542  GetMythMainWindow()->GetStack("popup stack");
543 
544  auto *confirmPopup = new MythConfirmationDialog(popupStack, label, false);
545 
546  if (confirmPopup->Create())
547  {
548  confirmPopup->SetReturnEvent(this, "mandatorydelete");
549  popupStack->AddScreen(confirmPopup);
550  }
551  else
552  delete confirmPopup;
553 }
554 
559 void MythControls::ResolveConflict(ActionID *conflict, int error_level,
560  const QString &key)
561 {
562  if (!conflict)
563  return;
564 
565  QString label;
566 
567  bool error = (KeyBindings::kKeyBindingError == error_level);
568 
569  if (error)
570  {
571  label = tr("This key binding conflicts with %1 in the %2 context. "
572  "Unable to bind key.")
573  .arg(conflict->GetAction(), conflict->GetContext());
574  }
575  else
576  {
577  label = tr("This key binding conflicts with %1 in the %2 context. "
578  "Do you want to bind it anyway?")
579  .arg(conflict->GetAction(), conflict->GetContext());
580  }
581 
582  MythScreenStack *popupStack =
583  GetMythMainWindow()->GetStack("popup stack");
584 
585  auto *confirmPopup = new MythConfirmationDialog(popupStack, label, !error);
586 
587  if (!error)
588  {
589  confirmPopup->SetData(QVariant::fromValue(key));
590  confirmPopup->SetReturnEvent(this, "conflict");
591  }
592 
593  if (confirmPopup->Create())
594  popupStack->AddScreen(confirmPopup);
595 
596  delete conflict;
597 }
598 
599 void MythControls::GrabKey(void) const
600 {
601  /* grab a key from the user */
602  MythScreenStack *popupStack =
603  GetMythMainWindow()->GetStack("popup stack");
604 
605  auto *keyGrabPopup = new KeyGrabPopupBox(popupStack);
606 
607  if (keyGrabPopup->Create())
608  popupStack->AddScreen(keyGrabPopup, false);
609 
610  connect(keyGrabPopup, &KeyGrabPopupBox::HaveResult,
611  this, qOverload<const QString&>(&MythControls::AddKeyToAction),
612  Qt::QueuedConnection);
613 }
614 
623 void MythControls::AddKeyToAction(const QString& key, bool ignoreconflict)
624 {
625  QString action = GetCurrentAction();
626  QString context = GetCurrentContext();
627  QStringList keys = m_bindings->GetActionKeys(context, action);
628 
629  // Don't recreating an existing binding...
630  int binding_index = GetCurrentButton();
631  if ((binding_index >= (int)Action::kMaximumNumberOfBindings) ||
632  ((binding_index < keys.size()) && (keys[binding_index] == key)))
633  {
634  return;
635  }
636 
637  if (!ignoreconflict)
638  {
639  // Check for first of the potential conflicts.
640  int err_level = 0;
641  ActionID *conflict = m_bindings->GetConflict(context, key, err_level);
642  if (conflict)
643  {
644  ResolveConflict(conflict, err_level, key);
645 
646  return;
647  }
648  }
649 
650  if (binding_index < keys.count())
651  {
652  m_bindings->ReplaceActionKey(context, action, key,
653  keys[binding_index]);
654  }
655  else
656  {
657  m_bindings->AddActionKey(context, action, key);
658  }
659 
661 }
662 
663 void MythControls::AddKeyToAction(const QString& key)
664 {
665  AddKeyToAction(key, false);
666 }
667 
668 void MythControls::customEvent(QEvent *event)
669 {
670  if (event->type() == DialogCompletionEvent::kEventType)
671  {
672  auto *dce = (DialogCompletionEvent*)(event);
673 
674  QString resultid = dce->GetId();
675  int buttonnum = dce->GetResult();
676 
677  if (resultid == "action")
678  {
679  if (buttonnum == 0)
680  GrabKey();
681  else if (buttonnum == 1)
682  DeleteKey();
683  }
684  else if (resultid == "option")
685  {
686  if (buttonnum == 0)
687  Save();
688  else if (buttonnum == 1)
689  ChangeView();
690  else if (buttonnum == 2)
691  GetMythMainWindow()->JumpTo("Reset All Keys");
692  }
693  else if (resultid == "exit")
694  {
695  if (buttonnum == 1)
696  Save();
697  else
698  Teardown();
699 
700  Close();
701  }
702  else if (resultid == "view")
703  {
704  QStringList contents;
705  QString leftcaption;
706  QString rightcaption;
707 
708  if (buttonnum == 0)
709  {
710  leftcaption = tr("Contexts");
711  rightcaption = tr("Actions");
713  contents = m_bindings->GetContexts();
714  }
715  else if (buttonnum == 1)
716  {
717  leftcaption = tr("Contexts");
718  rightcaption = tr("Keys");
720  contents = m_bindings->GetContexts();
721  }
722  else if (buttonnum == 2)
723  {
724  leftcaption = tr("Keys");
725  rightcaption = tr("Contexts");
727  contents = m_bindings->GetKeys();
728  }
729  else
730  return;
731 
732  m_leftDescription->SetText(leftcaption);
733  m_rightDescription->SetText(rightcaption);
734 
735  SetListContents(m_leftList, contents, true);
737  UpdateRightList();
738 
739  if (GetFocusWidget() != m_leftList)
741  }
742  else if (resultid == "conflict")
743  {
744  if (buttonnum == 1)
745  {
746  QString key = dce->GetData().toString();
747  AddKeyToAction(key, true);
748  }
749  }
750 
751  if (m_menuPopup)
752  m_menuPopup = nullptr;
753  }
754 
755 }
756 
757 /* vim: set expandtab tabstop=4 shiftwidth=4: */
MythUIButton::Clicked
void Clicked()
KeyBindings::GetKeys
QStringList GetKeys(void) const
Returns a list of all keys bound to an action.
Definition: keybindings.cpp:49
MythControls::m_rightListType
ListType m_rightListType
Definition: mythcontrols.h:134
MythDialogBox::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:301
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1587
mythuitext.h
MythScreenType::NextPrevWidgetFocus
virtual bool NextPrevWidgetFocus(bool up_or_down)
Definition: mythscreentype.cpp:153
MythControls::m_contexts
QHash< QString, QStringList > m_contexts
actions for a given context
Definition: mythcontrols.h:132
MythUIText::Reset
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuitext.cpp:82
error
static void error(const char *str,...)
Definition: vbi.cpp:36
MythControls::m_leftListType
ListType m_leftListType
Definition: mythcontrols.h:133
KeyBindings::kKeyBindingError
@ kKeyBindingError
Definition: keybindings.h:47
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:386
MythControls::m_actionButtons
QList< MythUIButton * > m_actionButtons
Definition: mythcontrols.h:126
MythControls::Teardown
void Teardown(void)
Definition: mythcontrols.cpp:52
MythUIType::GetChild
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
Definition: mythuitype.cpp:133
MythMainWindow::JumpTo
void JumpTo(const QString &Destination, bool Pop=true)
Definition: mythmainwindow.cpp:1458
build_compdb.content
content
Definition: build_compdb.py:38
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
LOC
#define LOC
Definition: mythcontrols.cpp:44
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:16
MythControls::DeleteKey
void DeleteKey(void)
Delete the currently active key to action mapping.
Definition: mythcontrols.cpp:519
MythControls::ChangeView
void ChangeView(void)
Change the view.
Definition: mythcontrols.cpp:192
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
KeyBindings::GetActions
QStringList GetActions(const QString &context) const
Get a list of the actions in a context.
Definition: keybindings.cpp:72
MythControls::SetListContents
static void SetListContents(MythUIButtonList *uilist, const QStringList &contents, bool arrows=false)
Set the contents of a list.
Definition: mythcontrols.cpp:279
MythControls::GetCurrentContext
QString GetCurrentContext(void)
Get the currently selected context string.
Definition: mythcontrols.cpp:357
MythControls::ResolveConflict
void ResolveConflict(ActionID *conflict, int error_level, const QString &key)
Resolve a potential conflict.
Definition: mythcontrols.cpp:559
mythuibuttonlist.h
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:113
MythUIType::TakingFocus
void TakingFocus()
MythControls::ChangeButtonFocus
void ChangeButtonFocus(int direction)
Change button focus in a particular direction.
Definition: mythcontrols.cpp:135
ActionID::GetAction
QString GetAction(void) const
Returns the action name.
Definition: action.h:103
KeyBindings
Encapsulates information about the current keybindings.
Definition: keybindings.h:36
MythControls::GetCurrentKey
QString GetCurrentKey(void)
Get the currently selected key string.
Definition: mythcontrols.cpp:445
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
MythControls::kKeyList
@ kKeyList
Definition: mythcontrols.h:72
KeyBindings::ReplaceActionKey
void ReplaceActionKey(const QString &context_name, const QString &action_name, const QString &newkey, const QString &oldkey)
Replace a key in an action.
Definition: keybindings.cpp:222
MythUIButtonList::itemClicked
void itemClicked(MythUIButtonListItem *item)
MythControls::kActionList
@ kActionList
Definition: mythcontrols.h:73
MythControls::m_menuPopup
MythDialogBox * m_menuPopup
Definition: mythcontrols.h:127
Action::kMaximumNumberOfBindings
static const unsigned int kMaximumNumberOfBindings
The maximum number of keys that can be bound to an action.
Definition: action.h:71
MythControls::RefreshKeyInformation
void RefreshKeyInformation(void)
Updates the list of keys that are shown and the description of the action.
Definition: mythcontrols.cpp:324
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:118
MythControls::~MythControls
~MythControls() override
Definition: mythcontrols.cpp:47
MythDialogBox::AddButton
void AddButton(const QString &title)
Definition: mythdialogbox.h:198
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
MythControls::LeftPressed
void LeftPressed(MythUIButtonListItem *item)
Slot handling a button being pressed in the left list.
Definition: mythcontrols.cpp:147
MythDialogBox::Create
bool Create(void) override
Definition: mythdialogbox.cpp:127
mythcontrols.h
Main header for mythcontrols.
MythControls::m_filters
KeyBindings::Filter m_filters
Definition: mythcontrols.h:135
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:206
MythUIButton
A single button widget.
Definition: mythuibutton.h:21
KeyGrabPopupBox::HaveResult
void HaveResult(QString)
MythControls::kContextList
@ kContextList
Definition: mythcontrols.h:71
uint
unsigned int uint
Definition: compat.h:81
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:55
KeyBindings::GetKeyContexts
QStringList GetKeyContexts(const QString &key) const
Get the context names in which a key is bound.
Definition: keybindings.cpp:115
kActionsByContext
@ kActionsByContext
Definition: mythcontrols.h:41
MythControls::m_leftDescription
MythUIText * m_leftDescription
Definition: mythcontrols.h:124
MythControls::Save
void Save(void)
Definition: mythcontrols.h:96
MythControls::m_description
MythUIText * m_description
Definition: mythcontrols.h:123
MythUIType
The base class on which all widgets and screens are based.
Definition: mythuitype.h:85
MythUIButtonListItem::GetText
QString GetText(const QString &name="") const
Definition: mythuibuttonlist.cpp:3311
MythControls::AddKeyToAction
void AddKeyToAction(const QString &key, bool ignoreconflict)
Add a key to the currently selected action.
Definition: mythcontrols.cpp:623
ActionSet::kJumpContext
static const QString kJumpContext
The statically assigned context for jump point actions.
Definition: actionset.h:80
MythControls::GetCurrentButton
uint GetCurrentButton(void)
Returns the focused button, or Action::kMaximumNumberOfBindings if no buttons are focued.
Definition: mythcontrols.cpp:425
MythControls::m_bindings
KeyBindings * m_bindings
Definition: mythcontrols.h:129
KeyGrabPopupBox
Captures a key.
Definition: keygrabber.h:15
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
KeyBindings::RemoveActionKey
bool RemoveActionKey(const QString &context_name, const QString &action_name, const QString &key)
Unbind a key from an action.
Definition: keybindings.cpp:242
MythControls::GetCurrentAction
QString GetCurrentAction(void)
Get the currently selected action string.
Definition: mythcontrols.cpp:383
MythConfirmationDialog
Dialog asking for user confirmation. Ok and optional Cancel button.
Definition: mythdialogbox.h:272
MythControls::RightSelected
void RightSelected(MythUIButtonListItem *item)
Refreshes key information when an item in the right list is selected.
Definition: mythcontrols.cpp:267
mythcorecontext.h
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:687
MythControls::GrabKey
void GrabKey(void) const
Definition: mythcontrols.cpp:599
KeyBindings::GetActionKeys
QStringList GetActionKeys(const QString &context_name, const QString &action_name) const
Get an action's keys.
Definition: keybindings.cpp:95
MythControls::m_sortedContexts
QStringList m_sortedContexts
sorted list of contexts
Definition: mythcontrols.h:130
kKeysByContext
@ kKeysByContext
Definition: mythcontrols.h:41
DialogCompletionEvent
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
Definition: mythdialogbox.h:41
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:132
MythControls::RightPressed
void RightPressed(MythUIButtonListItem *item)
Slot handling a button being pressed in the left list.
Definition: mythcontrols.cpp:155
ActionSet::kGlobalContext
static const QString kGlobalContext
The name of global actions.
Definition: actionset.h:82
DialogCompletionEvent::kEventType
static const Type kEventType
Definition: mythdialogbox.h:57
MythControls::m_currentView
ViewType m_currentView
Definition: mythcontrols.h:120
MythUIButtonList::Reset
void Reset() override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuibuttonlist.cpp:116
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:104
KeyBindings::GetContexts
QStringList GetContexts(void) const
Returns a list of the context names.
Definition: keybindings.cpp:58
build_compdb.action
action
Definition: build_compdb.py:9
KeyBindings::GetContextKeys
QStringList GetContextKeys(const QString &context) const
Get the keys within a context.
Definition: keybindings.cpp:106
MythControls::Create
bool Create(void) override
Loads UI elements from theme.
Definition: mythcontrols.cpp:68
mythuibutton.h
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:323
ActionID
A class that uniquely identifies an action.
Definition: action.h:84
MythCoreContext::GetHostName
QString GetHostName(void)
Definition: mythcorecontext.cpp:838
KeyBindings::GetActionDescription
QString GetActionDescription(const QString &context_name, const QString &action_name) const
Get an action's description.
Definition: keybindings.cpp:136
MythControls::UpdateRightList
void UpdateRightList(void)
Update the right list.
Definition: mythcontrols.cpp:296
KeyBindings::AddActionKey
bool AddActionKey(const QString &context_name, const QString &action_name, const QString &key)
Add a key to an action.
Definition: keybindings.cpp:152
musicbrainzngs.caa.hostname
string hostname
Definition: caa.py:17
MythControls::customEvent
void customEvent(QEvent *event) override
Definition: mythcontrols.cpp:668
MythControls::m_rightList
MythUIButtonList * m_rightList
Definition: mythcontrols.h:122
MythControls::ShowMenu
void ShowMenu(void) override
Definition: mythcontrols.cpp:213
MythControls::LeftSelected
void LeftSelected(MythUIButtonListItem *item)
Refreshes the right list when an item in the left list is selected.
Definition: mythcontrols.cpp:258
kContextsByKey
@ kContextsByKey
Definition: mythcontrols.h:41
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:191
mythmainwindow.h
MythControls::LoadData
void LoadData(const QString &hostname)
Load the settings for a particular host.
Definition: mythcontrols.cpp:490
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:52
KeyBindings::GetConflict
ActionID * GetConflict(const QString &context_name, const QString &key, int &level) const
Determine if adding a key would cause a conflict.
Definition: keybindings.cpp:179
MythControls::m_leftList
MythUIButtonList * m_leftList
Definition: mythcontrols.h:121
MythControls::ActionButtonPressed
void ActionButtonPressed()
Slot handling a button being pressed in the left list.
Definition: mythcontrols.cpp:164
KeyBindings::HasChanges
bool HasChanges(void) const
Definition: keybindings.h:78
MythControls::m_rightDescription
MythUIText * m_rightDescription
Definition: mythcontrols.h:125
ActionID::GetContext
QString GetContext(void) const
Returns the context name.
Definition: action.h:100
MythControls::Close
void Close(void) override
Definition: mythcontrols.cpp:233
keygrabber.h