summaryrefslogtreecommitdiffstats
path: root/tools/thumbnail/kofficecreator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/thumbnail/kofficecreator.cpp')
-rw-r--r--tools/thumbnail/kofficecreator.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/thumbnail/kofficecreator.cpp b/tools/thumbnail/kofficecreator.cpp
index b62808d2..4e820eb1 100644
--- a/tools/thumbnail/kofficecreator.cpp
+++ b/tools/thumbnail/kofficecreator.cpp
@@ -21,9 +21,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 <kfileitem.h>
@@ -55,27 +55,27 @@ KOfficeCreator::~KOfficeCreator()
delete m_doc;
}
-bool KOfficeCreator::create(const QString &path, int width, int height, QImage &img)
+bool KOfficeCreator::create(const TQString &path, int width, int height, TQImage &img)
{
KoStore* store = KoStore::createStore(path, KoStore::Read);
- if ( store && ( store->open( QString("Thumbnails/thumbnail.png") ) || store->open( QString("preview.png") ) ) )
+ if ( store && ( store->open( TQString("Thumbnails/thumbnail.png") ) || store->open( TQString("preview.png") ) ) )
{
// Hooray! No long delay for the user...
- QByteArray bytes = store->read(store->size());
+ TQByteArray bytes = store->read(store->size());
store->close();
delete store;
return img.loadFromData(bytes);
}
delete store;
- QString mimetype = KMimeType::findByPath( path )->name();
+ TQString mimetype = KMimeType::findByPath( path )->name();
- m_doc = KParts::ComponentFactory::createPartInstanceFromQuery<KoDocument>( mimetype, QString::null);
+ m_doc = KParts::ComponentFactory::createPartInstanceFromQuery<KoDocument>( mimetype, TQString());
if (!m_doc) return false;
- connect(m_doc, SIGNAL(completed()), SLOT(slotCompleted()));
+ connect(m_doc, TQT_SIGNAL(completed()), TQT_SLOT(slotCompleted()));
KURL url;
url.setPath( path );
@@ -90,22 +90,22 @@ bool KOfficeCreator::create(const QString &path, int width, int height, QImage &
killTimers();
// render the 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)
{
- pix = m_doc->generatePreview(QSize(width, height));
+ pix = m_doc->generatePreview(TQSize(width, height));
}
else
{
- pix = m_doc->generatePreview(QSize(400, 400));
+ pix = m_doc->generatePreview(TQSize(400, 400));
}
img = pix.convertToImage();
return true;
}
-void KOfficeCreator::timerEvent(QTimerEvent *)
+void KOfficeCreator::timerEvent(TQTimerEvent *)
{
m_doc->closeURL();
m_completed = true;