equal
deleted
inserted
replaced
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 * Version : %version: 3 % |
16 * Version : %version: 5 % |
17 */ |
17 */ |
18 #ifndef HGDATAPROVIDERMODEL_H_ |
18 #ifndef HGDATAPROVIDERMODEL_H_ |
19 #define HGDATAPROVIDERMODEL_H_ |
19 #define HGDATAPROVIDERMODEL_H_ |
20 |
20 |
21 #include <QObject> |
21 #include <QObject> |
117 QList<QMap<int, QVariant>*>* mCache; |
117 QList<QMap<int, QVariant>*>* mCache; |
118 int mCacheSize; //Number of cached Icons. Not same as mCache->count() |
118 int mCacheSize; //Number of cached Icons. Not same as mCache->count() |
119 QList< QPixmap* > mFreePixmaps; |
119 QList< QPixmap* > mFreePixmaps; |
120 QMap< int, QPixmap* > mUsedPixmaps; |
120 QMap< int, QPixmap* > mUsedPixmaps; |
121 int mUnallocatedPixmaps; |
121 int mUnallocatedPixmaps; |
122 QMutex mQPixmapsLock; |
122 // QMutex mQPixmapsLock; |
123 HgDataProviderModelObserver *mObserver; |
123 HgDataProviderModelObserver *mObserver; |
124 }; |
124 }; |
125 |
125 |
126 inline bool HgDataProviderModel::isIndexValid(int idx) const |
126 inline bool HgDataProviderModel::isIndexValid(int idx) const |
127 { |
127 { |
128 return ((0 <= idx) && |
128 return ((idx >= 0) && |
129 (idx < mCache->size()) && |
129 (idx < mCache->size()) && |
130 (mCache->at(idx))); |
130 (mCache->at(idx))); |
131 } |
131 } |
132 |
132 |
133 inline bool HgDataProviderModel::containsRole(int idx, int role) const |
133 inline bool HgDataProviderModel::containsRole(int idx, int role) const |