|
MythTV
0.26-pre
|
A tree widget for displaying and navigating a MythGenericTree() More...
#include <mythuibuttontree.h>
Public Slots | |
| void | handleSelect (MythUIButtonListItem *item) |
| Handle a list item receiving focus. | |
| void | handleClick (MythUIButtonListItem *item) |
| Handle a list item being clicked. | |
| void | handleVisible (MythUIButtonListItem *item) |
| Handle a list item becoming visible. | |
| void | Select () |
| void | Deselect () |
Signals | |
| void | itemSelected (MythUIButtonListItem *item) |
| void | itemClicked (MythUIButtonListItem *item) |
| void | itemVisible (MythUIButtonListItem *item) |
| void | nodeChanged (MythGenericTree *node) |
| void | rootChanged (MythGenericTree *node) |
Public Member Functions | |
| MythUIButtonTree (MythUIType *parent, const QString &name) | |
| ~MythUIButtonTree () | |
| virtual bool | keyPressEvent (QKeyEvent *) |
| bool | AssignTree (MythGenericTree *tree) |
| Assign the root node of the tree to be displayed. | |
| void | Reset (void) |
| bool | SetNodeByString (QStringList route) |
| Using a path based on the node string, set the currently selected node. | |
| bool | SetNodeById (QList< int > route) |
| Using a path based on the node IDs, set the currently selected node. | |
| bool | SetCurrentNode (MythGenericTree *node) |
| Set the currently selected node. | |
| void | ShowSearchDialog (void) |
| MythGenericTree * | GetCurrentNode (void) const |
| void | SetActive (bool active) |
| Set the widget active/inactive. | |
| MythUIButtonListItem * | GetItemCurrent (void) const |
| Return the currently selected list item. | |
| void | RemoveItem (MythUIButtonListItem *item, bool deleteNode=false) |
| Remove the item from the tree. | |
| void | RemoveCurrentItem (bool deleteNode=false) |
| Remove the currently selected item from the tree. | |
Protected Member Functions | |
| virtual bool | ParseElement (const QString &filename, QDomElement &element, bool showWarnings) |
| virtual void | CopyFrom (MythUIType *base) |
| virtual void | CreateCopy (MythUIType *parent) |
Private Member Functions | |
| void | Init (void) |
| Initialise the tree having loaded the formatting options from the theme. | |
| void | SetTreeState (bool refreshAll=false) |
| Update the widget following a change. | |
| bool | UpdateList (MythUIButtonList *list, MythGenericTree *node) |
| Update a list with children of the tree node. | |
| bool | DoSetCurrentNode (MythGenericTree *node) |
| void | SwitchList (bool right) |
| Move from list, or one level of the tree, to another. | |
Private Attributes | |
| bool | m_active |
| bool | m_initialized |
| uint | m_numLists |
| uint | m_visibleLists |
| uint | m_currentDepth |
| int | m_depthOffset |
| uint | m_oldDepth |
| QList< MythUIButtonList * > | m_buttonlists |
| MythUIButtonList * | m_listTemplate |
| MythUIButtonList * | m_activeList |
| uint | m_activeListID |
| MythGenericTree * | m_rootNode |
| MythGenericTree * | m_currentNode |
| uint | m_listSpacing |
A tree widget for displaying and navigating a MythGenericTree()
Definition at line 16 of file mythuibuttontree.h.
| MythUIButtonTree::MythUIButtonTree | ( | MythUIType * | parent, |
| const QString & | name | ||
| ) |
Definition at line 14 of file mythuibuttontree.cpp.
Referenced by CreateCopy().
Definition at line 36 of file mythuibuttontree.cpp.
| bool MythUIButtonTree::keyPressEvent | ( | QKeyEvent * | event | ) | [virtual] |
Key event handler.
| event | Keypress event |
Reimplemented from MythUIType.
Definition at line 591 of file mythuibuttontree.cpp.
| bool MythUIButtonTree::AssignTree | ( | MythGenericTree * | tree | ) |
Assign the root node of the tree to be displayed.
MythUIButtonTree() is merely responsible for the display and navigation of a tree, the structure of that tree and the data it contains are the responsibility of MythGenericTree(). Generally MythUIButtonTree() will not modify the tree, for technical reason RemoteItem() is an exception to the rule.
You should operate directly on MythGenericTree() to change it's content.
| tree | The node to make the root of the displayed tree |
Definition at line 224 of file mythuibuttontree.cpp.
Referenced by GameUI::Load(), NetTree::loadData(), and VideoDialog::loadData().
| void MythUIButtonTree::Reset | ( | void | ) | [virtual] |
Reset the widget to it's original state, should not reset changes made by the theme.
Reimplemented from MythUIType.
Definition at line 247 of file mythuibuttontree.cpp.
Referenced by AssignTree().
| bool MythUIButtonTree::SetNodeByString | ( | QStringList | route | ) |
Using a path based on the node string, set the currently selected node.
| route | List defining the path using node strings starting at the root node |
Definition at line 292 of file mythuibuttontree.cpp.
Referenced by VideoDialog::handleDynamicDirSelect(), VideoDialog::loadData(), and SetCurrentNode().
| bool MythUIButtonTree::SetNodeById | ( | QList< int > | route | ) |
Using a path based on the node IDs, set the currently selected node.
| route | List defining the path using node IDs starting at the root node |
Definition at line 270 of file mythuibuttontree.cpp.
Set the currently selected node.
| node | The node, which must appear in this tree or behaviour is undefined |
Definition at line 357 of file mythuibuttontree.cpp.
Referenced by GameUI::searchComplete(), VideoDialog::searchComplete(), and GameUI::updateChangedNode().
Definition at line 370 of file mythuibuttontree.cpp.
Referenced by MusicCommon::searchButtonList().
| MythGenericTree* MythUIButtonTree::GetCurrentNode | ( | void | ) | const [inline] |
Definition at line 32 of file mythuibuttontree.h.
Referenced by GameUI::customEvent(), NetTree::customEvent(), NetTree::doDeleteVideo(), NetTree::doDownloadAndPlay(), NetTree::doPlayVideo(), GameUI::edit(), GameUI::gameSearch(), GameUI::itemClicked(), VideoDialog::SavePosition(), GameUI::searchComplete(), VideoDialog::searchComplete(), GameUI::searchStart(), GameUI::showInfo(), GameUI::showMenu(), NetTree::showMenu(), NetTree::showWebVideo(), NetTree::slotItemChanged(), NetTree::streamWebVideo(), and GameUI::toggleFavorite().
| void MythUIButtonTree::SetActive | ( | bool | active | ) |
Set the widget active/inactive.
| active |
Definition at line 449 of file mythuibuttontree.cpp.
Referenced by Deselect(), VideoDialog::searchComplete(), and Select().
| MythUIButtonListItem * MythUIButtonTree::GetItemCurrent | ( | void | ) | const |
Return the currently selected list item.
Definition at line 567 of file mythuibuttontree.cpp.
Referenced by VideoDialog::GetItemByMetadata(), VideoDialog::GetItemCurrent(), RemoveCurrentItem(), and NetTree::slotItemChanged().
| void MythUIButtonTree::RemoveItem | ( | MythUIButtonListItem * | item, |
| bool | deleteNode = false |
||
| ) |
Remove the item from the tree.
| item | Item to be removed |
| deleteNode | Also delete the node from the tree? Modifies the tree. |
Definition at line 400 of file mythuibuttontree.cpp.
Referenced by VideoDialog::OnRemoveVideo(), and RemoveCurrentItem().
| void MythUIButtonTree::RemoveCurrentItem | ( | bool | deleteNode = false | ) |
Remove the currently selected item from the tree.
| deleteNode | Also delete the node from the tree? Modifies the tree. |
Definition at line 439 of file mythuibuttontree.cpp.
| void MythUIButtonTree::handleSelect | ( | MythUIButtonListItem * | item | ) | [slot] |
Handle a list item receiving focus.
| item | The list item |
Definition at line 524 of file mythuibuttontree.cpp.
Referenced by UpdateList().
| void MythUIButtonTree::handleClick | ( | MythUIButtonListItem * | item | ) | [slot] |
Handle a list item being clicked.
| item | The list item |
Definition at line 551 of file mythuibuttontree.cpp.
Referenced by UpdateList().
| void MythUIButtonTree::handleVisible | ( | MythUIButtonListItem * | item | ) | [slot] |
Handle a list item becoming visible.
| item | The list item |
Definition at line 580 of file mythuibuttontree.cpp.
Referenced by UpdateList().
| void MythUIButtonTree::Select | ( | ) | [slot] |
Definition at line 457 of file mythuibuttontree.cpp.
Referenced by MythUIButtonTree().
| void MythUIButtonTree::Deselect | ( | ) | [slot] |
Definition at line 462 of file mythuibuttontree.cpp.
Referenced by MythUIButtonTree().
| void MythUIButtonTree::itemSelected | ( | MythUIButtonListItem * | item | ) | [signal] |
Referenced by SetTreeState(), and UpdateList().
| void MythUIButtonTree::itemClicked | ( | MythUIButtonListItem * | item | ) | [signal] |
Referenced by handleClick(), and UpdateList().
| void MythUIButtonTree::itemVisible | ( | MythUIButtonListItem * | item | ) | [signal] |
Referenced by handleVisible(), and UpdateList().
| void MythUIButtonTree::nodeChanged | ( | MythGenericTree * | node | ) | [signal] |
Referenced by DoSetCurrentNode().
| void MythUIButtonTree::rootChanged | ( | MythGenericTree * | node | ) | [signal] |
Referenced by AssignTree(), and Reset().
| bool MythUIButtonTree::ParseElement | ( | const QString & | filename, |
| QDomElement & | element, | ||
| bool | showWarnings | ||
| ) | [protected, virtual] |
Parse the xml definition of this widget setting the state of the object accordingly.
Reimplemented from MythUIType.
Definition at line 639 of file mythuibuttontree.cpp.
| void MythUIButtonTree::CopyFrom | ( | MythUIType * | base | ) | [protected, virtual] |
Copy this widgets state from another.
Reimplemented from MythUIType.
Definition at line 670 of file mythuibuttontree.cpp.
Referenced by CreateCopy().
| void MythUIButtonTree::CreateCopy | ( | MythUIType * | parent | ) | [protected, virtual] |
Copy the state of this widget to the one given, it must be of the same type.
Reimplemented from MythUIType.
Definition at line 661 of file mythuibuttontree.cpp.
| void MythUIButtonTree::Init | ( | void | ) | [private] |
Initialise the tree having loaded the formatting options from the theme.
Definition at line 44 of file mythuibuttontree.cpp.
Referenced by SetTreeState().
| void MythUIButtonTree::SetTreeState | ( | bool | refreshAll = false | ) | [private] |
Update the widget following a change.
Definition at line 86 of file mythuibuttontree.cpp.
Referenced by AssignTree(), handleSelect(), RemoveItem(), Reset(), SetActive(), SetNodeById(), SetNodeByString(), and SwitchList().
| bool MythUIButtonTree::UpdateList | ( | MythUIButtonList * | list, |
| MythGenericTree * | node | ||
| ) | [private] |
Update a list with children of the tree node.
| list | List to refill |
| node | Parent node whose children will appear in the list |
Definition at line 162 of file mythuibuttontree.cpp.
Referenced by SetTreeState().
| bool MythUIButtonTree::DoSetCurrentNode | ( | MythGenericTree * | node | ) | [private] |
Definition at line 376 of file mythuibuttontree.cpp.
Referenced by handleClick(), handleSelect(), RemoveItem(), SetNodeById(), SetNodeByString(), and SetTreeState().
| void MythUIButtonTree::SwitchList | ( | bool | right | ) | [private] |
Move from list, or one level of the tree, to another.
| right | If true move to the right or away from the root, if false move to the left or towards the root |
Definition at line 474 of file mythuibuttontree.cpp.
Referenced by keyPressEvent().
bool MythUIButtonTree::m_active [private] |
Definition at line 68 of file mythuibuttontree.h.
Referenced by CopyFrom(), MythUIButtonTree(), Reset(), SetActive(), and SetTreeState().
bool MythUIButtonTree::m_initialized [private] |
Definition at line 69 of file mythuibuttontree.h.
Referenced by CopyFrom(), Init(), MythUIButtonTree(), SetActive(), and SetTreeState().
uint MythUIButtonTree::m_numLists [private] |
Definition at line 70 of file mythuibuttontree.h.
Referenced by CopyFrom(), Init(), MythUIButtonTree(), ParseElement(), and SetNodeByString().
uint MythUIButtonTree::m_visibleLists [private] |
Definition at line 71 of file mythuibuttontree.h.
Referenced by MythUIButtonTree(), Reset(), SetTreeState(), and SwitchList().
uint MythUIButtonTree::m_currentDepth [private] |
Definition at line 72 of file mythuibuttontree.h.
Referenced by keyPressEvent(), MythUIButtonTree(), RemoveItem(), Reset(), SetNodeByString(), SetTreeState(), and SwitchList().
int MythUIButtonTree::m_depthOffset [private] |
Definition at line 73 of file mythuibuttontree.h.
Referenced by AssignTree(), MythUIButtonTree(), SetNodeByString(), and SetTreeState().
uint MythUIButtonTree::m_oldDepth [private] |
Definition at line 74 of file mythuibuttontree.h.
Referenced by MythUIButtonTree(), Reset(), and SetTreeState().
QList<MythUIButtonList*> MythUIButtonTree::m_buttonlists [private] |
Definition at line 75 of file mythuibuttontree.h.
Referenced by Init(), SetTreeState(), and SwitchList().
MythUIButtonList* MythUIButtonTree::m_listTemplate [private] |
Definition at line 76 of file mythuibuttontree.h.
Referenced by CopyFrom(), Init(), and MythUIButtonTree().
MythUIButtonList* MythUIButtonTree::m_activeList [private] |
Definition at line 77 of file mythuibuttontree.h.
Referenced by GetItemCurrent(), handleSelect(), keyPressEvent(), MythUIButtonTree(), Reset(), SetTreeState(), ShowSearchDialog(), and SwitchList().
uint MythUIButtonTree::m_activeListID [private] |
Definition at line 78 of file mythuibuttontree.h.
Referenced by handleSelect(), keyPressEvent(), MythUIButtonTree(), RemoveItem(), Reset(), SetNodeByString(), SetTreeState(), and SwitchList().
MythGenericTree* MythUIButtonTree::m_rootNode [private] |
Definition at line 79 of file mythuibuttontree.h.
Referenced by AssignTree(), MythUIButtonTree(), RemoveItem(), Reset(), SetNodeById(), SetNodeByString(), and SetTreeState().
MythGenericTree* MythUIButtonTree::m_currentNode [private] |
Definition at line 80 of file mythuibuttontree.h.
Referenced by AssignTree(), DoSetCurrentNode(), keyPressEvent(), MythUIButtonTree(), Reset(), SetCurrentNode(), SetTreeState(), and SwitchList().
uint MythUIButtonTree::m_listSpacing [private] |
Definition at line 81 of file mythuibuttontree.h.
Referenced by CopyFrom(), Init(), MythUIButtonTree(), and ParseElement().
1.7.6.1