|
MythTV
0.26-pre
|
Screen for managing and configuring keyboard input bindings. More...
#include <mythcontrols.h>
Public Types | |
| enum | ListType { kContextList, kKeyList, kActionList } |
Public Member Functions | |
| MythControls (MythScreenStack *parent, const char *name) | |
| Creates a new MythControls wizard. | |
| ~MythControls () | |
| bool | Create (void) |
| Loads UI elements from theme. | |
| void | customEvent (QEvent *) |
| 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 (MythUIButtonList *uilist, const QStringList &contents, bool arrows=false) |
| Set the contents of a list. | |
| void | UpdateRightList (void) |
| Update the right list. | |
| void | GrabKey (void) |
| void | DeleteKey (void) |
| Delete the currently active key to action mapping. | |
| void | Save (void) |
| uint | GetCurrentButton (void) |
| Returns the focused button, or Action::kMaximumNumberOfBindings if no buttons are focued. | |
| void | ResolveConflict (ActionID *conflict, int error_level, const QString &key) |
| Resolve a potential conflict. | |
| QString | GetTypeDesc (ListType type) const |
Private Slots | |
| void | LeftSelected (MythUIButtonListItem *) |
| Refreshes the right list when an item in the left list is selected. | |
| void | RightSelected (MythUIButtonListItem *) |
| Refreshes key information when an item in the right list is selected. | |
| void | LeftPressed (MythUIButtonListItem *) |
| Slot handling a button being pressed in the left list. | |
| void | RightPressed (MythUIButtonListItem *) |
| Slot handling a button being pressed in the left list. | |
| void | ActionButtonPressed () |
| Slot handling a button being pressed in the left list. | |
| void | RefreshKeyInformation (void) |
| Updates the list of keys that are shown and the description of the action. | |
| void | AddKeyToAction (QString key, bool ignoreconflict=false) |
| Add a key to the currently selected action. | |
Private Member Functions | |
| void | ShowMenu (void) |
| void | Close (void) |
Private Attributes | |
| ViewType | m_currentView |
| MythUIButtonList * | m_leftList |
| MythUIButtonList * | m_rightList |
| MythUIText * | m_description |
| MythUIText * | m_leftDescription |
| MythUIText * | m_rightDescription |
| QList< MythUIButton * > | m_actionButtons |
| MythDialogBox * | m_menuPopup |
| KeyBindings * | m_bindings |
| QStringList | m_sortedContexts |
| sorted list of contexts | |
| QHash< QString, QStringList > | m_contexts |
| actions for a given context | |
| ListType | m_leftListType |
| ListType | m_rightListType |
Screen for managing and configuring keyboard input bindings.
Definition at line 49 of file mythcontrols.h.
Definition at line 61 of file mythcontrols.h.
| MythControls::MythControls | ( | MythScreenStack * | parent, |
| const char * | name | ||
| ) |
Creates a new MythControls wizard.
| parent | Pointer to the screen stack |
| name | The name of the window |
Definition at line 56 of file mythcontrols.cpp.
Definition at line 70 of file mythcontrols.cpp.
| bool MythControls::Create | ( | void | ) | [virtual] |
Loads UI elements from theme.
Reimplemented from MythScreenType.
Definition at line 91 of file mythcontrols.cpp.
Referenced by startKeysSetup().
| void MythControls::customEvent | ( | QEvent * | event | ) | [virtual] |
Reimplemented from MythUIType.
Definition at line 690 of file mythcontrols.cpp.
| QString MythControls::GetCurrentContext | ( | void | ) |
Get the currently selected context string.
If no context is selected, an empty string is returned.
Definition at line 388 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 414 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 479 of file mythcontrols.cpp.
Referenced by ActionButtonPressed(), and DeleteKey().
| void MythControls::Teardown | ( | void | ) | [protected] |
Definition at line 75 of file mythcontrols.cpp.
Referenced by customEvent(), and ~MythControls().
| 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 524 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 161 of file mythcontrols.cpp.
Referenced by RightPressed().
| void MythControls::ChangeView | ( | void | ) | [protected] |
| void MythControls::SetListContents | ( | MythUIButtonList * | 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 308 of file mythcontrols.cpp.
Referenced by Create(), customEvent(), and UpdateRightList().
| void MythControls::UpdateRightList | ( | void | ) | [protected] |
Update the right list.
Definition at line 327 of file mythcontrols.cpp.
Referenced by Create(), customEvent(), and LeftSelected().
| void MythControls::GrabKey | ( | void | ) | [protected] |
Definition at line 631 of file mythcontrols.cpp.
Referenced by ActionButtonPressed(), and customEvent().
| void MythControls::DeleteKey | ( | void | ) | [protected] |
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 556 of file mythcontrols.cpp.
Referenced by customEvent().
| void MythControls::Save | ( | void | ) | [inline, protected] |
Definition at line 88 of file mythcontrols.h.
Referenced by customEvent().
| uint MythControls::GetCurrentButton | ( | void | ) | [protected] |
Returns the focused button, or Action::kMaximumNumberOfBindings if no buttons are focued.
Definition at line 459 of file mythcontrols.cpp.
Referenced by AddKeyToAction(), and GetCurrentKey().
| void MythControls::ResolveConflict | ( | ActionID * | conflict, |
| int | error_level, | ||
| const QString & | key | ||
| ) | [protected] |
Resolve a potential conflict.
Definition at line 597 of file mythcontrols.cpp.
Referenced by AddKeyToAction().
| QString MythControls::GetTypeDesc | ( | ListType | type | ) | const [protected] |
| void MythControls::LeftSelected | ( | MythUIButtonListItem * | ) | [private, slot] |
Refreshes the right list when an item in the left list is selected.
Definition at line 287 of file mythcontrols.cpp.
Referenced by Create().
| void MythControls::RightSelected | ( | MythUIButtonListItem * | ) | [private, slot] |
Refreshes key information when an item in the right list is selected.
Definition at line 296 of file mythcontrols.cpp.
Referenced by Create().
| void MythControls::LeftPressed | ( | MythUIButtonListItem * | item | ) | [private, slot] |
Slot handling a button being pressed in the left list.
Definition at line 173 of file mythcontrols.cpp.
Referenced by Create().
| void MythControls::RightPressed | ( | MythUIButtonListItem * | item | ) | [private, slot] |
Slot handling a button being pressed in the left list.
Definition at line 182 of file mythcontrols.cpp.
Referenced by Create().
| void MythControls::ActionButtonPressed | ( | ) | [private, slot] |
Slot handling a button being pressed in the left list.
Definition at line 192 of file mythcontrols.cpp.
Referenced by Create().
| void MythControls::RefreshKeyInformation | ( | void | ) | [private, slot] |
Updates the list of keys that are shown and the description of the action.
Definition at line 355 of file mythcontrols.cpp.
Referenced by AddKeyToAction(), Create(), customEvent(), DeleteKey(), and RightSelected().
| void MythControls::AddKeyToAction | ( | QString | key, |
| bool | ignoreconflict = false |
||
| ) | [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 654 of file mythcontrols.cpp.
Referenced by customEvent(), and GrabKey().
| void MythControls::ShowMenu | ( | void | ) | [private, virtual] |
Reimplemented from MythScreenType.
Definition at line 241 of file mythcontrols.cpp.
| void MythControls::Close | ( | void | ) | [private, virtual] |
Reimplemented from MythScreenType.
Definition at line 261 of file mythcontrols.cpp.
Referenced by customEvent().
ViewType MythControls::m_currentView [private] |
Definition at line 111 of file mythcontrols.h.
Referenced by Create(), customEvent(), MythControls(), RightPressed(), and UpdateRightList().
MythUIButtonList* MythControls::m_leftList [private] |
Definition at line 112 of file mythcontrols.h.
Referenced by Create(), customEvent(), GetCurrentAction(), GetCurrentContext(), GetCurrentKey(), MythControls(), RefreshKeyInformation(), and UpdateRightList().
MythUIButtonList* MythControls::m_rightList [private] |
Definition at line 113 of file mythcontrols.h.
Referenced by Create(), GetCurrentAction(), GetCurrentContext(), GetCurrentKey(), MythControls(), and UpdateRightList().
MythUIText* MythControls::m_description [private] |
Definition at line 114 of file mythcontrols.h.
Referenced by Create(), MythControls(), and RefreshKeyInformation().
MythUIText* MythControls::m_leftDescription [private] |
Definition at line 115 of file mythcontrols.h.
Referenced by Create(), customEvent(), and MythControls().
MythUIText* MythControls::m_rightDescription [private] |
Definition at line 116 of file mythcontrols.h.
Referenced by Create(), customEvent(), and MythControls().
QList<MythUIButton*> MythControls::m_actionButtons [private] |
Definition at line 117 of file mythcontrols.h.
Referenced by ChangeButtonFocus(), Create(), GetCurrentButton(), and RefreshKeyInformation().
MythDialogBox* MythControls::m_menuPopup [private] |
Definition at line 118 of file mythcontrols.h.
Referenced by ActionButtonPressed(), ChangeView(), customEvent(), MythControls(), and ShowMenu().
KeyBindings* MythControls::m_bindings [private] |
Definition at line 120 of file mythcontrols.h.
Referenced by AddKeyToAction(), Close(), Create(), customEvent(), DeleteKey(), GetCurrentKey(), LoadData(), MythControls(), RefreshKeyInformation(), Save(), Teardown(), and UpdateRightList().
QStringList MythControls::m_sortedContexts [private] |
QHash<QString, QStringList> MythControls::m_contexts [private] |
actions for a given context
Definition at line 123 of file mythcontrols.h.
Referenced by LoadData(), Teardown(), and UpdateRightList().
ListType MythControls::m_leftListType [private] |
Definition at line 124 of file mythcontrols.h.
Referenced by ChangeButtonFocus(), GetCurrentAction(), GetCurrentContext(), GetCurrentKey(), and MythControls().
ListType MythControls::m_rightListType [private] |
Definition at line 125 of file mythcontrols.h.
Referenced by ChangeButtonFocus(), GetCurrentAction(), GetCurrentContext(), GetCurrentKey(), and MythControls().
1.7.6.1