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 {
186  // for blank keys, no reason to ask what to do
187  GrabKey();
188  }
189 }
190 
195 {
196  QString label = tr("Change View");
197 
198  MythScreenStack *popupStack =
199  GetMythMainWindow()->GetStack("popup stack");
200 
201  m_menuPopup =
202  new MythDialogBox(label, popupStack, "mcviewmenu");
203 
204  if (m_menuPopup->Create())
205  popupStack->AddScreen(m_menuPopup);
206 
207  m_menuPopup->SetReturnEvent(this, "view");
208 
209  m_menuPopup->AddButton(tr("Actions By Context"));
210  m_menuPopup->AddButton(tr("Contexts By Key"));
211  m_menuPopup->AddButton(tr("Keys By Context"));
212 
213 }
214 
216 {
217  QString label = tr("Options");
218 
219  MythScreenStack *popupStack =
220  GetMythMainWindow()->GetStack("popup stack");
221 
222  m_menuPopup =
223  new MythDialogBox(label, popupStack, "optionmenu");
224 
225  if (m_menuPopup->Create())
226  popupStack->AddScreen(m_menuPopup);
227 
228  m_menuPopup->SetReturnEvent(this, "option");
229 
230  m_menuPopup->AddButton(tr("Save"));
231  m_menuPopup->AddButton(tr("Change View"));
232  m_menuPopup->AddButton(tr("Reset All Keys to Defaults"));
233 }
234 
236 {
237  if (m_bindings && m_bindings->HasChanges())
238  {
239  /* prompt user to save changes */
240  QString label = tr("Save changes?");
241 
242  MythScreenStack *popupStack =
243  GetMythMainWindow()->GetStack("popup stack");
244 
245  auto *confirmPopup = new MythConfirmationDialog(popupStack, label, true);
246 
247  if (confirmPopup->Create())
248  popupStack->AddScreen(confirmPopup);
249 
250  confirmPopup->SetReturnEvent(this, "exit");
251  }
252  else
253  {
255  }
256 }
257 
263 {
264  UpdateRightList();
265 }
266 
272 {
274 }
275 
276 
284  MythUIButtonList *uilist, const QStringList &contents, bool arrows)
285 {
286  // remove all strings from the current list
287  uilist->Reset();
288 
289  // add each new string
290  for (const auto & content : std::as_const(contents))
291  {
292  auto *item = new MythUIButtonListItem(uilist, content);
293  item->setDrawArrow(arrows);
294  }
295 }
296 
301 {
302  // get the selected item in the right list.
304 
305  if (!item)
306  return;
307 
308  QString rtstr = item->GetText();
309 
310  switch(m_currentView)
311  {
312  case kActionsByContext:
314  break;
315  case kKeysByContext:
317  break;
318  case kContextsByKey:
320  break;
321  }
322 }
323 
329 {
330  for (uint i = 0; i < Action::kMaximumNumberOfBindings; i++)
331  m_actionButtons.at(i)->SetText("");
332 
333  if (GetFocusWidget() == m_leftList)
334  {
335  m_description->Reset();
336  return;
337  }
338 
339  const QString context = GetCurrentContext();
340  const QString action = GetCurrentAction();
341 
342  QString desc = m_bindings->GetActionDescription(context, action);
343  m_description->SetText(tr(desc.toLatin1().constData()));
344 
345  QStringList keys = m_bindings->GetActionKeys(context, action);
346  for (int i = 0; (i < keys.count()) &&
347  (i < (int)Action::kMaximumNumberOfBindings); i++)
348  {
349  m_actionButtons.at(i)->SetText(keys[i]);
350  }
351 }
352 
353 
362 {
364  return m_leftList->GetItemCurrent()->GetText();
365 
366  if (GetFocusWidget() == m_leftList)
367  return {};
368 
369  QString desc = m_rightList->GetItemCurrent()->GetText();
370  int loc = desc.indexOf(" => ");
371  if (loc == -1)
372  return {}; // Should not happen
373 
375  return desc.left(loc);
376 
377  return desc.mid(loc + 4);
378 }
379 
388 {
390  {
392  {
393  return m_leftList->GetItemCurrent()->GetText();
394  }
395  return {};
396  }
397 
398  if (GetFocusWidget() == m_leftList)
399  return {};
400 
402  return {};
403 
404  QString desc = m_rightList->GetItemCurrent()->GetText();
405  if (kContextList == m_leftListType &&
407  {
408  return desc;
409  }
410 
411  int loc = desc.indexOf(" => ");
412  if (loc == -1)
413  return {}; // should not happen..
414 
416  return desc.left(loc);
417 
418  QString rv = desc.mid(loc+4);
419  if (rv == "<none>")
420  return {};
421 
422  return rv;
423 }
424 
430 {
431  for (uint i = 0; i < Action::kMaximumNumberOfBindings; i++)
432  {
433  MythUIButton *button = m_actionButtons.at(i);
434  MythUIType *uitype = GetFocusWidget();
435  if (uitype == button)
436  return i;
437  }
438 
440 }
441 
450 {
451  MythUIButtonListItem* currentButton = nullptr;
452  if (m_leftListType == kKeyList)
453  {
454  currentButton = m_leftList->GetItemCurrent();
455  if (currentButton != nullptr)
456  return currentButton->GetText();
457  }
458 
459  if (GetFocusWidget() == m_leftList)
460  return {};
461 
463  {
464  QString context = GetCurrentContext();
465  QString action = GetCurrentAction();
466  uint b = GetCurrentButton();
467  QStringList keys = m_bindings->GetActionKeys(context, action);
468 
469  if (b < (uint)keys.count())
470  return keys[b];
471 
472  return {};
473  }
474 
475  currentButton = m_rightList->GetItemCurrent();
476  QString desc;
477  if (currentButton)
478  desc = currentButton->GetText();
479 
480  int loc = desc.indexOf(" => ");
481  if (loc == -1)
482  return {}; // Should not happen
483 
484 
485  if (m_rightListType == kKeyList)
486  return desc.left(loc);
487 
488  return desc.mid(loc + 4);
489 }
490 
495 void MythControls::LoadData(const QString &hostname)
496 {
497  /* create the key bindings and the tree */
500 
501  /* Alphabetic order, but jump and global at the top */
502  m_sortedContexts.sort();
505  m_sortedContexts.insert(m_sortedContexts.begin(),
507  m_sortedContexts.insert(m_sortedContexts.begin(),
509 
510  for (const auto & ctx_name : std::as_const(m_sortedContexts))
511  {
512  QStringList actions = m_bindings->GetActions(ctx_name);
513  actions.sort();
514  m_contexts.insert(ctx_name, actions);
515  }
516 }
517 
525 {
526  QString context = GetCurrentContext();
527  QString key = GetCurrentKey();
528  QString action = GetCurrentAction();
529 
530  if (context.isEmpty() || key.isEmpty() || action.isEmpty())
531  {
532  LOG(VB_GENERAL, LOG_ERR,
533  "Unable to delete binding, missing information");
534  return;
535  }
536 
537  if (m_bindings->RemoveActionKey(context, action, key))
538  {
540  return;
541  }
542 
543  QString label = tr("This action is mandatory and needs at least one key "
544  "bound to it. Instead, try rebinding with another key.");
545 
546  MythScreenStack *popupStack =
547  GetMythMainWindow()->GetStack("popup stack");
548 
549  auto *confirmPopup = new MythConfirmationDialog(popupStack, label, false);
550 
551  if (confirmPopup->Create())
552  {
553  confirmPopup->SetReturnEvent(this, "mandatorydelete");
554  popupStack->AddScreen(confirmPopup);
555  }
556  else
557  {
558  delete confirmPopup;
559  }
560 }
561 
566 void MythControls::ResolveConflict(ActionID *conflict, int error_level,
567  const QString &key)
568 {
569  if (!conflict)
570  return;
571 
572  QString label;
573 
574  bool error = (KeyBindings::kKeyBindingError == error_level);
575 
576  if (error)
577  {
578  label = tr("This key binding conflicts with %1 in the %2 context. "
579  "Unable to bind key.")
580  .arg(conflict->GetAction(), conflict->GetContext());
581  }
582  else
583  {
584  label = tr("This key binding conflicts with %1 in the %2 context. "
585  "Do you want to bind it anyway?")
586  .arg(conflict->GetAction(), conflict->GetContext());
587  }
588 
589  MythScreenStack *popupStack =
590  GetMythMainWindow()->GetStack("popup stack");
591 
592  auto *confirmPopup = new MythConfirmationDialog(popupStack, label, !error);
593 
594  if (!error)
595  {
596  confirmPopup->SetData(QVariant::fromValue(key));
597  confirmPopup->SetReturnEvent(this, "conflict");
598  }
599 
600  if (confirmPopup->Create())
601  popupStack->AddScreen(confirmPopup);
602 
603  delete conflict;
604 }
605 
606 void MythControls::GrabKey(void) const
607 {
608  /* grab a key from the user */
609  MythScreenStack *popupStack =
610  GetMythMainWindow()->GetStack("popup stack");
611 
612  auto *keyGrabPopup = new KeyGrabPopupBox(popupStack);
613 
614  if (keyGrabPopup->Create())
615  popupStack->AddScreen(keyGrabPopup, false);
616 
617  connect(keyGrabPopup, &KeyGrabPopupBox::HaveResult,
618  this, qOverload<const QString&>(&MythControls::AddKeyToAction),
619  Qt::QueuedConnection);
620 }
621 
630 void MythControls::AddKeyToAction(const QString& key, bool ignoreconflict)
631 {
632  QString action = GetCurrentAction();
633  QString context = GetCurrentContext();
634  QStringList keys = m_bindings->GetActionKeys(context, action);
635 
636  // Don't recreating an existing binding...
637  int binding_index = GetCurrentButton();
638  if ((binding_index >= (int)Action::kMaximumNumberOfBindings) ||
639  ((binding_index < keys.size()) && (keys[binding_index] == key)))
640  {
641  return;
642  }
643 
644  if (!ignoreconflict)
645  {
646  // Check for first of the potential conflicts.
647  int err_level = 0;
648  ActionID *conflict = m_bindings->GetConflict(context, key, err_level);
649  if (conflict)
650  {
651  ResolveConflict(conflict, err_level, key);
652 
653  return;
654  }
655  }
656 
657  if (binding_index < keys.count())
658  {
659  m_bindings->ReplaceActionKey(context, action, key,
660  keys[binding_index]);
661  }
662  else
663  {
664  m_bindings->AddActionKey(context, action, key);
665  }
666 
668 }
669 
670 void MythControls::AddKeyToAction(const QString& key)
671 {
672  AddKeyToAction(key, false);
673 }
674 
675 void MythControls::customEvent(QEvent *event)
676 {
677  if (event->type() == DialogCompletionEvent::kEventType)
678  {
679  auto *dce = (DialogCompletionEvent*)(event);
680 
681  QString resultid = dce->GetId();
682  int buttonnum = dce->GetResult();
683 
684  if (resultid == "action")
685  {
686  if (buttonnum == 0)
687  GrabKey();
688  else if (buttonnum == 1)
689  DeleteKey();
690  }
691  else if (resultid == "option")
692  {
693  if (buttonnum == 0)
694  Save();
695  else if (buttonnum == 1)
696  ChangeView();
697  else if (buttonnum == 2)
698  GetMythMainWindow()->JumpTo("Reset All Keys");
699  }
700  else if (resultid == "exit")
701  {
702  if (buttonnum == 1)
703  Save();
704  else
705  Teardown();
706 
707  Close();
708  }
709  else if (resultid == "view")
710  {
711  QStringList contents;
712  QString leftcaption;
713  QString rightcaption;
714 
715  if (buttonnum == 0)
716  {
717  leftcaption = tr("Contexts");
718  rightcaption = tr("Actions");
720  contents = m_bindings->GetContexts();
721  }
722  else if (buttonnum == 1)
723  {
724  leftcaption = tr("Contexts");
725  rightcaption = tr("Keys");
727  contents = m_bindings->GetContexts();
728  }
729  else if (buttonnum == 2)
730  {
731  leftcaption = tr("Keys");
732  rightcaption = tr("Contexts");
734  contents = m_bindings->GetKeys();
735  }
736  else
737  {
738  return;
739  }
740 
741  m_leftDescription->SetText(leftcaption);
742  m_rightDescription->SetText(rightcaption);
743 
744  SetListContents(m_leftList, contents, true);
746  UpdateRightList();
747 
748  if (GetFocusWidget() != m_leftList)
750  }
751  else if (resultid == "conflict")
752  {
753  if (buttonnum == 1)
754  {
755  QString key = dce->GetData().toString();
756  AddKeyToAction(key, true);
757  }
758  }
759 
760  if (m_menuPopup)
761  m_menuPopup = nullptr;
762  }
763 
764 }
765 
766 /* vim: set expandtab tabstop=4 shiftwidth=4: */
MythUIButton::Clicked
void Clicked()
MythControls::kKeyList
@ kKeyList
Definition: mythcontrols.h:72
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:303
kContextsByKey
@ kContextsByKey
Definition: mythcontrols.h:41
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1614
mythuitext.h
MythScreenType::NextPrevWidgetFocus
virtual bool NextPrevWidgetFocus(bool up_or_down)
Definition: mythscreentype.cpp:150
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:65
error
static void error(const char *str,...)
Definition: vbi.cpp:37
MythControls::m_leftListType
ListType m_leftListType
Definition: mythcontrols.h:133
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:383
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:138
MythMainWindow::JumpTo
void JumpTo(const QString &Destination, bool Pop=true)
Definition: mythmainwindow.cpp:1457
kKeysByContext
@ kKeysByContext
Definition: mythcontrols.h:41
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:524
MythControls::ChangeView
void ChangeView(void)
Change the view.
Definition: mythcontrols.cpp:194
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:283
MythControls::GetCurrentContext
QString GetCurrentContext(void)
Get the currently selected context string.
Definition: mythcontrols.cpp:361
MythControls::ResolveConflict
void ResolveConflict(ActionID *conflict, int error_level, const QString &key)
Resolve a potential conflict.
Definition: mythcontrols.cpp:566
mythuibuttonlist.h
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:110
MythUIType::TakingFocus
void TakingFocus()
MythControls::ChangeButtonFocus
void ChangeButtonFocus(int direction)
Change button focus in a particular direction.
Definition: mythcontrols.cpp:135
MythControls::kActionList
@ kActionList
Definition: mythcontrols.h:73
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:449
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
KeyBindings::kKeyBindingError
@ kKeyBindingError
Definition: keybindings.h:47
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
MythControls::kContextList
@ kContextList
Definition: mythcontrols.h:71
MythUIButtonList::itemClicked
void itemClicked(MythUIButtonListItem *item)
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:328
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:115
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:203
MythUIButton
A single button widget.
Definition: mythuibutton.h:21
KeyGrabPopupBox::HaveResult
void HaveResult(QString)
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:55
kActionsByContext
@ kActionsByContext
Definition: mythcontrols.h:41
KeyBindings::GetKeyContexts
QStringList GetKeyContexts(const QString &key) const
Get the context names in which a key is bound.
Definition: keybindings.cpp:115
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:3368
MythControls::AddKeyToAction
void AddKeyToAction(const QString &key, bool ignoreconflict)
Add a key to the currently selected action.
Definition: mythcontrols.cpp:630
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:429
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:387
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:271
mythcorecontext.h
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:701
MythControls::GrabKey
void GrabKey(void) const
Definition: mythcontrols.cpp:606
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
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:115
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:322
ActionID
A class that uniquely identifies an action.
Definition: action.h:84
MythCoreContext::GetHostName
QString GetHostName(void)
Definition: mythcorecontext.cpp:842
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:300
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:675
MythControls::m_rightList
MythUIButtonList * m_rightList
Definition: mythcontrols.h:122
MythControls::ShowMenu
void ShowMenu(void) override
Definition: mythcontrols.cpp:215
MythControls::LeftSelected
void LeftSelected(MythUIButtonListItem *item)
Refreshes the right list when an item in the left list is selected.
Definition: mythcontrols.cpp:262
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:495
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:235
uint
unsigned int uint
Definition: freesurround.h:24
keygrabber.h