11#include <QWriteLocker>
30 auto tuple = std::make_tuple(other.m_pixmap, other.m_hasCachedPixmap, other.m_array);
34 std::tie(m_pixmap, m_hasCachedPixmap, m_array) = tuple;
41 if (this->m_hasCachedPixmap)
43 return this->m_pixmap;
48 this->m_hasCachedPixmap =
true;
49 if (this->m_array.isEmpty())
51 return this->m_pixmap;
53 bool s = this->m_pixmap.loadFromData(this->m_array,
"PNG");
56 return this->m_pixmap;
62 if (this->m_hasCachedPixmap)
66 return (this->m_array.isEmpty() || this->m_array.isNull());
79 void CPixmap::fillByteArray()
84 this->m_pixmap.
save(&buffer,
"PNG");
bool isNull() const
With Pixmap?
const QPixmap & pixmap() const
Corresponding pixmap.
CPixmap()=default
Default constructor.
QString convertToQString(bool i18n=false) const
Cast as QString.
CPixmap & operator=(const CPixmap &other)
Copy assignment (because of mutex).
QPixmap toPixmap() const
Corresponding pixmap.
Free functions in swift::misc.
bool save(QIODevice *device, const char *format, int quality) const const
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.