summaryrefslogtreecommitdiffstats
path: root/krita/ui/kis_opengl_image_context.cc
diff options
context:
space:
mode:
Diffstat (limited to 'krita/ui/kis_opengl_image_context.cc')
-rw-r--r--krita/ui/kis_opengl_image_context.cc46
1 files changed, 23 insertions, 23 deletions
diff --git a/krita/ui/kis_opengl_image_context.cc b/krita/ui/kis_opengl_image_context.cc
index f3ad4341..f60b7965 100644
--- a/krita/ui/kis_opengl_image_context.cc
+++ b/krita/ui/kis_opengl_image_context.cc
@@ -37,7 +37,7 @@
using namespace std;
-QGLWidget *KisOpenGLImageContext::SharedContextWidget = 0;
+TQGLWidget *KisOpenGLImageContext::SharedContextWidget = 0;
int KisOpenGLImageContext::SharedContextWidgetRefCount = 0;
KisOpenGLImageContext::ImageContextMap KisOpenGLImageContext::imageContextMap;
@@ -78,7 +78,7 @@ KisOpenGLImageContext::KisOpenGLImageContext(KisImageSP image, KisProfile *monit
if (SharedContextWidget == 0) {
kdDebug(41001) << "Creating shared context widget\n";
- SharedContextWidget = new QGLWidget(KisOpenGLCanvasFormat);
+ SharedContextWidget = new TQGLWidget(KisOpenGLCanvasFormat);
}
++SharedContextWidgetRefCount;
@@ -93,15 +93,15 @@ KisOpenGLImageContext::KisOpenGLImageContext(KisImageSP image, KisProfile *monit
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
- m_imageTextureTileWidth = QMIN(PREFERRED_IMAGE_TEXTURE_WIDTH, max_texture_size);
- m_imageTextureTileHeight = QMIN(PREFERRED_IMAGE_TEXTURE_HEIGHT, max_texture_size);
+ m_imageTextureTileWidth = TQMIN(PREFERRED_IMAGE_TEXTURE_WIDTH, max_texture_size);
+ m_imageTextureTileHeight = TQMIN(PREFERRED_IMAGE_TEXTURE_HEIGHT, max_texture_size);
createImageTextureTiles();
- connect(m_image, SIGNAL(sigImageUpdated(QRect)),
- SLOT(slotImageUpdated(QRect)));
- connect(m_image, SIGNAL(sigSizeChanged(Q_INT32, Q_INT32)),
- SLOT(slotImageSizeChanged(Q_INT32, Q_INT32)));
+ connect(m_image, TQT_SIGNAL(sigImageUpdated(TQRect)),
+ TQT_SLOT(slotImageUpdated(TQRect)));
+ connect(m_image, TQT_SIGNAL(sigSizeChanged(TQ_INT32, TQ_INT32)),
+ TQT_SLOT(slotImageSizeChanged(TQ_INT32, TQ_INT32)));
updateImageTextureTiles(m_image->bounds());
}
@@ -109,7 +109,7 @@ KisOpenGLImageContext::KisOpenGLImageContext(KisImageSP image, KisProfile *monit
KisOpenGLImageContextSP KisOpenGLImageContext::getImageContext(KisImageSP image, KisProfile *monitorProfile)
{
if (imageCanShareImageContext(image)) {
- ImageContextMap::iterator it = imageContextMap.find(image);
+ ImageContextMap::iterator it = imageContextMap.tqfind(image);
if (it != imageContextMap.end()) {
@@ -144,16 +144,16 @@ bool KisOpenGLImageContext::imageCanShareImageContext(KisImageSP image)
}
}
-QGLWidget *KisOpenGLImageContext::sharedContextWidget() const
+TQGLWidget *KisOpenGLImageContext::sharedContextWidget() const
{
return SharedContextWidget;
}
-void KisOpenGLImageContext::updateImageTextureTiles(const QRect& rect)
+void KisOpenGLImageContext::updateImageTextureTiles(const TQRect& rect)
{
//kdDebug() << "updateImageTextureTiles " << rect << endl;
- QRect updateRect = rect & m_image->bounds();
+ TQRect updateRect = rect & m_image->bounds();
if (!updateRect.isEmpty()) {
@@ -167,10 +167,10 @@ void KisOpenGLImageContext::updateImageTextureTiles(const QRect& rect)
for (int column = firstColumn; column <= lastColumn; column++) {
for (int row = firstRow; row <= lastRow; row++) {
- QRect tileRect(column * m_imageTextureTileWidth, row * m_imageTextureTileHeight,
+ TQRect tileRect(column * m_imageTextureTileWidth, row * m_imageTextureTileHeight,
m_imageTextureTileWidth, m_imageTextureTileHeight);
- QRect tileUpdateRect = tileRect & updateRect;
+ TQRect tileUpdateRect = tileRect & updateRect;
glBindTexture(GL_TEXTURE_2D, imageTextureTile(tileRect.x(), tileRect.y()));
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
@@ -180,7 +180,7 @@ void KisOpenGLImageContext::updateImageTextureTiles(const QRect& rect)
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- QImage tileUpdateImage = m_image->convertToQImage(tileUpdateRect.left(), tileUpdateRect.top(),
+ TQImage tileUpdateImage = m_image->convertToTQImage(tileUpdateRect.left(), tileUpdateRect.top(),
tileUpdateRect.right(), tileUpdateRect.bottom(),
m_monitorProfile, m_exposure);
@@ -254,7 +254,7 @@ void KisOpenGLImageContext::generateBackgroundTexture()
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- QImage backgroundImage = m_image->background()->patternTile();
+ TQImage backgroundImage = m_image->background()->patternTile();
// XXX: temp.
Q_ASSERT(backgroundImage.width() == BACKGROUND_TEXTURE_WIDTH);
@@ -279,9 +279,9 @@ int KisOpenGLImageContext::imageTextureTileIndex(int x, int y) const
GLuint KisOpenGLImageContext::imageTextureTile(int pixelX, int pixelY) const
{
- Q_INT32 textureTileIndex = imageTextureTileIndex(pixelX, pixelY);
+ TQ_INT32 textureTileIndex = imageTextureTileIndex(pixelX, pixelY);
- textureTileIndex = CLAMP(textureTileIndex, 0, ((Q_INT32)m_imageTextureTiles.count()) - 1);
+ textureTileIndex = CLAMP(textureTileIndex, 0, ((TQ_INT32)m_imageTextureTiles.count()) - 1);
return m_imageTextureTiles[textureTileIndex];
}
@@ -312,7 +312,7 @@ void KisOpenGLImageContext::createImageTextureTiles()
//XXX: will be float/half with shaders
#define RGBA_BYTES_PER_PIXEL 4
- QByteArray emptyTilePixelData(m_imageTextureTileWidth * m_imageTextureTileHeight * RGBA_BYTES_PER_PIXEL);
+ TQByteArray emptyTilePixelData(m_imageTextureTileWidth * m_imageTextureTileHeight * RGBA_BYTES_PER_PIXEL);
emptyTilePixelData.fill(0);
for (int tileIndex = 0; tileIndex < numImageTextureTiles; ++tileIndex) {
@@ -339,7 +339,7 @@ void KisOpenGLImageContext::destroyImageTextureTiles()
}
}
-void KisOpenGLImageContext::update(const QRect& imageRect)
+void KisOpenGLImageContext::update(const TQRect& imageRect)
{
updateImageTextureTiles(imageRect);
}
@@ -349,15 +349,15 @@ void KisOpenGLImageContext::setSelectionDisplayEnabled(bool enable)
m_displaySelection = enable;
}
-void KisOpenGLImageContext::slotImageUpdated(QRect rc)
+void KisOpenGLImageContext::slotImageUpdated(TQRect rc)
{
- QRect r = rc & m_image->bounds();
+ TQRect r = rc & m_image->bounds();
updateImageTextureTiles(r);
emit sigImageUpdated(r);
}
-void KisOpenGLImageContext::slotImageSizeChanged(Q_INT32 w, Q_INT32 h)
+void KisOpenGLImageContext::slotImageSizeChanged(TQ_INT32 w, TQ_INT32 h)
{
createImageTextureTiles();
updateImageTextureTiles(m_image->bounds());