#include <mythcontrols.h>

Definition at line 41 of file mythcontrols.h.
Public Types | |
| enum | ListType { kContextList, kKeyList, kActionList } |
Public Member Functions | |
| MythControls (MythScreenStack *parent, const char *name) | |
| ~MythControls () | |
| virtual bool | Create (void) |
| Loads UI elements from theme. | |
| virtual bool | keyPressEvent (QKeyEvent *) |
| virtual void | customEvent (QCustomEvent *) |
| QString | GetCurrentContext (void) |
| Get the currently selected context string. | |
| QString | GetCurrentAction (void) |
| Get the currently selected action string. | |
| QString | GetCurrentKey (void) |
| Get the currently selected key string. | |
Protected Member Functions | |
| void | Teardown (void) |
| bool | LoadUI (void) |
| void | LoadData (const QString &hostname) |
| Load the settings for a particular host. | |
| void | ChangeButtonFocus (int direction) |
| Change button focus in a particular direction. | |
| void | ChangeView (void) |
| Change the view. | |
| void | SetListContents (MythListButton *uilist, const QStringList &contents, bool arrows=false) |
| Set the contents of a list. | |
| void | UpdateRightList (void) |
| Update the right list. | |
| uint | GetCurrentButton (void) |
| Returns the focused button, or Action::kMaximumNumberOfBindings if no buttons are focued. | |
| QString | GetTypeDesc (ListType type) const |
Static Protected Member Functions | |
| static bool | ResolveConflict (ActionID *conflict, int error_level) |
Private Slots | |
| void | AddKeyToAction (void) |
| Add a key to the currently selected action. | |
| void | DeleteKey (void) |
| Delete the currently active key to action mapping. | |
| void | LeftSelected (MythListButtonItem *) |
| Refreshes the right list when an item in the left list is selected. | |
| void | RightSelected (MythListButtonItem *) |
| Refreshes key information when an item in the right list is selected. | |
| bool | JumpTo (QKeyEvent *event) |
| void | Save (void) |
| Save the bindings to the Database. | |
| void | RefreshKeyInformation (void) |
| Updates the list of keys that are shown and the description of the action. | |
Private Attributes | |
| ViewType | m_currentView |
| MythUIType * | m_focusedUIElement |
| MythListButton * | m_leftList |
| MythListButton * | m_rightList |
| MythUIText * | m_description |
| MythUIText * | m_leftDescription |
| MythUIText * | m_rightDescription |
| QPtrList< MythUIButton > | m_actionButtons |
| MythDialogBox * | m_menuPopup |
| KeyBindings * | m_bindings |
| QStringList | m_sortedContexts |
| sorted list of contexts | |
| QDict< QStringList > | m_contexts |
| actions for a given context | |
| ListType | m_leftListType |
| ListType | m_rightListType |
| MythControls::MythControls | ( | MythScreenStack * | parent, | |
| const char * | name | |||
| ) |
Definition at line 54 of file mythcontrols.cpp.
| MythControls::~MythControls | ( | ) |
Definition at line 70 of file mythcontrols.cpp.
| bool MythControls::Create | ( | void | ) | [virtual] |
Loads UI elements from theme.
This method grabs all of the UI elements that are needed by mythcontrols. If this method returns false the plugin must exit, otherwise the application will crash.
Reimplemented from MythScreenType.
Definition at line 95 of file mythcontrols.cpp.
Referenced by mythplugin_run().
| bool MythControls::keyPressEvent | ( | QKeyEvent * | event | ) | [virtual] |
| void MythControls::customEvent | ( | QCustomEvent * | event | ) | [virtual] |
| QString MythControls::GetCurrentContext | ( | void | ) |
Get the currently selected context string.
If no context is selected, an empty string is returned.
Definition at line 425 of file mythcontrols.cpp.
Referenced by AddKeyToAction(), DeleteKey(), GetCurrentKey(), and RefreshKeyInformation().
| QString MythControls::GetCurrentAction | ( | void | ) |
Get the currently selected action string.
If no action is selected, an empty string is returned.
Definition at line 450 of file mythcontrols.cpp.
Referenced by AddKeyToAction(), DeleteKey(), GetCurrentKey(), and RefreshKeyInformation().
| QString MythControls::GetCurrentKey | ( | void | ) |
Get the currently selected key string.
If no key is selected, an empty string is returned.
Definition at line 505 of file mythcontrols.cpp.
Referenced by DeleteKey(), and keyPressEvent().
| void MythControls::Teardown | ( | void | ) | [protected] |
| bool MythControls::LoadUI | ( | void | ) | [protected] |
| void MythControls::LoadData | ( | const QString & | hostname | ) | [protected] |
Load the settings for a particular host.
| hostname | The host to load settings for. |
Definition at line 542 of file mythcontrols.cpp.
Referenced by Create().
| void MythControls::ChangeButtonFocus | ( | int | direction | ) | [protected] |
Change button focus in a particular direction.
| direction | +1 moves focus to the right, -1 moves to the left, and 0 changes the focus to the first button. |
Definition at line 173 of file mythcontrols.cpp.
Referenced by keyPressEvent().
| void MythControls::ChangeView | ( | void | ) | [protected] |
| void MythControls::SetListContents | ( | MythListButton * | uilist, | |
| const QStringList & | contents, | |||
| bool | arrows = false | |||
| ) | [protected] |
Set the contents of a list.
| uilist | The list being changed. | |
| contents | The contents of the list. | |
| arrows | True to draw with arrows, otherwise arrows are not drawn. |
Definition at line 348 of file mythcontrols.cpp.
Referenced by Create(), customEvent(), and UpdateRightList().
| void MythControls::UpdateRightList | ( | void | ) | [protected] |
Update the right list.
Definition at line 363 of file mythcontrols.cpp.
Referenced by Create(), customEvent(), and LeftSelected().
| uint MythControls::GetCurrentButton | ( | void | ) | [protected] |
Returns the focused button, or Action::kMaximumNumberOfBindings if no buttons are focued.
Definition at line 486 of file mythcontrols.cpp.
Referenced by AddKeyToAction(), and GetCurrentKey().
| QString MythControls::GetTypeDesc | ( | ListType | type | ) | const [protected] |
| void MythControls::AddKeyToAction | ( | void | ) | [private, slot] |
Add a key to the currently selected action.
TODO FIXME This code needs work to support deleteKey in any mode exc. Context/Action TODO FIXME This code needs work to deal with multiple binding conflicts.
Definition at line 643 of file mythcontrols.cpp.
Referenced by customEvent(), and keyPressEvent().
| void MythControls::DeleteKey | ( | void | ) | [private, slot] |
Delete the currently active key to action mapping.
TODO FIXME This code needs work to support deleteKey in any mode exc. Context/Action
Definition at line 572 of file mythcontrols.cpp.
Referenced by customEvent().
| void MythControls::LeftSelected | ( | MythListButtonItem * | ) | [private, slot] |
Refreshes the right list when an item in the left list is selected.
Definition at line 328 of file mythcontrols.cpp.
Referenced by Create().
| void MythControls::RightSelected | ( | MythListButtonItem * | ) | [private, slot] |
Refreshes key information when an item in the right list is selected.
Definition at line 337 of file mythcontrols.cpp.
Referenced by Create().
| bool MythControls::JumpTo | ( | QKeyEvent * | event | ) | [inline, private, slot] |
Definition at line 91 of file mythcontrols.h.
| void MythControls::Save | ( | void | ) | [inline, private, slot] |
Save the bindings to the Database.
Definition at line 93 of file mythcontrols.h.
Referenced by customEvent().
| void MythControls::RefreshKeyInformation | ( | void | ) | [private, slot] |
Updates the list of keys that are shown and the description of the action.
Definition at line 393 of file mythcontrols.cpp.
Referenced by AddKeyToAction(), Create(), customEvent(), DeleteKey(), and RightSelected().
ViewType MythControls::m_currentView [private] |
Definition at line 97 of file mythcontrols.h.
Referenced by Create(), customEvent(), keyPressEvent(), MythControls(), and UpdateRightList().
MythUIType* MythControls::m_focusedUIElement [private] |
Definition at line 98 of file mythcontrols.h.
MythListButton* MythControls::m_leftList [private] |
Definition at line 99 of file mythcontrols.h.
Referenced by Create(), customEvent(), GetCurrentAction(), GetCurrentContext(), GetCurrentKey(), keyPressEvent(), MythControls(), RefreshKeyInformation(), and UpdateRightList().
MythListButton* MythControls::m_rightList [private] |
Definition at line 100 of file mythcontrols.h.
Referenced by ChangeButtonFocus(), Create(), GetCurrentAction(), GetCurrentContext(), GetCurrentKey(), keyPressEvent(), MythControls(), and UpdateRightList().
MythUIText* MythControls::m_description [private] |
Definition at line 101 of file mythcontrols.h.
Referenced by Create(), MythControls(), and RefreshKeyInformation().
MythUIText* MythControls::m_leftDescription [private] |
Definition at line 102 of file mythcontrols.h.
Referenced by Create(), customEvent(), and MythControls().
MythUIText* MythControls::m_rightDescription [private] |
Definition at line 103 of file mythcontrols.h.
Referenced by Create(), customEvent(), and MythControls().
QPtrList<MythUIButton> MythControls::m_actionButtons [private] |
Definition at line 104 of file mythcontrols.h.
Referenced by ChangeButtonFocus(), Create(), GetCurrentButton(), and RefreshKeyInformation().
MythDialogBox* MythControls::m_menuPopup [private] |
Definition at line 105 of file mythcontrols.h.
Referenced by ChangeView(), customEvent(), keyPressEvent(), and MythControls().
KeyBindings* MythControls::m_bindings [private] |
Definition at line 107 of file mythcontrols.h.
Referenced by AddKeyToAction(), Create(), customEvent(), DeleteKey(), GetCurrentKey(), keyPressEvent(), LoadData(), MythControls(), RefreshKeyInformation(), Save(), Teardown(), and UpdateRightList().
QStringList MythControls::m_sortedContexts [private] |
QDict<QStringList> MythControls::m_contexts [private] |
actions for a given context
Definition at line 109 of file mythcontrols.h.
Referenced by LoadData(), MythControls(), Teardown(), and UpdateRightList().
ListType MythControls::m_leftListType [private] |
Definition at line 110 of file mythcontrols.h.
Referenced by ChangeButtonFocus(), GetCurrentAction(), GetCurrentContext(), GetCurrentKey(), and MythControls().
ListType MythControls::m_rightListType [private] |
Definition at line 111 of file mythcontrols.h.
Referenced by ChangeButtonFocus(), GetCurrentAction(), GetCurrentContext(), GetCurrentKey(), and MythControls().
1.5.5