Skip to content
Permalink
Browse files

Add an itemVisible() signal to MythUIButtonTree.

  • Loading branch information
Paul Harrison
Paul Harrison committed Dec 30, 2010
1 parent 7c46b75 commit fcd505474c9c9ffed1bd1cca6e7f40621dc66c52
Showing with 17 additions and 0 deletions.
  1. +15 −0 mythtv/libs/libmythui/mythuibuttontree.cpp
  2. +2 −0 mythtv/libs/libmythui/mythuibuttontree.h
@@ -196,6 +196,8 @@ bool MythUIButtonTree::UpdateList(MythUIButtonList *list, MythGenericTree *node)
SLOT(handleSelect(MythUIButtonListItem *)));
connect(list, SIGNAL(itemClicked(MythUIButtonListItem *)),
SLOT(handleClick(MythUIButtonListItem *)));
connect(list, SIGNAL(itemVisible(MythUIButtonListItem *)),
SLOT(handleVisible(MythUIButtonListItem *)));

return true;
}
@@ -505,6 +507,19 @@ MythUIButtonListItem* MythUIButtonTree::GetItemCurrent() const
return NULL;
}

/*!
* \brief Handle a list item becoming visible
*
* \param item The list item
*/
void MythUIButtonTree::handleVisible(MythUIButtonListItem *item)
{
if (!item)
return;

emit itemVisible(item);
}

/*!
* \copydoc MythUIType::keyPressEvent()
*/
@@ -39,10 +39,12 @@ class MPUBLIC MythUIButtonTree : public MythUIType
public slots:
void handleSelect(MythUIButtonListItem* item);
void handleClick(MythUIButtonListItem* item);
void handleVisible(MythUIButtonListItem* item);

signals:
void itemSelected(MythUIButtonListItem* item);
void itemClicked(MythUIButtonListItem* item);
void itemVisible(MythUIButtonListItem* item);
void nodeChanged(MythGenericTree* node);

protected:

0 comments on commit fcd5054

Please sign in to comment.
You can’t perform that action at this time.