summaryrefslogtreecommitdiffstats
path: root/kioslave/thumbnail
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kioslave/thumbnail
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslave/thumbnail')
-rw-r--r--kioslave/thumbnail/cursorcreator.cpp12
-rw-r--r--kioslave/thumbnail/cursorcreator.h2
-rw-r--r--kioslave/thumbnail/djvucreator.cpp12
-rw-r--r--kioslave/thumbnail/djvucreator.h2
-rw-r--r--kioslave/thumbnail/exrcreator.cpp10
-rw-r--r--kioslave/thumbnail/exrcreator.h2
-rw-r--r--kioslave/thumbnail/htmlcreator.cpp22
-rw-r--r--kioslave/thumbnail/htmlcreator.h6
-rw-r--r--kioslave/thumbnail/imagecreator.cpp4
-rw-r--r--kioslave/thumbnail/imagecreator.h2
-rw-r--r--kioslave/thumbnail/textcreator.cpp32
-rw-r--r--kioslave/thumbnail/textcreator.h6
-rw-r--r--kioslave/thumbnail/thumbnail.cpp70
-rw-r--r--kioslave/thumbnail/thumbnail.h12
14 files changed, 97 insertions, 97 deletions
diff --git a/kioslave/thumbnail/cursorcreator.cpp b/kioslave/thumbnail/cursorcreator.cpp
index 0b1470bd6..d77629acf 100644
--- a/kioslave/thumbnail/cursorcreator.cpp
+++ b/kioslave/thumbnail/cursorcreator.cpp
@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qimage.h>
-#include <qfile.h>
+#include <tqimage.h>
+#include <tqfile.h>
#include <kdemacros.h>
@@ -35,16 +35,16 @@ extern "C"
}
}
-bool CursorCreator::create( const QString &path, int width, int height, QImage &img )
+bool CursorCreator::create( const TQString &path, int width, int height, TQImage &img )
{
XcursorImage *cursor = XcursorFilenameLoadImage(
- QFile::encodeName( path ).data(),
+ TQFile::encodeName( path ).data(),
width > height ? height : width );
if ( cursor ) {
- img = QImage( reinterpret_cast<uchar *>( cursor->pixels ),
+ img = TQImage( reinterpret_cast<uchar *>( cursor->pixels ),
cursor->width, cursor->height, 32,
- NULL, 0, QImage::BigEndian );
+ NULL, 0, TQImage::BigEndian );
img.setAlphaBuffer( true );
// Convert the image to non-premultiplied alpha
diff --git a/kioslave/thumbnail/cursorcreator.h b/kioslave/thumbnail/cursorcreator.h
index 7ef8ac2fd..9fd7c7fa4 100644
--- a/kioslave/thumbnail/cursorcreator.h
+++ b/kioslave/thumbnail/cursorcreator.h
@@ -26,7 +26,7 @@ class CursorCreator : public ThumbCreator
{
public:
CursorCreator() {}
- bool create( const QString &path, int, int, QImage &img );
+ bool create( const TQString &path, int, int, TQImage &img );
};
#endif
diff --git a/kioslave/thumbnail/djvucreator.cpp b/kioslave/thumbnail/djvucreator.cpp
index 653fc4163..20a32fb26 100644
--- a/kioslave/thumbnail/djvucreator.cpp
+++ b/kioslave/thumbnail/djvucreator.cpp
@@ -36,8 +36,8 @@
#include <fcntl.h>
#include <errno.h>
-#include <qfile.h>
-#include <qimage.h>
+#include <tqfile.h>
+#include <tqimage.h>
#include <kdemacros.h>
@@ -53,19 +53,19 @@ extern "C"
}
}
-bool DjVuCreator::create(const QString &path, int width, int height, QImage &img)
+bool DjVuCreator::create(const TQString &path, int width, int height, TQImage &img)
{
int output[2];
- QByteArray data(1024);
+ TQByteArray data(1024);
bool ok = false;
if (pipe(output) == -1)
return false;
const char* argv[8];
- QCString sizearg, fnamearg;
+ TQCString sizearg, fnamearg;
sizearg.sprintf("%dx%d", width, height);
- fnamearg = QFile::encodeName( path );
+ fnamearg = TQFile::encodeName( path );
argv[0] = "ddjvu";
argv[1] = "-page";
argv[2] = "1";
diff --git a/kioslave/thumbnail/djvucreator.h b/kioslave/thumbnail/djvucreator.h
index f6724c163..f5df3650b 100644
--- a/kioslave/thumbnail/djvucreator.h
+++ b/kioslave/thumbnail/djvucreator.h
@@ -27,7 +27,7 @@ class DjVuCreator : public ThumbCreator
{
public:
DjVuCreator() {}
- virtual bool create(const QString &path, int, int, QImage &img);
+ virtual bool create(const TQString &path, int, int, TQImage &img);
virtual Flags flags() const;
};
diff --git a/kioslave/thumbnail/exrcreator.cpp b/kioslave/thumbnail/exrcreator.cpp
index ac2bc3a71..633ad5095 100644
--- a/kioslave/thumbnail/exrcreator.cpp
+++ b/kioslave/thumbnail/exrcreator.cpp
@@ -17,13 +17,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qimage.h>
+#include <tqimage.h>
#include <kimageio.h>
#include <kdebug.h>
#include <kconfig.h>
#include <kglobal.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <ImfInputFile.h>
#include <ImfPreviewImage.h>
@@ -38,7 +38,7 @@ extern "C"
}
}
-bool EXRCreator::create(const QString &path, int, int, QImage &img)
+bool EXRCreator::create(const TQString &path, int, int, TQImage &img)
{
Imf::InputFile in ( path.ascii() );
const Imf::Header &h = in.header();
@@ -46,7 +46,7 @@ bool EXRCreator::create(const QString &path, int, int, QImage &img)
if ( h.hasPreviewImage() ) {
kdDebug() << "EXRcreator - using preview" << endl;
const Imf::PreviewImage &preview = in.header().previewImage();
- QImage qpreview(preview.width(), preview.height(), 32, 0, QImage::BigEndian);
+ TQImage qpreview(preview.width(), preview.height(), 32, 0, TQImage::BigEndian);
for ( unsigned int y=0; y < preview.height(); y++ ) {
for ( unsigned int x=0; x < preview.width(); x++ ) {
const Imf::PreviewRgba &q = preview.pixels()[x+(y*preview.width())];
@@ -65,7 +65,7 @@ bool EXRCreator::create(const QString &path, int, int, QImage &img)
KConfig * config = KGlobal::config();
KConfigGroupSaver cgs( config, "PreviewSettings" );
unsigned long long maxSize = config->readNumEntry( "MaximumSize", 1024*1024 /* 1MB */ );
- unsigned long long fileSize = QFile( path ).size();
+ unsigned long long fileSize = TQFile( path ).size();
if ( (fileSize > 0) && (fileSize < maxSize) ) {
if (!img.load( path )) {
return false;
diff --git a/kioslave/thumbnail/exrcreator.h b/kioslave/thumbnail/exrcreator.h
index 498bcfb1b..75e11d455 100644
--- a/kioslave/thumbnail/exrcreator.h
+++ b/kioslave/thumbnail/exrcreator.h
@@ -26,7 +26,7 @@ class EXRCreator : public ThumbCreator
{
public:
EXRCreator() {};
- virtual bool create(const QString &path, int, int, QImage &img);
+ virtual bool create(const TQString &path, int, int, TQImage &img);
virtual Flags flags() const;
};
diff --git a/kioslave/thumbnail/htmlcreator.cpp b/kioslave/thumbnail/htmlcreator.cpp
index 0431bcf6e..c9ddf0204 100644
--- a/kioslave/thumbnail/htmlcreator.cpp
+++ b/kioslave/thumbnail/htmlcreator.cpp
@@ -19,9 +19,9 @@
*/
#include <time.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include <kapplication.h>
#include <khtml_part.h>
@@ -45,12 +45,12 @@ HTMLCreator::~HTMLCreator()
delete m_html;
}
-bool HTMLCreator::create(const QString &path, int width, int height, QImage &img)
+bool HTMLCreator::create(const TQString &path, int width, int height, TQImage &img)
{
if (!m_html)
{
m_html = new KHTMLPart;
- connect(m_html, SIGNAL(completed()), SLOT(slotCompleted()));
+ connect(m_html, TQT_SIGNAL(completed()), TQT_SLOT(slotCompleted()));
m_html->setJScriptEnabled(false);
m_html->setJavaEnabled(false);
m_html->setPluginsEnabled(false);
@@ -68,8 +68,8 @@ bool HTMLCreator::create(const QString &path, int width, int height, QImage &img
killTimer(t);
// render the HTML page on a bigger pixmap and use smoothScale,
- // looks better than directly scaling with the QPainter (malte)
- QPixmap pix;
+ // looks better than directly scaling with the TQPainter (malte)
+ TQPixmap pix;
if (width > 400 || height > 600)
{
if (height * 3 > width * 4)
@@ -81,13 +81,13 @@ bool HTMLCreator::create(const QString &path, int width, int height, QImage &img
pix.resize(400, 600);
// light-grey background, in case loadind the page failed
- pix.fill( QColor( 245, 245, 245 ) );
+ pix.fill( TQColor( 245, 245, 245 ) );
int borderX = pix.width() / width, borderY = pix.height() / height;
- QRect rc(borderX, borderY, pix.width() - borderX * 2,
+ TQRect rc(borderX, borderY, pix.width() - borderX * 2,
pix.height() - borderY * 2);
- QPainter p;
+ TQPainter p;
p.begin(&pix);
m_html->paint(&p, rc);
p.end();
@@ -99,7 +99,7 @@ bool HTMLCreator::create(const QString &path, int width, int height, QImage &img
return true;
}
-void HTMLCreator::timerEvent(QTimerEvent *)
+void HTMLCreator::timerEvent(TQTimerEvent *)
{
qApp->exit_loop();
}
diff --git a/kioslave/thumbnail/htmlcreator.h b/kioslave/thumbnail/htmlcreator.h
index 6cb58b18f..f131ed1ad 100644
--- a/kioslave/thumbnail/htmlcreator.h
+++ b/kioslave/thumbnail/htmlcreator.h
@@ -25,17 +25,17 @@
class KHTMLPart;
-class HTMLCreator : public QObject, public ThumbCreator
+class HTMLCreator : public TQObject, public ThumbCreator
{
Q_OBJECT
public:
HTMLCreator();
virtual ~HTMLCreator();
- 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;
protected:
- virtual void timerEvent(QTimerEvent *);
+ virtual void timerEvent(TQTimerEvent *);
private slots:
void slotCompleted();
diff --git a/kioslave/thumbnail/imagecreator.cpp b/kioslave/thumbnail/imagecreator.cpp
index 24a75a51a..259a8928f 100644
--- a/kioslave/thumbnail/imagecreator.cpp
+++ b/kioslave/thumbnail/imagecreator.cpp
@@ -20,7 +20,7 @@
#include <assert.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <kimageio.h>
@@ -35,7 +35,7 @@ extern "C"
}
}
-bool ImageCreator::create(const QString &path, int, int, QImage &img)
+bool ImageCreator::create(const TQString &path, int, int, TQImage &img)
{
// create image preview
if (!img.load( path ))
diff --git a/kioslave/thumbnail/imagecreator.h b/kioslave/thumbnail/imagecreator.h
index d06c9fa7d..cc527438d 100644
--- a/kioslave/thumbnail/imagecreator.h
+++ b/kioslave/thumbnail/imagecreator.h
@@ -26,7 +26,7 @@ class ImageCreator : public ThumbCreator
{
public:
ImageCreator() {}
- virtual bool create(const QString &path, int, int, QImage &img);
+ virtual bool create(const TQString &path, int, int, TQImage &img);
virtual Flags flags() const;
};
diff --git a/kioslave/thumbnail/textcreator.cpp b/kioslave/thumbnail/textcreator.cpp
index b0424e228..31f4c4254 100644
--- a/kioslave/thumbnail/textcreator.cpp
+++ b/kioslave/thumbnail/textcreator.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqfile.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include <kstandarddirs.h>
#include <kpixmapsplitter.h>
@@ -49,7 +49,7 @@ TextCreator::~TextCreator()
delete [] m_data;
}
-bool TextCreator::create(const QString &path, int width, int height, QImage &img)
+bool TextCreator::create(const TQString &path, int width, int height, TQImage &img)
{
// Filter out unwanted mimetypes
KMimeType::Ptr mimeType = KMimeType::findByPath( path );
@@ -59,12 +59,12 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &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() )
{
// FIXME: make font/glyphsize configurable...
- m_splitter->setPixmap( QPixmap( pixmap ));
- m_splitter->setItemSize( QSize( 4, 7 ));
+ m_splitter->setPixmap( TQPixmap( pixmap ));
+ m_splitter->setItemSize( TQSize( 4, 7 ));
}
}
@@ -72,7 +72,7 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
// determine some sizes...
// example: width: 60, height: 64
- QSize pixmapSize( width, height );
+ TQSize pixmapSize( width, height );
if (height * 3 > width * 4)
pixmapSize.setHeight( width * 4 / 3 );
else
@@ -85,7 +85,7 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
int xborder = 1 + pixmapSize.width()/16; // minimum x-border
int yborder = 1 + pixmapSize.height()/16; // minimum y-border
- 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();
@@ -99,7 +99,7 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
const int bytesToRead = 120 * numLines;
// create text-preview
- QFile file( path );
+ TQFile file( path );
if ( file.open( IO_ReadOnly ))
{
if ( !m_data || m_dataSize < bytesToRead + 1 )
@@ -114,12 +114,12 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
{
ok = true;
m_data[read] = '\0';
- QString text = QString::fromLocal8Bit( m_data );
+ TQString text = TQString::fromLocal8Bit( m_data );
// FIXME: maybe strip whitespace and read more?
- m_pixmap.fill( QColor( 245, 245, 245 ) ); // light-grey background
+ m_pixmap.fill( TQColor( 245, 245, 245 ) ); // light-grey background
- QRect rect;
+ TQRect rect;
int rest = m_pixmap.width() - (numCharsPerLine * chSize.width());
xborder = QMAX( xborder, rest/2); // center horizontally
@@ -132,7 +132,7 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
int posLastLine = m_pixmap.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++ )
{
@@ -158,7 +158,7 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
}
// check for newlines in the text (unix,dos)
- QChar ch = text.at( i );
+ TQChar ch = text.at( i );
if ( ch == '\n' )
{
newLine = true;
@@ -174,7 +174,7 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
rect = m_splitter->coordinates( ch );
if ( !rect.isEmpty() )
{
- bitBlt( &m_pixmap, QPoint(x,y), fontPixmap, rect, Qt::CopyROP );
+ bitBlt( &m_pixmap, TQPoint(x,y), fontPixmap, rect, Qt::CopyROP );
}
x += xOffset; // next character
diff --git a/kioslave/thumbnail/textcreator.h b/kioslave/thumbnail/textcreator.h
index 92461d0cd..02b14aec9 100644
--- a/kioslave/thumbnail/textcreator.h
+++ b/kioslave/thumbnail/textcreator.h
@@ -20,7 +20,7 @@
#ifndef _TEXTCREATOR_H_
#define _TEXTCREATOR_H_
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kio/thumbcreator.h>
class KPixmapSplitter;
@@ -30,14 +30,14 @@ class TextCreator : public ThumbCreator
public:
TextCreator();
virtual ~TextCreator();
- 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:
KPixmapSplitter *m_splitter;
char *m_data;
int m_dataSize;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
};
#endif
diff --git a/kioslave/thumbnail/thumbnail.cpp b/kioslave/thumbnail/thumbnail.cpp
index 99cb3a89d..272e34eed 100644
--- a/kioslave/thumbnail/thumbnail.cpp
+++ b/kioslave/thumbnail/thumbnail.cpp
@@ -27,12 +27,12 @@
#include <sys/ipc.h>
#include <sys/shm.h>
-#include <qfile.h>
-#include <qbitmap.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qbuffer.h>
+#include <tqfile.h>
+#include <tqbitmap.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqbuffer.h>
#include <kdatastream.h> // Do not remove, needed for correct bool serialization
#include <kurl.h>
@@ -53,13 +53,13 @@
#include "thumbnail.h"
#include <kio/thumbcreator.h>
-// Use correctly KInstance instead of KApplication (but then no QPixmap)
+// Use correctly KInstance instead of KApplication (but then no TQPixmap)
#undef USE_KINSTANCE
// Fix thumbnail: protocol
#define THUMBNAIL_HACK (1)
#ifdef THUMBNAIL_HACK
-# include <qfileinfo.h>
+# include <tqfileinfo.h>
# include <ktrader.h>
#endif
@@ -122,7 +122,7 @@ int kdemain(int argc, char **argv)
return 0;
}
-ThumbnailProtocol::ThumbnailProtocol(const QCString &pool, const QCString &app)
+ThumbnailProtocol::ThumbnailProtocol(const TQCString &pool, const TQCString &app)
: SlaveBase("thumbnail", pool, app)
{
m_creators.setAutoDelete(true);
@@ -144,7 +144,7 @@ void ThumbnailProtocol::get(const KURL &url)
if (m_mimeType.isEmpty())
{
kdDebug(7115) << "PATH: " << url.path() << endl;
- QFileInfo info(url.path());
+ TQFileInfo info(url.path());
if (info.isDir())
{
// We cannot process a directory
@@ -204,7 +204,7 @@ void ThumbnailProtocol::get(const KURL &url)
if (m_iconAlpha)
m_iconAlpha = (m_iconAlpha << 24) | 0xffffff;
- QImage img;
+ TQImage img;
KConfigGroup group( KGlobal::config(), "PreviewSettings" );
@@ -222,7 +222,7 @@ void ThumbnailProtocol::get(const KURL &url)
if (info.isValid())
{
KFileMetaInfoItem item = info.item(KFileMimeTypeInfo::Thumbnail);
- if (item.isValid() && item.value().type() == QVariant::Image)
+ if (item.isValid() && item.value().type() == TQVariant::Image)
{
img = item.value().toImage();
kdDebug(7115) << "using KFMI for the thumbnail\n";
@@ -236,17 +236,17 @@ void ThumbnailProtocol::get(const KURL &url)
if (!kfmiThumb)
{
kdDebug(7115) << "using thumb creator for the thumbnail\n";
- QString plugin = metaData("plugin");
+ TQString plugin = metaData("plugin");
#ifdef THUMBNAIL_HACK
if (plugin.isEmpty())
{
KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator");
- QMap<QString, KService::Ptr> mimeMap;
+ TQMap<TQString, KService::Ptr> mimeMap;
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
{
- QStringList mimeTypes = (*it)->property("MimeTypes").toStringList();
- for (QStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt)
+ TQStringList mimeTypes = (*it)->property("MimeTypes").toStringList();
+ for (TQStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt)
{
if ((*mt)==m_mimeType)
{
@@ -269,9 +269,9 @@ void ThumbnailProtocol::get(const KURL &url)
ThumbCreator *creator = m_creators[plugin];
if (!creator)
{
- // Don't use KLibFactory here, this is not a QObject and
+ // Don't use KLibFactory here, this is not a TQObject and
// neither is ThumbCreator
- KLibrary *library = KLibLoader::self()->library(QFile::encodeName(plugin));
+ KLibrary *library = KLibLoader::self()->library(TQFile::encodeName(plugin));
if (library)
{
newCreator create = (newCreator)library->symbol("new_creator");
@@ -307,26 +307,26 @@ void ThumbnailProtocol::get(const KURL &url)
#ifndef USE_KINSTANCE
if (flags & ThumbCreator::DrawFrame)
{
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage(img);
int x2 = pix.width() - 1;
int y2 = pix.height() - 1;
// paint a black rectangle around the "page"
- QPainter p;
+ TQPainter p;
p.begin( &pix );
- p.setPen( QColor( 48, 48, 48 ));
+ p.setPen( TQColor( 48, 48, 48 ));
p.drawLine( x2, 0, x2, y2 );
p.drawLine( 0, y2, x2, y2 );
- p.setPen( QColor( 215, 215, 215 ));
+ p.setPen( TQColor( 215, 215, 215 ));
p.drawLine( 0, 0, x2, 0 );
p.drawLine( 0, 0, 0, y2 );
p.end();
- const QBitmap *mask = pix.mask();
+ const TQBitmap *mask = pix.mask();
if ( mask ) // need to update it so we can see the frame
{
- QBitmap bitmap( *mask );
- QPainter painter;
+ TQBitmap bitmap( *mask );
+ TQPainter painter;
painter.begin( &bitmap );
painter.drawLine( x2, 0, x2, y2 );
painter.drawLine( 0, y2, x2, y2 );
@@ -344,7 +344,7 @@ void ThumbnailProtocol::get(const KURL &url)
if ((flags & ThumbCreator::BlendIcon) && KGlobal::iconLoader()->alphaBlending(KIcon::Desktop))
{
// blending the mimetype icon in
- QImage icon = getIcon();
+ TQImage icon = getIcon();
int x = img.width() - icon.width() - 4;
x = QMAX( x, 0 );
@@ -359,7 +359,7 @@ void ThumbnailProtocol::get(const KURL &url)
return;
}
- const QString shmid = metaData("shmid");
+ const TQString shmid = metaData("shmid");
if (shmid.isEmpty())
{
#ifdef THUMBNAIL_HACK
@@ -367,7 +367,7 @@ void ThumbnailProtocol::get(const KURL &url)
{
// If thumbnail was called directly from Konqueror, then the image needs to be raw
//kdDebug(7115) << "RAW IMAGE TO STREAM" << endl;
- QBuffer buf;
+ TQBuffer buf;
if (!buf.open(IO_WriteOnly))
{
error(KIO::ERR_INTERNAL, i18n("Could not write image."));
@@ -380,8 +380,8 @@ void ThumbnailProtocol::get(const KURL &url)
else
#endif
{
- QByteArray imgData;
- QDataStream stream( imgData, IO_WriteOnly );
+ TQByteArray imgData;
+ TQDataStream stream( imgData, IO_WriteOnly );
//kdDebug(7115) << "IMAGE TO STREAM" << endl;
stream << img;
data(imgData);
@@ -389,8 +389,8 @@ void ThumbnailProtocol::get(const KURL &url)
}
else
{
- QByteArray imgData;
- QDataStream stream( imgData, IO_WriteOnly );
+ TQByteArray imgData;
+ TQDataStream stream( imgData, IO_WriteOnly );
//kdDebug(7115) << "IMAGE TO SHMID" << endl;
void *shmaddr = shmat(shmid.toInt(), 0, 0);
if (shmaddr == (void *)-1)
@@ -415,12 +415,12 @@ void ThumbnailProtocol::get(const KURL &url)
finished();
}
-const QImage& ThumbnailProtocol::getIcon()
+const TQImage& ThumbnailProtocol::getIcon()
{
- QImage* icon = m_iconDict.find(m_mimeType);
+ TQImage* icon = m_iconDict.find(m_mimeType);
if ( !icon ) // generate it!
{
- icon = new QImage( KMimeType::mimeType(m_mimeType)->pixmap( KIcon::Desktop, m_iconSize ).convertToImage() );
+ icon = new TQImage( KMimeType::mimeType(m_mimeType)->pixmap( KIcon::Desktop, m_iconSize ).convertToImage() );
icon->setAlphaBuffer( true );
int w = icon->width();
diff --git a/kioslave/thumbnail/thumbnail.h b/kioslave/thumbnail/thumbnail.h
index 23118e21c..0bd4c1412 100644
--- a/kioslave/thumbnail/thumbnail.h
+++ b/kioslave/thumbnail/thumbnail.h
@@ -20,7 +20,7 @@
#ifndef _THUMBNAIL_H_
#define _THUMBNAIL_H_
-#include <qdict.h>
+#include <tqdict.h>
#include <kio/slavebase.h>
@@ -30,25 +30,25 @@ class QImage;
class ThumbnailProtocol : public KIO::SlaveBase
{
public:
- ThumbnailProtocol(const QCString &pool, const QCString &app);
+ ThumbnailProtocol(const TQCString &pool, const TQCString &app);
virtual ~ThumbnailProtocol();
virtual void get(const KURL &url);
protected:
- const QImage& getIcon();
+ const TQImage& getIcon();
private:
- QString m_mimeType;
+ TQString m_mimeType;
int m_width;
int m_height;
bool m_keepAspectRatio;
int m_iconSize;
int m_iconAlpha;
// Thumbnail creators
- QDict<ThumbCreator> m_creators;
+ TQDict<ThumbCreator> m_creators;
// transparent icon cache
- QDict<QImage> m_iconDict;
+ TQDict<TQImage> m_iconDict;
};
#endif