00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KIS_DATAMANAGER_H_
00019 #define KIS_DATAMANAGER_H_
00020
00021 #include <qglobal.h>
00022 #include <qvaluevector.h>
00023 #include <qrect.h>
00024
00025 class KoStore;
00026
00027
00028
00029 #include "tiles/kis_tileddatamanager.h"
00030 #define ACTUAL_DATAMGR KisTiledDataManager
00031
00045 class KisDataManager : public ACTUAL_DATAMGR {
00046
00047 public:
00048 KisDataManager(Q_UINT32 pixelSize, const Q_UINT8 *defPixel) : ACTUAL_DATAMGR(pixelSize, defPixel) {}
00049 KisDataManager(const KisDataManager& dm) : ACTUAL_DATAMGR(dm) { }
00050
00051 public:
00056 inline void setDefaultPixel(const Q_UINT8 *defPixel) { return ACTUAL_DATAMGR::setDefaultPixel(defPixel); }
00057
00061 inline const Q_UINT8 *defaultPixel() const { return ACTUAL_DATAMGR::defaultPixel(); }
00062
00069 inline KisMementoSP getMemento() { return ACTUAL_DATAMGR::getMemento(); }
00070
00077 inline void rollback(KisMementoSP memento) { ACTUAL_DATAMGR::rollback(memento); }
00078
00086 inline void rollforward(KisMementoSP memento) { ACTUAL_DATAMGR::rollforward(memento); }
00087
00088 public:
00093 inline bool write(KoStore *store) { return ACTUAL_DATAMGR::write(store); }
00094 inline bool read(KoStore *store) { return ACTUAL_DATAMGR::read(store); }
00095
00096 public:
00097
00101 inline Q_UINT32 pixelSize() { return ACTUAL_DATAMGR::pixelSize(); }
00102
00106 inline void extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const
00107 { return ACTUAL_DATAMGR::extent(x, y, w, h); }
00108
00109 QRect extent() const { return ACTUAL_DATAMGR::extent(); }
00110
00111
00112 public:
00113
00117 inline void setExtent(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h)
00118 { return ACTUAL_DATAMGR::setExtent(x, y, w, h); }
00119
00120 inline void setExtent(const QRect & rect) { setExtent(rect.x(), rect.y(), rect.width(), rect.height()); }
00121
00122 public:
00123
00127 inline void clear(Q_INT32 x, Q_INT32 y,
00128 Q_INT32 w, Q_INT32 h,
00129 Q_UINT8 def) { ACTUAL_DATAMGR::clear(x, y, w, h, def); }
00130
00134 inline void clear(Q_INT32 x, Q_INT32 y,
00135 Q_INT32 w, Q_INT32 h,
00136 const Q_UINT8 * def) { ACTUAL_DATAMGR::clear(x, y, w, h, def); }
00137
00141 inline void clear() { ACTUAL_DATAMGR::clear(); }
00142
00143
00144 public:
00145
00150 inline void paste(KisDataManagerSP data, Q_INT32 sx, Q_INT32 sy, Q_INT32 dx, Q_INT32 dy,
00151 Q_INT32 w, Q_INT32 h) { ACTUAL_DATAMGR::paste(data, sx, sy, dx, dy, w, h); }
00152
00153 public:
00157 inline KDE_DEPRECATED const Q_UINT8* pixel(Q_INT32 x, Q_INT32 y)
00158 { return ACTUAL_DATAMGR::pixel(x, y); }
00159
00163 inline KDE_DEPRECATED Q_UINT8* writablePixel(Q_INT32 x, Q_INT32 y)
00164 { return ACTUAL_DATAMGR::writablePixel(x, y); }
00165
00169 inline void setPixel(Q_INT32 x, Q_INT32 y, const Q_UINT8 * data)
00170 { ACTUAL_DATAMGR::setPixel(x, y, data);}
00171
00172
00178 inline void readBytes(Q_UINT8 * data,
00179 Q_INT32 x, Q_INT32 y,
00180 Q_INT32 w, Q_INT32 h)
00181 { ACTUAL_DATAMGR::readBytes(data, x, y, w, h);}
00182
00187 inline void writeBytes(const Q_UINT8 * data,
00188 Q_INT32 x, Q_INT32 y,
00189 Q_INT32 w, Q_INT32 h)
00190 {ACTUAL_DATAMGR::writeBytes( data, x, y, w, h); }
00191
00192
00193
00194 inline Q_INT32 numContiguousColumns(Q_INT32 x, Q_INT32 minY, Q_INT32 maxY)
00195 { return ACTUAL_DATAMGR::numContiguousColumns(x, minY, maxY); }
00196
00197
00198
00199
00200 inline Q_INT32 numContiguousRows(Q_INT32 y, Q_INT32 minX, Q_INT32 maxX)
00201 { return ACTUAL_DATAMGR::numContiguousRows(y, minX, maxX); }
00202
00203
00204
00205
00206 inline Q_INT32 rowStride(Q_INT32 x, Q_INT32 y)
00207 { return ACTUAL_DATAMGR::rowStride(x, y); }
00208
00209 protected:
00210 friend class KisRectIterator;
00211 friend class KisHLineIterator;
00212 friend class KisVLineIterator;
00213 };
00214
00215
00216 #endif // KIS_DATAMANAGER_H_
00217