|
virtual void | addFile (const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state) |
|
virtual void | addFile (const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state) |
|
| ctkIconEngine () |
|
| ctkIconEngine () |
|
virtual QString | key () const |
|
virtual QString | key () const |
|
void | setSizeDirectories (const QStringList &sizeDirectories) |
|
void | setSizeDirectories (const QStringList &sizeDirectories) |
|
QStringList | sizeDirectories () const |
|
QStringList | sizeDirectories () const |
|
virtual | ~ctkIconEngine () |
|
virtual | ~ctkIconEngine () |
|
QSize | actualSize (const QSize &size, QIcon::Mode mode, QIcon::State state) |
|
void | addFile (const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state) |
|
void | addPixmap (const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state) |
|
ctkPixmapIconEngineEntry * | bestMatch (const QSize &size, QIcon::Mode mode, QIcon::State state, bool sizeOnly) |
|
QIconEngineV2 * | clone () const |
|
| ctkPixmapIconEngine () |
|
| ctkPixmapIconEngine (const ctkPixmapIconEngine &) |
|
QString | key () const |
|
void | paint (QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) |
|
QPixmap | pixmap (const QSize &size, QIcon::Mode mode, QIcon::State state) |
|
bool | read (QDataStream &in) |
|
void | virtual_hook (int id, void *data) |
|
bool | write (QDataStream &out) const |
|
| ~ctkPixmapIconEngine () |
|
ctkIconEngine is an icon engine that behaves like the default Qt icon engine QPixmapIconEngine(ctkPixmapIconEngine)), but can automatically support icons in multiple size. When adding a file to an icon, it will automatically check if the same file name exists in a different directory. This allows the application to contains icons in different size,e.g. :/Icons/Small/edit.png and :/Icons/Large/edit.png. Without ctkIconEngine, QIcon already support mutltiple files:
QIcon editIcon;
editIcon.addFile(":/Icons/Small/edit.png");
editIcon.addFile(":/Icons/Large/edit.png");
Using ctkIconEngine, adding a file to an icon will automatically search for any icon in a different directory:
QIcon editIcon(autoIconEngine);
editIcon.addFile(":/Icons/Small/edit.png");
void setSizeDirectories(const QStringList &sizeDirectories)
where the large version of the icon is automatically added. It is mostly useful when using the designer, where only 1 icon file can be specified. It must be used with ctkIconEnginePlugin TODO: support more than just files in ressources.
Definition at line 101 of file ctkIconEnginePlugin_qt4.h.
void ctkIconEngine::setSizeDirectories |
( |
const QStringList & |
sizeDirectories | ) |
|
Subdirectories where the icons should be searched, typically: "Small", "Medium", "Large", "XLarge" or "16x16", "32x32", "64x64", "128x128" or "LowDef", "HighDef"
void ctkIconEngine::setSizeDirectories |
( |
const QStringList & |
sizeDirectories | ) |
|
Subdirectories where the icons should be searched, typically: "Small", "Medium", "Large", "XLarge" or "16x16", "32x32", "64x64", "128x128" or "LowDef", "HighDef"