MythTV  0.26-pre
Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
MythUIButton Class Reference

A single button widget. More...

#include <mythuibutton.h>

Inheritance diagram for MythUIButton:
MythUIType XMLParseBase

List of all members.

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
MythUIStateTypem_BackgroundState
MythUITextm_Text
QString m_state
bool m_Pushed
bool m_Lockable
class QTimer * m_clickTimer

Detailed Description

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.


Constructor & Destructor Documentation

MythUIButton::MythUIButton ( MythUIType parent,
const QString &  name 
)

Definition at line 16 of file mythuibutton.cpp.

Referenced by CreateCopy().

Definition at line 38 of file mythuibutton.cpp.


Member Function Documentation

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.

Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop.

Should not be used directly.

Parameters:
eventMouse event

Reimplemented from MythUIType.

Definition at line 157 of file mythuibutton.cpp.

bool MythUIButton::keyPressEvent ( QKeyEvent *  e) [virtual]

Key event handler.

Parameters:
eventKeypress event

Reimplemented from MythUIType.

Definition at line 126 of file mythuibutton.cpp.

void MythUIButton::SetText ( const QString &  msg)
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::SetLockable ( bool  lockable) [inline]

Definition at line 39 of file mythuibutton.h.

Referenced by MusicCommon::CreateCommon(), and MythUIVirtualKeyboard::updateKeys().

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().

Referenced by Push(), and UnPush().

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.

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().


Member Data Documentation

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().

Definition at line 65 of file mythuibutton.h.

Referenced by MythUIButton(), SetInitialStates(), SetState(), and SetText().

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().

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().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends