Go to the documentation of this file.
9 #include <QDomDocument>
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;
525 QString name = list->objectName();
589 bool handled =
false;
592 for (
int i = 0; i < actions.size() && !handled; i++)
594 const QString&
action = actions[i];
637 bool handled =
false;
642 QPoint position =
event->GetPosition() -
663 const QString &
filename, QDomElement &element,
bool showWarnings)
665 if (element.tagName() ==
"spacing")
669 else if (element.tagName() ==
"numlists")
QString GetText(const QString &name="") const
Gesture GetGesture() const
MythUIType * GetChildAt(QPoint p, bool recursive=true, bool focusable=true) const
Return the first MythUIType at the given coordinates.
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
uint visibleChildCount() const
int currentDepth(void)
Establish how deep in the current tree this node lies.
void SetCanTakeFocus(bool set=true)
Set whether this widget can take focus.
MythGenericTree * getChildByName(const QString &a_name) const
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
bool isSelectable() const
Wrapper around QRect allowing us to handle percentage and other relative values for areas in mythui.
virtual MythRect GetArea(void) const
If the object has a minimum area defined, return it, other wise return the default area.
MythGenericTree * getChildAt(uint reference) const
MythGenericTree * getSelectedChild(bool onlyVisible=false) 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.
QString GetXMLLocation(void) const
QStringList getRouteByString(void)
static QString getFirstText(QDomElement &element)
virtual MythUIButtonListItem * CreateListButton(MythUIButtonList *list)
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
A C++ ripoff of the stroke library for MythTV.
QList< MythGenericTree * > * getAllChildren() const
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
MythGenericTree * findNode(QList< int > route_of_branches)
The base class on which all widgets and screens are based.
MythPoint topLeft(void) const
virtual void SetVisible(bool visible)
MythMainWindow * GetMythMainWindow(void)
QList< MythGenericTree * > getRoute(void)
A custom event that represents a mouse gesture.
static int NormX(int width)
virtual bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings)
Parse the xml definition of this widget setting the state of the object accordingly.
void becomeSelectedChild(void)