summaryrefslogtreecommitdiffstats
path: root/kexi/kexiutils/utils.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
commit94844816550ad672ccfcdc25659c625546239998 (patch)
treee35fc60fd736c645d59f6408af032774ad8023d3 /kexi/kexiutils/utils.cpp
parent2a811c38c74c03648ecf857e566c44483cbad706 (diff)
downloadkoffice-94844816550ad672ccfcdc25659c625546239998.tar.gz
koffice-94844816550ad672ccfcdc25659c625546239998.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kexi/kexiutils/utils.cpp')
-rw-r--r--kexi/kexiutils/utils.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kexi/kexiutils/utils.cpp b/kexi/kexiutils/utils.cpp
index 7a1ab0f7..dca4998b 100644
--- a/kexi/kexiutils/utils.cpp
+++ b/kexi/kexiutils/utils.cpp
@@ -226,7 +226,7 @@ TQMap<TQString,TQString> KexiUtils::deserializeMap(const TQString& string)
TQCString cstr(string.latin1());
TQByteArray array( size );
for (uint i=0; i<size; i++) {
- array[i] = char(string[i].tqunicode()-1);
+ array[i] = char(string[i].unicode()-1);
}
TQMap<TQString,TQString> map;
TQDataStream ds(array, IO_ReadOnly);
@@ -244,17 +244,17 @@ TQString KexiUtils::stringToFileName(const TQString& string)
void KexiUtils::simpleCrypt(TQString& string)
{
for (uint i=0; i<string.length(); i++)
- string[i] = TQChar( string[i].tqunicode() + 47 + i );
+ string[i] = TQChar( string[i].unicode() + 47 + i );
}
void KexiUtils::simpleDecrypt(TQString& string)
{
for (uint i=0; i<string.length(); i++)
- string[i] = TQChar( string[i].tqunicode() - 47 - i );
+ string[i] = TQChar( string[i].unicode() - 47 - i );
}
void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect,
- const TQPixmap& pixmap, int tqalignment, bool scaledContents, bool keepAspectRatio)
+ const TQPixmap& pixmap, int alignment, bool scaledContents, bool keepAspectRatio)
{
if (pixmap.isNull())
return;
@@ -285,21 +285,21 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect,
img = img.smoothScale(w, h, TQ_ScaleMin);
pos = rect.topLeft(); //0, 0);
if (img.width() < w) {
- int hAlign = TQApplication::horizontalAlignment( tqalignment );
+ int hAlign = TQApplication::horizontalAlignment( alignment );
if ( hAlign & TQt::AlignRight )
pos.setX(pos.x() + w-img.width());
else if ( hAlign & TQt::AlignHCenter )
pos.setX(pos.x() + w/2-img.width()/2);
}
else if (img.height() < h) {
- if ( tqalignment & TQt::AlignBottom )
+ if ( alignment & TQt::AlignBottom )
pos.setY(pos.y() + h-img.height());
- else if ( tqalignment & TQt::AlignVCenter )
+ else if ( alignment & TQt::AlignVCenter )
pos.setY(pos.y() + h/2-img.height()/2);
}
pixmapBuffer.convertFromImage(img);
if (!fast) {
- p2.tqbegin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.tqdevice());
+ p2.begin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.device());
}
else
target->drawPixmap(pos, pixmapBuffer);
@@ -307,7 +307,7 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect,
else {
if (!fast) {
pixmapBuffer.resize(rect.size()-TQSize(lineWidth, lineWidth));
- p2.tqbegin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.tqdevice());
+ p2.begin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.device());
p2.drawPixmap(TQRect(rect.x(), rect.y(), w, h), pixmap);
}
else
@@ -315,7 +315,7 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect,
}
}
else {
- int hAlign = TQApplication::horizontalAlignment( tqalignment );
+ int hAlign = TQApplication::horizontalAlignment( alignment );
if ( hAlign & TQt::AlignRight )
pos.setX(pos.x() + w-pixmap.width());
else if ( hAlign & TQt::AlignHCenter )
@@ -323,9 +323,9 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect,
else //left, etc.
pos.setX(pos.x());
- if ( tqalignment & TQt::AlignBottom )
+ if ( alignment & TQt::AlignBottom )
pos.setY(pos.y() + h-pixmap.height());
- else if ( tqalignment & TQt::AlignVCenter )
+ else if ( alignment & TQt::AlignVCenter )
pos.setY(pos.y() + h/2-pixmap.height()/2);
else //top, etc.
pos.setY(pos.y());
@@ -339,8 +339,8 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect,
bitBlt( p.device(),
// pos.x(),
// pos.y(),
- (int)p.tqworldMatrix().dx() + rect.x() + lineWidth + pos.x(),
- (int)p.tqworldMatrix().dy() + rect.y() + lineWidth + pos.y(),
+ (int)p.worldMatrix().dx() + rect.x() + lineWidth + pos.x(),
+ (int)p.worldMatrix().dy() + rect.y() + lineWidth + pos.y(),
&pixmapBuffer);
}
}