diff options
Diffstat (limited to 'krita/core/tiles/kis_tileddatamanager.h')
-rw-r--r-- | krita/core/tiles/kis_tileddatamanager.h | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/krita/core/tiles/kis_tileddatamanager.h b/krita/core/tiles/kis_tileddatamanager.h index d4976080..20d78085 100644 --- a/krita/core/tiles/kis_tileddatamanager.h +++ b/krita/core/tiles/kis_tileddatamanager.h @@ -18,8 +18,8 @@ #ifndef KIS_TILEDDATAMANAGER_H_ #define KIS_TILEDDATAMANAGER_H_ -#include <qglobal.h> -#include <qvaluevector.h> +#include <tqglobal.h> +#include <tqvaluevector.h> #include <ksharedptr.h> @@ -39,11 +39,11 @@ class KoStore; class KisTileDataWrapper : public KShared { KisTile* m_tile; - Q_INT32 m_offset; + TQ_INT32 m_offset; public: - KisTileDataWrapper(KisTile* tile, Q_INT32 offset); + KisTileDataWrapper(KisTile* tile, TQ_INT32 offset); virtual ~KisTileDataWrapper(); - Q_UINT8* data() const { return m_tile->data() + m_offset; } + TQ_UINT8* data() const { return m_tile->data() + m_offset; } }; typedef KSharedPtr<KisTileDataWrapper> KisTileDataWrapperSP; @@ -61,13 +61,13 @@ typedef KSharedPtr<KisTileDataWrapper> KisTileDataWrapperSP; * that may allow deferred loading. * * A datamanager knows nothing about the type of pixel data except - * how many Q_UINT8's a single pixel takes. + * how many TQ_UINT8's a single pixel takes. */ class KisTiledDataManager : public KShared { protected: - KisTiledDataManager(Q_UINT32 pixelSize, const Q_UINT8 *defPixel); + KisTiledDataManager(TQ_UINT32 pixelSize, const TQ_UINT8 *defPixel); ~KisTiledDataManager(); KisTiledDataManager(const KisTiledDataManager &dm); KisTiledDataManager & operator=(const KisTiledDataManager &dm); @@ -81,8 +81,8 @@ protected: protected: - void setDefaultPixel(const Q_UINT8 *defPixel); - const Q_UINT8 * defaultPixel() const { return m_defPixel;}; + void setDefaultPixel(const TQ_UINT8 *defPixel); + const TQ_UINT8 * defaultPixel() const { return m_defPixel;}; KisMementoSP getMemento(); void rollback(KisMementoSP memento); @@ -101,24 +101,24 @@ protected: protected: - Q_UINT32 pixelSize(); + TQ_UINT32 pixelSize(); - void extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const; - QRect extent() const; + void extent(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const; + TQRect extent() const; - void setExtent(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); + void setExtent(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); protected: - void clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, Q_UINT8 clearValue); - void clear(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, const Q_UINT8 *clearPixel); + void clear(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, TQ_UINT8 clearValue); + void clear(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, const TQ_UINT8 *clearPixel); void clear(); protected: - void paste(KisDataManagerSP data, Q_INT32 sx, Q_INT32 sy, Q_INT32 dx, Q_INT32 dy, - Q_INT32 w, Q_INT32 h); + void paste(KisDataManagerSP data, TQ_INT32 sx, TQ_INT32 sy, TQ_INT32 dx, TQ_INT32 dy, + TQ_INT32 w, TQ_INT32 h); protected: @@ -127,87 +127,87 @@ protected: /** * Get a read-only pointer to pixel (x, y). */ - const Q_UINT8* pixel(Q_INT32 x, Q_INT32 y); + const TQ_UINT8* pixel(TQ_INT32 x, TQ_INT32 y); /** * Get a read-write pointer to pixel (x, y). */ - Q_UINT8* writablePixel(Q_INT32 x, Q_INT32 y); + TQ_UINT8* writablePixel(TQ_INT32 x, TQ_INT32 y); /** * write the specified data to x, y. There is no checking on pixelSize! */ - void setPixel(Q_INT32 x, Q_INT32 y, const Q_UINT8 * data); + void setPixel(TQ_INT32 x, TQ_INT32 y, const TQ_UINT8 * data); /** * Copy the bytes in the specified rect to a vector. The caller is responsible * for managing the vector. */ - void readBytes(Q_UINT8 * bytes, - Q_INT32 x, Q_INT32 y, - Q_INT32 w, Q_INT32 h); + void readBytes(TQ_UINT8 * bytes, + TQ_INT32 x, TQ_INT32 y, + TQ_INT32 w, TQ_INT32 h); /** * Copy the bytes in the vector to the specified rect. If there are bytes left * in the vector after filling the rect, they will be ignored. If there are * not enough bytes, the rest of the rect will be filled with the default value * given (by default, 0); */ - void writeBytes(const Q_UINT8 * bytes, - Q_INT32 x, Q_INT32 y, - Q_INT32 w, Q_INT32 h); + void writeBytes(const TQ_UINT8 * bytes, + TQ_INT32 x, TQ_INT32 y, + TQ_INT32 w, TQ_INT32 h); /// Get the number of contiguous columns starting at x, valid for all values /// of y between minY and maxY. - Q_INT32 numContiguousColumns(Q_INT32 x, Q_INT32 minY, Q_INT32 maxY); + TQ_INT32 numContiguousColumns(TQ_INT32 x, TQ_INT32 minY, TQ_INT32 maxY); /// Get the number of contiguous rows starting at y, valid for all values /// of x between minX and maxX. - Q_INT32 numContiguousRows(Q_INT32 y, Q_INT32 minX, Q_INT32 maxX); + TQ_INT32 numContiguousRows(TQ_INT32 y, TQ_INT32 minX, TQ_INT32 maxX); /// Get the row stride at pixel (x, y). This is the number of bytes to add to a /// pointer to pixel (x, y) to access (x, y + 1). - Q_INT32 rowStride(Q_INT32 x, Q_INT32 y); + TQ_INT32 rowStride(TQ_INT32 x, TQ_INT32 y); // For debugging use - Q_INT32 numTiles() const; + TQ_INT32 numTiles() const; private: - Q_UINT32 m_pixelSize; - Q_UINT32 m_numTiles; + TQ_UINT32 m_pixelSize; + TQ_UINT32 m_numTiles; KisTile *m_defaultTile; KisTile **m_hashTable; KisMementoSP m_currentMemento; - Q_INT32 m_extentMinX; - Q_INT32 m_extentMinY; - Q_INT32 m_extentMaxX; - Q_INT32 m_extentMaxY; - Q_UINT8 *m_defPixel; + TQ_INT32 m_extentMinX; + TQ_INT32 m_extentMinY; + TQ_INT32 m_extentMaxX; + TQ_INT32 m_extentMaxY; + TQ_UINT8 *m_defPixel; private: - void ensureTileMementoed(Q_INT32 col, Q_INT32 row, Q_UINT32 tileHash, const KisTile *refTile); - KisTile *getOldTile(Q_INT32 col, Q_INT32 row, KisTile *def); - KisTile *getTile(Q_INT32 col, Q_INT32 row, bool writeAccess); - Q_UINT32 calcTileHash(Q_INT32 col, Q_INT32 row); - void updateExtent(Q_INT32 col, Q_INT32 row); + void ensureTileMementoed(TQ_INT32 col, TQ_INT32 row, TQ_UINT32 tileHash, const KisTile *refTile); + KisTile *getOldTile(TQ_INT32 col, TQ_INT32 row, KisTile *def); + KisTile *getTile(TQ_INT32 col, TQ_INT32 row, bool writeAccess); + TQ_UINT32 calcTileHash(TQ_INT32 col, TQ_INT32 row); + void updateExtent(TQ_INT32 col, TQ_INT32 row); void recalculateExtent(); void deleteTiles(const KisMemento::DeletedTile *deletedTileList); - Q_INT32 xToCol(Q_INT32 x) const; - Q_INT32 yToRow(Q_INT32 y) const; - void getContiguousColumnsAndRows(Q_INT32 x, Q_INT32 y, Q_INT32 *columns, Q_INT32 *rows); - Q_UINT8* pixelPtr(Q_INT32 x, Q_INT32 y, bool writable); - KisTileDataWrapperSP pixelPtrSafe(Q_INT32 x, Q_INT32 y, bool writable); + TQ_INT32 xToCol(TQ_INT32 x) const; + TQ_INT32 yToRow(TQ_INT32 y) const; + void getContiguousColumnsAndRows(TQ_INT32 x, TQ_INT32 y, TQ_INT32 *columns, TQ_INT32 *rows); + TQ_UINT8* pixelPtr(TQ_INT32 x, TQ_INT32 y, bool writable); + KisTileDataWrapperSP pixelPtrSafe(TQ_INT32 x, TQ_INT32 y, bool writable); }; -inline Q_UINT32 KisTiledDataManager::pixelSize() +inline TQ_UINT32 KisTiledDataManager::pixelSize() { return m_pixelSize; } -inline Q_INT32 KisTiledDataManager::xToCol(Q_INT32 x) const +inline TQ_INT32 KisTiledDataManager::xToCol(TQ_INT32 x) const { if (x >= 0) { return x / KisTile::WIDTH; @@ -216,7 +216,7 @@ inline Q_INT32 KisTiledDataManager::xToCol(Q_INT32 x) const } } -inline Q_INT32 KisTiledDataManager::yToRow(Q_INT32 y) const +inline TQ_INT32 KisTiledDataManager::yToRow(TQ_INT32 y) const { if (y >= 0) { return y / KisTile::HEIGHT; |