MythUIStateType Class Reference
[MythUI Widget and theme handling]

This widget is used for grouping other widgets for display when a particular named state is called. More...

#include <mythuistatetype.h>

Inheritance diagram for MythUIStateType:
MythUIType XMLParseBase

List of all members.

Public Types

enum  StateType { None = 0, Off, Half, Full }

Public Member Functions

 MythUIStateType (MythUIType *parent, const QString &name)
 ~MythUIStateType ()
void SetShowEmpty (bool showempty)
bool AddImage (const QString &name, MythImage *image)
bool AddImage (StateType type, MythImage *image)
bool AddObject (const QString &name, MythUIType *object)
bool AddObject (StateType type, MythUIType *object)
bool DisplayState (const QString &name)
bool DisplayState (StateType type)
MythUITypeGetCurrentState ()
MythUITypeGetState (const QString &name)
MythUITypeGetState (StateType state)
void Reset (void)
void Clear (void)
void EnsureStateLoaded (const QString &name)
void EnsureStateLoaded (StateType type)
virtual void LoadNow (void)
 Cause images in this and child widgets to be loaded.
virtual void RecalculateArea (bool recurse=true)

Protected Member Functions

virtual bool ParseElement (const QString &filename, QDomElement &element, bool showWarnings)
 Parse the xml definition of this widget setting the state of the object accordingly.
virtual void CopyFrom (MythUIType *base)
 Copy this widgets state from another.
virtual void CreateCopy (MythUIType *parent)
 Copy the state of this widget to the one given, it must be of the same type.
virtual void Finalize (void)
 Perform any post-xml parsing initialisation tasks.

Protected Attributes

QMap< QString, MythUIType * > m_ObjectsByName
QMap< int, MythUIType * > m_ObjectsByState
MythUITypem_CurrentState
MythRect m_ParentArea
bool m_ShowEmpty

Friends

class MythUIButtonList

Detailed Description

This widget is used for grouping other widgets for display when a particular named state is called.

A statetype can contain any number of state groups which can themselves contain any number of widgets.

States are mutally exclusive, when one state is displayed the others are hidden.

Definition at line 21 of file mythuistatetype.h.


Member Enumeration Documentation

Enumerator:
None 
Off 
Half 
Full 

Definition at line 24 of file mythuistatetype.h.


Constructor & Destructor Documentation

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

Definition at line 14 of file mythuistatetype.cpp.

Referenced by CreateCopy().

MythUIStateType::~MythUIStateType (  ) 

Definition at line 21 of file mythuistatetype.cpp.


Member Function Documentation

void MythUIStateType::SetShowEmpty ( bool  showempty  )  [inline]

Definition at line 29 of file mythuistatetype.h.

bool MythUIStateType::AddImage ( const QString &  name,
MythImage image 
)

Definition at line 25 of file mythuistatetype.cpp.

bool MythUIStateType::AddImage ( StateType  type,
MythImage image 
)

Definition at line 58 of file mythuistatetype.cpp.

bool MythUIStateType::AddObject ( const QString &  name,
MythUIType object 
)

Definition at line 40 of file mythuistatetype.cpp.

Referenced by AddImage(), CopyFrom(), and ParseElement().

bool MythUIStateType::AddObject ( StateType  type,
MythUIType object 
)

Definition at line 71 of file mythuistatetype.cpp.

bool MythUIStateType::DisplayState ( const QString &  name  ) 

Definition at line 87 of file mythuistatetype.cpp.

Referenced by CheckedSet(), TrackInfoPopup::Create(), TrackInfoDialog::Create(), MusicCommon::CreateCommon(), MusicCommon::customEvent(), MythUITextEdit::Deselect(), MythUICheckBox::Deselect(), MythUICheckBox::Disable(), StatusBox::doAutoExpireList(), StatusBox::doJobQueueStatus(), StatusBox::doListingsStatus(), StatusBox::doLogEntries(), StatusBox::doMachineStatus(), StatusBox::doScheduleStatus(), StatusBox::doTunerStatus(), MythUICheckBox::Enable(), Finalize(), ProgLister::HandleSelected(), ThemeChooser::itemChanged(), MusicCommon::keyPressEvent(), SearchButtonListDialog::nextClicked(), MythThemedMenu::parseMenu(), SearchButtonListDialog::prevClicked(), EditMetadataDialog::ratingSpinChanged(), Reset(), SearchButtonListDialog::searchChanged(), MythUITextEdit::Select(), MythUICheckBox::Select(), MythThemedMenu::setButtonActive(), MythUICheckBox::SetCheckState(), MythUITextEdit::SetInitialStates(), MythUICheckBox::SetInitialStates(), MythUIButtonList::SetPositionArrowStates(), MythUIButton::SetState(), OSD::SetText(), MythUIButtonListItem::SetToRealButton(), NetTree::slotItemChanged(), NetSearch::slotItemChanged(), MythUICheckBox::toggleCheckState(), ThemeChooser::toggleFullscreenPreview(), MythMusicVolumeDialog::updateDisplay(), PlaybackBox::updateIcons(), ViewScheduled::updateInfo(), GuideGrid::updateInfo(), EditMetadataDialog::updateRating(), MusicCommon::updateRepeatMode(), GameUI::updateRomInfo(), MusicCommon::updateShuffleMode(), IdleScreen::UpdateStatus(), MusicCommon::updateTrackInfo(), PlaybackBox::UpdateUIListItem(), and MusicCommon::updateVolume().

bool MythUIStateType::DisplayState ( StateType  type  ) 

Definition at line 119 of file mythuistatetype.cpp.

MythUIType* MythUIStateType::GetCurrentState (  )  [inline]
MythUIType * MythUIStateType::GetState ( const QString &  name  ) 

Definition at line 148 of file mythuistatetype.cpp.

Referenced by MythUIButtonList::Init().

MythUIType * MythUIStateType::GetState ( StateType  state  ) 

Definition at line 158 of file mythuistatetype.cpp.

void MythUIStateType::Reset ( void   )  [virtual]
void MythUIStateType::Clear ( void   ) 

Definition at line 169 of file mythuistatetype.cpp.

void MythUIStateType::EnsureStateLoaded ( const QString &  name  ) 

Definition at line 313 of file mythuistatetype.cpp.

Referenced by MythThemedMenu::addButton(), and MythThemedMenu::parseMenu().

void MythUIStateType::EnsureStateLoaded ( StateType  type  ) 

Definition at line 324 of file mythuistatetype.cpp.

void MythUIStateType::LoadNow ( void   )  [virtual]

Cause images in this and child widgets to be loaded.

Used only in conjunction with delayed loading in some large statetypes to conserve memory.

Reimplemented from MythUIType.

Definition at line 332 of file mythuistatetype.cpp.

void MythUIStateType::RecalculateArea ( bool  recurse = true  )  [virtual]

Reimplemented from MythUIType.

Definition at line 338 of file mythuistatetype.cpp.

bool MythUIStateType::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 214 of file mythuistatetype.cpp.

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

Copy this widgets state from another.

Reimplemented from MythUIType.

Definition at line 265 of file mythuistatetype.cpp.

Referenced by CreateCopy(), MythUIButtonList::Init(), MythUIButtonList::InitButton(), and MythUIButtonList::PrepareButton().

void MythUIStateType::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 301 of file mythuistatetype.cpp.

void MythUIStateType::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 307 of file mythuistatetype.cpp.


Friends And Related Function Documentation

friend class MythUIButtonList [friend]

Definition at line 68 of file mythuistatetype.h.


Member Data Documentation

QMap<QString, MythUIType *> MythUIStateType::m_ObjectsByName [protected]

Definition at line 63 of file mythuistatetype.h.

Referenced by Clear(), DisplayState(), MythUIStateType(), and Reset().

Definition at line 64 of file mythuistatetype.h.

Referenced by AddObject(), and RecalculateArea().

Definition at line 66 of file mythuistatetype.h.

Referenced by CopyFrom(), DisplayState(), MythUIStateType(), and ParseElement().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:42:18 2012 for MythTV by  doxygen 1.6.3