A single button widget. More...
#include <mythuibutton.h>
Signals | |
| void | Clicked () |
Public Member Functions | |
| MythUIButton (MythUIType *parent, const QString &name) | |
| ~MythUIButton () | |
| virtual void | Reset (void) |
| virtual bool | gestureEvent (MythGestureEvent *event) |
| virtual bool | keyPressEvent (QKeyEvent *) |
| void | SetText (const QString &msg) |
| QString | GetText (void) const |
| QString | GetDefaultText (void) const |
| void | Push (bool lock=false) |
| void | SetLockable (bool lockable) |
| void | SetLocked (bool locked) |
Protected Slots | |
| void | Select () |
| void | Deselect () |
| void | Enable () |
| void | Disable () |
| void | UnPush () |
Protected Member Functions | |
| virtual bool | ParseElement (const QString &filename, QDomElement &element, bool showWarnings) |
| virtual void | CopyFrom (MythUIType *base) |
| virtual void | CreateCopy (MythUIType *parent) |
| virtual void | Finalize (void) |
| void | SetInitialStates (void) |
| void | SetState (QString state) |
Protected Attributes | |
| QString | m_Message |
| QString | m_ValueText |
| MythUIStateType * | m_BackgroundState |
| MythUIText * | m_Text |
| QString | m_state |
| bool | m_Pushed |
| bool | m_Lockable |
| class QTimer * | m_clickTimer |
A single button widget.
Has multiple states with backgrounds and fonts, text and optional checkbox (dual/tri state)
Definition at line 21 of file mythuibutton.h.
| MythUIButton::MythUIButton | ( | MythUIType * | parent, | |
| const QString & | name | |||
| ) |
Definition at line 16 of file mythuibutton.cpp.
Referenced by CreateCopy().
| MythUIButton::~MythUIButton | ( | ) |
Definition at line 38 of file mythuibutton.cpp.
| void MythUIButton::Reset | ( | void | ) | [virtual] |
Reset the widget to it's original state, should not reset changes made by the theme.
Reimplemented from MythUIType.
Definition at line 61 of file mythuibutton.cpp.
| bool MythUIButton::gestureEvent | ( | MythGestureEvent * | event | ) | [virtual] |
Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop. Should not be used directly.
| event | Mouse event |
Reimplemented from MythUIType.
Definition at line 157 of file mythuibutton.cpp.
| bool MythUIButton::keyPressEvent | ( | QKeyEvent * | e | ) | [virtual] |
Key event handler.
| event | Keypress event |
Reimplemented from MythUIType.
Definition at line 126 of file mythuibutton.cpp.
| void MythUIButton::SetText | ( | const QString & | msg | ) |
Definition at line 229 of file mythuibutton.cpp.
Referenced by ZMPlayer::Create(), ZMEvents::Create(), FunctionDialog::Create(), WelcomeDialog::Create(), LocationDialog::Create(), SourceSetup::Create(), ScreenSetup::Create(), AudioSetupWizard::Create(), PowerSearchPopup::Create(), PhrasePopup::Create(), MythNewsEditor::Create(), ImportIconsWizard::enableControls(), Finalize(), ZMPlayer::playPressed(), AudioSetupWizard::toggleSpeakers(), ZMPlayer::updateFrame(), and MythUIVirtualKeyboard::updateKeys().
| QString MythUIButton::GetText | ( | void | ) | const |
Definition at line 246 of file mythuibutton.cpp.
| QString MythUIButton::GetDefaultText | ( | void | ) | const |
Definition at line 251 of file mythuibutton.cpp.
| void MythUIButton::Push | ( | bool | lock = false |
) |
Definition at line 175 of file mythuibutton.cpp.
Referenced by gestureEvent(), ZMPlayer::keyPressEvent(), ZMEvents::keyPressEvent(), keyPressEvent(), MusicCommon::keyPressEvent(), ImportCoverArtDialog::keyPressEvent(), and ImportMusicDialog::keyPressEvent().
| void MythUIButton::SetLockable | ( | bool | lockable | ) | [inline] |
Definition at line 39 of file mythuibutton.h.
Referenced by MusicCommon::CreateCommon(), and MythUIVirtualKeyboard::updateKeys().
| void MythUIButton::SetLocked | ( | bool | locked | ) |
Definition at line 206 of file mythuibutton.cpp.
Referenced by MythUIVirtualKeyboard::charClicked(), MusicCommon::CreateCommon(), MusicCommon::customEvent(), MythUIVirtualKeyboard::lockClicked(), and MythUIVirtualKeyboard::shiftClicked().
| void MythUIButton::Select | ( | ) | [protected, slot] |
Definition at line 66 of file mythuibutton.cpp.
Referenced by MythUIButton().
| void MythUIButton::Deselect | ( | ) | [protected, slot] |
Definition at line 74 of file mythuibutton.cpp.
Referenced by MythUIButton().
| void MythUIButton::Enable | ( | ) | [protected, slot] |
Definition at line 85 of file mythuibutton.cpp.
Referenced by MythUIButton().
| void MythUIButton::Disable | ( | ) | [protected, slot] |
Definition at line 90 of file mythuibutton.cpp.
Referenced by MythUIButton().
| void MythUIButton::UnPush | ( | ) | [protected, slot] |
Definition at line 186 of file mythuibutton.cpp.
Referenced by gestureEvent(), keyPressEvent(), MythUIButton(), and SetState().
| bool MythUIButton::ParseElement | ( | const QString & | filename, | |
| QDomElement & | element, | |||
| bool | showWarnings | |||
| ) | [protected, virtual] |
Parse the xml definition of this widget setting the state of the object accordingly.
Reimplemented from MythUIType.
Definition at line 259 of file mythuibutton.cpp.
| void MythUIButton::CopyFrom | ( | MythUIType * | base | ) | [protected, virtual] |
Copy this widgets state from another.
Reimplemented from MythUIType.
Definition at line 288 of file mythuibutton.cpp.
Referenced by CreateCopy().
| void MythUIButton::CreateCopy | ( | MythUIType * | parent | ) | [protected, virtual] |
Copy the state of this widget to the one given, it must be of the same type.
Reimplemented from MythUIType.
Definition at line 279 of file mythuibutton.cpp.
| void MythUIButton::Finalize | ( | void | ) | [protected, virtual] |
Perform any post-xml parsing initialisation tasks. This is called after the widget has been created and it's state established by ParseElement() or CopyFrom(). A derived class should use this to perform any initialisation tasks which should occur after this point.
Reimplemented from MythUIType.
Definition at line 310 of file mythuibutton.cpp.
| void MythUIButton::SetInitialStates | ( | void | ) | [protected] |
Definition at line 44 of file mythuibutton.cpp.
Referenced by CopyFrom(), and Finalize().
| void MythUIButton::SetState | ( | QString | state | ) | [protected] |
Definition at line 95 of file mythuibutton.cpp.
Referenced by Deselect(), Disable(), Enable(), Push(), Select(), SetInitialStates(), SetLocked(), and UnPush().
QString MythUIButton::m_Message [protected] |
Definition at line 62 of file mythuibutton.h.
Referenced by CopyFrom(), GetText(), SetInitialStates(), SetState(), and SetText().
QString MythUIButton::m_ValueText [protected] |
Definition at line 63 of file mythuibutton.h.
Referenced by CopyFrom(), Finalize(), and ParseElement().
MythUIStateType* MythUIButton::m_BackgroundState [protected] |
Definition at line 65 of file mythuibutton.h.
Referenced by MythUIButton(), SetInitialStates(), SetState(), and SetText().
MythUIText* MythUIButton::m_Text [protected] |
Definition at line 66 of file mythuibutton.h.
Referenced by GetDefaultText(), MythUIButton(), SetInitialStates(), SetState(), and SetText().
QString MythUIButton::m_state [protected] |
Definition at line 68 of file mythuibutton.h.
Referenced by SetState().
bool MythUIButton::m_Pushed [protected] |
Definition at line 70 of file mythuibutton.h.
Referenced by Deselect(), gestureEvent(), keyPressEvent(), MythUIButton(), Push(), Select(), SetLocked(), SetState(), and UnPush().
bool MythUIButton::m_Lockable [protected] |
Definition at line 71 of file mythuibutton.h.
Referenced by CopyFrom(), MythUIButton(), Push(), SetLocked(), and UnPush().
class QTimer* MythUIButton::m_clickTimer [protected] |
Definition at line 72 of file mythuibutton.h.
Referenced by MythUIButton(), Push(), UnPush(), and ~MythUIButton().
1.6.3