diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2021-09-02 16:50:11 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-09-03 10:33:59 +0200 |
commit | 97c18f92eafc461649aab84d92470cdff696de89 (patch) | |
tree | b79251a48fda8005999ec186425116663fde94fc /src | |
parent | 74dc8e5a0cae5016ac02f594300c1bea42747c01 (diff) | |
download | mplayerthumbs-97c18f92eafc461649aab84d92470cdff696de89.tar.gz mplayerthumbs-97c18f92eafc461649aab84d92470cdff696de89.zip |
Renamed from videopreview and mplayerthumbs to mplayer-thumbnailer.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 16167444904ab5b0382e3aff98b3de749161ebe3)
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeL10n.txt | 6 | ||||
-rw-r--r-- | src/CMakeLists.txt | 32 | ||||
-rw-r--r-- | src/config/CMakeLists.txt (renamed from src/mplayerthumbsconfig/CMakeLists.txt) | 14 | ||||
-rw-r--r-- | src/config/main.cpp (renamed from src/mplayerthumbsconfig/main.cpp) | 14 | ||||
-rw-r--r-- | src/config/mplayer-thumbnailer-config.cpp (renamed from src/mplayerthumbsconfig/mplayerthumbscfg.cpp) | 15 | ||||
-rw-r--r-- | src/config/mplayer-thumbnailer-config.h (renamed from src/mplayerthumbsconfig/mplayerthumbscfg.h) | 12 | ||||
-rw-r--r-- | src/mplayer-thumbnailer-cfg-rename.upd | 4 | ||||
-rw-r--r-- | src/mplayer-thumbnailer-cfg.kcfgc | 2 | ||||
-rw-r--r-- | src/mplayer-thumbnailer.cpp (renamed from src/videopreview.cpp) | 62 | ||||
-rw-r--r-- | src/mplayer-thumbnailer.desktop (renamed from src/videopreview.desktop) | 6 | ||||
-rw-r--r-- | src/mplayer-thumbnailer.h (renamed from src/videopreview.h) | 10 | ||||
-rw-r--r-- | src/mplayer-thumbnailer.kcfg (renamed from src/mplayerthumbs.kcfg) | 6 | ||||
-rw-r--r-- | src/mplayerthumbs.cpp | 25 | ||||
-rw-r--r-- | src/mplayerthumbs.kcfgc | 2 |
14 files changed, 91 insertions, 119 deletions
diff --git a/src/CMakeL10n.txt b/src/CMakeL10n.txt index 2331528..616015b 100644 --- a/src/CMakeL10n.txt +++ b/src/CMakeL10n.txt @@ -1,8 +1,8 @@ ##### create translation templates ############## -tde_l10n_create_template( "messages/mplayerthumbs" ) +tde_l10n_create_template( "messages/mplayer-thumbnailer" ) tde_l10n_create_template( - CATALOG "desktop_files/videopreview.desktop/" - SOURCES videopreview.desktop + CATALOG "desktop_files/mplayer-thumbnailer.desktop/" + SOURCES mplayer-thumbnailer.desktop ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4eb2329..4723e56 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -add_subdirectory( mplayerthumbsconfig ) +add_subdirectory( config ) include_directories( ${CMAKE_BINARY_DIR} @@ -14,31 +14,26 @@ link_directories( ) -##### videopreview (kpart) +##### mplayer-thumbnailer (kpart) -tde_add_kpart( videopreview AUTOMOC +tde_add_kpart( ${PROJECT_NAME} AUTOMOC SOURCES - videopreview.cpp + ${PROJECT_NAME}.cpp LINK tdecore-shared - mplayerthumbscfg-static + ${PROJECT_NAME}-cfg-static DESTINATION ${PLUGIN_INSTALL_DIR} ) -set_property( - SOURCE videopreview.cpp - APPEND PROPERTY - OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/src/mplayerthumbs.cpp -) -##### mplayerthumbscfg (static) +##### mplayer-thumbnailer-cfg (static) -tde_add_library( mplayerthumbscfg STATIC_PIC AUTOMOC +tde_add_library( ${PROJECT_NAME}-cfg STATIC_PIC AUTOMOC SOURCES - mplayerthumbs.kcfgc + ${PROJECT_NAME}-cfg.kcfgc LINK tdecore-shared ) @@ -47,7 +42,7 @@ tde_add_library( mplayerthumbscfg STATIC_PIC AUTOMOC ##### other data tde_create_translated_desktop( - SOURCE videopreview.desktop + SOURCE ${PROJECT_NAME}.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) @@ -57,10 +52,15 @@ install( sprocket-medium.png sprocket-large.png - DESTINATION ${DATA_INSTALL_DIR}/videopreview + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME} ) install( - FILES mplayerthumbs.kcfg + FILES ${PROJECT_NAME}.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) + +install( + FILES ${PROJECT_NAME}-cfg-rename.upd + DESTINATION ${KCONF_UPDATE_INSTALL_DIR} +) diff --git a/src/mplayerthumbsconfig/CMakeLists.txt b/src/config/CMakeLists.txt index 12df3ef..f4a8b2d 100644 --- a/src/mplayerthumbsconfig/CMakeLists.txt +++ b/src/config/CMakeLists.txt @@ -13,23 +13,17 @@ link_directories( ) -##### mplayerthumbsconfig (executable) +##### mplayer-thumbnailer-config (executable) -tde_add_executable( mplayerthumbsconfig AUTOMOC +tde_add_executable( ${PROJECT_NAME}-config AUTOMOC SOURCES main.cpp - mplayerthumbscfg.cpp + ${PROJECT_NAME}-config.cpp LINK tdecore-shared tdeui-shared - mplayerthumbscfg-static + ${PROJECT_NAME}-cfg-static DESTINATION ${BIN_INSTALL_DIR} ) - -set_property( - SOURCE main.cpp mplayerthumbscfg.cpp - APPEND PROPERTY - OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/src/mplayerthumbs.cpp -) diff --git a/src/mplayerthumbsconfig/main.cpp b/src/config/main.cpp index 051cf83..6f637c5 100644 --- a/src/mplayerthumbsconfig/main.cpp +++ b/src/config/main.cpp @@ -22,11 +22,11 @@ #include <tdecmdlineargs.h> #include <tdelocale.h> -#include "mplayerthumbscfg.h" -#include "mplayerthumbs.h" +#include "mplayer-thumbnailer-cfg.h" +#include "mplayer-thumbnailer-config.h" static const char description[] = - I18N_NOOP("MPlayerThumbs Configuration Utility"); + I18N_NOOP("MPlayerThumbnailer Configuration Utility"); static const char version[] = "0.1"; @@ -38,17 +38,17 @@ static TDECmdLineOptions options[] = int main(int argc, char **argv) { - TDEAboutData about("MPlayerThumbsConfig", I18N_NOOP("MPlayerThumbsConfig"), version, description, + TDEAboutData about("MPlayerThumbnailerConfig", I18N_NOOP("MPlayerThumbnailerConfig"), version, description, TDEAboutData::License_GPL, "(C) 2006 Marco Gulino", 0, 0, "marco@kmobiletools.org"); about.addAuthor( "Marco Gulino", 0, "marco@kmobiletools.org" ); TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::addCmdLineOptions( options ); TDEApplication app; - MPlayerThumbsConfig *mainWin = 0; + MPlayerThumbnailerConfig *mainWin = 0; // if (app.isRestored()) // { -// RESTORE(MPlayerThumbsConfig); +// RESTORE(MPlayerThumbnailerConfig); // } // else // { @@ -57,7 +57,7 @@ int main(int argc, char **argv) /// @todo do something with the command line args here - mainWin = new MPlayerThumbsConfig(0, "configDialog", new MPlayerThumbsCfg(), KDialogBase::Swallow ); + mainWin = new MPlayerThumbnailerConfig(0, "configDialog", new MPlayerThumbnailerCfg(), KDialogBase::Swallow ); app.setMainWidget( mainWin ); mainWin->show(); diff --git a/src/mplayerthumbsconfig/mplayerthumbscfg.cpp b/src/config/mplayer-thumbnailer-config.cpp index 02fe59d..ee15917 100644 --- a/src/mplayerthumbsconfig/mplayerthumbscfg.cpp +++ b/src/config/mplayer-thumbnailer-config.cpp @@ -18,7 +18,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include "mplayerthumbscfg.h" +#include "mplayer-thumbnailer-config.h" #include <tqvbox.h> #include <klineedit.h> #include <kpushbutton.h> @@ -29,7 +29,7 @@ #include <tqtimer.h> #include <keditlistbox.h> -MPlayerThumbsConfig::MPlayerThumbsConfig(TQWidget *parent, const char *name, MPlayerThumbsCfg *config, DialogType dialogType, int dialogButtons, ButtonCode defaultButton, bool modal) +MPlayerThumbnailerConfig::MPlayerThumbnailerConfig(TQWidget *parent, const char *name, MPlayerThumbnailerCfg *config, DialogType dialogType, int dialogButtons, ButtonCode defaultButton, bool modal) : TDEConfigDialog(parent, name, config, dialogType, dialogButtons, defaultButton, modal) { TQVBox *vbox=new TQVBox(0); @@ -46,20 +46,19 @@ MPlayerThumbsConfig::MPlayerThumbsConfig(TQWidget *parent, const char *name, MPl TQTimer::singleShot( 100, this, SLOT(autoFindPath())); } -MPlayerThumbsConfig::~MPlayerThumbsConfig() +MPlayerThumbnailerConfig::~MPlayerThumbnailerConfig() { } -#include "mplayerthumbscfg.moc" - - /*! - \fn MPlayerThumbsConfig::autoFindPath() + \fn MPlayerThumbnailerConfig::autoFindPath() */ -void MPlayerThumbsConfig::autoFindPath() +void MPlayerThumbnailerConfig::autoFindPath() { TQString playerPath=TDEStandardDirs::findExe("mplayer-bin"); if(playerPath.isNull() ) playerPath=TDEStandardDirs::findExe("mplayer"); kdDebug() << "Trying to set player path to " << playerPath << endl; kcfg_mplayerbin->setText( playerPath ); } + +#include "mplayer-thumbnailer-config.moc" diff --git a/src/mplayerthumbsconfig/mplayerthumbscfg.h b/src/config/mplayer-thumbnailer-config.h index e762687..ae786ad 100644 --- a/src/mplayerthumbsconfig/mplayerthumbscfg.h +++ b/src/config/mplayer-thumbnailer-config.h @@ -17,18 +17,18 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef _MPLAYERTHUMBSCONFIG_ -#define _MPLAYERTHUMBSCONFIG_ +#ifndef _MPLAYER_THUMBNAILER_CONFIG_ +#define _MPLAYER_THUMBNAILER_CONFIG_ #include <tdeconfigdialog.h> -#include "mplayerthumbs.h" +#include "mplayer-thumbnailer-cfg.h" class KLineEdit; -class MPlayerThumbsConfig : public TDEConfigDialog +class MPlayerThumbnailerConfig : public TDEConfigDialog { Q_OBJECT public: - MPlayerThumbsConfig(TQWidget *parent, const char *name, MPlayerThumbsCfg *config, DialogType dialogType=IconList, int dialogButtons=Default|Ok|Apply|Cancel, ButtonCode defaultButton=Ok, bool modal=false); - ~MPlayerThumbsConfig(); + MPlayerThumbnailerConfig(TQWidget *parent, const char *name, MPlayerThumbnailerCfg *config, DialogType dialogType=IconList, int dialogButtons=Default|Ok|Apply|Cancel, ButtonCode defaultButton=Ok, bool modal=false); + ~MPlayerThumbnailerConfig(); private: KLineEdit *kcfg_mplayerbin; public slots: diff --git a/src/mplayer-thumbnailer-cfg-rename.upd b/src/mplayer-thumbnailer-cfg-rename.upd new file mode 100644 index 0000000..ce3c37f --- /dev/null +++ b/src/mplayer-thumbnailer-cfg-rename.upd @@ -0,0 +1,4 @@ +Id=mplayerthumbs-rename +File=mplayerthumbs,mplayer-thumbnailer +Group=MPlayerThumbsCfg,MPlayerThumbnailerCfg +AllKeys diff --git a/src/mplayer-thumbnailer-cfg.kcfgc b/src/mplayer-thumbnailer-cfg.kcfgc new file mode 100644 index 0000000..6834d64 --- /dev/null +++ b/src/mplayer-thumbnailer-cfg.kcfgc @@ -0,0 +1,2 @@ +File=mplayer-thumbnailer.kcfg +ClassName=MPlayerThumbnailerCfg diff --git a/src/videopreview.cpp b/src/mplayer-thumbnailer.cpp index b11acbb..ae2e720 100644 --- a/src/videopreview.cpp +++ b/src/mplayer-thumbnailer.cpp @@ -18,7 +18,7 @@ Boston, MA 02110-1301, USA. ***************************************************************************/ -#include "videopreview.h" +#include "mplayer-thumbnailer.h" #include <tqfile.h> #include <tqpixmap.h> @@ -42,25 +42,25 @@ #include <cstdlib> #include <unistd.h> -#include "mplayerthumbs.h" - +#include "mplayer-thumbnailer-cfg.h" #include "config.h" + extern "C" { KDE_EXPORT ThumbCreator *new_creator() { - return new VideoPreview; + return new MPlayerThumbnailer; } } -VideoPreview::VideoPreview() +MPlayerThumbnailer::MPlayerThumbnailer() : m_splitter(0), m_data(0), m_dataSize(0) { } -VideoPreview::~VideoPreview() +MPlayerThumbnailer::~MPlayerThumbnailer() { delete m_splitter; delete [] m_data; @@ -69,33 +69,33 @@ VideoPreview::~VideoPreview() delete mplayerprocess; } -bool VideoPreview::create(const TQString &path, int width, int height, TQImage &img) +bool MPlayerThumbnailer::create(const TQString &path, int width, int height, TQImage &img) { - MPlayerThumbsCfg *cfg=new MPlayerThumbsCfg(); + MPlayerThumbnailerCfg *cfg=new MPlayerThumbnailerCfg(); TQFileInfo fi(path); - kdDebug() << "videopreview: file extension=\"" << fi.extension().stripWhiteSpace() << "\"\n"; + kdDebug() << "mplayer-thumbnailer: file extension=\"" << fi.extension().stripWhiteSpace() << "\"\n"; if( fi.extension().stripWhiteSpace().length() && !cfg->noextensions().grep(fi.extension().stripWhiteSpace(), false) .isEmpty() ) { delete cfg; - kdDebug() << "videopreview: matched extension " << fi.extension().prepend('.') << "; exiting.\n"; + kdDebug() << "mplayer-thumbnailer: matched extension " << fi.extension().prepend('.') << "; exiting.\n"; return false; } playerBin=cfg->mplayerbin(); customargs=TQStringList::split(" ", cfg->customargs() ); - kdDebug() << "videopreview: customargs=" << cfg->customargs() << " ;;;; " << customargs << endl; + kdDebug() << "mplayer-thumbnailer: customargs=" << cfg->customargs() << " ;;;; " << customargs << endl; delete cfg; - if(playerBin.length()) kdDebug() << "videopreview: found playerbin from config: " << playerBin << endl; + if(playerBin.length()) kdDebug() << "mplayer-thumbnailer: found playerbin from config: " << playerBin << endl; else { playerBin=TDEStandardDirs::findExe("mplayer-bin"); if(!playerBin.length()) playerBin=TDEStandardDirs::findExe("mplayer"); if(!playerBin.length()) { - kdDebug() << "videopreview: mplayer not found, exiting. Run mplayerthumbsconfig to setup mplayer path manually.\n"; + kdDebug() << "mplayer-thumbnailer: mplayer not found, exiting. Run mplayer-thumbnailer-config to setup mplayer path manually.\n"; return false; } - kdDebug() << "videopreview: found playerbin from path: " << playerBin << endl; + kdDebug() << "mplayer-thumbnailer: found playerbin from path: " << playerBin << endl; } fileinfo.seconds=0; fileinfo.fps=0; @@ -106,7 +106,7 @@ bool VideoPreview::create(const TQString &path, int width, int height, TQImage & mplayerprocess=new TQProcess(); int flags=0; KURL furl(path); - kdDebug() << "videopreview: url=" << furl << "; local:" << furl.isLocalFile() << endl; + kdDebug() << "mplayer-thumbnailer: url=" << furl << "; local:" << furl.isLocalFile() << endl; fileinfo.towidth=width; fileinfo.toheight=height; TQPixmap pix; @@ -131,7 +131,7 @@ bool VideoPreview::create(const TQString &path, int width, int height, TQImage & fileinfo.fps=findfps.cap(1).toInt(); if( fileinfo.fps!=0 && fileinfo.seconds!=0 ) break; } while (lineout != TQString::null ); - kdDebug() << "videopreview: find length=" << fileinfo.seconds << ", fps=" << fileinfo.fps << endl; + kdDebug() << "mplayer-thumbnailer: find length=" << fileinfo.seconds << ", fps=" << fileinfo.fps << endl; /* } else { flags=frameend; @@ -139,11 +139,11 @@ bool VideoPreview::create(const TQString &path, int width, int height, TQImage & #define LASTTRY 3 for(int i=0; i<=LASTTRY; i++) { - kdDebug() << "videopreview: try " << i << endl; + kdDebug() << "mplayer-thumbnailer: try " << i << endl; pix=getFrame(path, ((i<LASTTRY) ? flags : framestart ) ); if(!pix.isNull()) { uint variance=imageVariance(pix.convertToImage()/*.bits(),( (width+ 7) & ~0x7), width, height, 1 */); - kdDebug() << "videopreview: " << TQFileInfo(path).fileName() << " frame variance: " << variance << "; " << + kdDebug() << "mplayer-thumbnailer: " << TQFileInfo(path).fileName() << " frame variance: " << variance << "; " << ((variance<=40 && ( i!=LASTTRY-1))? "!!!DROPPING!!!" : "GOOD :-)" ) << endl; if(variance>40 || i==LASTTRY-1 ) break; } @@ -163,11 +163,11 @@ bool VideoPreview::create(const TQString &path, int width, int height, TQImage & TQPixmap sprocket; if (pix.height() < 60) - sprocket = TQPixmap(locate( "data", "videopreview/sprocket-small.png" )); + sprocket = TQPixmap(locate( "data", "mplayer-thumbnailer/sprocket-small.png" )); else if (pix.height() < 90) - sprocket = TQPixmap(locate( "data", "videopreview/sprocket-medium.png" )); + sprocket = TQPixmap(locate( "data", "mplayer-thumbnailer/sprocket-medium.png" )); else - sprocket = TQPixmap(locate( "data", "videopreview/sprocket-large.png" )); + sprocket = TQPixmap(locate( "data", "mplayer-thumbnailer/sprocket-large.png" )); for (int y = 0; y < pix.height() + sprocket.height(); y += sprocket.height()) { painter.drawPixmap( 0, y, sprocket ); @@ -181,10 +181,10 @@ bool VideoPreview::create(const TQString &path, int width, int height, TQImage & return true; } -TQPixmap VideoPreview::getFrame(const TQString &path, int flags) +TQPixmap MPlayerThumbnailer::getFrame(const TQString &path, int flags) { TQStringList args; - kdDebug() << "videopreview: using flags " << flags << endl; + kdDebug() << "mplayer-thumbnailer: using flags " << flags << endl; #define START ((fileinfo.seconds*15)/100) #define END ((fileinfo.seconds*70)/100) mplayerprocess->setCommunication( 0 ); @@ -197,18 +197,18 @@ TQPixmap VideoPreview::getFrame(const TQString &path, int flags) // } if( flags & framerandom ) { - kdDebug() << "videopreview: framerandom\n"; + kdDebug() << "mplayer-thumbnailer: framerandom\n"; unsigned long start=(unsigned long)(START+(rand->getDouble() * (END - START) ) ); args << "-ss" << TQString::number( start ) << "-frames" << "4"; } else if (flags & frameend ) { - kdDebug() << "videopreview: frameend\n"; + kdDebug() << "mplayer-thumbnailer: frameend\n"; args << "-ss" << TQString::number( fileinfo.seconds - 10 ) << "-frames" << "4"; } else if (flags & framestart) { - kdDebug() << "videopreview: framestart\n"; + kdDebug() << "mplayer-thumbnailer: 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" << TQString::number( fileinfo.fps*10 ); @@ -216,7 +216,7 @@ TQPixmap VideoPreview::getFrame(const TQString &path, int flags) args << "-nocache" << "-idx" /*@TODO check if it's too slow..*/ << "-ao" << "null"/*"-nosound" << */<< "-speed" << "99" /*<< "-sstep" << "5"*/ << "-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; + kdDebug() << "mplayer-thumbnailer: Starting MPlayer with" << args.join( " ") << endl; // return false; mplayerprocess->setArguments( args); mplayerprocess->start(); @@ -224,18 +224,18 @@ TQPixmap VideoPreview::getFrame(const TQString &path, int flags) if (tmpdir->qDir()->entryList( "*.jpg" ).isEmpty() ) return 0; TQString lastframe=tmpdir->qDir()->entryList( "*.jpg" ).last(); - kdDebug() << "videopreview: LastFrame==" << lastframe << endl; + kdDebug() << "mplayer-thumbnailer: LastFrame==" << lastframe << endl; TQPixmap retpix(tmpdir->name().append( lastframe )); return retpix; } -ThumbCreator::Flags VideoPreview::flags() const +ThumbCreator::Flags MPlayerThumbnailer::flags() const { return (Flags)(DrawFrame); } -uint VideoPreview::imageVariance(TQImage image ) +uint MPlayerThumbnailer::imageVariance(TQImage image ) { uint delta=0; uint avg=0; @@ -258,5 +258,5 @@ uint VideoPreview::imageVariance(TQImage image ) } return delta/STEPS; } -#include "videopreview.moc" +#include "mplayer-thumbnailer.moc" diff --git a/src/videopreview.desktop b/src/mplayer-thumbnailer.desktop index c84aab7..6f71873 100644 --- a/src/videopreview.desktop +++ b/src/mplayer-thumbnailer.desktop @@ -1,8 +1,8 @@ [Desktop Entry] +Name=Video Files (MPlayer thumbnailer) Type=Service -Name=Video Files (MPlayerThumbs) -X-TDE-ServiceTypes=ThumbCreator CacheThumbnail=true IgnoreMaximumSize=true MimeTypes=video/*,application/vnd.ms-asf,application/vnd.rn-realmedia -X-TDE-Library=videopreview +X-TDE-ServiceTypes=ThumbCreator +X-TDE-Library=mplayer-thumbnailer diff --git a/src/videopreview.h b/src/mplayer-thumbnailer.h index 418b77b..786b9aa 100644 --- a/src/videopreview.h +++ b/src/mplayer-thumbnailer.h @@ -18,8 +18,8 @@ Boston, MA 02110-1301, USA. ***************************************************************************/ -#ifndef _videopreview_H_ -#define _videopreview_H_ +#ifndef _mplayer_thumbnailer_H_ +#define _mplayer_thumbnailer_H_ #include <tqstring.h> #include <tqcstring.h> @@ -34,12 +34,12 @@ class KRandomSequence; class KPixmapSplitter; #include <tqobject.h> -class VideoPreview : public TQObject, public ThumbCreator +class MPlayerThumbnailer : public TQObject, public ThumbCreator { Q_OBJECT public: - VideoPreview(); - virtual ~VideoPreview(); + MPlayerThumbnailer(); + virtual ~MPlayerThumbnailer(); virtual bool create(const TQString &path, int width, int height, TQImage &img); virtual Flags flags() const; protected: diff --git a/src/mplayerthumbs.kcfg b/src/mplayer-thumbnailer.kcfg index 2208b1c..76ddfc8 100644 --- a/src/mplayerthumbs.kcfg +++ b/src/mplayer-thumbnailer.kcfg @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd"> <kcfg> - <kcfgfile name="mplayerthumbs"/> - <group name="MPlayerThumbsCfg"> + <kcfgfile name="mplayer-thumbnailer"/> + <group name="MPlayerThumbnailerCfg"> <entry name="mplayerbin" type="String"> <label>Full path of the mplayer binary to use.</label> </entry> <entry name="noextensions" type="StringList"> - <label>File extensions that mplayerthumbs should avoid</label> + <label>File extensions that mplayer-thumbnailer should avoid</label> </entry> <entry name="customargs" type="String"> <label>Append custom arguments to mplayer</label> diff --git a/src/mplayerthumbs.cpp b/src/mplayerthumbs.cpp deleted file mode 100644 index a183e83..0000000 --- a/src/mplayerthumbs.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// This file is generated by tdeconfig_compiler from mplayerthumbs.kcfg. -// All changes you do to this file will be lost. - -#include "mplayerthumbs.h" - -MPlayerThumbsCfg::MPlayerThumbsCfg( ) - : TDEConfigSkeleton( TQString::fromLatin1( "mplayerthumbs" ) ) -{ - setCurrentGroup( TQString::fromLatin1( "MPlayerThumbsCfg" ) ); - - 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/mplayerthumbs.kcfgc b/src/mplayerthumbs.kcfgc deleted file mode 100644 index a4bed80..0000000 --- a/src/mplayerthumbs.kcfgc +++ /dev/null @@ -1,2 +0,0 @@ -File=mplayerthumbs.kcfg -ClassName=MPlayerThumbsCfg |