[][src]Struct qt_gui::QMovie

#[repr(C)]pub struct QMovie { /* fields omitted */ }

The QMovie class is a convenience class for playing movies with QImageReader.

C++ class: QMovie.

C++ documentation:

The QMovie class is a convenience class for playing movies with QImageReader.

This class is used to show simple animations without sound. If you want to display video and media content, use the Qt Multimedia multimedia framework instead.

First, create a QMovie object by passing either the name of a file or a pointer to a QIODevice containing an animated image format to QMovie's constructor. You can call isValid() to check if the image data is valid, before starting the movie. To start the movie, call start(). QMovie will enter Running state, and emit started() and stateChanged(). To get the current state of the movie, call state().

To display the movie in your application, you can pass your QMovie object to QLabel::setMovie(). Example:

QLabel label; QMovie *movie = new QMovie("animations/fire.gif");

label.setMovie(movie); movie->start();

Whenever a new frame is available in the movie, QMovie will emit updated(). If the size of the frame changes, resized() is emitted. You can call currentImage() or currentPixmap() to get a copy of the current frame. When the movie is done, QMovie emits finished(). If any error occurs during playback (i.e, the image file is corrupt), QMovie will emit error().

You can control the speed of the movie playback by calling setSpeed(), which takes the percentage of the original speed as an argument. Pause the movie by calling setPaused(true). QMovie will then enter Paused state and emit stateChanged(). If you call setPaused(false), QMovie will reenter Running state and start the movie again. To stop the movie, call stop().

Certain animation formats allow you to set the background color. You can call setBackgroundColor() to set the color, or backgroundColor() to retrieve the current background color.

currentFrameNumber() returns the sequence number of the current frame. The first frame in the animation has the sequence number 0. frameCount() returns the total number of frames in the animation, if the image format supports this. You can call loopCount() to get the number of times the movie should loop before finishing. nextFrameDelay() returns the number of milliseconds the current frame should be displayed.

QMovie can be instructed to cache frames of an animation by calling setCacheMode().

Call supportedFormats() for a list of formats that QMovie supports.

Methods

impl QMovie[src]

pub fn started(&self) -> Signal<()>[src]

This signal is emitted after QMovie::start() has been called, and QMovie has entered QMovie::Running state.

Returns a built-in Qt signal QMovie::started that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted after QMovie::start() has been called, and QMovie has entered QMovie::Running state.

pub fn resized(&self) -> Signal<(*const QSize,)>[src]

This signal is emitted when the current frame has been resized to size. This effect is sometimes used in animations as an alternative to replacing the frame. You can call currentImage() or currentPixmap() to get a copy of the updated frame.

Returns a built-in Qt signal QMovie::resized that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the current frame has been resized to size. This effect is sometimes used in animations as an alternative to replacing the frame. You can call currentImage() or currentPixmap() to get a copy of the updated frame.

pub fn updated(&self) -> Signal<(*const QRect,)>[src]

This signal is emitted when the rect rect in the current frame has been updated. You can call currentImage() or currentPixmap() to get a copy of the updated frame.

Returns a built-in Qt signal QMovie::updated that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the rect rect in the current frame has been updated. You can call currentImage() or currentPixmap() to get a copy of the updated frame.

pub fn state_changed(&self) -> Signal<(MovieState,)>[src]

This signal is emitted every time the state of the movie changes. The new state is specified by state.

Returns a built-in Qt signal QMovie::stateChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted every time the state of the movie changes. The new state is specified by state.

See also QMovie::state().

pub fn error(&self) -> Signal<(ImageReaderError,)>[src]

This signal is emitted by QMovie when the error error occurred during playback. QMovie will stop the movie, and enter QMovie::NotRunning state.

Returns a built-in Qt signal QMovie::error that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted by QMovie when the error error occurred during playback. QMovie will stop the movie, and enter QMovie::NotRunning state.

pub fn finished(&self) -> Signal<()>[src]

This signal is emitted when the movie has finished.

Returns a built-in Qt signal QMovie::finished that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the movie has finished.

See also QMovie::stop().

pub fn frame_changed(&self) -> Signal<(c_int,)>[src]

This signal is emitted when the frame number has changed to frameNumber. You can call currentImage() or currentPixmap() to get a copy of the frame.

Returns a built-in Qt signal QMovie::frameChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the frame number has changed to frameNumber. You can call currentImage() or currentPixmap() to get a copy of the frame.

This function was introduced in Qt 4.1.

pub fn slot_start(&self) -> Receiver<()>[src]

Starts the movie. QMovie will enter Running state, and start emitting updated() and resized() as the movie progresses.

Returns a built-in Qt slot QMovie::start that can be passed to qt_core::Signal::connect.

C++ documentation:

Starts the movie. QMovie will enter Running state, and start emitting updated() and resized() as the movie progresses.

If QMovie is in the Paused state, this function is equivalent to calling setPaused(false). If QMovie is already in the Running state, this function does nothing.

See also stop() and setPaused().

pub fn slot_jump_to_next_frame(&self) -> Receiver<()>[src]

Jumps to the next frame. Returns true on success; otherwise returns false.

Returns a built-in Qt slot QMovie::jumpToNextFrame that can be passed to qt_core::Signal::connect.

C++ documentation:

Jumps to the next frame. Returns true on success; otherwise returns false.

pub fn slot_set_paused(&self) -> Receiver<(bool,)>[src]

If paused is true, QMovie will enter Paused state and emit stateChanged(Paused); otherwise it will enter Running state and emit stateChanged(Running).

Returns a built-in Qt slot QMovie::setPaused that can be passed to qt_core::Signal::connect.

C++ documentation:

If paused is true, QMovie will enter Paused state and emit stateChanged(Paused); otherwise it will enter Running state and emit stateChanged(Running).

See also state().

pub fn slot_stop(&self) -> Receiver<()>[src]

Stops the movie. QMovie enters NotRunning state, and stops emitting updated() and resized(). If start() is called again, the movie will restart from the beginning.

Returns a built-in Qt slot QMovie::stop that can be passed to qt_core::Signal::connect.

C++ documentation:

Stops the movie. QMovie enters NotRunning state, and stops emitting updated() and resized(). If start() is called again, the movie will restart from the beginning.

If QMovie is already in the NotRunning state, this function does nothing.

See also start() and setPaused().

pub fn slot_set_speed(&self) -> Receiver<(c_int,)>[src]

This property holds the movie's speed

Returns a built-in Qt slot QMovie::setSpeed that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds the movie's speed

The speed is measured in percentage of the original movie speed. The default speed is 100%. Example:

QMovie movie("racecar.gif"); movie.setSpeed(200); // 2x speed

Access functions:

int speed() const
void setSpeed(int percentSpeed)

pub unsafe fn background_color(&self) -> CppBox<QColor>[src]

Returns the background color of the movie. If no background color has been assigned, an invalid QColor is returned.

Calls C++ function: QColor QMovie::backgroundColor() const.

C++ documentation:

Returns the background color of the movie. If no background color has been assigned, an invalid QColor is returned.

See also setBackgroundColor().

pub unsafe fn cache_mode(&self) -> CacheMode[src]

This property holds the movie's cache mode

Calls C++ function: QMovie::CacheMode QMovie::cacheMode() const.

C++ documentation:

This property holds the movie's cache mode

Caching frames can be useful when the underlying animation format handler that QMovie relies on to decode the animation data does not support jumping to particular frames in the animation, or even "rewinding" the animation to the beginning (for looping). Furthermore, if the image data comes from a sequential device, it is not possible for the underlying animation handler to seek back to frames whose data has already been read (making looping altogether impossible).

To aid in such situations, a QMovie object can be instructed to cache the frames, at the added memory cost of keeping the frames in memory for the lifetime of the object.

By default, this property is set to CacheNone.

Access functions:

CacheMode cacheMode() const
void setCacheMode(CacheMode mode)

See also QMovie::CacheMode.

pub unsafe fn current_frame_number(&self) -> c_int[src]

Returns the sequence number of the current frame. The number of the first frame in the movie is 0.

Calls C++ function: int QMovie::currentFrameNumber() const.

C++ documentation:

Returns the sequence number of the current frame. The number of the first frame in the movie is 0.

pub unsafe fn current_image(&self) -> CppBox<QImage>[src]

Returns the current frame as a QImage.

Calls C++ function: QImage QMovie::currentImage() const.

C++ documentation:

Returns the current frame as a QImage.

See also currentPixmap() and updated().

pub unsafe fn current_pixmap(&self) -> CppBox<QPixmap>[src]

Returns the current frame as a QPixmap.

Calls C++ function: QPixmap QMovie::currentPixmap() const.

C++ documentation:

Returns the current frame as a QPixmap.

See also currentImage() and updated().

pub unsafe fn device(&self) -> QPtr<QIODevice>[src]

Returns the device QMovie reads image data from. If no device has currently been assigned, 0 is returned.

Calls C++ function: QIODevice* QMovie::device() const.

C++ documentation:

Returns the device QMovie reads image data from. If no device has currently been assigned, 0 is returned.

See also setDevice() and fileName().

pub unsafe fn file_name(&self) -> CppBox<QString>[src]

Returns the name of the file that QMovie reads image data from. If no file name has been assigned, or if the assigned device is not a file, an empty QString is returned.

Calls C++ function: QString QMovie::fileName() const.

C++ documentation:

Returns the name of the file that QMovie reads image data from. If no file name has been assigned, or if the assigned device is not a file, an empty QString is returned.

See also setFileName() and device().

pub unsafe fn format(&self) -> CppBox<QByteArray>[src]

Returns the format that QMovie uses when decoding image data. If no format has been assigned, an empty QByteArray() is returned.

Calls C++ function: QByteArray QMovie::format() const.

C++ documentation:

Returns the format that QMovie uses when decoding image data. If no format has been assigned, an empty QByteArray() is returned.

See also setFormat().

pub unsafe fn frame_count(&self) -> c_int[src]

Returns the number of frames in the movie.

Calls C++ function: int QMovie::frameCount() const.

C++ documentation:

Returns the number of frames in the movie.

Certain animation formats do not support this feature, in which case 0 is returned.

pub unsafe fn frame_rect(&self) -> CppBox<QRect>[src]

Returns the rect of the last frame. If no frame has yet been updated, an invalid QRect is returned.

Calls C++ function: QRect QMovie::frameRect() const.

C++ documentation:

Returns the rect of the last frame. If no frame has yet been updated, an invalid QRect is returned.

See also currentImage() and currentPixmap().

pub unsafe fn is_valid(&self) -> bool[src]

Returns true if the movie is valid (e.g., the image data is readable and the image format is supported); otherwise returns false.

Calls C++ function: bool QMovie::isValid() const.

C++ documentation:

Returns true if the movie is valid (e.g., the image data is readable and the image format is supported); otherwise returns false.

pub unsafe fn jump_to_frame(&self, frame_number: c_int) -> bool[src]

Jumps to frame number frameNumber. Returns true on success; otherwise returns false.

Calls C++ function: bool QMovie::jumpToFrame(int frameNumber).

C++ documentation:

Jumps to frame number frameNumber. Returns true on success; otherwise returns false.

pub unsafe fn jump_to_next_frame(&self) -> bool[src]

Jumps to the next frame. Returns true on success; otherwise returns false.

Calls C++ function: [slot] bool QMovie::jumpToNextFrame().

C++ documentation:

Jumps to the next frame. Returns true on success; otherwise returns false.

pub unsafe fn last_error(&self) -> ImageReaderError[src]

This is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Returns the most recent error that occurred while attempting to read image data.

Calls C++ function: QImageReader::ImageReaderError QMovie::lastError() const.

C++ documentation:

Returns the most recent error that occurred while attempting to read image data.

See also lastErrorString().

pub unsafe fn last_error_string(&self) -> CppBox<QString>[src]

This is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Returns a human-readable representation of the most recent error that occurred while attempting to read image data.

Calls C++ function: QString QMovie::lastErrorString() const.

C++ documentation:

Returns a human-readable representation of the most recent error that occurred while attempting to read image data.

See also lastError().

pub unsafe fn loop_count(&self) -> c_int[src]

Returns the number of times the movie will loop before it finishes. If the movie will only play once (no looping), loopCount returns 0. If the movie loops forever, loopCount returns -1.

Calls C++ function: int QMovie::loopCount() const.

C++ documentation:

Returns the number of times the movie will loop before it finishes. If the movie will only play once (no looping), loopCount returns 0. If the movie loops forever, loopCount returns -1.

Note that, if the image data comes from a sequential device (e.g. a socket), QMovie can only loop the movie if the cacheMode is set to QMovie::CacheAll.

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QMovie::metaObject() const.

pub unsafe fn from_q_object(parent: impl CastInto<Ptr<QObject>>) -> QBox<QMovie>[src]

Constructs a QMovie object, passing the parent object to QObject's constructor.

Calls C++ function: [constructor] void QMovie::QMovie(QObject* parent = …).

C++ documentation:

Constructs a QMovie object, passing the parent object to QObject's constructor.

See also setFileName(), setDevice(), and setFormat().

pub unsafe fn from_q_io_device_q_byte_array_q_object(
    device: impl CastInto<Ptr<QIODevice>>,
    format: impl CastInto<Ref<QByteArray>>,
    parent: impl CastInto<Ptr<QObject>>
) -> QBox<QMovie>
[src]

Constructs a QMovie object. QMovie will use read image data from device, which it assumes is open and readable. If format is not empty, QMovie will use the image format format for decoding the image data. Otherwise, QMovie will attempt to guess the format.

Calls C++ function: [constructor] void QMovie::QMovie(QIODevice* device, const QByteArray& format = …, QObject* parent = …).

C++ documentation:

Constructs a QMovie object. QMovie will use read image data from device, which it assumes is open and readable. If format is not empty, QMovie will use the image format format for decoding the image data. Otherwise, QMovie will attempt to guess the format.

The parent object is passed to QObject's constructor.

pub unsafe fn from_q_string_q_byte_array_q_object(
    file_name: impl CastInto<Ref<QString>>,
    format: impl CastInto<Ref<QByteArray>>,
    parent: impl CastInto<Ptr<QObject>>
) -> QBox<QMovie>
[src]

Constructs a QMovie object. QMovie will use read image data from fileName. If format is not empty, QMovie will use the image format format for decoding the image data. Otherwise, QMovie will attempt to guess the format.

Calls C++ function: [constructor] void QMovie::QMovie(const QString& fileName, const QByteArray& format = …, QObject* parent = …).

C++ documentation:

Constructs a QMovie object. QMovie will use read image data from fileName. If format is not empty, QMovie will use the image format format for decoding the image data. Otherwise, QMovie will attempt to guess the format.

The parent object is passed to QObject's constructor.

pub unsafe fn new() -> QBox<QMovie>[src]

The QMovie class is a convenience class for playing movies with QImageReader.

Calls C++ function: [constructor] void QMovie::QMovie().

C++ documentation:

The QMovie class is a convenience class for playing movies with QImageReader.

This class is used to show simple animations without sound. If you want to display video and media content, use the Qt Multimedia multimedia framework instead.

First, create a QMovie object by passing either the name of a file or a pointer to a QIODevice containing an animated image format to QMovie's constructor. You can call isValid() to check if the image data is valid, before starting the movie. To start the movie, call start(). QMovie will enter Running state, and emit started() and stateChanged(). To get the current state of the movie, call state().

To display the movie in your application, you can pass your QMovie object to QLabel::setMovie(). Example:

QLabel label; QMovie *movie = new QMovie("animations/fire.gif");

label.setMovie(movie); movie->start();

Whenever a new frame is available in the movie, QMovie will emit updated(). If the size of the frame changes, resized() is emitted. You can call currentImage() or currentPixmap() to get a copy of the current frame. When the movie is done, QMovie emits finished(). If any error occurs during playback (i.e, the image file is corrupt), QMovie will emit error().

You can control the speed of the movie playback by calling setSpeed(), which takes the percentage of the original speed as an argument. Pause the movie by calling setPaused(true). QMovie will then enter Paused state and emit stateChanged(). If you call setPaused(false), QMovie will reenter Running state and start the movie again. To stop the movie, call stop().

Certain animation formats allow you to set the background color. You can call setBackgroundColor() to set the color, or backgroundColor() to retrieve the current background color.

currentFrameNumber() returns the sequence number of the current frame. The first frame in the animation has the sequence number 0. frameCount() returns the total number of frames in the animation, if the image format supports this. You can call loopCount() to get the number of times the movie should loop before finishing. nextFrameDelay() returns the number of milliseconds the current frame should be displayed.

QMovie can be instructed to cache frames of an animation by calling setCacheMode().

Call supportedFormats() for a list of formats that QMovie supports.

pub unsafe fn from_q_io_device_q_byte_array(
    device: impl CastInto<Ptr<QIODevice>>,
    format: impl CastInto<Ref<QByteArray>>
) -> QBox<QMovie>
[src]

Constructs a QMovie object. QMovie will use read image data from device, which it assumes is open and readable. If format is not empty, QMovie will use the image format format for decoding the image data. Otherwise, QMovie will attempt to guess the format.

Calls C++ function: [constructor] void QMovie::QMovie(QIODevice* device, const QByteArray& format = …).

C++ documentation:

Constructs a QMovie object. QMovie will use read image data from device, which it assumes is open and readable. If format is not empty, QMovie will use the image format format for decoding the image data. Otherwise, QMovie will attempt to guess the format.

The parent object is passed to QObject's constructor.

pub unsafe fn from_q_io_device(
    device: impl CastInto<Ptr<QIODevice>>
) -> QBox<QMovie>
[src]

Constructs a QMovie object. QMovie will use read image data from device, which it assumes is open and readable. If format is not empty, QMovie will use the image format format for decoding the image data. Otherwise, QMovie will attempt to guess the format.

Calls C++ function: [constructor] void QMovie::QMovie(QIODevice* device).

C++ documentation:

Constructs a QMovie object. QMovie will use read image data from device, which it assumes is open and readable. If format is not empty, QMovie will use the image format format for decoding the image data. Otherwise, QMovie will attempt to guess the format.

The parent object is passed to QObject's constructor.

pub unsafe fn from_q_string_q_byte_array(
    file_name: impl CastInto<Ref<QString>>,
    format: impl CastInto<Ref<QByteArray>>
) -> QBox<QMovie>
[src]

Constructs a QMovie object. QMovie will use read image data from fileName. If format is not empty, QMovie will use the image format format for decoding the image data. Otherwise, QMovie will attempt to guess the format.

Calls C++ function: [constructor] void QMovie::QMovie(const QString& fileName, const QByteArray& format = …).

C++ documentation:

Constructs a QMovie object. QMovie will use read image data from fileName. If format is not empty, QMovie will use the image format format for decoding the image data. Otherwise, QMovie will attempt to guess the format.

The parent object is passed to QObject's constructor.

pub unsafe fn from_q_string(
    file_name: impl CastInto<Ref<QString>>
) -> QBox<QMovie>
[src]

Constructs a QMovie object. QMovie will use read image data from fileName. If format is not empty, QMovie will use the image format format for decoding the image data. Otherwise, QMovie will attempt to guess the format.

Calls C++ function: [constructor] void QMovie::QMovie(const QString& fileName).

C++ documentation:

Constructs a QMovie object. QMovie will use read image data from fileName. If format is not empty, QMovie will use the image format format for decoding the image data. Otherwise, QMovie will attempt to guess the format.

The parent object is passed to QObject's constructor.

pub unsafe fn next_frame_delay(&self) -> c_int[src]

Returns the number of milliseconds QMovie will wait before updating the next frame in the animation.

Calls C++ function: int QMovie::nextFrameDelay() const.

C++ documentation:

Returns the number of milliseconds QMovie will wait before updating the next frame in the animation.

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QMovie::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QMovie::qt_metacast(const char* arg1).

pub unsafe fn scaled_size(&self) -> CppBox<QSize>[src]

Returns the scaled size of frames.

Calls C++ function: QSize QMovie::scaledSize().

C++ documentation:

Returns the scaled size of frames.

This function was introduced in Qt 4.1.

See also setScaledSize() and QImageReader::scaledSize().

pub unsafe fn set_background_color(&self, color: impl CastInto<Ref<QColor>>)[src]

For image formats that support it, this function sets the background color to color.

Calls C++ function: void QMovie::setBackgroundColor(const QColor& color).

C++ documentation:

For image formats that support it, this function sets the background color to color.

See also backgroundColor().

pub unsafe fn set_cache_mode(&self, mode: CacheMode)[src]

This property holds the movie's cache mode

Calls C++ function: void QMovie::setCacheMode(QMovie::CacheMode mode).

C++ documentation:

This property holds the movie's cache mode

Caching frames can be useful when the underlying animation format handler that QMovie relies on to decode the animation data does not support jumping to particular frames in the animation, or even "rewinding" the animation to the beginning (for looping). Furthermore, if the image data comes from a sequential device, it is not possible for the underlying animation handler to seek back to frames whose data has already been read (making looping altogether impossible).

To aid in such situations, a QMovie object can be instructed to cache the frames, at the added memory cost of keeping the frames in memory for the lifetime of the object.

By default, this property is set to CacheNone.

Access functions:

CacheMode cacheMode() const
void setCacheMode(CacheMode mode)

See also QMovie::CacheMode.

pub unsafe fn set_device(&self, device: impl CastInto<Ptr<QIODevice>>)[src]

Sets the current device to device. QMovie will read image data from this device when the movie is running.

Calls C++ function: void QMovie::setDevice(QIODevice* device).

C++ documentation:

Sets the current device to device. QMovie will read image data from this device when the movie is running.

See also device() and setFormat().

pub unsafe fn set_file_name(&self, file_name: impl CastInto<Ref<QString>>)[src]

Sets the name of the file that QMovie reads image data from, to fileName.

Calls C++ function: void QMovie::setFileName(const QString& fileName).

C++ documentation:

Sets the name of the file that QMovie reads image data from, to fileName.

See also fileName(), setDevice(), and setFormat().

pub unsafe fn set_format(&self, format: impl CastInto<Ref<QByteArray>>)[src]

Sets the format that QMovie will use when decoding image data, to format. By default, QMovie will attempt to guess the format of the image data.

Calls C++ function: void QMovie::setFormat(const QByteArray& format).

C++ documentation:

Sets the format that QMovie will use when decoding image data, to format. By default, QMovie will attempt to guess the format of the image data.

You can call supportedFormats() for the full list of formats QMovie supports.

See also format() and QImageReader::supportedImageFormats().

pub unsafe fn set_paused(&self, paused: bool)[src]

If paused is true, QMovie will enter Paused state and emit stateChanged(Paused); otherwise it will enter Running state and emit stateChanged(Running).

Calls C++ function: [slot] void QMovie::setPaused(bool paused).

C++ documentation:

If paused is true, QMovie will enter Paused state and emit stateChanged(Paused); otherwise it will enter Running state and emit stateChanged(Running).

See also state().

pub unsafe fn set_scaled_size(&self, size: impl CastInto<Ref<QSize>>)[src]

Sets the scaled frame size to size.

Calls C++ function: void QMovie::setScaledSize(const QSize& size).

C++ documentation:

Sets the scaled frame size to size.

This function was introduced in Qt 4.1.

See also scaledSize() and QImageReader::setScaledSize().

pub unsafe fn set_speed(&self, percent_speed: c_int)[src]

This property holds the movie's speed

Calls C++ function: [slot] void QMovie::setSpeed(int percentSpeed).

C++ documentation:

This property holds the movie's speed

The speed is measured in percentage of the original movie speed. The default speed is 100%. Example:

QMovie movie("racecar.gif"); movie.setSpeed(200); // 2x speed

Access functions:

int speed() const
void setSpeed(int percentSpeed)

pub unsafe fn speed(&self) -> c_int[src]

This property holds the movie's speed

Calls C++ function: int QMovie::speed() const.

C++ documentation:

This property holds the movie's speed

The speed is measured in percentage of the original movie speed. The default speed is 100%. Example:

QMovie movie("racecar.gif"); movie.setSpeed(200); // 2x speed

Access functions:

int speed() const
void setSpeed(int percentSpeed)

pub unsafe fn start(&self)[src]

Starts the movie. QMovie will enter Running state, and start emitting updated() and resized() as the movie progresses.

Calls C++ function: [slot] void QMovie::start().

C++ documentation:

Starts the movie. QMovie will enter Running state, and start emitting updated() and resized() as the movie progresses.

If QMovie is in the Paused state, this function is equivalent to calling setPaused(false). If QMovie is already in the Running state, this function does nothing.

See also stop() and setPaused().

pub unsafe fn state(&self) -> MovieState[src]

Returns the current state of QMovie.

Calls C++ function: QMovie::MovieState QMovie::state() const.

C++ documentation:

Returns the current state of QMovie.

See also MovieState and stateChanged().

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn stop(&self)[src]

Stops the movie. QMovie enters NotRunning state, and stops emitting updated() and resized(). If start() is called again, the movie will restart from the beginning.

Calls C++ function: [slot] void QMovie::stop().

C++ documentation:

Stops the movie. QMovie enters NotRunning state, and stops emitting updated() and resized(). If start() is called again, the movie will restart from the beginning.

If QMovie is already in the NotRunning state, this function does nothing.

See also start() and setPaused().

pub unsafe fn supported_formats() -> CppBox<QListOfQByteArray>[src]

Returns the list of image formats supported by QMovie.

Calls C++ function: static QList<QByteArray> QMovie::supportedFormats().

C++ documentation:

Returns the list of image formats supported by QMovie.

This function was introduced in Qt 4.1.

See also QImageReader::supportedImageFormats().

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QMovie::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QMovie::trUtf8(const char* s, const char* c, int n).

Trait Implementations

impl CppDeletable for QMovie[src]

unsafe fn delete(&self)[src]

Destructs the QMovie object.

Calls C++ function: virtual [destructor] void QMovie::~QMovie().

C++ documentation:

Destructs the QMovie object.

impl Deref for QMovie[src]

type Target = QObject

The resulting type after dereferencing.

fn deref(&self) -> &QObject[src]

Calls C++ function: QObject* static_cast<QObject*>(QMovie* ptr).

impl DynamicCast<QMovie> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QMovie>[src]

Calls C++ function: QMovie* dynamic_cast<QMovie*>(QObject* ptr).

impl StaticDowncast<QMovie> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QMovie>[src]

Calls C++ function: QMovie* static_cast<QMovie*>(QObject* ptr).

impl StaticUpcast<QObject> for QMovie[src]

unsafe fn static_upcast(ptr: Ptr<QMovie>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QMovie* ptr).

Auto Trait Implementations

impl RefUnwindSafe for QMovie

impl Send for QMovie

impl Sync for QMovie

impl Unpin for QMovie

impl UnwindSafe for QMovie

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.