dirsortplugin.h (krename-4.0.9) | : | dirsortplugin.h (krename-4.90.90) | ||
---|---|---|---|---|
skipping to change at line 24 | skipping to change at line 24 | |||
* (at your option) any later version. * | * (at your option) any later version. * | |||
* * | * * | |||
***************************************************************************/ | ***************************************************************************/ | |||
#ifndef DIR_SORT_PLUGIN_H | #ifndef DIR_SORT_PLUGIN_H | |||
#define DIR_SORT_PLUGIN_H | #define DIR_SORT_PLUGIN_H | |||
#include "plugin.h" | #include "plugin.h" | |||
#include "ui_dirsortpluginwidget.h" | #include "ui_dirsortpluginwidget.h" | |||
class DirSortPlugin : public Plugin { | #include <QUrl> | |||
public: | ||||
DirSortPlugin( PluginLoader* loader ); | class DirSortPlugin : public Plugin | |||
{ | ||||
public: | ||||
explicit DirSortPlugin(PluginLoader *loader); | ||||
~DirSortPlugin(); | ~DirSortPlugin(); | |||
/** | /** | |||
* @returns a name of the plugin that can be displayed | * @returns a name of the plugin that can be displayed | |||
* to the user. This name should be internationalized. | * to the user. This name should be internationalized. | |||
*/ | */ | |||
virtual const QString name() const; | virtual const QString name() const; | |||
/** | /** | |||
* Determines the type of the plugin. | * Determines the type of the plugin. | |||
skipping to change at line 83 | skipping to change at line 86 | |||
* 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); | |||
/** Get a list of all tokens supported by this plugin. | /** Get a list of all tokens supported by this plugin. | |||
* | * | |||
* If the token type != ePluginType_Token you have to return an empty list | * If the token type != ePluginType_Token you have to return an empty list | |||
* | * | |||
* @returns a list of all supported tokens. The returned strings will be tr eated | * @returns a list of all supported tokens. The returned strings will be tr eated | |||
* as regular expressions to find a plugin which supports a token. | * as regular expressions to find a plugin which supports a token. | |||
*/ | */ | |||
virtual const QStringList & supportedTokens() const; | virtual const QStringList &supportedTokens() const; | |||
/** 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 | |||
*/ | */ | |||
virtual const QStringList & help() const; | virtual 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 | |||
*/ | */ | |||
virtual void createUI( QWidget* parent ) const; | virtual void createUI(QWidget *parent) const; | |||
private: | private: | |||
/** | /** | |||
* Create a new subdirectory with the current setting | * Create a new subdirectory with the current setting | |||
* from m_digits and m_dirCounter. | * from m_digits and m_dirCounter. | |||
* | * | |||
* \returns the URL of the new subdirectory. | * \returns the URL of the new subdirectory. | |||
*/ | */ | |||
KUrl createNewSubdirectory() const; | QUrl createNewSubdirectory() const; | |||
protected: | protected: | |||
int m_dirCounter; | int m_dirCounter; | |||
int m_fileCounter; | int m_fileCounter; | |||
int m_filesPerDir; | int m_filesPerDir; | |||
int m_digits; | int m_digits; | |||
KUrl m_baseDirectory; | QUrl m_baseDirectory; | |||
KUrl m_currentDirectory; | QUrl m_currentDirectory; | |||
Ui::DirSortPluginWidget* m_widget; | Ui::DirSortPluginWidget *m_widget; | |||
QStringList m_emptyList; | QStringList m_emptyList; | |||
bool m_valid; | bool m_valid; | |||
}; | }; | |||
#endif // DIR_SORT_PLUGIN | #endif // DIR_SORT_PLUGIN | |||
End of changes. 8 change blocks. | ||||
11 lines changed or deleted | 14 lines changed or added |