MythUIType Class Reference

#include <mythuitype.h>

Inheritance diagram for MythUIType:

XMLParseBase MythListButton MythScreenType MythUIButton MythUIImage MythUIStateType MythUIText ThemedButton MythAppearance MythControls MythDialogBox MythThemedMenu MythUIClock

List of all members.


Detailed Description

Base UI type.

Children are drawn/processed in order added

Definition at line 22 of file mythuitype.h.


Public Slots

void LoseFocus ()
bool TakeFocus ()
void Activate ()
void Hide (void)
void Show (void)
void Refresh (void)

Signals

void RequestUpdate ()
void RequestUpdate (const QRect &)
void RequestRegionUpdate (const QRect &)
void TakingFocus ()
void LosingFocus ()
void Showing ()
void Hiding ()
void FinishedMoving ()
void FinishedFading ()

Public Member Functions

 MythUIType (QObject *parent, const char *name)
virtual ~MythUIType ()
void AddChild (MythUIType *child)
MythUITypeGetChild (const char *name, const char *inherits=0)
virtual MythUITypeGetChildAt (const QPoint &p)
 Return the first MythUIType which accepts focus found at the given coordinates.
QValueVector< MythUIType * > * GetAllChildren (void)
void DeleteAllChildren (void)
bool NeedsRedraw (void)
void SetRedraw ()
void SetChildNeedsRedraw (MythUIType *child)
bool CanTakeFocus (void)
void SetCanTakeFocus (bool set=true)
virtual void Pulse (void)
void Draw (MythPainter *p, int xoffset, int yoffset, int alphaMod=255, QRect clipRegion=QRect())
virtual void SetPosition (int x, int y)
virtual void SetPosition (const QPoint &pos)
virtual void SetArea (const QRect &rect)
virtual QRect GetArea (void) const
virtual QRegion GetDirtyArea (void) const
QString cutDown (const QString &data, QFont *font, bool multiline=false, int overload_width=-1, int overload_height=-1)
bool IsVisible (void)
void SetVisible (bool visible)
void MoveTo (QPoint destXY, QPoint speedXY)
void AdjustAlpha (int mode, int alphachange, int minalpha=0, int maxalpha=255)
void SetAlpha (int newalpha)
int GetAlpha (void)
virtual bool keyPressEvent (QKeyEvent *)
virtual void gestureEvent (MythUIType *origtype, MythGestureEvent *ge)
MythFontPropertiesGetFont (const QString &text)
bool AddFont (const QString &text, MythFontProperties *fontProp)

Protected Member Functions

virtual void customEvent (QCustomEvent *)
virtual void DrawSelf (MythPainter *p, int xoffset, int yoffset, int alphaMod, QRect clipRegion)
void AddFocusableChildrenToList (QPtrList< MythUIType > &focusList)
void HandleAlphaPulse ()
void HandleMovementPulse ()
int CalcAlpha (int alphamod)
QFont CreateQFont (const QString &face, int pointSize=12, int weight=QFont::Normal, bool italic=FALSE)
QRect NormRect (const QRect &rect)
QPoint NormPoint (const QPoint &point)
int NormX (const int width)
int NormY (const int height)
virtual bool ParseElement (QDomElement &element)
virtual void CopyFrom (MythUIType *base)
virtual void CreateCopy (MythUIType *parent)
virtual void Finalize (void)

Protected Attributes

QValueVector< MythUIType * > m_ChildrenList
bool m_Visible
bool m_HasFocus
bool m_CanHaveFocus
QRect m_Area
QRegion m_DirtyRegion
bool m_NeedsRedraw
int m_Alpha
int m_AlphaChangeMode
int m_AlphaChange
int m_AlphaMin
int m_AlphaMax
bool m_Moving
QPoint m_XYDestination
QPoint m_XYSpeed
FontMapm_Fonts
MythUITypem_Parent

Friends

class XMLParseBase

Constructor & Destructor Documentation

MythUIType::MythUIType ( QObject *  parent,
const char *  name 
)

Definition at line 14 of file mythuitype.cpp.

MythUIType::~MythUIType (  )  [virtual]

Definition at line 41 of file mythuitype.cpp.


Member Function Documentation

void MythUIType::AddChild ( MythUIType child  ) 

Definition at line 46 of file mythuitype.cpp.

Referenced by MythUIType().

MythUIType * MythUIType::GetChild ( const char *  name,
const char *  inherits = 0 
)

MythUIType * MythUIType::GetChildAt ( const QPoint &  p  )  [virtual]

Return the first MythUIType which accepts focus found at the given coordinates.

Parameters:
p QPoint coordinates
Returns:
The widget at these coordinates

Reimplemented in MythListButton.

Definition at line 87 of file mythuitype.cpp.

Referenced by MythMainWindow::eventFilter(), GetChildAt(), and MythListButton::GetChildAt().

QValueVector< MythUIType * > * MythUIType::GetAllChildren ( void   ) 

Definition at line 64 of file mythuitype.cpp.

void MythUIType::DeleteAllChildren ( void   ) 

Definition at line 69 of file mythuitype.cpp.

Referenced by MythThemedMenuPrivate::ReloadTheme().

bool MythUIType::NeedsRedraw ( void   ) 

Definition at line 113 of file mythuitype.cpp.

Referenced by MythMainWindow::drawTimeout().

void MythUIType::SetRedraw ( void   ) 

void MythUIType::SetChildNeedsRedraw ( MythUIType child  ) 

Definition at line 134 of file mythuitype.cpp.

Referenced by SetChildNeedsRedraw(), and SetRedraw().

bool MythUIType::CanTakeFocus ( void   ) 

Definition at line 153 of file mythuitype.cpp.

Referenced by GetChildAt(), and MythScreenType::SetFocusWidget().

void MythUIType::SetCanTakeFocus ( bool  set = true  ) 

void MythUIType::Pulse ( void   )  [virtual]

Reimplemented in MythUIClock, MythUIImage, and MythUIText.

Definition at line 235 of file mythuitype.cpp.

Referenced by MythUIText::Pulse(), and MythUIImage::Pulse().

void MythUIType::Draw ( MythPainter p,
int  xoffset,
int  yoffset,
int  alphaMod = 255,
QRect  clipRegion = QRect() 
)

Definition at line 254 of file mythuitype.cpp.

void MythUIType::SetPosition ( int  x,
int  y 
) [virtual]

void MythUIType::SetPosition ( const QPoint &  pos  )  [virtual]

Definition at line 284 of file mythuitype.cpp.

void MythUIType::SetArea ( const QRect &  rect  )  [virtual]

QRect MythUIType::GetArea ( void   )  const [virtual]

QRegion MythUIType::GetDirtyArea ( void   )  const [virtual]

Definition at line 311 of file mythuitype.cpp.

Referenced by MythMainWindow::drawTimeout(), and SetChildNeedsRedraw().

QString MythUIType::cutDown ( const QString &  data,
QFont *  font,
bool  multiline = false,
int  overload_width = -1,
int  overload_height = -1 
)

Definition at line 316 of file mythuitype.cpp.

Referenced by MythUIText::DrawSelf().

bool MythUIType::IsVisible ( void   ) 

void MythUIType::SetVisible ( bool  visible  ) 

void MythUIType::MoveTo ( QPoint  destXY,
QPoint  speedXY 
)

Definition at line 373 of file mythuitype.cpp.

void MythUIType::AdjustAlpha ( int  mode,
int  alphachange,
int  minalpha = 0,
int  maxalpha = 255 
)

void MythUIType::SetAlpha ( int  newalpha  ) 

int MythUIType::GetAlpha ( void   ) 

Definition at line 410 of file mythuitype.cpp.

Referenced by MythScreenStack::CheckNewFadeTransition().

bool MythUIType::keyPressEvent ( QKeyEvent *   )  [virtual]

void MythUIType::gestureEvent ( MythUIType origtype,
MythGestureEvent ge 
) [virtual]

MythFontProperties * MythUIType::GetFont ( const QString &  text  ) 

bool MythUIType::AddFont ( const QString &  text,
MythFontProperties fontProp 
)

void MythUIType::customEvent ( QCustomEvent *   )  [protected, virtual]

Reimplemented in MythAppearance, and MythControls.

Definition at line 420 of file mythuitype.cpp.

void MythUIType::LoseFocus ( void   )  [slot]

Definition at line 431 of file mythuitype.cpp.

Referenced by MythScreenType::SetFocusWidget().

bool MythUIType::TakeFocus ( void   )  [slot]

Definition at line 441 of file mythuitype.cpp.

Referenced by MythScreenType::SetFocusWidget().

void MythUIType::Activate ( void   )  [slot]

Definition at line 452 of file mythuitype.cpp.

void MythUIType::Hide ( void   )  [slot]

Definition at line 470 of file mythuitype.cpp.

void MythUIType::Show ( void   )  [slot]

Definition at line 477 of file mythuitype.cpp.

void MythUIType::Refresh ( void   )  [slot]

Definition at line 456 of file mythuitype.cpp.

Referenced by LoseFocus(), and TakeFocus().

void MythUIType::RequestUpdate (  )  [signal]

void MythUIType::RequestUpdate ( const QRect &   )  [signal]

void MythUIType::RequestRegionUpdate ( const QRect &   )  [signal]

void MythUIType::TakingFocus (  )  [signal]

void MythUIType::LosingFocus (  )  [signal]

void MythUIType::Showing (  )  [signal]

Referenced by Show().

void MythUIType::Hiding (  )  [signal]

Referenced by Hide().

void MythUIType::FinishedMoving (  )  [signal]

Referenced by HandleMovementPulse().

void MythUIType::FinishedFading (  )  [signal]

void MythUIType::DrawSelf ( MythPainter p,
int  xoffset,
int  yoffset,
int  alphaMod,
QRect  clipRegion 
) [protected, virtual]

Reimplemented in MythUIImage, and MythUIText.

Definition at line 250 of file mythuitype.cpp.

Referenced by Draw().

void MythUIType::AddFocusableChildrenToList ( QPtrList< MythUIType > &  focusList  )  [protected]

Definition at line 484 of file mythuitype.cpp.

Referenced by MythScreenType::BuildFocusList().

void MythUIType::HandleAlphaPulse ( void   )  [protected]

Definition at line 205 of file mythuitype.cpp.

Referenced by Pulse().

void MythUIType::HandleMovementPulse ( void   )  [protected]

Definition at line 163 of file mythuitype.cpp.

Referenced by Pulse().

int MythUIType::CalcAlpha ( int  alphamod  )  [protected]

Definition at line 245 of file mythuitype.cpp.

Referenced by Draw(), MythUIText::DrawSelf(), and MythUIImage::DrawSelf().

QFont MythUIType::CreateQFont ( const QString &  face,
int  pointSize = 12,
int  weight = QFont::Normal,
bool  italic = FALSE 
) [protected]

Definition at line 494 of file mythuitype.cpp.

QRect MythUIType::NormRect ( const QRect &  rect  )  [protected]

Definition at line 500 of file mythuitype.cpp.

QPoint MythUIType::NormPoint ( const QPoint &  point  )  [protected]

Definition at line 505 of file mythuitype.cpp.

int MythUIType::NormX ( const int  width  )  [protected]

int MythUIType::NormY ( const int  height  )  [protected]

Definition at line 515 of file mythuitype.cpp.

Referenced by MythListButton::ParseElement(), and MythListButton::SetSpacing().

bool MythUIType::ParseElement ( QDomElement &  element  )  [protected, virtual]

void MythUIType::CopyFrom ( MythUIType base  )  [protected, virtual]

void MythUIType::CreateCopy ( MythUIType parent  )  [protected, virtual]

void MythUIType::Finalize ( void   )  [protected, virtual]


Friends And Related Function Documentation

friend class XMLParseBase [friend]

Reimplemented in MythScreenType.

Definition at line 149 of file mythuitype.h.


Member Data Documentation

QValueVector<MythUIType *> MythUIType::m_ChildrenList [protected]

Definition at line 126 of file mythuitype.h.

Referenced by CopyFrom(), Draw(), Hide(), IsVisible(), MythUIType(), SetVisible(), and Show().

Definition at line 127 of file mythuitype.h.

Referenced by LoseFocus(), MythUIType(), and TakeFocus().

QRect MythUIType::m_Area [protected]

QRegion MythUIType::m_DirtyRegion [protected]

Definition at line 133 of file mythuitype.h.

Referenced by Draw(), MythUIType(), NeedsRedraw(), SetChildNeedsRedraw(), and SetRedraw().

int MythUIType::m_Alpha [protected]

Definition at line 136 of file mythuitype.h.

Referenced by AdjustAlpha(), CopyFrom(), HandleAlphaPulse(), MythUIType(), and ParseElement().

int MythUIType::m_AlphaChange [protected]

Definition at line 137 of file mythuitype.h.

Referenced by AdjustAlpha(), CopyFrom(), HandleAlphaPulse(), MythUIType(), and ParseElement().

int MythUIType::m_AlphaMin [protected]

Definition at line 138 of file mythuitype.h.

Referenced by AdjustAlpha(), CopyFrom(), HandleAlphaPulse(), MythUIType(), and ParseElement().

int MythUIType::m_AlphaMax [protected]

Definition at line 139 of file mythuitype.h.

Referenced by AdjustAlpha(), CopyFrom(), HandleAlphaPulse(), MythUIType(), and ParseElement().

Definition at line 141 of file mythuitype.h.

Referenced by CopyFrom(), HandleMovementPulse(), MoveTo(), and MythUIType().

QPoint MythUIType::m_XYDestination [protected]

Definition at line 142 of file mythuitype.h.

Referenced by CopyFrom(), HandleMovementPulse(), MoveTo(), and MythUIType().

QPoint MythUIType::m_XYSpeed [protected]

Definition at line 143 of file mythuitype.h.

Referenced by CopyFrom(), HandleMovementPulse(), MoveTo(), and MythUIType().

Definition at line 145 of file mythuitype.h.

Referenced by AddFont(), GetFont(), MythUIType(), and ~MythUIType().

Definition at line 147 of file mythuitype.h.

Referenced by gestureEvent(), GetFont(), MythUIType(), SetChildNeedsRedraw(), and SetRedraw().


The documentation for this class was generated from the following files:

Generated on Sat Dec 18 05:16:08 2010 for MythTV by  doxygen 1.5.5