MythTV  master
mythuibuttontree.cpp
Go to the documentation of this file.
1 // Own header
2 #include "mythuibuttontree.h"
3 
4 // C++
5 #include <algorithm>
6 #include <utility>
7 
8 // Qt headers
9 #include <QDomDocument>
10 
11 // Mythbase headers
13 
14 // Mythui Headers
15 #include "mythmainwindow.h"
16 #include "mythgesture.h"
17 
18 MythUIButtonTree::MythUIButtonTree(MythUIType *parent, const QString &name)
19  : MythUIType(parent, name)
20 {
21  SetCanTakeFocus(true);
22 
23  connect(this, &MythUIType::TakingFocus, this, &MythUIButtonTree::Select);
25 }
26 
32 {
33  if (!m_listTemplate)
34  m_listTemplate = dynamic_cast<MythUIButtonList *>
35  (GetChild("listtemplate"));
36 
37  if (!m_listTemplate)
38  {
39  LOG(VB_GENERAL, LOG_ERR, QString("(%1) MythUIButtonList listtemplate "
40  "is required in mythuibuttonlist: %2")
41  .arg(GetXMLLocation().arg(objectName())));
42  return;
43  }
44 
45  m_listTemplate->SetVisible(false);
46 
47  int width = (m_area.width() - (m_listSpacing * (m_numLists - 1))) / m_numLists;
48  int height = m_area.height();
49 
50  int i = 0;
51 
52  while (i < (int)m_numLists)
53  {
54  QString listname = QString("buttontree list %1").arg(i);
55  auto *list = new MythUIButtonList(this, listname);
56  list->CopyFrom(m_listTemplate);
57  list->SetVisible(false);
58  list->SetActive(false);
59  list->SetCanTakeFocus(false);
60  int x = i * (width + m_listSpacing);
61  MythRect listArea = MythRect(x, 0, width, height);
62  list->SetArea(listArea);
63  m_buttonlists.append(list);
64  i++;
65  }
66 
67  m_initialized = true;
68 }
69 
73 void MythUIButtonTree::SetTreeState(bool refreshAll)
74 {
75  if (!m_initialized)
76  Init();
77 
78  if (!m_rootNode)
79  return;
80 
81  if (!m_currentNode)
83  if (!m_currentNode)
84  return;
85 
86  QList<MythGenericTree *> route = m_currentNode->getRoute();
87 
88  // Sanity Checks
89  if (m_depthOffset >= route.size())
90  m_depthOffset = 0;
91 
92  if (((int)m_currentDepth + m_depthOffset) >= route.size())
93  m_currentDepth = 0;
94 
95  MythGenericTree *node = route.at(m_currentDepth + m_depthOffset);
96 
98  refreshAll = true;
99 
101 
102  m_visibleLists = 0;
103  uint listid = 0;
104 
105  while (listid < (uint)m_buttonlists.count())
106  {
107  MythUIButtonList *list = m_buttonlists.at(listid);
108 
109  list->SetVisible(false);
110  list->SetActive(false);
111 
112  MythGenericTree *selectedNode = nullptr;
113 
114  if (node)
115  selectedNode = node->getSelectedChild(true);
116 
117  if (refreshAll || m_activeListID < listid)
118  {
119  if (!UpdateList(list, node))
120  {
121  listid++;
122  continue;
123  }
124  }
125 
126  if (m_active && (listid == m_activeListID))
127  {
128  m_activeList = list;
129  list->SetActive(true);
130  DoSetCurrentNode(selectedNode);
131  emit itemSelected(list->GetItemCurrent());
132  }
133 
134  listid++;
135 
136  list->SetVisible(true);
137  m_visibleLists++;
138 
139  node = selectedNode;
140  }
141 }
142 
152 {
153  disconnect(list, nullptr, nullptr, nullptr);
154 
155  list->Reset();
156 
157  QList<MythGenericTree *> *nodelist = nullptr;
158 
159  if (node)
160  nodelist = node->getAllChildren();
161 
162  if (!nodelist || nodelist->isEmpty())
163  return false;
164 
165  MythGenericTree *selectedNode = node->getSelectedChild(true);
166 
167  MythUIButtonListItem *selectedItem = nullptr;
168  QList<MythGenericTree *>::iterator it;
169 
170  for (it = nodelist->begin(); it != nodelist->end(); ++it)
171  {
172  MythGenericTree *childnode = *it;
173 
174  if (!childnode->IsVisible())
175  continue;
176 
177  MythUIButtonListItem *item = childnode->CreateListButton(list);
178 
179  if (childnode == selectedNode)
180  selectedItem = item;
181  }
182 
183  if (list->IsEmpty())
184  return false;
185 
186  if (selectedItem)
187  list->SetItemCurrent(selectedItem);
188 
189  connect(list, &MythUIButtonList::itemSelected,
191  connect(list, &MythUIButtonList::itemClicked,
193  connect(list, &MythUIButtonList::itemVisible,
195 
196  return true;
197 }
198 
214 {
215  if (!tree || !tree->visibleChildCount())
216  return false;
217 
218  if (m_rootNode)
219  Reset();
220 
221  m_rootNode = tree;
223  // The node we are given may not be the root node of that tree, we need
224  // to keep track of our depth in the tree so that we can navigate
225  // as though the parent nodes do not exist
227  SetTreeState(true);
228  emit rootChanged(m_rootNode);
229 
230  return true;
231 }
232 
237 {
238  m_rootNode = m_currentNode = nullptr;
239  m_visibleLists = 0;
241  m_activeList = nullptr;
242  m_activeListID = 0;
243  m_active = true;
244 
245  SetTreeState(true);
246  emit rootChanged(m_rootNode);
247 
249 }
250 
259 bool MythUIButtonTree::SetNodeById(QList<int> route)
260 {
261  MythGenericTree *node = m_rootNode->findNode(std::move(route));
262 
263  if (node && node->isSelectable())
264  {
265  DoSetCurrentNode(node);
266  SetTreeState();
267  return true;
268  }
269 
270  return false;
271 }
272 
281 bool MythUIButtonTree::SetNodeByString(QStringList route)
282 {
283  if (!m_rootNode)
284  {
285  DoSetCurrentNode(nullptr);
286  return false;
287  }
288 
289  MythGenericTree *foundNode = m_rootNode;
290 
291  bool foundit = false;
292 
293  if (!route.isEmpty())
294  {
295  if (route[0] == m_rootNode->GetText())
296  {
297  if (route.size() > 1)
298  {
299  for (int i = 1; i < route.size(); i ++)
300  {
301  MythGenericTree *node = foundNode->getChildByName(route[i]);
302 
303  if (node)
304  {
305  node->becomeSelectedChild();
306  foundNode = node;
307  foundit = true;
308  }
309  else
310  {
311  node = foundNode->getChildAt(0);
312 
313  if (node)
314  {
315  node->becomeSelectedChild();
316  foundNode = node;
317  }
318 
319  break;
320  }
321  }
322  }
323  else
324  {
325  foundit = true;
326  }
327  }
328  }
329 
330  DoSetCurrentNode(foundNode);
331 
332  m_currentDepth = std::max(0, (int)(foundNode->currentDepth() - m_depthOffset - m_numLists));
333  m_activeListID = std::min(foundNode->currentDepth() - m_depthOffset - 1, (int)(m_numLists - 1));
334 
335  SetTreeState(true);
336 
337  return foundit;
338 }
339 
349 {
350  if (!node)
351  return false;
352 
353  if (node == m_currentNode)
354  return true;
355 
356  QStringList route = node->getRouteByString();
357 
358  return SetNodeByString(route);
359 }
360 
362 {
363  if (m_activeList)
365 }
366 
368 {
369  if (node)
370  {
371  if (node == m_currentNode)
372  return true;
373 
374  m_currentNode = node;
375  node->becomeSelectedChild();
377  return true;
378  }
379 
380  return false;
381 }
382 
392 {
393  if (!item || !m_rootNode)
394  return;
395 
396  auto *node = item->GetData().value<MythGenericTree *>();
397 
398  if (node && node->getParent())
399  {
400  DoSetCurrentNode(node->getParent());
401 
402  if (deleteNode)
403  node->getParent()->deleteNode(node);
404  else
405  node->SetVisible(false);
406  }
407 
408  MythUIButtonList *list = item->parent();
409 
410  list->RemoveItem(item);
411 
412  if (list->IsEmpty())
413  {
414  if (m_currentDepth > 0)
415  m_currentDepth--;
416  else if (m_activeListID > 1)
417  m_activeListID--;
418 
419  SetTreeState(true);
420  }
421 }
422 
431 {
432  RemoveItem(GetItemCurrent(), deleteNode);
433 }
434 
441 {
442  m_active = active;
443 
444  if (m_initialized)
445  SetTreeState();
446 }
447 
449 {
450  SetActive(true);
451 }
452 
454 {
455  SetActive(false);
456 }
457 
458 
466 {
467  bool doUpdate = false;
468 
469  if (right)
470  {
471  if ((m_activeListID + 1 < m_visibleLists) &&
472  (m_activeListID + 1 < (uint)m_buttonlists.count()))
473  m_activeListID++;
474  else if (m_currentNode && m_currentNode->visibleChildCount() > 0)
475  {
476  m_currentDepth++;
477  doUpdate = true;
478  }
479  else
480  {
481  return;
482  }
483  }
484  else if (!right)
485  {
486  if (m_activeListID > 0)
487  m_activeListID--;
488  else if (m_currentDepth > 0)
489  {
490  m_currentDepth--;
491  doUpdate = true;
492  }
493  else
494  {
495  return;
496  }
497  }
498 
499  if (doUpdate)
500  SetTreeState();
501  else
502  {
503  if (m_activeList)
505 
506  if (m_activeListID < (uint)m_buttonlists.count())
507  {
509  m_activeList->Select();
510  }
511  }
512 }
513 
520 {
521  if (!item)
522  return;
523 
524  MythUIButtonList *list = item->parent();
525  QString name = list->objectName();
526 
527  // New list is automatically selected so we just need to deselect the old
528  // list
529  if (m_activeList)
531 
532  m_activeListID = name.section(' ', 2, 2).toInt();
533  m_activeList = list;
534 
535 
536  auto *node = item->GetData().value<MythGenericTree *> ();
537  DoSetCurrentNode(node);
538  SetTreeState();
539 }
540 
547 {
548  if (!item)
549  return;
550 
551  auto *node = item->GetData().value<MythGenericTree *>();
552 
553  if (DoSetCurrentNode(node))
554  emit itemClicked(item);
555 }
556 
563 {
564  if (m_activeList)
565  return m_activeList->GetItemCurrent();
566 
567  return nullptr;
568 }
569 
576 {
577  if (!item)
578  return;
579 
580  emit itemVisible(item);
581 }
582 
586 bool MythUIButtonTree::keyPressEvent(QKeyEvent *event)
587 {
588  QStringList actions;
589  bool handled = false;
590  handled = GetMythMainWindow()->TranslateKeyPress("Global", event, actions);
591 
592  for (int i = 0; i < actions.size() && !handled; i++)
593  {
594  const QString& action = actions[i];
595  handled = true;
596 
598  {
599  if (action == "SELECT" && m_currentNode->visibleChildCount() > 0)
600  {
601  SwitchList(true);
602  }
603  else if (action == "ESCAPE" && m_currentDepth > 0)
604  {
605  SwitchList(false);
606  }
607  else
608  {
609  handled = false;
610  }
611  }
612  else
613  {
614  if (action == "RIGHT" && m_currentNode->visibleChildCount() > 0)
615  {
616  SwitchList(true);
617  }
618  else if (action == "LEFT" && (m_currentDepth != 0 || m_activeListID != 0))
619  {
620  SwitchList(false);
621  }
622  else
623  {
624  handled = false;
625  }
626  }
627  }
628 
629  if (!handled && m_activeList)
630  handled = m_activeList->keyPressEvent(event);
631 
632  return handled;
633 }
634 
636 {
637  bool handled = false;
638 
639  if (event->GetGesture() == MythGestureEvent::Click)
640  {
641  // We want the relative position of the click
642  QPoint position = event->GetPosition() -
643  m_parent->GetArea().topLeft();
644 
645  MythUIType *type = GetChildAt(position, false, false);
646 
647  if (!type)
648  return false;
649 
650  auto *list = dynamic_cast<MythUIButtonList *>(type);
651 
652  if (list)
653  handled = list->gestureEvent(event);
654  }
655 
656  return handled;
657 }
658 
663  const QString &filename, QDomElement &element, bool showWarnings)
664 {
665  if (element.tagName() == "spacing")
666  {
667  m_listSpacing = NormX(getFirstText(element).toInt());
668  }
669  else if (element.tagName() == "numlists")
670  {
671  m_numLists = getFirstText(element).toInt();
672  }
673  else
674  {
675  return MythUIType::ParseElement(filename, element, showWarnings);
676  }
677 
678  return true;
679 }
680 
685 {
686  auto *bt = new MythUIButtonTree(parent, objectName());
687  bt->CopyFrom(this);
688 }
689 
694 {
695  auto *bt = dynamic_cast<MythUIButtonTree *>(base);
696 
697  if (!bt)
698  return;
699 
700  m_numLists = bt->m_numLists;
701  m_listSpacing = bt->m_listSpacing;
702  m_active = bt->m_active;
703 
704  MythUIType::CopyFrom(base);
705 
706  m_listTemplate = dynamic_cast<MythUIButtonList *>(GetChild("listtemplate"));
707 
708  m_initialized = false;
709 }
MythUIType::m_area
MythRect m_area
Definition: mythuitype.h:274
mythuibuttontree.h
MythUIButtonTree::m_buttonlists
QList< MythUIButtonList * > m_buttonlists
Definition: mythuibuttontree.h:75
MythUIButtonTree::gestureEvent
bool gestureEvent(MythGestureEvent *event) override
Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop.
Definition: mythuibuttontree.cpp:635
MythGestureEvent::Click
@ Click
Definition: mythgesture.h:77
MythUIButtonTree::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythuibuttontree.cpp:586
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1614
MythUIButtonTree::m_listTemplate
MythUIButtonList * m_listTemplate
Definition: mythuibuttontree.h:76
MythGenericTree::GetText
QString GetText(const QString &name="") const
Definition: mythgenerictree.cpp:555
MythUIButtonTree::CreateCopy
void CreateCopy(MythUIType *parent) override
Copy the state of this widget to the one given, it must be of the same type.
Definition: mythuibuttontree.cpp:684
MythGestureEvent::GetGesture
Gesture GetGesture() const
Definition: mythgesture.h:85
MythUIType::GetChildAt
MythUIType * GetChildAt(QPoint p, bool recursive=true, bool focusable=true) const
Return the first MythUIType at the given coordinates.
Definition: mythuitype.cpp:241
MythUIButtonTree::m_initialized
bool m_initialized
Definition: mythuibuttontree.h:69
MythUIButtonList::gestureEvent
bool gestureEvent(MythGestureEvent *event) override
Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop.
Definition: mythuibuttonlist.cpp:2673
MythUIType::GetChild
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
Definition: mythuitype.cpp:138
MythUIButtonList::RemoveItem
void RemoveItem(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1512
MythGenericTree::visibleChildCount
uint visibleChildCount() const
Definition: mythgenerictree.h:101
MythUIButtonTree::SetNodeById
bool SetNodeById(QList< int > route)
Using a path based on the node IDs, set the currently selected node.
Definition: mythuibuttontree.cpp:259
MythGenericTree::currentDepth
int currentDepth(void)
Establish how deep in the current tree this node lies.
Definition: mythgenerictree.cpp:269
MythUIButtonList::m_layout
LayoutType m_layout
Definition: mythuibuttonlist.h:343
MythUIButtonTree::itemSelected
void itemSelected(MythUIButtonListItem *item)
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
MythUIButtonTree::Deselect
void Deselect()
Definition: mythuibuttontree.cpp:453
MythUIButtonTree::GetItemCurrent
MythUIButtonListItem * GetItemCurrent(void) const
Return the currently selected list item.
Definition: mythuibuttontree.cpp:562
MythUIType::SetCanTakeFocus
void SetCanTakeFocus(bool set=true)
Set whether this widget can take focus.
Definition: mythuitype.cpp:362
MythUIButtonListItem::parent
MythUIButtonList * parent() const
Definition: mythuibuttonlist.cpp:3674
MythUIButtonTree::SetCurrentNode
bool SetCurrentNode(MythGenericTree *node)
Set the currently selected node.
Definition: mythuibuttontree.cpp:348
MythGenericTree::getChildByName
MythGenericTree * getChildByName(const QString &a_name) const
Definition: mythgenerictree.cpp:377
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MythUIButtonTree::RemoveItem
void RemoveItem(MythUIButtonListItem *item, bool deleteNode=false)
Remove the item from the tree.
Definition: mythuibuttontree.cpp:391
MythUIButtonTree::m_numLists
uint m_numLists
Definition: mythuibuttontree.h:70
MythGenericTree::isSelectable
bool isSelectable() const
Definition: mythgenerictree.h:107
MythUIButtonTree::AssignTree
bool AssignTree(MythGenericTree *tree)
Assign the root node of the tree to be displayed.
Definition: mythuibuttontree.cpp:213
MythUIButtonTree::Select
void Select()
Definition: mythuibuttontree.cpp:448
MythRect
Wrapper around QRect allowing us to handle percentage and other relative values for areas in mythui.
Definition: mythrect.h:17
MythUIButtonTree::handleSelect
void handleSelect(MythUIButtonListItem *item)
Handle a list item receiving focus.
Definition: mythuibuttontree.cpp:519
MythUIType::TakingFocus
void TakingFocus()
MythUIType::GetArea
virtual MythRect GetArea(void) const
If the object has a minimum area defined, return it, other wise return the default area.
Definition: mythuitype.cpp:885
MythUIButtonTree::MythUIButtonTree
MythUIButtonTree(MythUIType *parent, const QString &name)
Definition: mythuibuttontree.cpp:18
MythUIButtonTree::handleClick
void handleClick(MythUIButtonListItem *item)
Handle a list item being clicked.
Definition: mythuibuttontree.cpp:546
MythGenericTree::getChildAt
MythGenericTree * getChildAt(uint reference) const
Definition: mythgenerictree.cpp:281
MythUIButtonTree::rootChanged
void rootChanged(MythGenericTree *node)
MythGenericTree::getSelectedChild
MythGenericTree * getSelectedChild(bool onlyVisible=false) const
Definition: mythgenerictree.cpp:310
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
MythUIButtonTree::itemClicked
void itemClicked(MythUIButtonListItem *item)
MythUIButtonList::IsEmpty
bool IsEmpty() const
Definition: mythuibuttonlist.cpp:1695
MythUIButtonTree::SwitchList
void SwitchList(bool right)
Move from list, or one level of the tree, to another.
Definition: mythuibuttontree.cpp:465
mythlogging.h
MythUIButtonList::itemClicked
void itemClicked(MythUIButtonListItem *item)
MythMainWindow::TranslateKeyPress
bool TranslateKeyPress(const QString &Context, QKeyEvent *Event, QStringList &Actions, bool AllowJumps=true)
Get a list of actions for a keypress in the given context.
Definition: mythmainwindow.cpp:1111
MythUIButtonList::Deselect
void Deselect()
Definition: mythuibuttonlist.cpp:86
MythUIType::GetXMLLocation
QString GetXMLLocation(void) const
Definition: mythuitype.h:180
MythUIButtonTree::m_activeList
MythUIButtonList * m_activeList
Definition: mythuibuttontree.h:77
MythUIButtonList::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythuibuttonlist.cpp:2528
MythGenericTree::getRouteByString
QStringList getRouteByString(void)
Definition: mythgenerictree.cpp:226
MythGenericTree::IsVisible
bool IsVisible() const
Definition: mythgenerictree.h:110
MythUIButtonTree::SetActive
void SetActive(bool active)
Set the widget active/inactive.
Definition: mythuibuttontree.cpp:440
XMLParseBase::getFirstText
static QString getFirstText(QDomElement &element)
Definition: xmlparsebase.cpp:52
MythUIButtonTree::m_activeListID
uint m_activeListID
Definition: mythuibuttontree.h:78
MythUIButtonTree::ParseElement
bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings) override
Parse the xml definition of this widget setting the state of the object accordingly.
Definition: mythuibuttontree.cpp:662
MythUIButtonTree::Init
void Init(void)
Initialise the tree having loaded the formatting options from the theme.
Definition: mythuibuttontree.cpp:31
MythUIType::m_parent
MythUIType * m_parent
Definition: mythuitype.h:294
MythUIButtonTree::m_currentNode
MythGenericTree * m_currentNode
Definition: mythuibuttontree.h:80
MythGenericTree::CreateListButton
virtual MythUIButtonListItem * CreateListButton(MythUIButtonList *list)
Definition: mythgenerictree.cpp:500
MythUIButtonTree
A tree widget for displaying and navigating a MythGenericTree()
Definition: mythuibuttontree.h:16
MythUIButtonTree::m_listSpacing
uint m_listSpacing
Definition: mythuibuttontree.h:81
MythUIType::CopyFrom
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
Definition: mythuitype.cpp:1171
MythUIButtonTree::SetTreeState
void SetTreeState(bool refreshAll=false)
Update the widget following a change.
Definition: mythuibuttontree.cpp:73
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3715
uint
unsigned int uint
Definition: compat.h:81
MythUIButtonTree::m_depthOffset
int m_depthOffset
Definition: mythuibuttontree.h:73
MythUIButtonTree::SetNodeByString
bool SetNodeByString(QStringList route)
Using a path based on the node string, set the currently selected node.
Definition: mythuibuttontree.cpp:281
MythUIButtonList::itemVisible
void itemVisible(MythUIButtonListItem *item)
mythgesture.h
A C++ ripoff of the stroke library for MythTV.
MythGenericTree::getAllChildren
QList< MythGenericTree * > * getAllChildren() const
Definition: mythgenerictree.cpp:276
MythUIType::Reset
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuitype.cpp:73
MythGenericTree::findNode
MythGenericTree * findNode(QList< int > route_of_branches)
Definition: mythgenerictree.cpp:156
MythUIButtonList::LayoutGrid
@ LayoutGrid
Definition: mythuibuttonlist.h:209
MythUIType
The base class on which all widgets and screens are based.
Definition: mythuitype.h:85
MythUIButtonTree::UpdateList
bool UpdateList(MythUIButtonList *list, MythGenericTree *node) const
Update a list with children of the tree node.
Definition: mythuibuttontree.cpp:151
MythUIButtonTree::m_active
bool m_active
Definition: mythuibuttontree.h:68
MythUIButtonTree::Reset
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuibuttontree.cpp:236
MythUIButtonTree::CopyFrom
void CopyFrom(MythUIType *base) override
Copy this widgets state from another.
Definition: mythuibuttontree.cpp:693
MythUIButtonTree::RemoveCurrentItem
void RemoveCurrentItem(bool deleteNode=false)
Remove the currently selected item from the tree.
Definition: mythuibuttontree.cpp:430
MythRect::topLeft
MythPoint topLeft(void) const
Definition: mythrect.cpp:288
MythUIButtonTree::handleVisible
void handleVisible(MythUIButtonListItem *item)
Handle a list item becoming visible.
Definition: mythuibuttontree.cpp:575
MythUIButtonTree::m_visibleLists
uint m_visibleLists
Definition: mythuibuttontree.h:71
MythGenericTree
Definition: mythgenerictree.h:27
MythUIButtonTree::m_currentDepth
uint m_currentDepth
Definition: mythuibuttontree.h:72
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1105
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
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1581
MythUIButtonTree::DoSetCurrentNode
bool DoSetCurrentNode(MythGenericTree *node)
Definition: mythuibuttontree.cpp:367
MythGenericTree::getRoute
QList< MythGenericTree * > getRoute(void)
Definition: mythgenerictree.cpp:240
build_compdb.action
action
Definition: build_compdb.py:9
MythUIButtonTree::ShowSearchDialog
void ShowSearchDialog(void)
Definition: mythuibuttontree.cpp:361
MythGestureEvent
A custom event that represents a mouse gesture.
Definition: mythgesture.h:39
MythUIButtonTree::m_oldDepth
uint m_oldDepth
Definition: mythuibuttontree.h:74
MythUIType::NormX
static int NormX(int width)
Definition: mythuitype.cpp:1158
MythUIButtonList::ShowSearchDialog
void ShowSearchDialog(void)
Definition: mythuibuttonlist.cpp:3149
MythUIType::LosingFocus
void LosingFocus()
MythUIType::ParseElement
virtual bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings)
Parse the xml definition of this widget setting the state of the object accordingly.
Definition: mythuitype.cpp:1237
MythUIButtonList::Select
void Select()
Definition: mythuibuttonlist.cpp:76
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:191
build_compdb.filename
filename
Definition: build_compdb.py:21
mythmainwindow.h
MythUIButtonTree::m_rootNode
MythGenericTree * m_rootNode
Definition: mythuibuttontree.h:79
MythGenericTree::becomeSelectedChild
void becomeSelectedChild(void)
Definition: mythgenerictree.cpp:324
MythUIButtonTree::itemVisible
void itemVisible(MythUIButtonListItem *item)
MythUIButtonTree::nodeChanged
void nodeChanged(MythGenericTree *node)
MythUIButtonList::SetActive
void SetActive(bool active)
Definition: mythuibuttonlist.cpp:102