MythTV  0.26-pre
Public Member Functions | Private Types | Private Member Functions | Private Attributes
MythGenericTree Class Reference

#include <mythgenerictree.h>

Inheritance diagram for MythGenericTree:
MusicGenericTree

List of all members.

Public Member Functions

 MythGenericTree (const QString &a_string="", int an_int=0, bool selectable_flag=false)
virtual ~MythGenericTree ()
MythGenericTreeaddNode (const QString &a_string, int an_int=0, bool selectable_flag=false, bool visible=true)
MythGenericTreeaddNode (MythGenericTree *child)
void DetachParent (void)
 Detach this node/branch from it's parent without deleting it, it can then be reattached elsewhere or used on it's own.
void removeNode (MythGenericTree *child)
void deleteNode (MythGenericTree *child)
MythGenericTreefindLeaf ()
MythGenericTreefindNode (QList< int > route_of_branches, int depth=-1)
MythGenericTreenextSibling (int number_down)
MythGenericTreeprevSibling (int number_up)
QList< MythGenericTree * >
::iterator 
getFirstChildIterator () const
MythGenericTreegetSelectedChild (bool onlyVisible=false) const
MythGenericTreegetVisibleChildAt (uint reference) const
MythGenericTreegetChildAt (uint reference) const
MythGenericTreegetChildByName (const QString &a_name) const
MythGenericTreegetChildById (int an_int) const
QList< MythGenericTree * > * getAllChildren () const
int getChildPosition (MythGenericTree *child) const
int getPosition (void)
QList< intgetRouteById (void)
QStringList getRouteByString (void)
QList< MythGenericTree * > getRoute (void)
void setInt (int an_int)
int getInt () const
void setParent (MythGenericTree *a_parent)
MythGenericTreegetParent (void) const
const QString getString (void) const
void setString (const QString &str)
void SetText (const QString &text, const QString &name="", const QString &state="")
void SetTextFromMap (InfoMap &infoMap, const QString &state="")
QString GetText (const QString &name="") const
void SetImage (const QString &filename, const QString &name="")
void SetImageFromMap (InfoMap &infoMap)
QString GetImage (const QString &name="") const
void DisplayState (const QString &state, const QString &name="")
void DisplayStateFromMap (InfoMap &infoMap)
QString GetState (const QString &name="") const
void SetData (QVariant data)
const QVariant GetData (void) const
int childCount (void) const
uint visibleChildCount () const
int siblingCount (void) const
int currentDepth (void)
 Establish how deep in the current tree this node lies.
void setSelectable (bool flag)
bool isSelectable () const
void SetVisible (bool visible)
bool IsVisible () const
void IncVisibleCount ()
void DecVisibleCount ()
void setAttribute (uint attribute_position, int value_of_attribute)
int getAttribute (uint which_one) const
IntVectorgetAttributes (void) const
void setOrderingIndex (int ordering_index)
int getOrderingIndex (void) const
void becomeSelectedChild (void)
void setSelectedChild (MythGenericTree *a_node)
void addYourselfIfSelectable (QList< MythGenericTree * > *flat_list)
void buildFlatListOfSubnodes (bool scrambled_parents)
MythGenericTreenextPrevFromFlatList (bool forward_or_back, bool wrap_around, MythGenericTree *active) const
void sortByString ()
void sortByAttributeThenByString (int which_attribute)
void sortBySelectable ()
void deleteAllChildren ()
void reOrderAsSorted ()
void MoveItemUpDown (MythGenericTree *item, bool flag)
virtual MythUIButtonListItemCreateListButton (MythUIButtonList *list)

Private Types

typedef QVector< intIntVector

Private Member Functions

void reorderSubnodes (void)

Private Attributes

QString m_text
QMap< QString, TextPropertiesm_strings
InfoMap m_imageFilenames
InfoMap m_states
int m_int
QVariant m_data
uint m_visibleCount
SortableMythGenericTreeListm_subnodes
SortableMythGenericTreeListm_ordered_subnodes
SortableMythGenericTreeListm_flatenedSubnodes
MythGenericTreem_selected_subnode
IntVectorm_attributes
MythGenericTreem_parent
bool m_selectable
bool m_visible
int m_currentOrderingIndex

Detailed Description

Definition at line 19 of file mythgenerictree.h.


Member Typedef Documentation

typedef QVector<int> MythGenericTree::IntVector [private]

Definition at line 21 of file mythgenerictree.h.


Constructor & Destructor Documentation

MythGenericTree::MythGenericTree ( const QString &  a_string = "",
int  an_int = 0,
bool  selectable_flag = false 
)

Definition at line 104 of file mythgenerictree.cpp.

Referenced by addNode().

Definition at line 127 of file mythgenerictree.cpp.


Member Function Documentation

MythGenericTree * MythGenericTree::addNode ( const QString &  a_string,
int  an_int = 0,
bool  selectable_flag = false,
bool  visible = true 
)

Definition at line 146 of file mythgenerictree.cpp.

Detach this node/branch from it's parent without deleting it, it can then be reattached elsewhere or used on it's own.

Definition at line 157 of file mythgenerictree.cpp.

Definition at line 165 of file mythgenerictree.cpp.

Referenced by deleteNode(), and DetachParent().

Definition at line 192 of file mythgenerictree.cpp.

Referenced by findLeaf().

MythGenericTree * MythGenericTree::findNode ( QList< int route_of_branches,
int  depth = -1 
)

Definition at line 207 of file mythgenerictree.cpp.

Referenced by MythUIButtonTree::SetNodeById().

Definition at line 418 of file mythgenerictree.cpp.

Definition at line 399 of file mythgenerictree.cpp.

Definition at line 437 of file mythgenerictree.cpp.

MythGenericTree * MythGenericTree::getChildByName ( const QString &  a_name) const

Definition at line 585 of file mythgenerictree.cpp.

Definition at line 252 of file mythgenerictree.cpp.

Referenced by getPosition(), nextSibling(), and prevSibling().

Definition at line 267 of file mythgenerictree.cpp.

Definition at line 295 of file mythgenerictree.cpp.

Referenced by currentDepth(), and MythUIButtonTree::SetTreeState().

void MythGenericTree::setInt ( int  an_int) [inline]

Definition at line 62 of file mythgenerictree.h.

Referenced by VideoListImp::build_generic_tree().

int MythGenericTree::getInt ( ) const [inline]

Definition at line 65 of file mythgenerictree.h.

Referenced by addNode(), and removeNode().

const QString MythGenericTree::getString ( void  ) const [inline]
void MythGenericTree::setString ( const QString &  str) [inline]

Definition at line 70 of file mythgenerictree.h.

Referenced by GameUI::customEvent().

void MythGenericTree::SetText ( const QString &  text,
const QString &  name = "",
const QString &  state = "" 
)

Definition at line 748 of file mythgenerictree.cpp.

Referenced by AddDirNode().

void MythGenericTree::SetTextFromMap ( InfoMap infoMap,
const QString &  state = "" 
)

Definition at line 762 of file mythgenerictree.cpp.

Referenced by AddFileNode().

QString MythGenericTree::GetText ( const QString &  name = "") const

Definition at line 776 of file mythgenerictree.cpp.

void MythGenericTree::SetImage ( const QString &  filename,
const QString &  name = "" 
)

Definition at line 786 of file mythgenerictree.cpp.

Referenced by AddFileNode().

Definition at line 792 of file mythgenerictree.cpp.

Referenced by AddFileNode().

QString MythGenericTree::GetImage ( const QString &  name = "") const

Definition at line 798 of file mythgenerictree.cpp.

void MythGenericTree::DisplayState ( const QString &  state,
const QString &  name = "" 
)

Definition at line 816 of file mythgenerictree.cpp.

Referenced by AddDirNode().

Definition at line 810 of file mythgenerictree.cpp.

Referenced by AddFileNode().

QString MythGenericTree::GetState ( const QString &  name = "") const

Definition at line 822 of file mythgenerictree.cpp.

void MythGenericTree::SetData ( QVariant  data) [inline]
const QVariant MythGenericTree::GetData ( void  ) const [inline]

Definition at line 314 of file mythgenerictree.cpp.

Establish how deep in the current tree this node lies.

Definition at line 324 of file mythgenerictree.cpp.

Referenced by MythUIButtonTree::AssignTree(), and MythUIButtonTree::SetNodeByString().

Definition at line 95 of file mythgenerictree.h.

Referenced by MusicGenericTree::MusicGenericTree().

bool MythGenericTree::isSelectable ( ) const [inline]

Definition at line 718 of file mythgenerictree.cpp.

Referenced by addNode(), and MythUIButtonTree::RemoveItem().

bool MythGenericTree::IsVisible ( void  ) const [inline]

Definition at line 101 of file mythgenerictree.h.

Referenced by addNode(), and SetVisible().

Definition at line 102 of file mythgenerictree.h.

Referenced by removeNode(), and SetVisible().

void MythGenericTree::setAttribute ( uint  attribute_position,
int  value_of_attribute 
)

Definition at line 454 of file mythgenerictree.cpp.

Referenced by AddDirNode(), and AddFileNode().

int MythGenericTree::getAttribute ( uint  which_one) const

Definition at line 465 of file mythgenerictree.cpp.

Definition at line 106 of file mythgenerictree.h.

Definition at line 477 of file mythgenerictree.cpp.

Referenced by AddDirNode(), AddFileNode(), and VideoDialog::fetchVideos().

Definition at line 109 of file mythgenerictree.h.

Definition at line 112 of file mythgenerictree.h.

Referenced by becomeSelectedChild().

Definition at line 492 of file mythgenerictree.cpp.

Referenced by addYourselfIfSelectable(), and buildFlatListOfSubnodes().

Definition at line 507 of file mythgenerictree.cpp.

MythGenericTree * MythGenericTree::nextPrevFromFlatList ( bool  forward_or_back,
bool  wrap_around,
MythGenericTree active 
) const

Definition at line 527 of file mythgenerictree.cpp.

Definition at line 606 of file mythgenerictree.cpp.

Referenced by sortByString().

Definition at line 626 of file mythgenerictree.cpp.

Referenced by sortByAttributeThenByString().

Definition at line 641 of file mythgenerictree.cpp.

Referenced by sortBySelectable().

Definition at line 671 of file mythgenerictree.cpp.

Referenced by reOrderAsSorted().

Definition at line 699 of file mythgenerictree.cpp.

Reimplemented in MusicGenericTree.

Definition at line 734 of file mythgenerictree.cpp.

Referenced by MythUIButtonTree::UpdateList().

Definition at line 483 of file mythgenerictree.cpp.

Referenced by setOrderingIndex().


Member Data Documentation

QString MythGenericTree::m_text [private]

Definition at line 134 of file mythgenerictree.h.

Referenced by GetText(), MythGenericTree(), and SetText().

QMap<QString, TextProperties> MythGenericTree::m_strings [private]

Definition at line 135 of file mythgenerictree.h.

Referenced by CreateListButton(), GetText(), SetText(), and SetTextFromMap().

Definition at line 136 of file mythgenerictree.h.

Referenced by CreateListButton(), GetImage(), SetImage(), and SetImageFromMap().

Definition at line 137 of file mythgenerictree.h.

Referenced by CreateListButton(), DisplayState(), DisplayStateFromMap(), and GetState().

Definition at line 138 of file mythgenerictree.h.

Referenced by MythGenericTree().

QVariant MythGenericTree::m_data [private]

Definition at line 139 of file mythgenerictree.h.

Referenced by MythGenericTree().

Definition at line 140 of file mythgenerictree.h.

Referenced by MythGenericTree().

Definition at line 147 of file mythgenerictree.h.

Referenced by getAttribute(), MythGenericTree(), setAttribute(), and ~MythGenericTree().

Definition at line 150 of file mythgenerictree.h.

Referenced by addYourselfIfSelectable(), and MythGenericTree().

Definition at line 151 of file mythgenerictree.h.

Referenced by MythGenericTree(), and SetVisible().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends