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 &point)
 
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 allowed_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 {true}
 
bool m_HasFocus {false}
 
bool m_CanHaveFocus {false}
 
bool m_Enabled {true}
 
bool m_EnableInitiator {false}
 
bool m_Initiator {false}
 
bool m_Vanish {false}
 
bool m_Vanished {false}
 
bool m_IsDependDefault {false}
 
QMap< MythUIType *, boolm_ReverseDepend
 
int m_focusOrder {0}
 
MythRect m_Area {0,0,0,0}
 
MythRect m_MinArea {0,0,0,0}
 
MythPoint m_MinSize
 
QRegion m_DirtyRegion {0,0,0,0}
 
bool m_NeedsRedraw {false}
 
UIEffects m_Effects
 
int m_AlphaChangeMode {0}
 
int m_AlphaChange {0}
 
int m_AlphaMin {0}
 
int m_AlphaMax {255}
 
bool m_Moving {false}
 
QPoint m_XYDestination {0,0}
 
QPoint m_XYSpeed {0,0}
 
FontMapm_Fonts {nullptr}
 
MythUITypem_Parent {nullptr}
 
MythPainterm_Painter {nullptr}
 
QList< MythUIAnimation * > m_animations
 
QString m_helptext
 
QString m_xmlName
 
QString m_xmlLocation
 
bool m_deferload {false}
 
QColor m_BorderColor {Qt::black}
 

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 41 of file mythuitype.cpp.

◆ ~MythUIType()

MythUIType::~MythUIType ( )
protectedvirtual

Definition at line 59 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 85 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 132 of file mythuitype.cpp.

Referenced by MythUIScrollBar::CalculatePosition(), MythUIProgressBar::CalculatePosition(), CheckedSet(), ConnectDependants(), MythThemedMenuState::CopyFrom(), MythUIButtonTree::CopyFrom(), MythUIStateType::CopyFrom(), CopyFrom(), MythUIButtonList::CopyFrom(), XMLParseBase::CopyWindowFromBase(), TvPlayWindow::Create(), CustomPriority::Create(), GeneralSetupWizard::Create(), AudioSetupWizard::Create(), StatusBox::Create(), KeyGrabPopupBox::Create(), ScreenWizard::Create(), ManualSchedule::Create(), NetSearch::Create(), GalleryThumbView::Create(), VideoSetupWizard::Create(), ChannelRecPriority::Create(), ThemeChooser::Create(), RawSettingsEditor::Create(), ViewScheduled::Create(), ImportIconsWizard::Create(), MythUIBusyDialog::Create(), MythThemedMenuState::Create(), TrackInfoPopup::Create(), GlobalSetup::Create(), BackendSelection::Create(), MythUIProgressDialog::Create(), MythControls::Create(), ProgramRecPriority::Create(), ScreenSetup::Create(), MythUIFileBrowser::Create(), Ripper::Create(), SourceSetup::Create(), GuideGrid::Create(), PlaybackBox::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 223 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 171 of file mythuitype.cpp.

◆ DeleteAllChildren()

void MythUIType::DeleteAllChildren ( void  )

◆ NeedsRedraw()

bool MythUIType::NeedsRedraw ( void  ) const

Definition at line 280 of file mythuitype.cpp.

◆ ResetNeedsRedraw()

void MythUIType::ResetNeedsRedraw ( void  )

Definition at line 285 of file mythuitype.cpp.

◆ SetRedraw()

void MythUIType::SetRedraw ( void  )

◆ SetChildNeedsRedraw()

void MythUIType::SetChildNeedsRedraw ( MythUIType child)

Definition at line 311 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 336 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 1323 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 1328 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 442 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 470 of file mythuitype.cpp.

◆ SetPosition() [1/2]

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

◆ SetPosition() [2/2]

void MythUIType::SetPosition ( const MythPoint point)
virtual

Reimplemented in MythUIText.

Definition at line 524 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 550 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 571 of file mythuitype.cpp.

Referenced by ParseElement().

◆ GetMinSize()

QSize MythUIType::GetMinSize ( void  ) const
virtual

Definition at line 583 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 610 of file mythuitype.cpp.

◆ VanishSibling()

void MythUIType::VanishSibling ( void  )
virtual

Definition at line 665 of file mythuitype.cpp.

◆ SetMinAreaParent()

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

Adjust the size of sibling objects within the button.

Definition at line 688 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 1305 of file mythuitype.cpp.

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

◆ ExpandArea()

void MythUIType::ExpandArea ( const MythRect rect)

Definition at line 847 of file mythuitype.cpp.

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

◆ GetDirtyArea()

QRegion MythUIType::GetDirtyArea ( void  ) const
virtual

Definition at line 876 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 1077 of file mythuitype.cpp.

Referenced by MythUIButtonList::CalculateButtonPositions(), MythUIProgressBar::CalculatePosition(), Slide::Clear(), Ripper::compilationChanged(), MythUIStateType::CopyFrom(), 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(), 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(), and MusicCommon::updateUIPlaylist().

◆ MoveTo()

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

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

Definition at line 971 of file mythuitype.cpp.

Referenced by WeatherScreen::keyPressEvent(), 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 986 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 995 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 1357 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 1373 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 1386 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 943 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 1094 of file mythuitype.cpp.

◆ SetReverseDependence()

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

Definition at line 1407 of file mythuitype.cpp.

Referenced by ConnectDependants().

◆ SetDependsMap()

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

Definition at line 1402 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 977 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 1020 of file mythuitype.cpp.

◆ Hide

void MythUIType::Hide ( void  )
slot

◆ Show

void MythUIType::Show ( void  )
slot

◆ Refresh

void MythUIType::Refresh ( void  )
slot

Definition at line 1024 of file mythuitype.cpp.

Referenced by LoseFocus(), TakeFocus(), and MythUIWebBrowser::UpdateBuffer().

◆ UpdateDependState [1/2]

void MythUIType::UpdateDependState ( bool  isDefault)
slot

Definition at line 1070 of file mythuitype.cpp.

Referenced by ConnectDependants().

◆ UpdateDependState [2/2]

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

Definition at line 1029 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 1120 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 401 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 354 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 1136 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, MythUIText, MythUITextEdit, MythUIGuideGrid, MythUIStateType, MythUIButton, MythUICheckBox, MythUIScrollBar, MythUIEditBar, and MythUIProgressBar.

Definition at line 1286 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 {true}
protected

◆ m_HasFocus

bool MythUIType::m_HasFocus {false}
protected

◆ m_CanHaveFocus

bool MythUIType::m_CanHaveFocus {false}
protected

◆ m_Enabled

bool MythUIType::m_Enabled {true}
protected

Definition at line 239 of file mythuitype.h.

Referenced by CopyFrom(), SetEnabled(), MythUIButton::SetLocked(), and MythUIButton::UnPush().

◆ m_EnableInitiator

bool MythUIType::m_EnableInitiator {false}
protected

◆ m_Initiator

bool MythUIType::m_Initiator {false}
protected

◆ m_Vanish

bool MythUIType::m_Vanish {false}
protected

◆ m_Vanished

bool MythUIType::m_Vanished {false}
protected

◆ m_IsDependDefault

bool MythUIType::m_IsDependDefault {false}
protected

Definition at line 244 of file mythuitype.h.

Referenced by 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 {0}
protected

Definition at line 247 of file mythuitype.h.

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

◆ m_Area

MythRect MythUIType::m_Area {0,0,0,0}
protected

◆ m_MinArea

MythRect MythUIType::m_MinArea {0,0,0,0}
protected

◆ m_MinSize

MythPoint MythUIType::m_MinSize
protected

◆ m_DirtyRegion

QRegion MythUIType::m_DirtyRegion {0,0,0,0}
protected

◆ m_NeedsRedraw

bool MythUIType::m_NeedsRedraw {false}
protected

Definition at line 255 of file mythuitype.h.

Referenced by NeedsRedraw(), ResetNeedsRedraw(), SetChildNeedsRedraw(), and SetRedraw().

◆ m_Effects

UIEffects MythUIType::m_Effects
protected

◆ m_AlphaChangeMode

int MythUIType::m_AlphaChangeMode {0}
protected

Definition at line 259 of file mythuitype.h.

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

◆ m_AlphaChange

int MythUIType::m_AlphaChange {0}
protected

Definition at line 260 of file mythuitype.h.

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

◆ m_AlphaMin

int MythUIType::m_AlphaMin {0}
protected

Definition at line 261 of file mythuitype.h.

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

◆ m_AlphaMax

int MythUIType::m_AlphaMax {255}
protected

Definition at line 262 of file mythuitype.h.

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

◆ m_Moving

bool MythUIType::m_Moving {false}
protected

Definition at line 264 of file mythuitype.h.

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

◆ m_XYDestination

QPoint MythUIType::m_XYDestination {0,0}
protected

Definition at line 265 of file mythuitype.h.

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

◆ m_XYSpeed

QPoint MythUIType::m_XYSpeed {0,0}
protected

Definition at line 266 of file mythuitype.h.

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

◆ m_Fonts

FontMap* MythUIType::m_Fonts {nullptr}
protected

Definition at line 268 of file mythuitype.h.

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

◆ m_Parent

MythUIType* MythUIType::m_Parent {nullptr}
protected

◆ m_Painter

MythPainter* MythUIType::m_Painter {nullptr}
protected

Definition at line 271 of file mythuitype.h.

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

◆ 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 {false}
protected

◆ m_BorderColor

QColor MythUIType::m_BorderColor {Qt::black}
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: