MythTV  master
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members

The base class on which all widgets and screens are based. More...

#include <mythuitype.h>

Inheritance diagram for MythUIType:
Inheritance graph
[legend]
Collaboration diagram for MythUIType:
Collaboration graph
[legend]

Public Slots

void LoseFocus ()
 
bool TakeFocus ()
 
void Activate ()
 
void Hide (void)
 
void Show (void)
 
void Refresh (void)
 
void UpdateDependState (bool isDefault)
 
void UpdateDependState (MythUIType *dependee, bool isDefault)
 

Signals

void RequestUpdate ()
 
void RequestUpdate (const QRect &)
 
void RequestRegionUpdate (const QRect &)
 
void TakingFocus ()
 
void LosingFocus ()
 
void Showing ()
 
void Hiding ()
 
void Enabling ()
 
void Disabling ()
 
void FinishedMoving ()
 
void FinishedFading ()
 
void DependChanged (bool isDefault)
 

Public Member Functions

 MythUIType (QObject *parent, const QString &name)
 
virtual void Reset (void)
 Reset the widget to it's original state, should not reset changes made by the theme. More...
 
void AddChild (MythUIType *child)
 Add a child UIType. More...
 
MythUITypeGetChild (const QString &name) const
 Get a named child of this UIType. More...
 
MythUITypeGetChildAt (const QPoint &p, bool recursive=true, bool focusable=true) const
 Return the first MythUIType at the given coordinates. More...
 
QList< MythUIType * > * GetAllChildren (void)
 Return a list of all child widgets. More...
 
void DeleteChild (const QString &name)
 Delete a named child of this UIType. More...
 
void DeleteChild (MythUIType *child)
 Delete the given UIType if it is a child of this UIType. More...
 
void DeleteAllChildren (void)
 Delete all child widgets. More...
 
bool NeedsRedraw (void) const
 
void ResetNeedsRedraw (void)
 
void SetRedraw (void)
 
void SetChildNeedsRedraw (MythUIType *child)
 
bool CanTakeFocus (void) const
 Return if this widget can accept input focus. More...
 
void SetCanTakeFocus (bool set=true)
 Set whether this widget can take focus. More...
 
void SetFocusOrder (int)
 
bool IsEnabled (void) const
 
void SetEnabled (bool enable)
 
bool MoveToTop (void)
 
bool MoveChildToTop (MythUIType *child)
 
void ActivateAnimations (MythUIAnimation::Trigger trigger)
 
QList< MythUIAnimation * > * GetAnimations (void)
 
virtual void Pulse (void)
 Pulse is called 70 times a second to trigger a single frame of an animation. More...
 
void Draw (MythPainter *p, int xoffset, int yoffset, int alphaMod=255, QRect clipRect=QRect())
 
void SetPosition (int x, int y)
 Convenience method, calls SetPosition(const MythPoint&) Override that instead to change functionality. More...
 
virtual void SetPosition (const MythPoint &pos)
 
virtual MythPoint GetPosition (void) const
 
virtual void SetSize (const QSize &size)
 
virtual void SetMinSize (const MythPoint &size)
 Set the minimum size of this widget, for widgets which can be rescaled. More...
 
virtual QSize GetMinSize (void) const
 
virtual void SetArea (const MythRect &rect)
 
virtual void AdjustMinArea (int delta_x, int delta_y, int delta_w, int delta_h)
 Adjust the size of a sibling. More...
 
virtual void VanishSibling (void)
 
virtual void SetMinAreaParent (MythRect actual_area, MythRect full_area, MythUIType *child)
 Adjust the size of sibling objects within the button. More...
 
virtual void SetMinArea (const MythRect &rect)
 Set the minimum area based on the given size. More...
 
virtual MythRect GetArea (void) const
 If the object has a minimum area defined, return it, other wise return the default area. More...
 
virtual MythRect GetFullArea (void) const
 
virtual void RecalculateArea (bool recurse=true)
 
void ExpandArea (const MythRect &rect)
 
virtual QRegion GetDirtyArea (void) const
 
bool IsVisible (bool recurse=false) const
 
virtual 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) const
 
virtual bool keyPressEvent (QKeyEvent *event)
 Key event handler. More...
 
virtual bool gestureEvent (MythGestureEvent *event)
 Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop. More...
 
virtual void mediaEvent (MythMediaEvent *event)
 Media/Device status event handler, received from MythMediaMonitor. More...
 
MythFontPropertiesGetFont (const QString &text) const
 
bool AddFont (const QString &text, MythFontProperties *fontProp)
 
void SetHelpText (const QString &text)
 
QString GetHelpText (void) const
 
void SetXMLLocation (const QString &filename, int where)
 
QString GetXMLLocation (void) const
 
void SetXMLName (const QString &name)
 
QString GetXMLName (void) const
 
bool IsDeferredLoading (bool recurse=false) const
 
void SetDeferLoad (bool defer)
 
virtual void LoadNow (void)
 Cause images in this and child widgets to be loaded. More...
 
bool ContainsPoint (const QPoint &point) const
 Check if the given point falls within this widgets area. More...
 
virtual MythPainterGetPainter (void)
 
void SetPainter (MythPainter *painter)
 
void SetCentre (UIEffects::Centre centre)
 
void SetZoom (float zoom)
 
void SetHorizontalZoom (float zoom)
 
void SetVerticalZoom (float zoom)
 
void SetAngle (float angle)
 
void SetDependIsDefault (bool isDefault)
 
void SetReverseDependence (MythUIType *dependee, bool reverse)
 
void SetDependsMap (QMap< QString, QString > dependsMap)
 
QMap< QString, QString > GetDependsMap () const
 

Protected Member Functions

virtual ~MythUIType ()
 
void customEvent (QEvent *event) override
 
virtual void DrawSelf (MythPainter *p, int xoffset, int yoffset, int alphaMod, QRect clipRect)
 
void AddFocusableChildrenToList (QMap< int, MythUIType * > &focusList)
 
void HandleAlphaPulse ()
 Handle one frame of an alpha (transparency) change animation. More...
 
void HandleMovementPulse ()
 Handle one frame of a movement animation. More...
 
int CalcAlpha (int alphamod)
 
int NormX (const int width)
 
int NormY (const int height)
 
void ConnectDependants (bool recurse=false)
 
virtual bool ParseElement (const QString &filename, QDomElement &element, bool showWarnings)
 Parse the xml definition of this widget setting the state of the object accordingly. More...
 
virtual void CopyFrom (MythUIType *base)
 Copy this widgets state from another. More...
 
virtual void CreateCopy (MythUIType *parent)
 Copy the state of this widget to the one given, it must be of the same type. More...
 
virtual void Finalize (void)
 Perform any post-xml parsing initialisation tasks. More...
 

Protected Attributes

QList< MythUIType * > m_ChildrenList
 
QMap< QString, QString > m_dependsMap
 
QList< QPair< MythUIType *, bool > > m_dependsValue
 
QList< int > m_dependOperator
 
bool m_Visible
 
bool m_HasFocus
 
bool m_CanHaveFocus
 
bool m_Enabled
 
bool m_EnableInitiator
 
bool m_Initiator
 
bool m_Vanish
 
bool m_Vanished
 
bool m_IsDependDefault
 
QMap< MythUIType *, boolm_ReverseDepend
 
int m_focusOrder
 
MythRect m_Area
 
MythRect m_MinArea
 
MythPoint m_MinSize
 
QRegion m_DirtyRegion
 
bool m_NeedsRedraw
 
UIEffects m_Effects
 
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
 
MythPainterm_Painter
 
QList< MythUIAnimation * > m_animations
 
QString m_helptext
 
QString m_xmlName
 
QString m_xmlLocation
 
bool m_deferload
 
QColor m_BorderColor
 

Friends

class XMLParseBase
 

Additional Inherited Members

- Static Public Member Functions inherited from XMLParseBase
static QString getFirstText (QDomElement &element)
 
static bool parseBool (const QString &text)
 
static bool parseBool (QDomElement &element)
 
static MythPoint parsePoint (const QString &text, bool normalize=true)
 
static MythPoint parsePoint (QDomElement &element, bool normalize=true)
 
static QSize parseSize (const QString &text, bool normalize=true)
 
static QSize parseSize (QDomElement &element, bool normalize=true)
 
static MythRect parseRect (const QString &text, bool normalize=true)
 
static MythRect parseRect (QDomElement &element, bool normalize=true)
 
static int parseAlignment (const QString &text)
 
static int parseAlignment (QDomElement &element)
 
static QBrush parseGradient (const QDomElement &element)
 
static QString parseText (QDomElement &element)
 
static MythUITypeGetGlobalObjectStore (void)
 
static void ClearGlobalObjectStore (void)
 
static void ParseChildren (const QString &filename, QDomElement &element, MythUIType *parent, bool showWarnings)
 
static MythUITypeParseUIType (const QString &filename, QDomElement &element, const QString &type, MythUIType *parent, MythScreenType *screen, bool showWarnings, QMap< QString, QString > &parentDependsMap)
 
static bool WindowExists (const QString &xmlfile, const QString &windowname)
 
static bool LoadWindowFromXML (const QString &xmlfile, const QString &windowname, MythUIType *parent)
 
static bool LoadBaseTheme (void)
 
static bool LoadBaseTheme (const QString &baseTheme)
 
static bool CopyWindowFromBase (const QString &windowname, MythScreenType *win)
 

Detailed Description

The base class on which all widgets and screens are based.

N.B. Children are drawn/processed in order added

Definition at line 63 of file mythuitype.h.

Constructor & Destructor Documentation

◆ MythUIType()

MythUIType::MythUIType ( QObject *  parent,
const QString &  name 
)

Definition at line 40 of file mythuitype.cpp.

◆ ~MythUIType()

MythUIType::~MythUIType ( )
protectedvirtual

Definition at line 82 of file mythuitype.cpp.

Member Function Documentation

◆ Reset()

void MythUIType::Reset ( void  )
virtual

◆ AddChild()

void MythUIType::AddChild ( MythUIType child)

Add a child UIType.

Definition at line 108 of file mythuitype.cpp.

Referenced by FormattedTextSubtitle::Draw(), MythUIType(), and Slide::Slide().

◆ GetChild()

MythUIType * MythUIType::GetChild ( const QString &  name) const

Get a named child of this UIType.

Parameters
nameName of child
Returns
Pointer to child if found, or nullptr

Definition at line 155 of file mythuitype.cpp.

Referenced by MythUIScrollBar::CalculatePosition(), MythUIProgressBar::CalculatePosition(), CheckedSet(), ConnectDependants(), MythUIButtonTree::CopyFrom(), MythThemedMenuState::CopyFrom(), MythUIStateType::CopyFrom(), CopyFrom(), MythUIButtonList::CopyFrom(), XMLParseBase::CopyWindowFromBase(), PlayerSettings::Create(), TvPlayWindow::Create(), MetadataSettings::Create(), CustomPriority::Create(), GrabberSettings::Create(), AudioSetupWizard::Create(), GeneralSetupWizard::Create(), KeyGrabPopupBox::Create(), StatusBox::Create(), ScreenWizard::Create(), ManualSchedule::Create(), NetSearch::Create(), ChannelRecPriority::Create(), VideoSetupWizard::Create(), GalleryThumbView::Create(), ThemeChooser::Create(), RawSettingsEditor::Create(), ImportIconsWizard::Create(), ViewScheduled::Create(), MythUIBusyDialog::Create(), TrackInfoPopup::Create(), MythThemedMenuState::Create(), BrowserConfig::Create(), GlobalSetup::Create(), BackendSelection::Create(), MythControls::Create(), MythUIProgressDialog::Create(), ProgramRecPriority::Create(), ScreenSetup::Create(), BookmarkManager::Create(), MythUIFileBrowser::Create(), Ripper::Create(), SourceSetup::Create(), PlaybackBox::Create(), GuideGrid::Create(), LocationDialog::Create(), MythNotificationScreen::Create(), RipStatus::Create(), TrackInfoDialog::Create(), GroupSelector::Create(), ChangeView::Create(), PasswordChange::Create(), RecMetadataEdit::Create(), HelpPopup::Create(), MythUIEditBar::Display(), ViewScheduled::FillList(), MythUIEditBar::Finalize(), MythUIScrollBar::Finalize(), ZMLivePlayer::GetMythUIType(), ProgLister::HandleSelected(), MythUIButtonTree::Init(), MythUIButtonList::Init(), PlaybackBox::IsUsageUIVisible(), ThemeChooser::itemChanged(), MythUIVirtualKeyboard::keyPressEvent(), TrackInfoDialog::keyPressEvent(), SubtitleFormat::Load(), XMLParseBase::ParseUIType(), WeatherScreen::prepareScreen(), NetworkControl::processTheme(), MythScreenType::SetFocusWidget(), OSD::SetGraph(), ZMEvents::setGridLayout(), MythUICheckBox::SetInitialStates(), MythUIButton::SetInitialStates(), MythUITextEdit::SetInitialStates(), ZMLivePlayer::setMonitorLayout(), OSD::SetRegions(), EditMetadataCommon::setSaveMetadataOnly(), MythUIButton::SetState(), MythUIButton::SetText(), OSD::SetText(), MythUIButtonListItem::SetToRealButton(), OSD::SetValues(), PlaybackBox::updateGroupInfo(), PlaybackBox::updateIcons(), ChannelRecPriority::updateInfo(), ViewScheduled::updateInfo(), GuideGrid::updateInfo(), ChannelRecPriority::updateList(), ProgramRecPriority::UpdateList(), EditMetadataCommon::updateMetadata(), ThemeChooser::updateProgressBar(), IdleScreen::UpdateStatus(), PlaybackBox::UpdateUIListItem(), and PlaybackBox::UpdateUsageUI().

◆ GetChildAt()

MythUIType * MythUIType::GetChildAt ( const QPoint &  p,
bool  recursive = true,
bool  focusable = true 
) const

Return the first MythUIType at the given coordinates.

Parameters
pQPoint coordinates
recursiveWhether to perform a recursive search
focusableOnly consider widgets that are focusable.
Returns
The widget at these coordinates

Definition at line 246 of file mythuitype.cpp.

Referenced by MythUIButtonTree::gestureEvent(), MythScreenType::gestureEvent(), GuideGrid::gestureEvent(), MythUIButtonList::gestureEvent(), and GetChildAt().

◆ GetAllChildren()

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

◆ DeleteChild() [1/2]

void MythUIType::DeleteChild ( const QString &  name)

◆ DeleteChild() [2/2]

void MythUIType::DeleteChild ( MythUIType child)

Delete the given UIType if it is a child of this UIType.

Will not delete the object if it is not a child. Pointer will be set to nullptr if successful.

Definition at line 194 of file mythuitype.cpp.

◆ DeleteAllChildren()

void MythUIType::DeleteAllChildren ( void  )

◆ NeedsRedraw()

bool MythUIType::NeedsRedraw ( void  ) const

Definition at line 303 of file mythuitype.cpp.

◆ ResetNeedsRedraw()

void MythUIType::ResetNeedsRedraw ( void  )

Definition at line 308 of file mythuitype.cpp.

◆ SetRedraw()

void MythUIType::SetRedraw ( void  )

◆ SetChildNeedsRedraw()

void MythUIType::SetChildNeedsRedraw ( MythUIType child)

Definition at line 334 of file mythuitype.cpp.

Referenced by SetChildNeedsRedraw(), and SetRedraw().

◆ CanTakeFocus()

bool MythUIType::CanTakeFocus ( void  ) const

Return if this widget can accept input focus.

Definition at line 359 of file mythuitype.cpp.

Referenced by ProgInfoList::Display(), InfoList::Display(), GetChildAt(), ProgInfoList::Toggle(), and InfoList::Toggle().

◆ SetCanTakeFocus()

void MythUIType::SetCanTakeFocus ( bool  set = true)

◆ SetFocusOrder()

void MythUIType::SetFocusOrder ( int  order)

Definition at line 1347 of file mythuitype.cpp.

Referenced by ParseElement().

◆ IsEnabled()

bool MythUIType::IsEnabled ( void  ) const
inline

◆ SetEnabled()

void MythUIType::SetEnabled ( bool  enable)

◆ MoveToTop()

bool MythUIType::MoveToTop ( void  )

◆ MoveChildToTop()

bool MythUIType::MoveChildToTop ( MythUIType child)

Definition at line 1352 of file mythuitype.cpp.

Referenced by MoveToTop().

◆ ActivateAnimations()

void MythUIType::ActivateAnimations ( MythUIAnimation::Trigger  trigger)

◆ GetAnimations()

QList<MythUIAnimation*>* MythUIType::GetAnimations ( void  )
inline

Definition at line 101 of file mythuitype.h.

Referenced by MythUIAnimation::ParseSection().

◆ Pulse()

void MythUIType::Pulse ( void  )
virtual

Pulse is called 70 times a second to trigger a single frame of an animation.

This changes the alpha value of the widget

Reimplemented in SubtitleScreen, Slide, MythUIWebBrowser, MythUIImage, MythUIText, MythUIBusyDialog, MythUITextEdit, MythUIClock, MythUIVideo, and TeletextScreen.

Definition at line 465 of file mythuitype.cpp.

Referenced by MythUIVideo::Pulse(), GallerySlideView::Pulse(), MythUITextEdit::Pulse(), MythUIBusyDialog::Pulse(), MythUIText::Pulse(), MythUIImage::Pulse(), MythUIWebBrowser::Pulse(), and SubtitleScreen::Pulse().

◆ Draw()

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

Definition at line 492 of file mythuitype.cpp.

◆ SetPosition() [1/2]

void MythUIType::SetPosition ( int  x,
int  y 
)

◆ SetPosition() [2/2]

void MythUIType::SetPosition ( const MythPoint pos)
virtual

Reimplemented in MythUIText.

Definition at line 546 of file mythuitype.cpp.

◆ GetPosition()

MythPoint MythUIType::GetPosition ( void  ) const
virtual

◆ SetSize()

void MythUIType::SetSize ( const QSize &  size)
virtual

Reimplemented in MythUIImage.

Definition at line 572 of file mythuitype.cpp.

Referenced by ExpandArea(), and MythUIImage::SetSize().

◆ SetMinSize()

void MythUIType::SetMinSize ( const MythPoint minsize)
virtual

Set the minimum size of this widget, for widgets which can be rescaled.

Use MythPoint to represent size, so percentages can be used

Definition at line 593 of file mythuitype.cpp.

Referenced by ParseElement().

◆ GetMinSize()

QSize MythUIType::GetMinSize ( void  ) const
virtual

Definition at line 605 of file mythuitype.cpp.

Referenced by AdjustMinArea(), SetMinArea(), and SetMinAreaParent().

◆ SetArea()

void MythUIType::SetArea ( const MythRect rect)
virtual

◆ AdjustMinArea()

void MythUIType::AdjustMinArea ( int  delta_x,
int  delta_y,
int  delta_w,
int  delta_h 
)
virtual

Adjust the size of a sibling.

Definition at line 632 of file mythuitype.cpp.

◆ VanishSibling()

void MythUIType::VanishSibling ( void  )
virtual

Definition at line 687 of file mythuitype.cpp.

◆ SetMinAreaParent()

void MythUIType::SetMinAreaParent ( MythRect  actual_area,
MythRect  full_area,
MythUIType child 
)
virtual

Adjust the size of sibling objects within the button.

Definition at line 710 of file mythuitype.cpp.

Referenced by SetMinArea(), and SetMinAreaParent().

◆ SetMinArea()

void MythUIType::SetMinArea ( const MythRect rect)
virtual

◆ GetArea()

MythRect MythUIType::GetArea ( void  ) const
virtual

◆ GetFullArea()

MythRect MythUIType::GetFullArea ( void  ) const
virtual

◆ RecalculateArea()

void MythUIType::RecalculateArea ( bool  recurse = true)
virtual

Reimplemented in MythUIStateType.

Definition at line 1329 of file mythuitype.cpp.

Referenced by CopyFrom(), SetArea(), SetPosition(), and SetSize().

◆ ExpandArea()

void MythUIType::ExpandArea ( const MythRect rect)

Definition at line 869 of file mythuitype.cpp.

Referenced by MythUIStateType::AddObject(), SetArea(), and SetSize().

◆ GetDirtyArea()

QRegion MythUIType::GetDirtyArea ( void  ) const
virtual

Definition at line 898 of file mythuitype.cpp.

Referenced by SetChildNeedsRedraw().

◆ IsVisible()

bool MythUIType::IsVisible ( bool  recurse = false) const

◆ SetVisible()

void MythUIType::SetVisible ( bool  visible)
virtual

Reimplemented in MythUIProgressBar.

Definition at line 1101 of file mythuitype.cpp.

Referenced by MythUIButtonList::CalculateButtonPositions(), MythUIProgressBar::CalculatePosition(), Slide::Clear(), Ripper::compilationChanged(), MythUIStateType::CopyFrom(), PlayerSettings::Create(), MetadataSettings::Create(), ProgInfoList::Create(), NetSearch::Create(), InfoList::Create(), GalleryThumbView::Create(), WelcomeDialog::Create(), ZMPlayer::Create(), ChannelScannerGUIScanPane::Create(), IconView::Create(), MythNotificationScreen::Create(), MythConfirmationDialog::Create(), OsdNavigation::Create(), MythTimeInputDialog::Create(), MusicCommon::customEvent(), OSD::DialogShow(), SubtitleScreen::DisableForcedSubtitles(), MythUIEditBar::Display(), MythUIStateType::DisplayState(), MythUIButtonList::DistributeButtons(), SubtitleScreen::EnableSubtitles(), OSD::EnableTeletext(), ViewScheduled::FillList(), ImportMusicDialog::fillWidgets(), Transition::Finished(), ZMPlayer::getEventInfo(), MythUIEditBar::GetNew(), NCPrivate::GetNotificationScreens(), ProgInfoList::Hide(), InfoList::Hide(), Hide(), ZMLivePlayer::hideAll(), MythUIButtonTree::Init(), MythUIButtonList::Init(), SlideBuffer::Initialise(), ZMPlayer::keyPressEvent(), GalleryThumbView::LoadData(), NetSearch::LoadData(), NetTree::LoadData(), RSSEditor::LoadData(), IconView::LoadDirectory(), MythUIGuideGrid::LoadImage(), OsdNavigation::More(), MythUITextEdit::Pulse(), VideoDialog::refreshData(), MythUIStateType::Reset(), Ripper::ScanFinished(), GalleryThumbView::SelectZoomWidget(), MythUIGuideGrid::SetArrow(), OSD::SetText(), OsdNavigation::SetTextFromMap(), MythUIButtonListItem::SetToRealButton(), MythUIButtonTree::SetTreeState(), MythUIProgressBar::SetVisible(), Player::setWidgets(), Show(), Transition::Start(), ProgInfoList::Toggle(), InfoList::Toggle(), PlayerSettings::toggleAlt(), MetadataSettings::toggleTrailers(), UpdateDependState(), ProgLister::UpdateDisplay(), PlaybackBox::updateIcons(), ChannelRecPriority::updateInfo(), ChannelRecPriority::updateList(), ProgramRecPriority::UpdateList(), MHIContext::UpdateOSD(), PlaybackBox::updateRecList(), GalleryThumbView::UpdateScanProgress(), IdleScreen::UpdateScreen(), FileAssocDialog::UpdateScreen(), WelcomeDialog::updateScreen(), WelcomeDialog::updateStatusMessage(), StreamView::updateStreamList(), MusicCommon::updateUIPlaylist(), and BookmarkManager::UpdateURLList().

◆ MoveTo()

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

Definition at line 914 of file mythuitype.cpp.

◆ AdjustAlpha()

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

◆ SetAlpha()

void MythUIType::SetAlpha ( int  newalpha)

◆ GetAlpha()

int MythUIType::GetAlpha ( void  ) const

◆ keyPressEvent()

bool MythUIType::keyPressEvent ( QKeyEvent *  event)
virtual

Key event handler.

Parameters
eventKeypress event

Reimplemented in ItemDetailPopup, StandardSettingDialog, SearchButtonListDialog, OsdNavigation, SchedEditChild, TrackInfoDialog, MythConfirmationDialog, SmartPLResultViewer, MythMusicVolumeDialog, RipStatus, ImportCoverArtDialog, MythDialogBox, MythNotificationScreen, ScheduleEditor, EditAlbumartDialog, MythUIButtonList, MythUIWebBrowser, GuideGrid, PlaybackBox, Ripper, ChannelEditor, MythThemedMenu, ImportNative, RSSEditor, SmartPlaylistEditor, BookmarkManager, ScreenSetup, EditMetadataDialog, PlaylistEditorView, ZMLivePlayer, EditLyricsDialog, ImportMusicDialog, ProgramRecPriority, ZMConsole, MythUIProgressDialog, MusicCommon, MythBurn, IconView, VideoDialog, MythScreenType, MythUIVirtualKeyboard, ThumbFinder, NetTree, ProgLister, FileSelector, VideoSelector, BrowserConfig, TrackInfoPopup, ZMPlayer, MythUITextEdit, ExportNative, GallerySlideView, RecordingSelector, MythUIBusyDialog, ThemeChooser, ViewScheduled, ZMEvents, GalleryThumbView, PrevRecordedList, RSSEditPopup, WeatherScreen, MythUISpinBox, GameUI, ProgFinder, ViewScheduleDiff, WelcomeDialog, MythUIButton, NetEditorBase, ChannelRecPriority, VideoSetupWizard, SelectDestination, DVDThemeSelector, EditMetadataCommon, MythNews, MythNewsEditor, EditMetadataDialog, BookmarkEditor, NetSearch, Weather, StreamView, MythUICheckBox, ScreenWizard, CustomEdit, StatusBox, LogViewer, MythBrowser, LyricsView, SearchView, PlaylistView, MythNewsConfig, AudioSetupWizard, GeneralSetupWizard, VisualizerView, MythUIButtonTree, GrabberSettings, KeyGrabPopupBox, ProgDetails, MetadataSettings, IdleScreen, PlayerSettings, ChannelEditor, ImportSettings, MiniPlayer, ZMMiniPlayer, and MythFlashPlayer.

Definition at line 993 of file mythuitype.cpp.

Referenced by MythScreenType::keyPressEvent(), and OsdNavigation::keyPressEvent().

◆ gestureEvent()

bool MythUIType::gestureEvent ( MythGestureEvent event)
virtual

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

Should not be used directly.

Parameters
eventMouse event

Reimplemented in MythDialogBox, MythUIButtonList, GuideGrid, MythScreenType, MythUITextEdit, MythUIButton, MythUICheckBox, MythUIButtonTree, and TvPlayWindow.

Definition at line 1009 of file mythuitype.cpp.

Referenced by MythScreenType::gestureEvent().

◆ mediaEvent()

void MythUIType::mediaEvent ( MythMediaEvent event)
virtual

Media/Device status event handler, received from MythMediaMonitor.

Parameters
eventMedia event

Reimplemented in MythThemedMenu, and GalleryThumbView.

Definition at line 1018 of file mythuitype.cpp.

Referenced by MythMainWindow::customEvent().

◆ GetFont()

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

◆ AddFont()

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

◆ SetHelpText()

void MythUIType::SetHelpText ( const QString &  text)
inline

◆ GetHelpText()

QString MythUIType::GetHelpText ( void  ) const
inline

Definition at line 151 of file mythuitype.h.

Referenced by MythScreenType::SetFocusWidget().

◆ SetXMLLocation()

void MythUIType::SetXMLLocation ( const QString &  filename,
int  where 
)
inline

Definition at line 153 of file mythuitype.h.

Referenced by XMLParseBase::ParseUIType().

◆ GetXMLLocation()

QString MythUIType::GetXMLLocation ( void  ) const
inline

◆ SetXMLName()

void MythUIType::SetXMLName ( const QString &  name)
inline

Definition at line 157 of file mythuitype.h.

Referenced by XMLParseBase::ParseUIType().

◆ GetXMLName()

QString MythUIType::GetXMLName ( void  ) const
inline

Definition at line 158 of file mythuitype.h.

Referenced by ETPrintWarning::Child(), and ETPrintError::Child().

◆ IsDeferredLoading()

bool MythUIType::IsDeferredLoading ( bool  recurse = false) const

Definition at line 1381 of file mythuitype.cpp.

Referenced by IsDeferredLoading(), and MythUIImage::ParseElement().

◆ SetDeferLoad()

void MythUIType::SetDeferLoad ( bool  defer)
inline

Definition at line 161 of file mythuitype.h.

Referenced by ParseElement().

◆ LoadNow()

void MythUIType::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 in MythUIImage, and MythUIStateType.

Definition at line 1397 of file mythuitype.cpp.

Referenced by MythUIStateType::DisplayState(), MythUIStateType::LoadNow(), and MythUIImage::LoadNow().

◆ ContainsPoint()

bool MythUIType::ContainsPoint ( const QPoint &  point) const

Check if the given point falls within this widgets area.

Largely used For correctly handling mouse clicks

Definition at line 1410 of file mythuitype.cpp.

Referenced by MythMainWindow::eventFilter().

◆ GetPainter()

MythPainter * MythUIType::GetPainter ( void  )
virtual

◆ SetPainter()

void MythUIType::SetPainter ( MythPainter painter)
inline

◆ SetCentre()

void MythUIType::SetCentre ( UIEffects::Centre  centre)

◆ SetZoom()

void MythUIType::SetZoom ( float  zoom)

Definition at line 965 of file mythuitype.cpp.

Referenced by MythUIAnimation::updateCurrentValue().

◆ SetHorizontalZoom()

void MythUIType::SetHorizontalZoom ( float  zoom)

◆ SetVerticalZoom()

void MythUIType::SetVerticalZoom ( float  zoom)

◆ SetAngle()

void MythUIType::SetAngle ( float  angle)

◆ SetDependIsDefault()

void MythUIType::SetDependIsDefault ( bool  isDefault)

Definition at line 1118 of file mythuitype.cpp.

◆ SetReverseDependence()

void MythUIType::SetReverseDependence ( MythUIType dependee,
bool  reverse 
)

Definition at line 1434 of file mythuitype.cpp.

Referenced by ConnectDependants().

◆ SetDependsMap()

void MythUIType::SetDependsMap ( QMap< QString, QString >  dependsMap)

Definition at line 1429 of file mythuitype.cpp.

Referenced by XMLParseBase::ParseChildren(), and XMLParseBase::ParseUIType().

◆ GetDependsMap()

QMap<QString, QString> MythUIType::GetDependsMap ( ) const
inline

Definition at line 177 of file mythuitype.h.

Referenced by XMLParseBase::ParseUIType().

◆ customEvent()

void MythUIType::customEvent ( QEvent *  event)
overrideprotected

Definition at line 999 of file mythuitype.cpp.

Referenced by IdleScreen::customEvent(), and Ripper::customEvent().

◆ LoseFocus

void MythUIType::LoseFocus ( void  )
slot

◆ TakeFocus

bool MythUIType::TakeFocus ( void  )
slot

◆ Activate

void MythUIType::Activate ( void  )
slot

Definition at line 1044 of file mythuitype.cpp.

◆ Hide

void MythUIType::Hide ( void  )
slot

◆ Show

void MythUIType::Show ( void  )
slot

◆ Refresh

void MythUIType::Refresh ( void  )
slot

◆ UpdateDependState [1/2]

void MythUIType::UpdateDependState ( bool  isDefault)
slot

Definition at line 1094 of file mythuitype.cpp.

Referenced by ConnectDependants().

◆ UpdateDependState [2/2]

void MythUIType::UpdateDependState ( MythUIType dependee,
bool  isDefault 
)
slot

Definition at line 1053 of file mythuitype.cpp.

◆ RequestUpdate [1/2]

void MythUIType::RequestUpdate ( )
signal

◆ RequestUpdate [2/2]

void MythUIType::RequestUpdate ( const QRect &  )
signal

◆ RequestRegionUpdate

void MythUIType::RequestRegionUpdate ( const QRect &  )
signal

◆ TakingFocus

void MythUIType::TakingFocus ( )
signal

◆ LosingFocus

void MythUIType::LosingFocus ( )
signal

◆ Showing

void MythUIType::Showing ( )
signal

◆ Hiding

void MythUIType::Hiding ( )
signal

◆ Enabling

void MythUIType::Enabling ( )
signal

◆ Disabling

void MythUIType::Disabling ( )
signal

◆ FinishedMoving

void MythUIType::FinishedMoving ( )
signal

Referenced by HandleMovementPulse().

◆ FinishedFading

void MythUIType::FinishedFading ( )
signal

◆ DependChanged

void MythUIType::DependChanged ( bool  isDefault)
signal

◆ DrawSelf()

void MythUIType::DrawSelf ( MythPainter p,
int  xoffset,
int  yoffset,
int  alphaMod,
QRect  clipRect 
)
protectedvirtual

◆ AddFocusableChildrenToList()

void MythUIType::AddFocusableChildrenToList ( QMap< int, MythUIType * > &  focusList)
protected

Definition at line 1144 of file mythuitype.cpp.

Referenced by MythScreenType::BuildFocusList().

◆ HandleAlphaPulse()

void MythUIType::HandleAlphaPulse ( void  )
protected

Handle one frame of an alpha (transparency) change animation.

This changes the alpha value of the widget

Definition at line 424 of file mythuitype.cpp.

Referenced by Pulse().

◆ HandleMovementPulse()

void MythUIType::HandleMovementPulse ( void  )
protected

Handle one frame of a movement animation.

This changes the position of the widget within it's parent's area

Definition at line 377 of file mythuitype.cpp.

Referenced by Pulse().

◆ CalcAlpha()

int MythUIType::CalcAlpha ( int  alphamod)
protected

◆ NormX()

int MythUIType::NormX ( const int  width)
protected

◆ NormY()

int MythUIType::NormY ( const int  height)
protected

Definition at line 1160 of file mythuitype.cpp.

Referenced by MythUIButtonList::ParseElement().

◆ ConnectDependants()

void MythUIType::ConnectDependants ( bool  recurse = false)
protected

◆ ParseElement()

bool MythUIType::ParseElement ( const QString &  filename,
QDomElement &  element,
bool  showWarnings 
)
protectedvirtual

◆ CopyFrom()

void MythUIType::CopyFrom ( MythUIType base)
protectedvirtual

◆ CreateCopy()

void MythUIType::CreateCopy ( MythUIType parent)
protectedvirtual

◆ Finalize()

void MythUIType::Finalize ( void  )
protectedvirtual

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 in MythUIButtonList, MythUIWebBrowser, MythUIImage, MythUITextEdit, MythUIText, MythUIGuideGrid, MythUIStateType, MythUIButton, MythUICheckBox, MythUIScrollBar, MythUIEditBar, and MythUIProgressBar.

Definition at line 1310 of file mythuitype.cpp.

Referenced by MythUIGuideGrid::Finalize(), MythUIImage::Finalize(), MythUIWebBrowser::Finalize(), MythUIButtonList::Finalize(), XMLParseBase::ParseChildren(), and XMLParseBase::ParseUIType().

Friends And Related Function Documentation

◆ XMLParseBase

friend class XMLParseBase
friend

Definition at line 283 of file mythuitype.h.

Member Data Documentation

◆ m_ChildrenList

QList<MythUIType *> MythUIType::m_ChildrenList
protected

◆ m_dependsMap

QMap<QString, QString> MythUIType::m_dependsMap
protected

Definition at line 229 of file mythuitype.h.

Referenced by ConnectDependants(), CopyFrom(), and SetDependsMap().

◆ m_dependsValue

QList< QPair<MythUIType *, bool> > MythUIType::m_dependsValue
protected

Definition at line 233 of file mythuitype.h.

Referenced by ConnectDependants(), and UpdateDependState().

◆ m_dependOperator

QList<int> MythUIType::m_dependOperator
protected

Definition at line 234 of file mythuitype.h.

Referenced by ConnectDependants(), and UpdateDependState().

◆ m_Visible

bool MythUIType::m_Visible
protected

◆ m_HasFocus

bool MythUIType::m_HasFocus
protected

◆ m_CanHaveFocus

bool MythUIType::m_CanHaveFocus
protected

◆ m_Enabled

bool MythUIType::m_Enabled
protected

◆ m_EnableInitiator

bool MythUIType::m_EnableInitiator
protected

◆ m_Initiator

bool MythUIType::m_Initiator
protected

◆ m_Vanish

bool MythUIType::m_Vanish
protected

◆ m_Vanished

bool MythUIType::m_Vanished
protected

◆ m_IsDependDefault

bool MythUIType::m_IsDependDefault
protected

Definition at line 244 of file mythuitype.h.

Referenced by MythUIType(), SetDependIsDefault(), SetVisible(), and UpdateDependState().

◆ m_ReverseDepend

QMap<MythUIType *, bool> MythUIType::m_ReverseDepend
protected

Definition at line 245 of file mythuitype.h.

Referenced by SetReverseDependence(), and UpdateDependState().

◆ m_focusOrder

int MythUIType::m_focusOrder
protected

Definition at line 247 of file mythuitype.h.

Referenced by AddFocusableChildrenToList(), CopyFrom(), MythUIType(), and SetFocusOrder().

◆ m_Area

MythRect MythUIType::m_Area
protected

◆ m_MinArea

MythRect MythUIType::m_MinArea
protected

◆ m_MinSize

MythPoint MythUIType::m_MinSize
protected

◆ m_DirtyRegion

QRegion MythUIType::m_DirtyRegion
protected

◆ m_NeedsRedraw

bool MythUIType::m_NeedsRedraw
protected

◆ m_Effects

UIEffects MythUIType::m_Effects
protected

◆ m_AlphaChangeMode

int MythUIType::m_AlphaChangeMode
protected

Definition at line 259 of file mythuitype.h.

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

◆ m_AlphaChange

int MythUIType::m_AlphaChange
protected

Definition at line 260 of file mythuitype.h.

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

◆ m_AlphaMin

int MythUIType::m_AlphaMin
protected

Definition at line 261 of file mythuitype.h.

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

◆ m_AlphaMax

int MythUIType::m_AlphaMax
protected

Definition at line 262 of file mythuitype.h.

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

◆ m_Moving

bool MythUIType::m_Moving
protected

Definition at line 264 of file mythuitype.h.

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

◆ m_XYDestination

QPoint MythUIType::m_XYDestination
protected

Definition at line 265 of file mythuitype.h.

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

◆ m_XYSpeed

QPoint MythUIType::m_XYSpeed
protected

Definition at line 266 of file mythuitype.h.

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

◆ m_Fonts

FontMap* MythUIType::m_Fonts
protected

Definition at line 268 of file mythuitype.h.

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

◆ m_Parent

MythUIType* MythUIType::m_Parent
protected

◆ m_Painter

MythPainter* MythUIType::m_Painter
protected

Definition at line 271 of file mythuitype.h.

Referenced by MythScreenType::GetPainter(), GetPainter(), and MythUIType().

◆ m_animations

QList<MythUIAnimation*> MythUIType::m_animations
protected

Definition at line 273 of file mythuitype.h.

Referenced by ActivateAnimations(), CopyFrom(), Pulse(), and ~MythUIType().

◆ m_helptext

QString MythUIType::m_helptext
protected

Definition at line 274 of file mythuitype.h.

Referenced by ParseElement().

◆ m_xmlName

QString MythUIType::m_xmlName
protected

Definition at line 276 of file mythuitype.h.

Referenced by CopyFrom().

◆ m_xmlLocation

QString MythUIType::m_xmlLocation
protected

Definition at line 277 of file mythuitype.h.

Referenced by CopyFrom().

◆ m_deferload

bool MythUIType::m_deferload
protected

◆ m_BorderColor

QColor MythUIType::m_BorderColor
protected

Definition at line 281 of file mythuitype.h.

Referenced by Draw(), and MythUIType().


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