C
SharedImage Struct
struct Qul::SharedImageShared reference to image data. More...
Header: | #include <qul/image.h> |
Since: | Qt Quick Ultralite 1.5 |
Public Functions
SharedImage(Qul::SharedImage &&other) | |
SharedImage(const Qul::SharedImage &other) | |
SharedImage() | |
Qul::SharedImage & | operator=(Qul::SharedImage &&other) |
Qul::SharedImage & | operator=(const Qul::SharedImage &other) |
~SharedImage() | |
Qul::Image * | image() const |
bool | operator bool() const |
Detailed Description
This struct is used to pass memory buffers with image data to QUL elements for drawing. Properties like Image.source
have the type Property<SharedImage>
.
The most commonly used SharedImage values are built by the compiler for the image resources that are available at compile time and point to static memory areas.
You can use Image to allocate new image data on the heap or to import image data you have prepared separately. Image implicitly converts to SharedImage.
Note: The image() function may return nullptr on SharedImage values generated by the compiler. Use operator bool() to determine if a SharedImage references image data.
See also Image.
Member Function Documentation
SharedImage::SharedImage(Qul::SharedImage &&other)
Move constructor
SharedImage::SharedImage(const Qul::SharedImage &other)
Copy constructor
SharedImage::SharedImage()
Construct a null image reference.
Qul::SharedImage &SharedImage::operator=(Qul::SharedImage &&other)
Move assignment from other
Qul::SharedImage &SharedImage::operator=(const Qul::SharedImage &other)
Copy assignment from other
SharedImage::~SharedImage()
Destructor
Qul::Image *SharedImage::image() const
Get associated Image, if available.
If this SharedImage was created from an Image, this returns a pointer to the image.
Note: Internally, Qt Quick Ultralite may create SharedImage instances that do not have an associated Image. In these cases this function returns nullptr.
bool SharedImage::operator bool() const
Returns true if the SharedImage references some image data.
Available under certain Qt licenses.
Find out more.