KDWinUtils
Helper library for MFC to Qt migration
|
The KImageList class defines a list of images, each of the same size. More...
#include <kimagelist.h>
Public Types | |
enum class | CreationFlag : uint { Mask = 0x00000001 , Color = 0x00000002 , ColorDDB = 0x00000004 , Color4 = 0x00000008 , Color8 = 0x00000010 , Color16 = 0x00000020 , Color24 = 0x00000040 , Color32 = 0x00000080 , Palette = 0x00000100 , Mirror = 0x00000200 , PerItemMirror = 0x00000400 , OriginalSize = 0x00000800 , HighQualityScale = 0x00001000 } |
Public Member Functions | |
int | Add (QImage images, const QColor &mask={}) |
Adds an image or images to an image list. | |
int | Create (int cx, int cy, CreationFlags flags, int cInitial, int cGrow) |
Initializes an image list. | |
int | Create (int cx, int cy, int nInitial) |
Initializes an image list. | |
KImageList () | |
KImageList (const QImage &images, int cx=-1) | |
Construct a new KImageList object from an image. | |
Q_DECLARE_FLAGS (CreationFlags, CreationFlag) | |
The KImageList class defines a list of images, each of the same size.
This class can replace a CImageList with the same API, and be used with KListModel.
|
strong |
KImageList::KImageList | ( | ) |
KImageList::KImageList | ( | const QImage & | images, |
int | cx = -1 ) |
Construct a new KImageList object from an image.
cx | width of each image, in pixels |
The number of images will be inferred either by cx
or from the height of the image if -1.
int KImageList::Add | ( | QImage | images, |
const QColor & | mask = {} ) |
Adds an image or images to an image list.
images | bitmap containing the image or images, the number of images is inferred from the width of the bitmap |
mask | color used to generate the mask (unused for now) |
int KImageList::Create | ( | int | cx, |
int | cy, | ||
CreationFlags | flags, | ||
int | cInitial, | ||
int | cGrow ) |
Initializes an image list.
Overloaded version of Create that matches the MFC API. Note that some parameters are unused
cx | width of each image, in pixels |
cy | height of each image, in pixels |
flags | unused |
cInitial | number of images reserved in the lis |
cGrow | unused |
int KImageList::Create | ( | int | cx, |
int | cy, | ||
int | nInitial ) |
Initializes an image list.
cx | width of each image, in pixels |
cy | height of each image, in pixels |
cInitial | number of images reserved in the list |
KImageList::Q_DECLARE_FLAGS | ( | CreationFlags | , |
CreationFlag | ) |