Image widget, displays a single image or multiple images in sequence. More...
#include <mythuiimage.h>
Public Member Functions | |
| MythUIImage (const QString &filepattern, int low, int high, int delayms, MythUIType *parent, const QString &name) | |
| MythUIImage (const QString &filename, MythUIType *parent, const QString &name) | |
| MythUIImage (MythUIType *parent, const QString &name) | |
| ~MythUIImage () | |
| QString | GetFilename (void) |
| void | SetFilename (const QString &filename) |
| Must be followed by a call to Load() to load the image. | |
| void | SetFilepattern (const QString &filepattern, int low, int high) |
| Must be followed by a call to Load() to load the image. | |
| void | SetImageCount (int low, int high) |
| Set the integer range for an animated image pattern. | |
| void | SetImage (MythImage *img) |
| Should not be used unless absolutely necessary since it bypasses the image caching and threaded loaded mechanisms. | |
| void | SetImages (QVector< MythImage * > *images) |
| Should not be used unless absolutely necessary since it bypasses the image caching and threaded loaded mechanisms. | |
| void | SetDelay (int delayms) |
| Set the delay between each image in an animation. | |
| void | SetDelays (QVector< int > delays) |
| Sets the delays between each image in an animation. | |
| void | Reset (void) |
| Reset the image back to the default defined in the theme. | |
| bool | Load (bool allowLoadInBackground=true, bool forceStat=false) |
| Load the image(s), wraps ImageLoader::LoadImage(). | |
| virtual void | Pulse (void) |
| virtual void | LoadNow (void) |
Protected Types | |
| enum | AnimationCycle { kCycleStart, kCycleReverse } |
Protected Member Functions | |
| virtual void | DrawSelf (MythPainter *p, int xoffset, int yoffset, int alphaMod, QRect clipRect) |
| void | Init (void) |
| Initialises the class. | |
| void | Clear (void) |
| Remove all images from the widget. | |
| void | SetAnimationFrames (AnimationFrames frames) |
| void | customEvent (QEvent *event) |
| virtual bool | ParseElement (const QString &filename, QDomElement &element, bool showWarnings) |
| virtual void | CopyFrom (MythUIType *base) |
| virtual void | CreateCopy (MythUIType *parent) |
| virtual void | Finalize (void) |
| void | SetSize (int width, int height) |
| Set the size of the widget. | |
| void | SetSize (const QSize &size) |
| Set the size of the widget. | |
| void | ForceSize (const QSize &size) |
| Force the dimensions of the widget and image to the given size. | |
| void | SetCropRect (int x, int y, int width, int height) |
| Crop the image using the given rectangle, useful for removing unsightly edges from imported images or zoom effects. | |
| void | SetCropRect (const MythRect &rect) |
| Crop the image using the given rectangle, useful for removing unsightly edges from imported images or zoom effects. | |
Protected Attributes | |
| QString | m_Filename |
| QString | m_OrigFilename |
| QHash< int, MythImage * > | m_Images |
| QHash< int, int > | m_Delays |
| QMutex | m_ImagesLock |
| int | m_Delay |
| int | m_LowNum |
| int | m_HighNum |
| unsigned int | m_CurPos |
| QTime | m_LastDisplay |
| bool | m_NeedLoad |
| ImageProperties | m_imageProperties |
| int | m_runningThreads |
| MythUIImagePrivate * | d |
| AnimationCycle | m_animationCycle |
| bool | m_animationReverse |
| bool | m_animatedImage |
Friends | |
| class | MythUIImagePrivate |
| class | MythThemeBase |
| class | MythUIButtonListItem |
| class | MythUIProgressBar |
| class | MythUIEditBar |
| class | MythUITextEdit |
| class | ImageLoadThread |
Image widget, displays a single image or multiple images in sequence.
Definition at line 67 of file mythuiimage.h.
enum MythUIImage::AnimationCycle [protected] |
Definition at line 151 of file mythuiimage.h.
| MythUIImage::MythUIImage | ( | const QString & | filepattern, | |
| int | low, | |||
| int | high, | |||
| int | delayms, | |||
| MythUIType * | parent, | |||
| const QString & | name | |||
| ) |
Definition at line 520 of file mythuiimage.cpp.
Referenced by CreateCopy().
| MythUIImage::MythUIImage | ( | const QString & | filename, | |
| MythUIType * | parent, | |||
| const QString & | name | |||
| ) |
Definition at line 537 of file mythuiimage.cpp.
| MythUIImage::MythUIImage | ( | MythUIType * | parent, | |
| const QString & | name | |||
| ) |
Definition at line 554 of file mythuiimage.cpp.
| MythUIImage::~MythUIImage | ( | ) |
Definition at line 567 of file mythuiimage.cpp.
| QString MythUIImage::GetFilename | ( | void | ) | [inline] |
Definition at line 76 of file mythuiimage.h.
Referenced by RSSEditPopup::parseAndSave(), and RSSEditPopup::slotSave().
| void MythUIImage::SetFilename | ( | const QString & | filename | ) |
Must be followed by a call to Load() to load the image.
Set the image filename, does not load the image.
See Load()
Definition at line 660 of file mythuiimage.cpp.
Referenced by CheckedSet(), TrackInfoPopup::Create(), MetadataOptions::Create(), RSSEditPopup::Create(), TrackInfoDialog::Create(), RSSEditPopup::customEvent(), NetTree::customEvent(), EditMetadataDialog::fillWidgets(), ZMPlayer::getEventInfo(), EditAlbumartDialog::gridItemChanged(), GameDetailsPopup::handleImage(), PlaybackBox::HandlePreviewEvent(), ThemeChooser::itemChanged(), ImportIconsWizard::itemChanged(), ChannelEditor::itemChanged(), MythUIFileBrowser::PathSelected(), EditMetadataDialog::SetBanner(), EditMetadataDialog::SetCoverArt(), EditMetadataDialog::SetFanart(), EditMetadataDialog::SetScreenshot(), OSD::SetText(), MythUIButtonListItem::SetToRealButton(), RSSEditor::slotItemChanged(), NetTree::slotItemChanged(), NetSearch::slotItemChanged(), DVDThemeSelector::themeChanged(), VideoSelector::titleChanged(), RecordingSelector::titleChanged(), ThemeChooser::toggleFullscreenPreview(), EditMetadataDialog::updateAlbumImage(), EditMetadataDialog::updateArtistImage(), EditMetadataDialog::updateGenreImage(), PlaybackBox::updateGroupInfo(), GuideGrid::updateInfo(), ChannelRecPriority::updateInfo(), MythNews::updateInfoView(), GameUI::updateRomInfo(), ImportCoverArtDialog::updateStatus(), MusicCommon::updateTrackInfo(), PlaybackBox::UpdateUIListItem(), VideoSelector::updateVideoList(), and MetadataOptions::ValuesChanged().
| void MythUIImage::SetFilepattern | ( | const QString & | filepattern, | |
| int | low, | |||
| int | high | |||
| ) |
Must be followed by a call to Load() to load the image.
Set the image filename pattern and integer range for an animated image, does not load the image.
See Load()
Definition at line 674 of file mythuiimage.cpp.
| void MythUIImage::SetImageCount | ( | int | low, | |
| int | high | |||
| ) |
Set the integer range for an animated image pattern.
Definition at line 690 of file mythuiimage.cpp.
Referenced by SetImages().
| void MythUIImage::SetImage | ( | MythImage * | img | ) |
Should not be used unless absolutely necessary since it bypasses the image caching and threaded loaded mechanisms.
Assign a MythImage to the widget.
Use is strongly discouraged, use SetFilename() instead.
Definition at line 731 of file mythuiimage.cpp.
Referenced by MythUIStateType::AddImage(), SubtitleScreen::AddScaledImage(), BDOverlayScreen::DisplayBDOverlay(), SubtitleScreen::DisplayScaledAVSubtitles(), ZMPlayer::getFrame(), ThumbFinder::getFrameImage(), TeletextScreen::OptimiseDisplayedArea(), SubtitleScreen::RenderAssTrack(), MythUIButtonListItem::SetToRealButton(), MHIContext::UpdateOSD(), and ThumbFinder::updatePositionBar().
| void MythUIImage::SetImages | ( | QVector< MythImage * > * | images | ) |
Should not be used unless absolutely necessary since it bypasses the image caching and threaded loaded mechanisms.
Assign a set of MythImages to the widget for animation.
Use is strongly discouraged, use SetFilepattern() instead.
Definition at line 786 of file mythuiimage.cpp.
Referenced by SetAnimationFrames().
| void MythUIImage::SetDelay | ( | int | delayms | ) |
Set the delay between each image in an animation.
Definition at line 700 of file mythuiimage.cpp.
| void MythUIImage::SetDelays | ( | QVector< int > | delays | ) |
Sets the delays between each image in an animation.
Definition at line 711 of file mythuiimage.cpp.
Referenced by ParseElement(), and SetAnimationFrames().
| void MythUIImage::Reset | ( | void | ) | [virtual] |
Reset the image back to the default defined in the theme.
Reimplemented from MythUIType.
Definition at line 613 of file mythuiimage.cpp.
Referenced by CheckedSet(), GameUI::clearRomInfo(), customEvent(), GameDetailsPopup::handleImage(), ThemeChooser::itemChanged(), ImportIconsWizard::itemChanged(), ChannelEditor::itemChanged(), Load(), GameUI::nodeChanged(), MythUIFileBrowser::PathSelected(), PlaybackBox::Play(), SetAnimationFrames(), SetImage(), OSD::SetText(), MythUIButtonListItem::SetToRealButton(), RSSEditor::slotItemChanged(), NetTree::slotItemChanged(), NetSearch::slotItemChanged(), ThemeChooser::toggleFullscreenPreview(), EditMetadataDialog::updateAlbumImage(), EditMetadataDialog::updateArtistImage(), EditMetadataDialog::updateGenreImage(), PlaybackBox::updateGroupInfo(), GuideGrid::updateInfo(), GameUI::updateRomInfo(), ImportCoverArtDialog::updateStatus(), MusicCommon::updateTrackInfo(), and PlaybackBox::UpdateUIListItem().
Load the image(s), wraps ImageLoader::LoadImage().
Definition at line 935 of file mythuiimage.cpp.
Referenced by PlaybackBox::bannerLoad(), CheckedSet(), CopyFrom(), PlaybackBox::coverartLoad(), TrackInfoPopup::Create(), MetadataOptions::Create(), RSSEditPopup::Create(), TrackInfoDialog::Create(), RSSEditPopup::customEvent(), NetTree::customEvent(), PlaybackBox::fanartLoad(), EditMetadataDialog::fillWidgets(), Finalize(), ForceSize(), ZMPlayer::getEventInfo(), EditAlbumartDialog::gridItemChanged(), GameDetailsPopup::handleImage(), PlaybackBox::HandlePreviewEvent(), MythThemeBase::Init(), ThemeChooser::itemChanged(), ImportIconsWizard::itemChanged(), ChannelEditor::itemChanged(), LoadNow(), MythUIFileBrowser::LoadPreview(), WeatherScreen::prepareWidget(), MythThemeBase::Reload(), Reset(), EditMetadataDialog::SetBanner(), EditMetadataDialog::SetCoverArt(), EditMetadataDialog::SetFanart(), EditMetadataDialog::SetScreenshot(), OSD::SetText(), MythUIButtonListItem::SetToRealButton(), GameUI::showImages(), RSSEditor::slotItemChanged(), NetTree::slotItemChanged(), NetSearch::slotItemChanged(), DVDThemeSelector::themeChanged(), VideoSelector::titleChanged(), RecordingSelector::titleChanged(), ThemeChooser::toggleFullscreenPreview(), EditMetadataDialog::updateAlbumImage(), EditMetadataDialog::updateArtistImage(), EditMetadataDialog::updateGenreImage(), GuideGrid::updateInfo(), ChannelRecPriority::updateInfo(), MythNews::updateInfoView(), ImportCoverArtDialog::updateStatus(), MusicCommon::updateTrackInfo(), PlaybackBox::UpdateUIListItem(), VideoSelector::updateVideoList(), and MetadataOptions::ValuesChanged().
| void MythUIImage::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 from MythUIType.
Definition at line 1090 of file mythuiimage.cpp.
| void MythUIImage::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 1474 of file mythuiimage.cpp.
| void MythUIImage::DrawSelf | ( | MythPainter * | p, | |
| int | xoffset, | |||
| int | yoffset, | |||
| int | alphaMod, | |||
| QRect | clipRect | |||
| ) | [protected, virtual] |
| void MythUIImage::Init | ( | void | ) | [protected] |
| void MythUIImage::Clear | ( | void | ) | [protected] |
Remove all images from the widget.
Definition at line 585 of file mythuiimage.cpp.
Referenced by Load(), SetImage(), SetImages(), and ~MythUIImage().
| void MythUIImage::SetAnimationFrames | ( | AnimationFrames | frames | ) | [protected] |
Definition at line 849 of file mythuiimage.cpp.
Referenced by customEvent(), and Load().
| void MythUIImage::customEvent | ( | QEvent * | event | ) | [protected, virtual] |
| bool MythUIImage::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 1223 of file mythuiimage.cpp.
| void MythUIImage::CopyFrom | ( | MythUIType * | base | ) | [protected, virtual] |
Copy this widgets state from another.
Reimplemented from MythUIType.
Definition at line 1397 of file mythuiimage.cpp.
Referenced by CreateCopy(), and MythUIEditBar::GetNew().
| void MythUIImage::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 1446 of file mythuiimage.cpp.
| void MythUIImage::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 1456 of file mythuiimage.cpp.
| void MythUIImage::SetSize | ( | int | width, | |
| int | height | |||
| ) | [protected] |
Set the size of the widget.
Definition at line 897 of file mythuiimage.cpp.
Referenced by customEvent(), ForceSize(), MythThemeBase::Init(), Load(), MythThemeBase::Reload(), SetImage(), SetImages(), and SetSize().
| void MythUIImage::SetSize | ( | const QSize & | size | ) | [protected, virtual] |
Set the size of the widget.
Reimplemented from MythUIType.
Definition at line 905 of file mythuiimage.cpp.
| void MythUIImage::ForceSize | ( | const QSize & | size | ) | [protected] |
Force the dimensions of the widget and image to the given size.
Definition at line 876 of file mythuiimage.cpp.
Referenced by MythUITextEdit::SetInitialStates().
| void MythUIImage::SetCropRect | ( | int | x, | |
| int | y, | |||
| int | width, | |||
| int | height | |||
| ) | [protected] |
Crop the image using the given rectangle, useful for removing unsightly edges from imported images or zoom effects.
Definition at line 916 of file mythuiimage.cpp.
Referenced by MythUIEditBar::AddBar(), and MythUIProgressBar::CalculatePosition().
| void MythUIImage::SetCropRect | ( | const MythRect & | rect | ) | [protected] |
Crop the image using the given rectangle, useful for removing unsightly edges from imported images or zoom effects.
Definition at line 925 of file mythuiimage.cpp.
friend class MythUIImagePrivate [friend] |
Definition at line 156 of file mythuiimage.h.
Referenced by MythUIImage().
friend class MythThemeBase [friend] |
Definition at line 157 of file mythuiimage.h.
friend class MythUIButtonListItem [friend] |
Definition at line 158 of file mythuiimage.h.
friend class MythUIProgressBar [friend] |
Definition at line 159 of file mythuiimage.h.
friend class MythUIEditBar [friend] |
Definition at line 160 of file mythuiimage.h.
friend class MythUITextEdit [friend] |
Definition at line 161 of file mythuiimage.h.
friend class ImageLoadThread [friend] |
Definition at line 162 of file mythuiimage.h.
Referenced by Load().
QString MythUIImage::m_Filename [protected] |
Definition at line 129 of file mythuiimage.h.
QString MythUIImage::m_OrigFilename [protected] |
Definition at line 130 of file mythuiimage.h.
Referenced by CopyFrom(), MythUIImage(), ParseElement(), Reset(), SetFilename(), and SetFilepattern().
QHash<int, MythImage *> MythUIImage::m_Images [protected] |
Definition at line 132 of file mythuiimage.h.
Referenced by Clear(), customEvent(), DrawSelf(), Load(), Pulse(), SetImage(), and SetImages().
QHash<int, int> MythUIImage::m_Delays [protected] |
Definition at line 133 of file mythuiimage.h.
Referenced by Clear(), Pulse(), SetDelays(), and SetImage().
QMutex MythUIImage::m_ImagesLock [protected] |
Definition at line 134 of file mythuiimage.h.
Referenced by Clear(), customEvent(), DrawSelf(), Load(), Pulse(), SetDelays(), SetImage(), and SetImages().
int MythUIImage::m_Delay [protected] |
Definition at line 136 of file mythuiimage.h.
Referenced by CopyFrom(), MythUIImage(), ParseElement(), Pulse(), SetAnimationFrames(), SetDelay(), SetDelays(), and SetImage().
int MythUIImage::m_LowNum [protected] |
Definition at line 137 of file mythuiimage.h.
Referenced by Clear(), CopyFrom(), Load(), MythUIImage(), ParseElement(), Reset(), SetFilepattern(), and SetImageCount().
int MythUIImage::m_HighNum [protected] |
Definition at line 138 of file mythuiimage.h.
Referenced by Clear(), CopyFrom(), Load(), MythUIImage(), ParseElement(), Reset(), SetFilepattern(), and SetImageCount().
unsigned int MythUIImage::m_CurPos [protected] |
Definition at line 140 of file mythuiimage.h.
Referenced by CopyFrom(), DrawSelf(), Init(), Pulse(), SetDelay(), SetDelays(), SetImage(), and SetImages().
QTime MythUIImage::m_LastDisplay [protected] |
Definition at line 141 of file mythuiimage.h.
Referenced by CopyFrom(), customEvent(), Init(), Load(), Pulse(), SetDelay(), and SetDelays().
bool MythUIImage::m_NeedLoad [protected] |
Definition at line 143 of file mythuiimage.h.
Referenced by CopyFrom(), Finalize(), Init(), LoadNow(), ParseElement(), and SetSize().
ImageProperties MythUIImage::m_imageProperties [protected] |
Definition at line 145 of file mythuiimage.h.
Referenced by CopyFrom(), customEvent(), DrawSelf(), ForceSize(), Load(), MythUIImage(), ParseElement(), Reset(), SetCropRect(), SetFilename(), SetFilepattern(), SetImage(), and SetImages().
int MythUIImage::m_runningThreads [protected] |
Definition at line 147 of file mythuiimage.h.
Referenced by customEvent(), Init(), Load(), and ~MythUIImage().
MythUIImagePrivate* MythUIImage::d [protected] |
Definition at line 149 of file mythuiimage.h.
Referenced by Clear(), CopyFrom(), CreateCopy(), customEvent(), DrawSelf(), Finalize(), ForceSize(), Load(), LoadNow(), MythUIImage(), ParseElement(), Pulse(), Reset(), SetCropRect(), SetDelay(), SetDelays(), SetFilename(), SetFilepattern(), SetImage(), SetImageCount(), SetImages(), SetSize(), and ~MythUIImage().
AnimationCycle MythUIImage::m_animationCycle [protected] |
Definition at line 152 of file mythuiimage.h.
Referenced by CopyFrom(), Init(), ParseElement(), and Pulse().
bool MythUIImage::m_animationReverse [protected] |
Definition at line 153 of file mythuiimage.h.
bool MythUIImage::m_animatedImage [protected] |
Definition at line 154 of file mythuiimage.h.
Referenced by Clear(), CopyFrom(), Init(), Load(), Reset(), and SetImages().
1.6.3