summaryrefslogtreecommitdiffstats
path: root/xine_artsplugin/tools/thumbnail
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /xine_artsplugin/tools/thumbnail
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'xine_artsplugin/tools/thumbnail')
-rw-r--r--xine_artsplugin/tools/thumbnail/videocreator.cpp34
-rw-r--r--xine_artsplugin/tools/thumbnail/videocreator.h10
2 files changed, 22 insertions, 22 deletions
diff --git a/xine_artsplugin/tools/thumbnail/videocreator.cpp b/xine_artsplugin/tools/thumbnail/videocreator.cpp
index 88f67292..ceea0da7 100644
--- a/xine_artsplugin/tools/thumbnail/videocreator.cpp
+++ b/xine_artsplugin/tools/thumbnail/videocreator.cpp
@@ -26,12 +26,12 @@
#include <pthread.h>
#include <sys/time.h>
-#include <qpixmap.h>
-#include <qdialog.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpaintdevice.h>
+#include <tqpixmap.h>
+#include <tqdialog.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpaintdevice.h>
#include <iostream>
@@ -140,7 +140,7 @@ static void xine_shared_exit( xine_t * )
pthread_mutex_unlock( &xine_mutex );
}
-static QImage createThumbnail( xine_video_frame_t *frame, int width, int height )
+static TQImage createThumbnail( xine_video_frame_t *frame, int width, int height )
{
unsigned char *base[3];
unsigned int pitches[3];
@@ -150,7 +150,7 @@ static QImage createThumbnail( xine_video_frame_t *frame, int width, int height
else
width = (int)(.5 + (height * frame->aspect_ratio));
- QImage image( width, height, 32 );
+ TQImage image( width, height, 32 );
if (frame->colorspace == XINE_IMGFMT_YV12)
{
@@ -283,16 +283,16 @@ VideoCreator::~VideoCreator()
{
}
-bool VideoCreator::create(const QString &path, int width, int height, QImage &img)
+bool VideoCreator::create(const TQString &path, int width, int height, TQImage &img)
{
if (m_sprocketSmall.isNull())
{
- QString pixmap = locate( "data", "videothumbnail/sprocket-small.png" );
- m_sprocketSmall = QPixmap(pixmap);
+ TQString pixmap = locate( "data", "videothumbnail/sprocket-small.png" );
+ m_sprocketSmall = TQPixmap(pixmap);
pixmap = locate( "data", "videothumbnail/sprocket-medium.png" );
- m_sprocketMedium = QPixmap(pixmap);
+ m_sprocketMedium = TQPixmap(pixmap);
pixmap = locate( "data", "videothumbnail/sprocket-large.png" );
- m_sprocketLarge = QPixmap(pixmap);
+ m_sprocketLarge = TQPixmap(pixmap);
}
// The long term plan is to seek to frame 1, create thumbnail, see if is is
@@ -309,7 +309,7 @@ bool VideoCreator::create(const QString &path, int width, int height, QImage &im
xine_stream_t *stream = xine_stream_new( xine, ao_port, vo_port );
bool success = false;
- if (xine_open( stream, QFile::encodeName ( path ).data() ))
+ if (xine_open( stream, TQFile::encodeName ( path ).data() ))
{
xine_video_frame_t frame;
int length;
@@ -337,9 +337,9 @@ bool VideoCreator::create(const QString &path, int width, int height, QImage &im
// Create thumbnail image
if (success)
{
- QPixmap pix( createThumbnail( &frame, width, height ) );
- QPainter painter( &pix );
- QPixmap sprocket;
+ TQPixmap pix( createThumbnail( &frame, width, height ) );
+ TQPainter painter( &pix );
+ TQPixmap sprocket;
if (pix.height() < 60)
sprocket = m_sprocketSmall;
diff --git a/xine_artsplugin/tools/thumbnail/videocreator.h b/xine_artsplugin/tools/thumbnail/videocreator.h
index 1c634e72..3af6d515 100644
--- a/xine_artsplugin/tools/thumbnail/videocreator.h
+++ b/xine_artsplugin/tools/thumbnail/videocreator.h
@@ -22,19 +22,19 @@
#include <kio/thumbcreator.h>
-class VideoCreator : public QObject, public ThumbCreator
+class VideoCreator : public TQObject, public ThumbCreator
{
Q_OBJECT
public:
VideoCreator();
virtual ~VideoCreator();
- 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:
- QPixmap m_sprocketSmall;
- QPixmap m_sprocketMedium;
- QPixmap m_sprocketLarge;
+ TQPixmap m_sprocketSmall;
+ TQPixmap m_sprocketMedium;
+ TQPixmap m_sprocketLarge;
};
#endif