MythListButton Class Reference

#include <mythlistbutton.h>

Inheritance diagram for MythListButton:

MythUIType XMLParseBase

List of all members.


Detailed Description

Definition at line 14 of file mythlistbutton.h.


Public Types

enum  MovementUnit {
  MoveItem, MoveColumn, MoveRow, MovePage,
  MoveMax
}
enum  LayoutType { LayoutVertical, LayoutHorizontal, LayoutGrid }

Public Slots

void Select ()
void Deselect ()

Signals

void itemSelected (MythListButtonItem *item)
void itemClicked (MythListButtonItem *item)

Public Member Functions

 MythListButton (MythUIType *parent, const char *name)
 MythListButton (MythUIType *parent, const char *name, const QRect &area, bool showArrow=true, bool showScrollArrows=false)
 ~MythListButton ()
virtual bool keyPressEvent (QKeyEvent *)
virtual void gestureEvent (MythUIType *uitype, MythGestureEvent *event)
 Mouse click/movement handler, recieves mouse gesture events from the QApplication event loop.
virtual MythUITypeGetChildAt (const QPoint &p)
 Mouse click/movement handler, recieves mouse gesture events from the QApplication event loop.
void SetFontActive (const MythFontProperties &font)
void SetFontInactive (const MythFontProperties &font)
void SetTextFlags (int flags)
void SetSpacing (int spacing)
void SetMargin (int margin)
void SetDrawFromBottom (bool draw)
void SetActive (bool active)
bool isActive ()
void Reset ()
void SetItemCurrent (MythListButtonItem *item)
void SetItemCurrent (int pos)
MythListButtonItemGetItemCurrent ()
MythListButtonItemGetItemFirst ()
MythListButtonItemGetItemNext (MythListButtonItem *item)
MythListButtonItemGetItemAt (int pos)
bool MoveItemUpDown (MythListButtonItem *item, bool flag)
QPtrListIterator
< MythListButtonItem
GetIterator ()
int GetCurrentPos ()
int GetItemPos (MythListButtonItem *item)
int GetCount ()
bool IsEmpty ()
void MoveDown (MovementUnit unit=MoveItem)
void MoveUp (MovementUnit unit=MoveItem)
bool MoveToNamedPosition (const QString &position_name)
void SetDrawOffset (QPoint off)
QPoint GetDrawOffset (void)

Protected Member Functions

void Const ()
virtual void Init ()
void LoadPixmap (MythImage **pix, QDomElement &element)
void InsertItem (MythListButtonItem *item)
void RemoveItem (MythListButtonItem *item)
void SetPositionArrowStates (void)
virtual uint ItemWidth (void) const
virtual QRect CalculateContentsRect (const QRect &arrowsRect) const
virtual void CalculateVisibleItems (void)
virtual const QRect PlaceArrows (const QSize &arrowSize)
virtual QPoint GetButtonPosition (int column, int row) const
virtual bool ParseElement (QDomElement &element)
virtual void CopyFrom (MythUIType *base)
virtual void CreateCopy (MythUIType *parent)
virtual void Finalize (void)

Protected Attributes

LayoutType m_layout
int m_order
QRect m_rect
QRect m_contentsRect
int m_itemHeight
int m_itemHorizSpacing
int m_itemVertSpacing
int m_itemMargin
uint m_itemsVisible
int m_rows
int m_columns
int m_itemWidth
bool m_active
bool m_showScrollArrows
bool m_showArrow
MythUIStateTypem_upArrow
MythUIStateTypem_downArrow
QValueVector< MythUIButton * > m_ButtonList
MythFontPropertiesm_fontActive
MythFontPropertiesm_fontInactive
bool m_initialized
bool m_clearing
MythListButtonItemm_topItem
MythListButtonItemm_selItem
QPtrListIterator
< MythListButtonItem > * 
m_topIterator
QPtrListIterator
< MythListButtonItem > * 
m_selIterator
int m_selPosition
int m_topPosition
int m_itemCount
QPtrList< MythListButtonItemm_itemList
QPoint m_drawoffset
bool m_drawFromBottom
int m_textFlags
MythImagearrowPix
MythImagecheckNonePix
MythImagecheckHalfPix
MythImagecheckFullPix
MythImageitemRegPix
MythImageitemSelActPix
MythImageitemSelInactPix

Friends

class MythListButtonItem

Member Enumeration Documentation

Enumerator:
MoveItem 
MoveColumn 
MoveRow 
MovePage 
MoveMax 

Definition at line 57 of file mythlistbutton.h.

Enumerator:
LayoutVertical 
LayoutHorizontal 
LayoutGrid 

Definition at line 58 of file mythlistbutton.h.


Constructor & Destructor Documentation

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

Definition at line 15 of file mythlistbutton.cpp.

Referenced by CreateCopy().

MythListButton::MythListButton ( MythUIType parent,
const char *  name,
const QRect &  area,
bool  showArrow = true,
bool  showScrollArrows = false 
)

Definition at line 24 of file mythlistbutton.cpp.

MythListButton::~MythListButton (  ) 

Definition at line 79 of file mythlistbutton.cpp.


Member Function Documentation

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

Reimplemented from MythUIType.

Definition at line 730 of file mythlistbutton.cpp.

void MythListButton::gestureEvent ( MythUIType uitype,
MythGestureEvent event 
) [virtual]

Mouse click/movement handler, recieves mouse gesture events from the QApplication event loop.

Should not be used directly.

Parameters:
uitype The mythuitype receiving the event
event Mouse event

Reimplemented from MythUIType.

Definition at line 799 of file mythlistbutton.cpp.

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

Mouse click/movement handler, recieves mouse gesture events from the QApplication event loop.

Should not be used directly.

Parameters:
p QPoint coordinates
Returns:
MythUIType accepting focus found at this coordinates

Reimplemented from MythUIType.

Definition at line 815 of file mythlistbutton.cpp.

void MythListButton::SetFontActive ( const MythFontProperties font  ) 

Definition at line 111 of file mythlistbutton.cpp.

void MythListButton::SetFontInactive ( const MythFontProperties font  ) 

Definition at line 116 of file mythlistbutton.cpp.

void MythListButton::SetTextFlags ( int  flags  ) 

Definition at line 137 of file mythlistbutton.cpp.

void MythListButton::SetSpacing ( int  spacing  ) 

Definition at line 121 of file mythlistbutton.cpp.

void MythListButton::SetMargin ( int  margin  ) 

Definition at line 127 of file mythlistbutton.cpp.

void MythListButton::SetDrawFromBottom ( bool  draw  ) 

Definition at line 132 of file mythlistbutton.cpp.

void MythListButton::SetActive ( bool  active  ) 

bool MythListButton::isActive (  )  [inline]

Definition at line 38 of file mythlistbutton.h.

void MythListButton::Reset ( void   ) 

Definition at line 149 of file mythlistbutton.cpp.

Referenced by MythControls::SetListContents().

void MythListButton::SetItemCurrent ( MythListButtonItem item  ) 

Definition at line 306 of file mythlistbutton.cpp.

Referenced by SetItemCurrent().

void MythListButton::SetItemCurrent ( int  pos  ) 

Definition at line 340 of file mythlistbutton.cpp.

MythListButtonItem * MythListButton::GetItemCurrent ( void   ) 

MythListButtonItem * MythListButton::GetItemFirst ( void   ) 

Definition at line 354 of file mythlistbutton.cpp.

MythListButtonItem * MythListButton::GetItemNext ( MythListButtonItem item  ) 

Definition at line 359 of file mythlistbutton.cpp.

MythListButtonItem * MythListButton::GetItemAt ( int  pos  ) 

Definition at line 385 of file mythlistbutton.cpp.

bool MythListButton::MoveItemUpDown ( MythListButtonItem item,
bool  flag 
)

Definition at line 583 of file mythlistbutton.cpp.

Referenced by MythListButtonItem::moveUpDown().

QPtrListIterator< MythListButtonItem > MythListButton::GetIterator ( void   ) 

Definition at line 380 of file mythlistbutton.cpp.

int MythListButton::GetCurrentPos (  )  [inline]

Definition at line 52 of file mythlistbutton.h.

int MythListButton::GetItemPos ( MythListButtonItem item  ) 

Definition at line 390 of file mythlistbutton.cpp.

Referenced by MythDialogBox::Select().

int MythListButton::GetCount ( void   ) 

Definition at line 367 of file mythlistbutton.cpp.

bool MythListButton::IsEmpty ( void   ) 

Definition at line 372 of file mythlistbutton.cpp.

void MythListButton::MoveDown ( MovementUnit  unit = MoveItem  ) 

Definition at line 463 of file mythlistbutton.cpp.

Referenced by keyPressEvent(), and MoveItemUpDown().

void MythListButton::MoveUp ( MovementUnit  unit = MoveItem  ) 

Definition at line 397 of file mythlistbutton.cpp.

Referenced by keyPressEvent(), and MoveItemUpDown().

bool MythListButton::MoveToNamedPosition ( const QString &  position_name  ) 

Definition at line 535 of file mythlistbutton.cpp.

Referenced by gestureEvent().

void MythListButton::SetDrawOffset ( QPoint  off  )  [inline]

Definition at line 63 of file mythlistbutton.h.

QPoint MythListButton::GetDrawOffset ( void   )  [inline]

Definition at line 64 of file mythlistbutton.h.

void MythListButton::Select (  )  [inline, slot]

Definition at line 67 of file mythlistbutton.h.

Referenced by Const().

void MythListButton::Deselect (  )  [inline, slot]

Definition at line 68 of file mythlistbutton.h.

Referenced by Const().

void MythListButton::itemSelected ( MythListButtonItem item  )  [signal]

void MythListButton::itemClicked ( MythListButtonItem item  )  [signal]

Referenced by gestureEvent(), and keyPressEvent().

void MythListButton::Const ( void   )  [protected]

Definition at line 37 of file mythlistbutton.cpp.

Referenced by MythListButton().

void MythListButton::Init ( void   )  [protected, virtual]

Definition at line 636 of file mythlistbutton.cpp.

Referenced by SetPositionArrowStates().

void MythListButton::LoadPixmap ( MythImage **  pix,
QDomElement &  element 
) [protected]

Definition at line 862 of file mythlistbutton.cpp.

Referenced by ParseElement().

void MythListButton::InsertItem ( MythListButtonItem item  )  [protected]

Definition at line 225 of file mythlistbutton.cpp.

Referenced by MythListButtonItem::MythListButtonItem().

void MythListButton::RemoveItem ( MythListButtonItem item  )  [protected]

Definition at line 245 of file mythlistbutton.cpp.

Referenced by MythListButtonItem::~MythListButtonItem().

void MythListButton::SetPositionArrowStates ( void   )  [protected]

virtual uint MythListButton::ItemWidth ( void   )  const [inline, protected, virtual]

Definition at line 85 of file mythlistbutton.h.

Referenced by GetButtonPosition(), and Init().

QRect MythListButton::CalculateContentsRect ( const QRect &  arrowsRect  )  const [protected, virtual]

Definition at line 907 of file mythlistbutton.cpp.

Referenced by Init().

void MythListButton::CalculateVisibleItems ( void   )  [protected, virtual]

Definition at line 926 of file mythlistbutton.cpp.

Referenced by Init().

const QRect MythListButton::PlaceArrows ( const QSize &  arrowSize  )  [protected, virtual]

Definition at line 883 of file mythlistbutton.cpp.

Referenced by Init().

QPoint MythListButton::GetButtonPosition ( int  column,
int  row 
) const [protected, virtual]

Definition at line 840 of file mythlistbutton.cpp.

Referenced by Init().

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

Reimplemented from MythUIType.

Definition at line 961 of file mythlistbutton.cpp.

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

Reimplemented from MythUIType.

Definition at line 1071 of file mythlistbutton.cpp.

Referenced by CreateCopy().

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

Reimplemented from MythUIType.

Definition at line 1065 of file mythlistbutton.cpp.

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

Reimplemented from MythUIType.

Definition at line 1153 of file mythlistbutton.cpp.


Friends And Related Function Documentation

friend class MythListButtonItem [friend]

Definition at line 148 of file mythlistbutton.h.


Member Data Documentation

int MythListButton::m_order [protected]

Definition at line 100 of file mythlistbutton.h.

Referenced by CopyFrom().

QRect MythListButton::m_rect [protected]

Definition at line 101 of file mythlistbutton.h.

Referenced by CopyFrom().

QRect MythListButton::m_contentsRect [protected]

Definition at line 102 of file mythlistbutton.h.

Referenced by CalculateVisibleItems(), CopyFrom(), and Init().

Definition at line 104 of file mythlistbutton.h.

Referenced by CalculateVisibleItems(), Const(), CopyFrom(), GetButtonPosition(), and Init().

int MythListButton::m_rows [protected]

Definition at line 109 of file mythlistbutton.h.

Referenced by CalculateVisibleItems(), and Const().

int MythListButton::m_columns [protected]

Definition at line 110 of file mythlistbutton.h.

Referenced by CalculateVisibleItems(), Const(), Init(), MoveDown(), and MoveUp().

int MythListButton::m_itemWidth [protected]

Definition at line 111 of file mythlistbutton.h.

Referenced by CalculateVisibleItems(), CopyFrom(), Init(), and ItemWidth().

QValueVector<MythUIButton *> MythListButton::m_ButtonList [protected]

Definition at line 120 of file mythlistbutton.h.

Referenced by CopyFrom(), Init(), and SetPositionArrowStates().

Definition at line 122 of file mythlistbutton.h.

Referenced by Const(), CopyFrom(), Init(), ParseElement(), SetFontActive(), and ~MythListButton().

Definition at line 123 of file mythlistbutton.h.

Referenced by Const(), CopyFrom(), Init(), ParseElement(), SetFontInactive(), and ~MythListButton().

Definition at line 125 of file mythlistbutton.h.

Referenced by Const(), CopyFrom(), Init(), SetActive(), and SetPositionArrowStates().

Definition at line 126 of file mythlistbutton.h.

Referenced by Const(), CopyFrom(), RemoveItem(), Reset(), and ~MythListButton().

QPtrListIterator<MythListButtonItem>* MythListButton::m_topIterator [protected]

QPtrListIterator<MythListButtonItem>* MythListButton::m_selIterator [protected]

int MythListButton::m_itemCount [protected]

QPoint MythListButton::m_drawoffset [protected]

Definition at line 140 of file mythlistbutton.h.

Referenced by CopyFrom(), GetDrawOffset(), and SetDrawOffset().

int MythListButton::m_textFlags [protected]

Definition at line 145 of file mythlistbutton.h.

Referenced by Const(), CopyFrom(), Init(), ParseElement(), and ~MythListButton().

Definition at line 145 of file mythlistbutton.h.

Referenced by Const(), CopyFrom(), Init(), ParseElement(), and ~MythListButton().

Definition at line 145 of file mythlistbutton.h.

Referenced by Const(), CopyFrom(), Init(), ParseElement(), and ~MythListButton().

Definition at line 145 of file mythlistbutton.h.

Referenced by Const(), CopyFrom(), Init(), ParseElement(), and ~MythListButton().

Definition at line 146 of file mythlistbutton.h.

Referenced by Const(), CopyFrom(), Init(), ParseElement(), and ~MythListButton().

Definition at line 146 of file mythlistbutton.h.

Referenced by Const(), CopyFrom(), Init(), ParseElement(), and ~MythListButton().

Definition at line 146 of file mythlistbutton.h.

Referenced by Const(), CopyFrom(), Init(), ParseElement(), and ~MythListButton().


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