summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-24 10:46:19 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-24 10:46:19 -0500
commit17b1e7850279ce936e0d090c9381d6167a7d548b (patch)
tree0308db06214336a071b7a3e1abf346684b055b70
parentc53429a6968563f72f8b334486d6dd1f0de75ecb (diff)
downloadmplayerthumbs-17b1e785.tar.gz
mplayerthumbs-17b1e785.zip
Convert to TDE R14 API
-rw-r--r--acinclude.m448
-rw-r--r--doc/en/index.docbook12
-rw-r--r--mplayerthumbs.kdevses2
-rw-r--r--src/Makefile.am4
-rw-r--r--src/mplayerthumbs.cpp22
-rw-r--r--src/mplayerthumbsconfig/mplayerthumbscfg.cpp18
-rw-r--r--src/mplayerthumbsconfig/mplayerthumbscfg.h2
-rw-r--r--src/videopreview.cpp72
-rw-r--r--src/videopreview.h28
9 files changed, 104 insertions, 104 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 70ed44c..0c8bd1f 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1060,7 +1060,7 @@ elif test "$kde_use_qt_emb" = "yes"; then
x_includes=""
x_libraries=""
elif test "$kde_use_qt_mac" = "yes"; then
- dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
+ dnl We're using QT/Mac (I use QT_MAC so that ntqglobal.h doesn't *have* to
dnl be included to get the information) --Sam
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
@@ -1092,19 +1092,19 @@ AC_DEFUN([KDE_PRINT_QT_PROGRAM],
AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
-#include <qglobal.h>
-#include <qapplication.h>
+#include <ntqglobal.h>
+#include <ntqapplication.h>
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF
-#include <qevent.h>
-#include <qstring.h>
-#include <qstyle.h>
+#include <ntqevent.h>
+#include <ntqstring.h>
+#include <ntqstyle.h>
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF
-#if QT_VERSION < 210
+#if TQT_VERSION < 210
#error 1
#endif
EOF
@@ -1113,8 +1113,8 @@ fi
if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF
-#include <qcursor.h>
-#include <qstylefactory.h>
+#include <ntqcursor.h>
+#include <ntqstylefactory.h>
#include <private/qucomextra_p.h>
EOF
fi
@@ -1201,22 +1201,22 @@ fi
if test -z "$3"; then
if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then
- kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
+ kde_qt_verstring="TQT_VERSION >= 0x03@VER@00 && TQT_VERSION < 0x040000"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else
- kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
+ kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000"
fi
fi
if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then
- kde_qt_verstring="QT_VERSION >= 222"
+ kde_qt_verstring="TQT_VERSION >= 222"
else
- kde_qt_verstring="QT_VERSION >= 200"
+ kde_qt_verstring="TQT_VERSION >= 200"
fi
fi
if test $kde_qtver = 1; then
- kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+ kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
fi
else
kde_qt_verstring="$3"
@@ -1325,7 +1325,7 @@ AC_ARG_ENABLE(
USING_QT_MT=""
dnl ------------------------------------------------------------------------
-dnl If we not get --disable-qt-mt then adjust some vars for the host.
+dnl If we not get --disable-tqt-mt then adjust some vars for the host.
dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS=
@@ -1383,7 +1383,7 @@ dnl ------------------------------------------------------------
fi
dnl ------------------------------------------------------------------------
-dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
+dnl If we got --enable-tqt-mt then adjust the Qt library name for the host.
dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then
@@ -1449,9 +1449,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi
if test "$kde_qtver" != "1"; then
- kde_qt_header=qstyle.h
+ kde_qt_header=ntqstyle.h
else
- kde_qt_header=qglobal.h
+ kde_qt_header=ntqglobal.h
fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@@ -2034,7 +2034,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([
- #include <qdom.h>
+ #include <ntqdom.h>
],
[
QDomDocument doc;
@@ -2595,7 +2595,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(
-[#include <qapplication.h>],
+[#include <ntqapplication.h>],
[
int argc;
char** argv;
@@ -3439,7 +3439,7 @@ AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
AC_TRY_COMPILE(
[
-#include <qglobal.h>
+#include <ntqglobal.h>
#if Q_EXPORT - 0 != 0
/* if this compiles, then Q_EXPORT is undefined */
/* if Q_EXPORT is nonempty, this will break compilation */
@@ -4691,7 +4691,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl
[
#include <qimageio.h>
-#include <qstring.h>
+#include <ntqstring.h>
int main() {
QString t = "hallo";
t.fill('t');
@@ -5536,7 +5536,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir"
fi
-AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
+AC_FIND_FILE(ntqsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
AC_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR)
@@ -5557,7 +5557,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no
-if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
+if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then
KDE_HAS_DOXYGEN=yes
fi
AC_SUBST(KDE_HAS_DOXYGEN)
diff --git a/doc/en/index.docbook b/doc/en/index.docbook
index c74fc42..0901bed 100644
--- a/doc/en/index.docbook
+++ b/doc/en/index.docbook
@@ -158,17 +158,17 @@ patent issues. -->
<para>It slices! It dices! and it comes with a free toaster!</para>
<para>
-The Squiggle Tool <guiicon><inlinemediaobject>
+The Stquiggle Tool <guiicon><inlinemediaobject>
<imageobject>
- <imagedata fileref="squiggle.png" format="PNG"/>
+ <imagedata fileref="stquiggle.png" format="PNG"/>
</imageobject>
<imageobject>
- <imagedata fileref="squiggle.eps" format="EPS"/>
+ <imagedata fileref="stquiggle.eps" format="EPS"/>
</imageobject>
<textobject>
- <phrase>Squiggle</phrase>
+ <phrase>Stquiggle</phrase>
</textobject>
-</inlinemediaobject></guiicon> is used to draw squiggly lines all over
+</inlinemediaobject></guiicon> is used to draw stquiggly lines all over
the &videopreview; main window. It's not a bug, it's a feature!
</para>
@@ -441,7 +441,7 @@ Program copyright 2006 Marco Gulino <email>marco@kmobiletools.org</email>
<para>
Contributors:
<itemizedlist>
-<listitem><para>Konqui the KDE Dragon <email>konqui@kde.org</email></para>
+<listitem><para>Kontqui the KDE Dragon <email>kontqui@kde.org</email></para>
</listitem>
<listitem><para>Tux the Linux Penguin <email>tux@linux.org</email></para>
</listitem>
diff --git a/mplayerthumbs.kdevses b/mplayerthumbs.kdevses
index 7f1f5ed..72029cc 100644
--- a/mplayerthumbs.kdevses
+++ b/mplayerthumbs.kdevses
@@ -11,7 +11,7 @@
<Doc2 NumberOfViews="1" URL="file:///mnt/dati/Sviluppo/mplayerthumbs/src/videopreview.h" >
<View0 line="53" Type="Source" />
</Doc2>
- <Doc3 NumberOfViews="1" URL="file:///usr/qt/3/doc/html/qstringlist.html" >
+ <Doc3 NumberOfViews="1" URL="file:///usr/qt/3/doc/html/ntqstringlist.html" >
<View0 Type="Documentation" />
</Doc3>
</DocsAndViews>
diff --git a/src/Makefile.am b/src/Makefile.am
index 4af25eb..d0313b3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,7 +6,7 @@ SUBDIRS = . mplayerthumbsconfig
kde_module_LTLIBRARIES = videopreview.la
videopreview_la_SOURCES = videopreview.cpp mplayerthumbs.kcfgc
-videopreview_la_LDFLAGS = -avoid-version -module $(all_libraries) $(KDE_PLUGIN)
+videopreview_la_LDFLAGS = -avoid-version -module $(all_libraries) $(TDE_PLUGIN)
protocoldir = $(kde_servicesdir)
@@ -14,7 +14,7 @@ messages: rc.cpp
$(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/videopreview.pot
protocol_DATA = videopreview.desktop
-videopreview_la_LIBADD = $(LIB_KDECORE)
+videopreview_la_LIBADD = $(LIB_TDECORE)
videothumbnail_DATA = sprocket-small.png sprocket-medium.png sprocket-large.png
videothumbnaildir = $(kde_datadir)/videothumbnail
diff --git a/src/mplayerthumbs.cpp b/src/mplayerthumbs.cpp
index 12eb3b8..7ceeb86 100644
--- a/src/mplayerthumbs.cpp
+++ b/src/mplayerthumbs.cpp
@@ -4,19 +4,19 @@
#include "mplayerthumbs.h"
MPlayerThumbsCfg::MPlayerThumbsCfg( )
- : KConfigSkeleton( QString::fromLatin1( "mplayerthumbs" ) )
+ : TDEConfigSkeleton( TQString::fromLatin1( "mplayerthumbs" ) )
{
- setCurrentGroup( QString::fromLatin1( "MPlayerThumbsCfg" ) );
+ setCurrentGroup( TQString::fromLatin1( "MPlayerThumbsCfg" ) );
- KConfigSkeleton::ItemString *itemMplayerbin;
- itemMplayerbin = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "mplayerbin" ), mMplayerbin );
- addItem( itemMplayerbin, QString::fromLatin1( "mplayerbin" ) );
- KConfigSkeleton::ItemStringList *itemNoextensions;
- itemNoextensions = new KConfigSkeleton::ItemStringList( currentGroup(), QString::fromLatin1( "noextensions" ), mNoextensions );
- addItem( itemNoextensions, QString::fromLatin1( "noextensions" ) );
- KConfigSkeleton::ItemString *itemCustomargs;
- itemCustomargs = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "customargs" ), mCustomargs );
- addItem( itemCustomargs, QString::fromLatin1( "customargs" ) );
+ TDEConfigSkeleton::ItemString *itemMplayerbin;
+ itemMplayerbin = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "mplayerbin" ), mMplayerbin );
+ addItem( itemMplayerbin, TQString::fromLatin1( "mplayerbin" ) );
+ TDEConfigSkeleton::ItemStringList *itemNoextensions;
+ itemNoextensions = new TDEConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "noextensions" ), mNoextensions );
+ addItem( itemNoextensions, TQString::fromLatin1( "noextensions" ) );
+ TDEConfigSkeleton::ItemString *itemCustomargs;
+ itemCustomargs = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "customargs" ), mCustomargs );
+ addItem( itemCustomargs, TQString::fromLatin1( "customargs" ) );
}
MPlayerThumbsCfg::~MPlayerThumbsCfg()
diff --git a/src/mplayerthumbsconfig/mplayerthumbscfg.cpp b/src/mplayerthumbsconfig/mplayerthumbscfg.cpp
index f1fc24a..56bea69 100644
--- a/src/mplayerthumbsconfig/mplayerthumbscfg.cpp
+++ b/src/mplayerthumbsconfig/mplayerthumbscfg.cpp
@@ -19,31 +19,31 @@
***************************************************************************/
#include "mplayerthumbscfg.h"
-#include <qvbox.h>
+#include <ntqvbox.h>
#include <klineedit.h>
#include <kpushbutton.h>
-#include <qlabel.h>
+#include <ntqlabel.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <qtimer.h>
+#include <ntqtimer.h>
#include <keditlistbox.h>
-MPlayerThumbsConfig::MPlayerThumbsConfig(QWidget *parent, const char *name, MPlayerThumbsCfg *config, DialogType dialogType, int dialogButtons, ButtonCode defaultButton, bool modal)
+MPlayerThumbsConfig::MPlayerThumbsConfig(TQWidget *parent, const char *name, MPlayerThumbsCfg *config, DialogType dialogType, int dialogButtons, ButtonCode defaultButton, bool modal)
: KConfigDialog(parent, name, config, dialogType, dialogButtons, defaultButton, modal)
{
- QVBox *vbox=new QVBox(0);
+ TQVBox *vbox=new TQVBox(0);
vbox->setSpacing( 5);
- new QLabel(i18n("Enter here the path for mplayer executable file."), vbox);
+ new TQLabel(i18n("Enter here the path for mplayer executable file."), vbox);
kcfg_mplayerbin=new KLineEdit( vbox, "kcfg_mplayerbin");
- new QLabel(i18n("Custom arguments for mplayer."), vbox);
+ new TQLabel(i18n("Custom arguments for mplayer."), vbox);
new KLineEdit( vbox, "kcfg_customargs");
new KEditListBox( i18n("Blacklisted File Extensions"),
vbox, "kcfg_noextensions", true, KEditListBox::Add | KEditListBox::Remove);
addPage( vbox, i18n("General"), "mplayer" );
kdDebug() << "config->mplayerbin().isNull()::" << config->mplayerbin().length() << endl;
if(!config->mplayerbin().length() )
- QTimer::singleShot( 100, this, SLOT(autoFindPath()));
+ TQTimer::singleShot( 100, this, SLOT(autoFindPath()));
}
MPlayerThumbsConfig::~MPlayerThumbsConfig()
@@ -58,7 +58,7 @@ MPlayerThumbsConfig::~MPlayerThumbsConfig()
*/
void MPlayerThumbsConfig::autoFindPath()
{
- QString playerPath=KStandardDirs::findExe("mplayer-bin");
+ TQString playerPath=KStandardDirs::findExe("mplayer-bin");
if(playerPath.isNull() ) playerPath=KStandardDirs::findExe("mplayer");
kdDebug() << "Trying to set player path to " << playerPath << endl;
kcfg_mplayerbin->setText( playerPath );
diff --git a/src/mplayerthumbsconfig/mplayerthumbscfg.h b/src/mplayerthumbsconfig/mplayerthumbscfg.h
index 6757a4c..92099ac 100644
--- a/src/mplayerthumbsconfig/mplayerthumbscfg.h
+++ b/src/mplayerthumbsconfig/mplayerthumbscfg.h
@@ -27,7 +27,7 @@ class MPlayerThumbsConfig : public KConfigDialog
{
Q_OBJECT
public:
- MPlayerThumbsConfig(QWidget *parent, const char *name, MPlayerThumbsCfg *config, DialogType dialogType=IconList, int dialogButtons=Default|Ok|Apply|Cancel, ButtonCode defaultButton=Ok, bool modal=false);
+ MPlayerThumbsConfig(TQWidget *parent, const char *name, MPlayerThumbsCfg *config, DialogType dialogType=IconList, int dialogButtons=Default|Ok|Apply|Cancel, ButtonCode defaultButton=Ok, bool modal=false);
~MPlayerThumbsConfig();
private:
KLineEdit *kcfg_mplayerbin;
diff --git a/src/videopreview.cpp b/src/videopreview.cpp
index bf779e6..26e9055 100644
--- a/src/videopreview.cpp
+++ b/src/videopreview.cpp
@@ -20,24 +20,24 @@
#include "videopreview.h"
-#include <qfile.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <ntqfile.h>
+#include <ntqpixmap.h>
+#include <ntqimage.h>
#include <kstandarddirs.h>
#include <kpixmapsplitter.h>
#include <kmimetype.h>
-#include <qpainter.h>
+#include <ntqpainter.h>
#include <krandomsequence.h>
-#include <qdatetime.h>
-#include <qregexp.h>
+#include <ntqdatetime.h>
+#include <ntqregexp.h>
#include "videopreview.h"
-#include <qprocess.h>
+#include <ntqprocess.h>
#include <kdebug.h>
#include <ktempdir.h>
#include <kurl.h>
#include <math.h>
-#include <qfileinfo.h>
+#include <ntqfileinfo.h>
#include "mplayerthumbs.h"
@@ -66,10 +66,10 @@ VideoPreview::~VideoPreview()
delete mplayerprocess;
}
-bool VideoPreview::create(const QString &path, int width, int height, QImage &img)
+bool VideoPreview::create(const TQString &path, int width, int height, TQImage &img)
{
MPlayerThumbsCfg *cfg=new MPlayerThumbsCfg();
- QFileInfo fi(path);
+ TQFileInfo fi(path);
kdDebug() << "videopreview: file extension=\"" << fi.extension().stripWhiteSpace() << "\"\n";
if( fi.extension().stripWhiteSpace().length() && !cfg->noextensions().grep(fi.extension().stripWhiteSpace(), false)
.isEmpty() )
@@ -79,7 +79,7 @@ bool VideoPreview::create(const QString &path, int width, int height, QImage &im
return false;
}
playerBin=cfg->mplayerbin();
- customargs=QStringList::split(" ", cfg->customargs() );
+ customargs=TQStringList::split(" ", cfg->customargs() );
kdDebug() << "videopreview: customargs=" << cfg->customargs() << " ;;;; " << customargs << endl;
delete cfg;
if(playerBin.length()) kdDebug() << "videopreview: found playerbin from config: " << playerBin << endl;
@@ -99,26 +99,26 @@ bool VideoPreview::create(const QString &path, int width, int height, QImage &im
tmpdir=new KTempDir();
if(tmpdir->name().isNull() ) return false;
- rand=new KRandomSequence(QDateTime::currentDateTime().toTime_t());
- mplayerprocess=new QProcess();
+ rand=new KRandomSequence(TQDateTime::currentDateTime().toTime_t());
+ mplayerprocess=new TQProcess();
int flags=0;
KURL furl(path);
kdDebug() << "videopreview: url=" << furl << "; local:" << furl.isLocalFile() << endl;
fileinfo.towidth=width;
fileinfo.toheight=height;
- QPixmap pix;
+ TQPixmap pix;
// if(furl.isLocalFile())
// {
flags=framerandom;
- QStringList args;
+ TQStringList args;
args << playerBin << path << "-nocache" << "-identify" << "-vo" << "null" << "-frames" << "0"/* << "-nosound" */<< "-ao" << "null";
args+= customargs;
mplayerprocess->setArguments(args);
- mplayerprocess->setCommunication( QProcess::Stdout );
+ mplayerprocess->setCommunication( TQProcess::Stdout );
mplayerprocess->start();
- QString lineout;
- QRegExp findsecs("^ID_LENGTH=([\\d]*)");
- QRegExp findfps("^ID_VIDEO_FPS=([\\d]*)");
+ TQString lineout;
+ TQRegExp findsecs("^ID_LENGTH=([\\d]*)");
+ TQRegExp findfps("^ID_VIDEO_FPS=([\\d]*)");
while (mplayerprocess->isRunning() ) usleep (10);
do {
lineout=mplayerprocess->readLineStdout();
@@ -127,7 +127,7 @@ bool VideoPreview::create(const QString &path, int width, int height, QImage &im
if(findfps.search( lineout) != -1)
fileinfo.fps=findfps.cap(1).toInt();
if( fileinfo.fps!=0 && fileinfo.seconds!=0 ) break;
- } while (lineout != QString::null );
+ } while (lineout != TQString::null );
kdDebug() << "videopreview: find length=" << fileinfo.seconds << ", fps=" << fileinfo.fps << endl;
/* } else
{
@@ -140,7 +140,7 @@ bool VideoPreview::create(const QString &path, int width, int height, QImage &im
pix=getFrame(path, ((i<LASTTRY) ? flags : framestart ) );
if(!pix.isNull()) {
uint variance=imageVariance(pix.convertToImage()/*.bits(),( (width+ 7) & ~0x7), width, height, 1 */);
- kdDebug() << "videopreview: " << QFileInfo(path).fileName() << " frame variance: " << variance << "; " <<
+ kdDebug() << "videopreview: " << TQFileInfo(path).fileName() << " frame variance: " << variance << "; " <<
((variance<=40 && ( i!=LASTTRY-1))? "!!!DROPPING!!!" : "GOOD :-)" ) << endl;
if(variance>40 || i==LASTTRY-1 ) break;
}
@@ -154,17 +154,17 @@ bool VideoPreview::create(const QString &path, int width, int height, QImage &im
Copyright (C) 2002 Simon MacMullen
Copyright (C) 2003 Ewald Snel <ewald@rambo.its.tudelft.nl>
* */
-// QPixmap pix( createThumbnail( &frame, width, height ) );
+// TQPixmap pix( createThumbnail( &frame, width, height ) );
#ifdef STRIPS_SUPPORT
- QPainter painter( &pix );
- QPixmap sprocket;
+ TQPainter painter( &pix );
+ TQPixmap sprocket;
if (pix.height() < 60)
- sprocket = QPixmap(locate( "data", "videothumbnail/sprocket-small.png" ));
+ sprocket = TQPixmap(locate( "data", "videothumbnail/sprocket-small.png" ));
else if (pix.height() < 90)
- sprocket = QPixmap(locate( "data", "videothumbnail/sprocket-medium.png" ));
+ sprocket = TQPixmap(locate( "data", "videothumbnail/sprocket-medium.png" ));
else
- sprocket = QPixmap(locate( "data", "videothumbnail/sprocket-large.png" ));
+ sprocket = TQPixmap(locate( "data", "videothumbnail/sprocket-large.png" ));
for (int y = 0; y < pix.height() + sprocket.height(); y += sprocket.height()) {
painter.drawPixmap( 0, y, sprocket );
@@ -178,9 +178,9 @@ bool VideoPreview::create(const QString &path, int width, int height, QImage &im
return true;
}
-QPixmap VideoPreview::getFrame(const QString &path, int flags)
+TQPixmap VideoPreview::getFrame(const TQString &path, int flags)
{
- QStringList args;
+ TQStringList args;
kdDebug() << "videopreview: using flags " << flags << endl;
#define START ((fileinfo.seconds*15)/100)
#define END ((fileinfo.seconds*70)/100)
@@ -196,22 +196,22 @@ QPixmap VideoPreview::getFrame(const QString &path, int flags)
{
kdDebug() << "videopreview: framerandom\n";
unsigned long start=(unsigned long)(START+(rand->getDouble() * (END - START) ) );
- args << "-ss" << QString::number( start )
+ args << "-ss" << TQString::number( start )
<< "-frames" << "4";
} else if (flags & frameend )
{
kdDebug() << "videopreview: frameend\n";
- args << "-ss" << QString::number( fileinfo.seconds - 10 )
+ args << "-ss" << TQString::number( fileinfo.seconds - 10 )
<< "-frames" << "4";
} else if (flags & framestart)
{
kdDebug() << "videopreview: framestart\n";
if(!fileinfo.fps) fileinfo.fps=25; // if we've not autodetected a fps rate, let's assume 25fps.. even if it's wrong it shouldn't hurt.
// If we can't skip to a random frame, let's try playing 10 seconds.
- args << "-frames" << QString::number( fileinfo.fps*10 );
+ args << "-frames" << TQString::number( fileinfo.fps*10 );
}
args << "-nocache" << "-idx" /*@TODO check if it's too slow..*/ << "-ao" << "null"/*"-nosound" << */<< "-speed" << "99" /*<< "-sstep" << "5"*/
- << "-vo" << QString("jpeg:outdir=%1").arg(tmpdir->name() ) << "-vf" << QString("scale=%1:%2").arg(fileinfo.towidth).arg(fileinfo.toheight);
+ << "-vo" << TQString("jpeg:outdir=%1").arg(tmpdir->name() ) << "-vf" << TQString("scale=%1:%2").arg(fileinfo.towidth).arg(fileinfo.toheight);
args+=customargs;
kdDebug() << "videopreview: Starting MPlayer with" << args.join( " ") << endl;
// return false;
@@ -220,9 +220,9 @@ QPixmap VideoPreview::getFrame(const QString &path, int flags)
while (mplayerprocess->isRunning() ) usleep (10);
if (tmpdir->qDir()->entryList( "*.jpg" ).isEmpty() ) return false;
- QString lastframe=tmpdir->qDir()->entryList( "*.jpg" ).last();
+ TQString lastframe=tmpdir->qDir()->entryList( "*.jpg" ).last();
kdDebug() << "videopreview: LastFrame==" << lastframe << endl;
- QPixmap retpix(tmpdir->name().append( lastframe ));
+ TQPixmap retpix(tmpdir->name().append( lastframe ));
return retpix;
}
@@ -232,7 +232,7 @@ ThumbCreator::Flags VideoPreview::flags() const
}
-uint VideoPreview::imageVariance(QImage image )
+uint VideoPreview::imageVariance(TQImage image )
{
uint delta=0;
uint avg=0;
diff --git a/src/videopreview.h b/src/videopreview.h
index cb4f255..6adcf2d 100644
--- a/src/videopreview.h
+++ b/src/videopreview.h
@@ -21,40 +21,40 @@
#ifndef _videopreview_H_
#define _videopreview_H_
-#include <qstring.h>
-#include <qcstring.h>
+#include <ntqstring.h>
+#include <ntqcstring.h>
-#include <qpixmap.h>
+#include <ntqpixmap.h>
#include <kio/thumbcreator.h>
-class QProcess;
-class QCString;
+class TQProcess;
+class TQCString;
class KTempDir;
class KRandomSequence;
class KPixmapSplitter;
-#include <qobject.h>
+#include <ntqobject.h>
-class VideoPreview : public QObject, public ThumbCreator
+class VideoPreview : public TQObject, public ThumbCreator
{
Q_OBJECT
public:
VideoPreview();
virtual ~VideoPreview();
- 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:
- QPixmap getFrame(const QString &path, int flags);
- static uint imageVariance(QImage image );
+ TQPixmap getFrame(const TQString &path, int flags);
+ static uint imageVariance(TQImage image );
private:
KPixmapSplitter *m_splitter;
char *m_data;
int m_dataSize;
- QPixmap m_pixmap;
- QProcess *mplayerprocess;
- QStringList customargs;
+ TQPixmap m_pixmap;
+ TQProcess *mplayerprocess;
+ TQStringList customargs;
KTempDir *tmpdir;
KRandomSequence *rand;
- QString playerBin;
+ TQString playerBin;
enum frameflags { framerandom=0x1, framestart=0x2, frameend=0x4 };
struct { int towidth; int toheight; int fps; int seconds; } fileinfo;
};