Skip to content

Commit

Permalink
Tweak the UISelectorType object.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.mythtv.org/svn/trunk@2012 7dbf422c-18fa-0310-86e9-fd20926502f2
  • Loading branch information
Thor Sigvaldason committed Aug 10, 2003
1 parent 0d5d714 commit 42011d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion mythtv/libs/libmyth/uitypes.cpp
Expand Up @@ -3759,6 +3759,18 @@ void UISelectorType::addItem(int an_int, const QString &a_string)
}
}

void UISelectorType::setToItem(int which_item)
{
for(uint i = 0; i < my_data.count(); i++)
{
if(my_data.at(i)->getInt() == which_item)
{
current_data = my_data.at(i);
refresh();
}
}
}

void UISelectorType::push(bool up_or_down)
{
if(currently_pushed)
Expand All @@ -3767,7 +3779,6 @@ void UISelectorType::push(bool up_or_down)
}
currently_pushed = true;
push_timer.start(300, TRUE);
refresh();

if(current_data)
{
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmyth/uitypes.h
Expand Up @@ -814,6 +814,7 @@ class UISelectorType : public UIPushButtonType
void unPush();
void activate(){push(true);}
void cleanOut(){current_data = NULL; my_data.clear();}
void setToItem(int which_item);

signals:

Expand Down

0 comments on commit 42011d9

Please sign in to comment.