39 LOG(VB_GENERAL, LOG_ERR, QString(
"(%1) MythUIButtonList listtemplate "
40 "is required in mythuibuttonlist: %2")
48 int height =
m_area.height();
54 QString listname = QString(
"buttontree list %1").arg(i);
57 list->SetVisible(
false);
58 list->SetActive(
false);
59 list->SetCanTakeFocus(
false);
62 list->SetArea(listArea);
153 disconnect(list,
nullptr,
nullptr,
nullptr);
157 QList<MythGenericTree *> *nodelist =
nullptr;
162 if (!nodelist || nodelist->isEmpty())
168 QList<MythGenericTree *>::iterator it;
170 for (it = nodelist->begin(); it != nodelist->end(); ++it)
179 if (childnode == selectedNode)
291 bool foundit =
false;
293 if (!route.isEmpty())
297 if (route.size() > 1)
299 for (
int i = 1; i < route.size(); i ++)
398 if (node && node->getParent())
403 node->getParent()->deleteNode(node);
405 node->SetVisible(
false);
467 bool doUpdate =
false;
531 QString name = list->objectName();
594 bool handled =
false;
597 for (
int i = 0; i < actions.size() && !handled; i++)
599 const QString&
action = actions[i];
642 bool handled =
false;
647 QPoint position =
event->GetPosition() -
668 const QString &
filename, QDomElement &element,
bool showWarnings)
670 if (element.tagName() ==
"spacing")
674 else if (element.tagName() ==
"numlists")
716#include "moc_mythuibuttontree.cpp"
bool isSelectable() const
QString GetText(const QString &name="") const
int currentDepth(void)
Establish how deep in the current tree this node lies.
QStringList getRouteByString(void)
virtual MythUIButtonListItem * CreateListButton(MythUIButtonList *list)
MythGenericTree * getChildAt(uint reference) const
MythGenericTree * findNode(QList< int > route_of_branches)
MythGenericTree * getSelectedChild(bool onlyVisible=false) const
uint visibleChildCount() const
void becomeSelectedChild(void)
MythGenericTree * getChildByName(const QString &a_name) const
QList< MythGenericTree * > getRoute(void)
QList< MythGenericTree * > * getAllChildren() const
A custom event that represents a mouse gesture.
Gesture GetGesture() const
bool TranslateKeyPress(const QString &Context, QKeyEvent *Event, QStringList &Actions, bool AllowJumps=true)
Get a list of actions for a keypress in the given context.
Wrapper around QRect allowing us to handle percentage and other relative values for areas in mythui.
MythPoint topLeft(void) const
The base class on which all widgets and screens are based.
void SetCanTakeFocus(bool set=true)
Set whether this widget can take focus.
virtual void SetVisible(bool visible)
QString GetXMLLocation(void) const
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
MythUIType * GetChildAt(QPoint p, bool recursive=true, bool focusable=true) const
Return the first MythUIType at the given coordinates.
virtual MythRect GetArea(void) const
If the object has a minimum area defined, return it, other wise return the default area.
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
virtual bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings)
Parse the xml definition of this widget setting the state of the object accordingly.
static int NormX(int width)
static QString getFirstText(QDomElement &element)
A C++ ripoff of the stroke library for MythTV.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
MythMainWindow * GetMythMainWindow(void)