summaryrefslogtreecommitdiffstats
path: root/kbabel/addons/preview
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/addons/preview')
-rw-r--r--kbabel/addons/preview/pothumbcreator.cpp42
-rw-r--r--kbabel/addons/preview/pothumbcreator.h2
2 files changed, 22 insertions, 22 deletions
diff --git a/kbabel/addons/preview/pothumbcreator.cpp b/kbabel/addons/preview/pothumbcreator.cpp
index f067948a..0883025c 100644
--- a/kbabel/addons/preview/pothumbcreator.cpp
+++ b/kbabel/addons/preview/pothumbcreator.cpp
@@ -33,9 +33,9 @@
*/
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -67,35 +67,35 @@ PoThumbCreator::~PoThumbCreator()
delete m_splitter;
}
-bool PoThumbCreator::create(const QString &path, int width, int height, QImage &img)
+bool PoThumbCreator::create(const TQString &path, int width, int height, TQImage &img)
{
if ( !m_splitter )
{
m_splitter = new KPixmapSplitter;
- QString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" );
+ TQString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" );
if ( !pixmap.isEmpty() )
{
- m_splitter->setPixmap( QPixmap( pixmap ));
- m_splitter->setItemSize( QSize( 4, 7 ));
+ m_splitter->setPixmap( TQPixmap( pixmap ));
+ m_splitter->setItemSize( TQSize( 4, 7 ));
}
}
bool ok = false;
PoInfo poInfo;
- QStringList wordList;
+ TQStringList wordList;
// We do not call msgfmt, as a thumbnail must be created fast.
if( PoInfo::info( path, poInfo, wordList, false, true, false ) == OK )
{
ok = true;
- QPixmap pix;
+ TQPixmap pix;
if (height * 3 > width * 4)
pix.resize(width, width * 4 / 3);
else
pix.resize(height * 3 / 4, height);
- pix.fill( QColor( 245, 245, 245 ) ); // light-grey background
+ pix.fill( TQColor( 245, 245, 245 ) ); // light-grey background
@@ -114,7 +114,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
xBorder = (pix.width()-d)/2;
yBorder = (pix.height()*2/3-d)/2;
- QPainter p(&pix);
+ TQPainter p(&pix);
if(fuzzyAngle>0)
{
@@ -163,9 +163,9 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
- QRect rect;
+ TQRect rect;
- QSize chSize = m_splitter->itemSize(); // the size of one char
+ TQSize chSize = m_splitter->itemSize(); // the size of one char
int xOffset = chSize.width();
int yOffset = chSize.height();
@@ -186,7 +186,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
// end centering
- QString text;
+ TQString text;
if(numCharsPerLine < 30)
{
@@ -250,9 +250,9 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
text = locale->formatNumber(p,0)+'%';
*/
// find the maximum string length to center the text
- QStringList lineList=QStringList::split('\n',text);
+ TQStringList lineList=TQStringList::split('\n',text);
uint max=0;
- for( QStringList::Iterator it = lineList.begin(); it != lineList.end()
+ for( TQStringList::Iterator it = lineList.begin(); it != lineList.end()
; ++it )
{
if((*it).length() > max)
@@ -269,7 +269,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
int posLastLine = pix.height() - (chSize.height() + yBorder);
bool newLine = false;
Q_ASSERT( posNewLine > 0 );
- const QPixmap *fontPixmap = &(m_splitter->pixmap());
+ const TQPixmap *fontPixmap = &(m_splitter->pixmap());
for ( uint i = 0; i < text.length(); i++ )
@@ -295,7 +295,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
}
// check for newlines in the text (unix,dos)
- QChar ch = text.at( i );
+ TQChar ch = text.at( i );
if ( ch == '\n' )
{
newLine = true;
@@ -311,7 +311,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
rect = m_splitter->coordinates( ch );
if ( !rect.isEmpty() )
{
- bitBlt( &pix, QPoint(x,y), fontPixmap, rect, Qt::CopyROP );
+ bitBlt( &pix, TQPoint(x,y), fontPixmap, rect, Qt::CopyROP );
}
x += xOffset; // next character
@@ -321,7 +321,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
// in this seldom cases they are usually hidden ;-)
if(pix.width() > 40 && KApplication::random()%2000 == 0)
{
- QPixmap kbabelPix;
+ TQPixmap kbabelPix;
if(pix.width() < 80)
{
kbabelPix = KGlobal::iconLoader()->loadIcon("kbabel"
@@ -342,7 +342,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
x = QMAX(x,0);
if(!kbabelPix.isNull())
{
- bitBlt(&pix, QPoint(x,4), &kbabelPix, kbabelPix.rect()
+ bitBlt(&pix, TQPoint(x,4), &kbabelPix, kbabelPix.rect()
, Qt::CopyROP);
}
}
diff --git a/kbabel/addons/preview/pothumbcreator.h b/kbabel/addons/preview/pothumbcreator.h
index 401e9431..25a1f7ab 100644
--- a/kbabel/addons/preview/pothumbcreator.h
+++ b/kbabel/addons/preview/pothumbcreator.h
@@ -44,7 +44,7 @@ class PoThumbCreator : public ThumbCreator
public:
PoThumbCreator();
virtual ~PoThumbCreator();
- virtual bool create(const QString &path, int width, int height, QImage &img);
+ virtual bool create(const TQString &path, int width, int height, TQImage &img);
virtual Flags flags() const;
private: