8#include <QWaitCondition>
54 QImage img(imageArea.size(), QImage::Format_ARGB32);
103 MythUIImage(
const QString &filepattern,
int low,
int high, std::chrono::milliseconds delay,
109 QString
GetFilename(
void)
const {
return m_imageProperties.m_filename; }
112 void SetFilename(
const QString &
filename);
115 void SetFilepattern(
const QString &filepattern,
int low,
int high);
117 void SetImageCount(
int low,
int high);
127 void SetImages(QVector<MythImage *> *images);
129 void SetDelay(std::chrono::milliseconds delayms);
130 void SetDelays(
const QVector<std::chrono::milliseconds>& delays);
132 void Reset(
void)
override;
133 bool Load(
bool allowLoadInBackground =
true,
bool forceStat =
false);
135 void Pulse(
void)
override;
139 void SetSize(QSize size)
override;
140 void SetOrientation(
int orientation);
147 int alphaMod, QRect clipRect)
override;
155 bool showWarnings)
override;
160 void SetSize(
int width,
int height);
161 void ForceSize(QSize size);
163 void SetCropRect(
int x,
int y,
int width,
int height);
164 void SetCropRect(
const MythRect &rect);
166 void FindRandomImage(
void);
174 std::chrono::milliseconds m_delay { -1ms };
178 unsigned int m_curPos {0};
179 QTime m_lastDisplay {QTime::currentTime()};
181 bool m_needLoad {
false};
185 int m_runningThreads {0};
187 bool m_showingRandomImage {
false};
190 int m_imageListIndex {0};
196 bool m_animationReverse {
false};
197 bool m_animatedImage {
false};
QRect GetMaskImageRect(void)
ImageProperties()=default
void SetMaskImageFilename(const QString &filename)
ReflectAxis m_reflectAxis
void SetMaskImage(MythImage *image)
void Copy(const ImageProperties &other)
ImageProperties & operator=(const ImageProperties &other)
QString GetMaskImageFilename()
QString m_maskImageFilename
QImage GetMaskImageSubset(QRect imageArea)
Wrapper around QRect allowing us to handle percentage and other relative values for areas in mythui.
Screen in which all other widgets are contained and rendered.
A narrow purpose widget used to represent cut positions and regions when editing a video.
A narrow purpose widget used to show television programs and the timeslots they occupy on channels.
Image widget, displays a single image or multiple images in sequence.
QHash< int, MythImage * > m_images
QString GetFilename(void) const
ImageProperties m_imageProperties
QHash< int, std::chrono::milliseconds > m_delays
A text entry and edit widget.
The base class on which all widgets and screens are based.
virtual void SetSize(QSize size)
void customEvent(QEvent *event) override
virtual void DrawSelf(MythPainter *p, int xoffset, int yoffset, int alphaMod, QRect clipRect)
virtual void LoadNow(void)
Cause images in this and child widgets to be loaded.
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
virtual void Finalize(void)
Perform any post-xml parsing initialisation tasks.
virtual void Pulse(void)
Pulse is called 70 times a second to trigger a single frame of an animation.
virtual void CreateCopy(MythUIType *parent)
Copy the state of this widget to the one given, it must be of the same type.
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
virtual bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings)
Parse the xml definition of this widget setting the state of the object accordingly.
static const iso6937table * d
QPair< MythImage *, std::chrono::milliseconds > AnimationFrame
QVector< AnimationFrame > AnimationFrames