#include </home/clem/local/src/opie/noncore/styles/theme/othemebase.h>
Public Types | |
| enum | ScaleHint { FullScale, HorizontalScale, VerticalScale } |
Public Member Functions | |
| OThemeCache (int maxSize, QObject *parent=0, const char *name=0) | |
| bool | insert (OThemePixmap *pixmap, ScaleHint scale, int widgetID, bool border=false, bool mask=false) |
| OThemePixmap * | pixmap (int w, int h, int widgetID, bool border=false, bool mask=false) |
| OThemePixmap * | horizontalPixmap (int w, int widgetID) |
| OThemePixmap * | verticalPixmap (int h, int widgetID) |
Protected Slots | |
| void | flushTimeout () |
Protected Attributes | |
| QIntCache< OThemePixmap > | cache |
| QTimer | flushTimer |
Private Attributes | |
| OThemeCachePrivate * | d |
This class is mostly just inline methods that do bit operations on a key composed of the widget ID, width and/or height, and then calls QIntCache::find().
One other thing to note is that full, horizontal, and vertically scaled pixmaps are not used interchangeably. For example, if you insert a fully scaled pixmap that is 32x32 then request a horizontally scaled pixmap with a width of 32, they will not match. This is because a pixmap that has been inserted into the cache has already been scaled at some point and it is very likely the vertical height was not originally 32. Thus the pixmap will be wrong when drawn, even though the horizontal width matches.
Definition at line 112 of file othemebase.h.
|
|
The scale hints supported by the cache. Note that Tiled is not here since tiled pixmaps are kept only once in OThemeBase. Definition at line 120 of file othemebase.h. |
|
||||||||||||||||
|
The constructor.
Definition at line 1117 of file othemebase.cpp. References cache, flushTimeout(), and flushTimer. |
|
|
Definition at line 1126 of file othemebase.cpp. References cache. Referenced by OThemeCache(). |
|
||||||||||||
|
Returns a horizontally scaled pixmap.
Definition at line 1155 of file othemebase.cpp. References kthemeKeyData::border, cache, kthemeKey::cacheKey, kthemeKey::data, kthemeKeyData::height, kthemeKeyData::id, kthemeKeyData::mask, pix, and kthemeKeyData::width. Referenced by OThemeBase::gradient(), and OThemeBase::scale(). |
|
||||||||||||||||||||||||
|
Inserts a new pixmap into the cache.
Definition at line 1185 of file othemebase.cpp. References kthemeKeyData::border, cache, kthemeKey::cacheKey, kthemeKey::data, FullScale, kthemeKeyData::height, HorizontalScale, kthemeKeyData::id, kthemeKeyData::mask, NULL, VerticalScale, and kthemeKeyData::width. Referenced by OThemeBase::gradient(), OThemeBase::scale(), and OThemeBase::scaleBorder(). |
|
||||||||||||||||||||||||
|
Returns a fully scaled pixmap.
Definition at line 1137 of file othemebase.cpp. References kthemeKeyData::border, cache, kthemeKey::cacheKey, kthemeKey::data, kthemeKeyData::height, kthemeKeyData::id, kthemeKeyData::mask, pix, and kthemeKeyData::width. Referenced by OThemeBase::gradient(), OThemeBase::scale(), and OThemeBase::scaleBorder(). |
|
||||||||||||
|
Returns a vertically scaled pixmap.
Definition at line 1170 of file othemebase.cpp. References kthemeKeyData::border, cache, kthemeKey::cacheKey, kthemeKey::data, kthemeKeyData::height, kthemeKeyData::id, kthemeKeyData::mask, pix, and kthemeKeyData::width. Referenced by OThemeBase::gradient(), and OThemeBase::scale(). |
|
|
Definition at line 174 of file othemebase.h. Referenced by flushTimeout(), horizontalPixmap(), insert(), OThemeCache(), pixmap(), and verticalPixmap(). |
|
|
Definition at line 178 of file othemebase.h. |
|
|
Definition at line 175 of file othemebase.h. Referenced by OThemeCache(). |
1.4.2