This widget is used for grouping other widgets for display when a particular named state is called. More...
#include <mythuistatetype.h>
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) |
| MythUIType * | GetCurrentState () |
| MythUIType * | GetState (const QString &name) |
| MythUIType * | GetState (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 |
| MythUIType * | m_CurrentState |
| MythRect | m_ParentArea |
| bool | m_ShowEmpty |
Friends | |
| class | MythUIButtonList |
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.
Definition at line 24 of file mythuistatetype.h.
| 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.
| void MythUIStateType::SetShowEmpty | ( | bool | showempty | ) | [inline] |
Definition at line 29 of file mythuistatetype.h.
Definition at line 25 of file mythuistatetype.cpp.
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().
Definition at line 119 of file mythuistatetype.cpp.
| MythUIType* MythUIStateType::GetCurrentState | ( | ) | [inline] |
Definition at line 40 of file mythuistatetype.h.
Referenced by MythUIButtonList::DistributeButtons(), MythUIButtonList::DistributeRow(), MythUIButtonList::PageDown(), MythUIButtonList::PageUp(), MythUIButtonList::PrepareButton(), MythUIButton::SetState(), MythUIButton::SetText(), and MythUIButtonListItem::SetToRealButton().
| 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] |
Reset the widget to it's original state, should not reset changes made by the theme.
Reimplemented from MythUIType.
Definition at line 198 of file mythuistatetype.cpp.
Referenced by CheckedSet(), GameUI::clearRomInfo(), MythThemedMenu::setButtonActive(), MythUIButtonListItem::SetToRealButton(), NetTree::slotItemChanged(), ThemeChooser::toggleFullscreenPreview(), PlaybackBox::updateGroupInfo(), and PlaybackBox::updateIcons().
| 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.
friend class MythUIButtonList [friend] |
Definition at line 68 of file mythuistatetype.h.
QMap<QString, MythUIType *> MythUIStateType::m_ObjectsByName [protected] |
Definition at line 60 of file mythuistatetype.h.
Referenced by AddImage(), AddObject(), Clear(), CopyFrom(), DisplayState(), EnsureStateLoaded(), GetState(), and ParseElement().
QMap<int, MythUIType *> MythUIStateType::m_ObjectsByState [protected] |
Definition at line 61 of file mythuistatetype.h.
Referenced by AddImage(), AddObject(), Clear(), CopyFrom(), DisplayState(), EnsureStateLoaded(), GetState(), and ParseElement().
MythUIType* MythUIStateType::m_CurrentState [protected] |
Definition at line 63 of file mythuistatetype.h.
Referenced by Clear(), DisplayState(), MythUIStateType(), and Reset().
MythRect MythUIStateType::m_ParentArea [protected] |
Definition at line 64 of file mythuistatetype.h.
Referenced by AddObject(), and RecalculateArea().
bool MythUIStateType::m_ShowEmpty [protected] |
Definition at line 66 of file mythuistatetype.h.
Referenced by CopyFrom(), DisplayState(), MythUIStateType(), and ParseElement().
1.6.3