Index: mythtv/libs/libmythui/mythlistbutton.cpp =================================================================== --- mythtv/libs/libmythui/mythlistbutton.cpp (revision 16588) +++ mythtv/libs/libmythui/mythlistbutton.cpp (working copy) @@ -658,6 +658,13 @@ return true; } +void MythListButton::SetAllChecked(CheckState state) +{ + MythListButtonItem* item = 0; + for (item = m_itemList.first(); item; item = m_itemList.next()) + item->setChecked(state); +} + void MythListButton::Init() { if (m_initialized) @@ -1265,7 +1272,7 @@ return m_checkable; } -MythListButtonItem::CheckState MythListButtonItem::state() const +CheckState MythListButtonItem::state() const { return m_state; } @@ -1275,7 +1282,7 @@ return m_parent; } -void MythListButtonItem::setChecked(MythListButtonItem::CheckState state) +void MythListButtonItem::setChecked(CheckState state) { if (!m_checkable) return; Index: mythtv/libs/libmythui/mythlistbutton.h =================================================================== --- mythtv/libs/libmythui/mythlistbutton.h (revision 16588) +++ mythtv/libs/libmythui/mythlistbutton.h (working copy) @@ -10,6 +10,12 @@ class MythListButtonItem; class MythFontProperties; class MythUIStateType; +typedef enum { + CantCheck = -1, + NotChecked = 0, + HalfChecked, + FullChecked +} CheckState; class MythListButton : public MythUIType { @@ -53,6 +59,8 @@ bool MoveItemUpDown(MythListButtonItem *item, bool flag); + void SetAllChecked(CheckState state); + QPtrListIterator GetIterator(); int GetCurrentPos() { return m_selPosition; } @@ -157,13 +165,6 @@ class MythListButtonItem { public: - enum CheckState { - CantCheck = -1, - NotChecked = 0, - HalfChecked, - FullChecked - }; - MythListButtonItem(MythListButton *lbtype, const QString& text, MythImage *image = 0, bool checkable = false, CheckState state = CantCheck, bool showArrow = false);