snumplugin.h (krename-4.0.9) | : | snumplugin.h (krename-4.90.90) | ||
---|---|---|---|---|
skipping to change at line 18 | skipping to change at line 18 | |||
/*************************************************************************** | /*************************************************************************** | |||
* * | * * | |||
* This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | |||
* it under the terms of the GNU General Public License as published by * | * it under the terms of the GNU General Public License as published by * | |||
* the Free Software Foundation; either version 2 of the License, or * | * the Free Software Foundation; either version 2 of the License, or * | |||
* (at your option) any later version. * | * (at your option) any later version. * | |||
* * | * * | |||
***************************************************************************/ | ***************************************************************************/ | |||
#ifndef _SNUM_PLUGIN_H_ | #ifndef SNUM_PLUGIN_H | |||
#define _SNUM_PLUGIN_H_ | #define SNUM_PLUGIN_H | |||
#include "fileplugin.h" | #include "fileplugin.h" | |||
class SnumPlugin : public FilePlugin { | class SnumPlugin : public FilePlugin | |||
public: | { | |||
SnumPlugin( PluginLoader* loader ); | public: | |||
explicit SnumPlugin(PluginLoader *loader); | ||||
~SnumPlugin(); | ~SnumPlugin(); | |||
/** | /** | |||
* @returns the type of the plugin. | * @returns the type of the plugin. | |||
*/ | */ | |||
inline virtual int type() const; | inline virtual int type() const; | |||
/** | /** | |||
* This function is the core of your plugin. | * This function is the core of your plugin. | |||
skipping to change at line 61 | skipping to change at line 62 | |||
* in brackets. If your plugin supports the token [ex ample], | * in brackets. If your plugin supports the token [ex ample], | |||
* KRename will pass the strign "example" to your met hod. | * KRename will pass the strign "example" to your met hod. | |||
* @param eCurrentType the current type of plugin that is requested (for plu gins that support more than one type) | * @param eCurrentType the current type of plugin that is requested (for plu gins that support more than one type) | |||
* | * | |||
* @returns the result of the function, depending on type(). | * @returns the result of the function, depending on type(). | |||
* @returns QString::null if this plugin has nothing to do. | * @returns QString::null if this plugin has nothing to do. | |||
* @returns A new filename if type is ePluginType_Filename | * @returns A new filename if type is ePluginType_Filename | |||
* @returns the value of the token if type is ePluginType_Token | * @returns the value of the token if type is ePluginType_Token | |||
* @returns an error message or QString::null if type is ePluginType_File | * @returns an error message or QString::null if type is ePluginType_File | |||
*/ | */ | |||
virtual QString processFile( BatchRenamer* b, int index, const QString & fil enameOrToken, EPluginType eCurrentType ); | virtual QString processFile(BatchRenamer *b, int index, const QString &filen ameOrToken, EPluginType eCurrentType); | |||
/** Returns help descriptions for the supported tokens | /** Returns help descriptions for the supported tokens | |||
* | * | |||
* The returned stringlist contains strings that are the tokens | * The returned stringlist contains strings that are the tokens | |||
* and the description separated by ;; | * and the description separated by ;; | |||
* | * | |||
* @returns a stringlist containing help on the supported tokens | * @returns a stringlist containing help on the supported tokens | |||
*/ | */ | |||
inline const QStringList & help() const; | inline const QStringList &help() const; | |||
/** Create a user interface for this plugin | /** Create a user interface for this plugin | |||
* | * | |||
* @param parent the parent widget of this plugin | * @param parent the parent widget of this plugin | |||
*/ | */ | |||
private: | private: | |||
/** Return the number. | /** Return the number. | |||
* | * | |||
* @param unicoded the string which is to be extracted | * @param unicoded the string which is to be extracted | |||
* | * | |||
* @returns the number part of the string, season, or episode or both | * @returns the number part of the string, season, or episode or both | |||
*/ | */ | |||
QString extractnum(const QString & unicoded, int a); | QString extractnum(const QString &unicoded, int a); | |||
private: | private: | |||
QStringList m_help; | QStringList m_help; | |||
}; | }; | |||
inline int SnumPlugin::type() const | inline int SnumPlugin::type() const | |||
{ | { | |||
return ePluginType_Token; | return ePluginType_Token; | |||
} | } | |||
inline const QStringList & SnumPlugin::help() const | inline const QStringList &SnumPlugin::help() const | |||
{ | { | |||
return m_help; | return m_help; | |||
} | } | |||
#endif // _SNUM_PLUGIN_H_ | #endif // SNUM_PLUGIN_H | |||
End of changes. 9 change blocks. | ||||
11 lines changed or deleted | 12 lines changed or added |