152#include "private/qobject_p.h"
153#include "private/qproperty_p.h"
155#define QMOVIE_INVALID_DELAY -1
217 void setSpeed(
int percentSpeed) { q_func()->setSpeed(percentSpeed); }
231 bool haveReadAll =
false;
313 if (frameNumber == 0) {
348 }
else if (frameNumber != 0) {
374 if (
i == frameNumber) {
406 if (
info.isEndMarker()) {
440 int processingTime =
time.elapsed();
594 if (
d->reader->device())
595 d->initialDevicePos =
d->reader->device()->pos();
630 return d->reader->device();
657 return d->reader->fileName();
685 return d->reader->format();
697 d->reader->setBackgroundColor(
color);
709 return d->reader->backgroundColor();
720 return d->movieState;
743 return d->currentPixmap;
754 return d->currentPixmap.toImage();
777 return d->reader->error();
789 return d->reader->errorString();
801 return d->frameCount();
821 return d->currentFrameNumber;
830 return d->jumpToNextFrame();
840 return d->jumpToFrame(frameNumber);
855 return d->reader->loopCount();
872 d->nextImageTimer.stop();
894 if (!
d->speed &&
d->movieState ==
Running)
896 if (percentSpeed !=
d->speed) {
897 d->speed = percentSpeed;
900 d->speed.removeBindingUnlessInWrapper();
930 d->_q_loadNextFrame(
true);
931 }
else if (
d->movieState ==
Paused) {
952 d->nextImageTimer.stop();
953 d->nextFrameNumber = 0;
966 return d->reader->scaledSize();
979 d->reader->setScaledSize(
size);
996 const auto doesntSupportAnimation =
1029 return d->cacheMode;
1041 return &
d->cacheMode;
1046#include "moc_qmovie.cpp"
IOBluetoothDevice * device
\inmodule QtCore \reentrant
The QColor class provides colors based on RGB, HSV or CMYK values.
QString absolutePath() const
Returns the absolute path (a path that starts with "/" or with a drive specification),...
qint64 size() const
Returns the file size in bytes.
QFrameInfo(QPixmap &&pixmap, int delay)
static QFrameInfo endMarker()
\inmodule QtCore \reentrant
virtual qint64 pos() const
For random-access devices, this function returns the position that data is written to or read from.
virtual bool isSequential() const
Returns true if this device is sequential; otherwise returns false.
virtual bool seek(qint64 pos)
For random-access devices, this function sets the current position to pos, returning true on success,...
The QImageReader class provides a format independent interface for reading images from files or other...
int imageCount() const
For image formats that support animation, this function returns the total number of images in the ani...
QSize scaledSize() const
Returns the scaled size of the image.
QString fileName() const
If the currently assigned device is a QFile, or if setFileName() has been called, this function retur...
void setScaledSize(const QSize &size)
Sets the scaled size of the image to size.
ImageReaderError
This enum describes the different types of errors that can occur when reading images with QImageReade...
QIODevice * device() const
Returns the device currently assigned to QImageReader, or \nullptr if no device has been assigned.
QColor backgroundColor() const
bool jumpToImage(int imageNumber)
For image formats that support animation, this function skips to the image whose sequence number is i...
bool supportsOption(QImageIOHandler::ImageOption option) const
QByteArray format() const
Returns the format QImageReader uses for reading images.
bool canRead() const
Returns true if an image can be read for the device (i.e., the image format is supported,...
static QList< QByteArray > supportedImageFormats()
Returns the list of image formats supported by QImageReader.
void setBackgroundColor(const QColor &color)
ImageReaderError error() const
Returns the type of error that occurred last.
int nextImageDelay() const
For image formats that support animation, this function returns the number of milliseconds to wait un...
int loopCount() const
For image formats that support animation, this function returns the number of times the animation sho...
QImage read()
Reads an image from the device.
bool isNull() const
Returns true if it is a null image, otherwise returns false.
qsizetype removeIf(Predicate pred)
iterator insert(const Key &key, const T &value)
T value(const Key &key, const T &defaultValue=T()) const
int speedAdjustedDelay(int delay) const
QMovie::MovieState movieState
QFrameInfo infoForFrame(int frameNumber)
QMap< int, QFrameInfo > frameMap
void enterState(QMovie::MovieState newState)
void setSpeed(int percentSpeed)
bool jumpToFrame(int frameNumber)
QPixmap currentPixmap() const
Returns the current frame as a QPixmap.
MovieState state() const
Returns the current state of QMovie.
QImage currentImage() const
Returns the current frame as a QImage.
QBindable< CacheMode > bindableCacheMode()
QColor backgroundColor() const
Returns the background color of the movie.
int currentFrameNumber() const
Returns the sequence number of the current frame.
QRect frameRect() const
Returns the rect of the last frame.
QImageReader::ImageReaderError lastError() const
Returns the most recent error that occurred while attempting to read image data.
QIODevice * device() const
Returns the device QMovie reads image data from.
MovieState
This enum describes the different states of QMovie.
static QList< QByteArray > supportedFormats()
void setBackgroundColor(const QColor &color)
For image formats that support it, this function sets the background color to color.
~QMovie()
Destructs the QMovie object.
CacheMode
This enum describes the different cache modes of QMovie.
void setFileName(const QString &fileName)
Sets the name of the file that QMovie reads image data from, to fileName.
void start()
Starts the movie.
int speed
the movie's speed
int loopCount() const
Returns the number of times the movie will loop before it finishes.
QBindable< int > bindableSpeed()
int nextFrameDelay() const
Returns the number of milliseconds QMovie will wait before updating the next frame in the animation.
bool jumpToNextFrame()
Jumps to the next frame.
void stop()
Stops the movie.
CacheMode cacheMode
the movie's cache mode
QString fileName() const
Returns the name of the file that QMovie reads image data from.
void setSpeed(int percentSpeed)
void setDevice(QIODevice *device)
Sets the current device to device.
QMovie(QObject *parent=nullptr)
Constructs a QMovie object, passing the parent object to QObject's constructor.
bool jumpToFrame(int frameNumber)
Jumps to frame number frameNumber.
void setFormat(const QByteArray &format)
Sets the format that QMovie will use when decoding image data, to format.
void setScaledSize(const QSize &size)
QByteArray format() const
Returns the format that QMovie uses when decoding image data.
bool isValid() const
Returns true if the movie is valid (e.g., the image data is readable and the image format is supporte...
void setCacheMode(CacheMode mode)
int frameCount() const
Returns the number of frames in the movie.
QString lastErrorString() const
Returns a human-readable representation of the most recent error that occurred while attempting to re...
void setPaused(bool paused)
If paused is true, QMovie will enter \l Paused state and emit stateChanged(Paused); otherwise it will...
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
QRect rect() const
Returns the pixmap's enclosing rectangle.
static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
Converts the given image to a pixmap using the specified flags to control the conversion.
\inmodule QtCore\reentrant
constexpr QSize size() const noexcept
Returns the size of the rectangle.
constexpr bool isValid() const noexcept
Returns true if both the width and height is equal to or greater than 0; otherwise returns false.
\macro QT_RESTRICTED_CAST_FROM_ASCII
void setSingleShot(bool singleShot)
void start(int msec)
Starts or restarts the timer with a timeout interval of msec milliseconds.
void stop()
Stops the timer.
void newState(QList< State > &states, const char *token, const char *lexem, bool pre)
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
#define QMOVIE_INVALID_DELAY
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLbitfield GLuint64 timeout
[4]
GLint GLsizei GLsizei GLenum format
GLdouble GLdouble GLdouble GLdouble q
#define Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS(...)
#define Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(...)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
QFileInfo info(fileName)
[8]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent