KRename – powerful batch renamer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

plugin.h 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /***************************************************************************
  2. plugin.h - description
  3. -------------------
  4. begin : Sun Dec 30 2001
  5. copyright : (C) 2001 by Dominik Seichter
  6. email : domseichter@web.de
  7. ***************************************************************************/
  8. /***************************************************************************
  9. * *
  10. * This program is free software; you can redistribute it and/or modify *
  11. * it under the terms of the GNU General Public License as published by *
  12. * the Free Software Foundation; either version 2 of the License, or *
  13. * (at your option) any later version. *
  14. * *
  15. ***************************************************************************/
  16. #ifndef PLUGIN_H
  17. #define PLUGIN_H
  18. #include "batchrenamer.h"
  19. #include <tqobject.h>
  20. class HelpDialogData;
  21. class TQString;
  22. class TQStringList;
  23. class TQWidget;
  24. class TQVBoxLayout;
  25. class Plugin : public TQObject {
  26. Q_OBJECT
  27. public:
  28. Plugin();
  29. virtual ~Plugin();
  30. virtual const TQString getName() const = 0;
  31. virtual const TQString getAccelName() const = 0;
  32. virtual const TQString getPattern() const;
  33. virtual const int type() const = 0;
  34. virtual bool alwaysUsed() const;
  35. virtual bool checkError() = 0;
  36. virtual void drawInterface( TQWidget* w, TQVBoxLayout* l ) = 0;
  37. virtual void fillStructure() { }
  38. virtual TQString processFile( BatchRenamer* b, int i, TQString token, int mode ) = 0;
  39. virtual void finished() { }
  40. virtual void addHelp( HelpDialogData* data );
  41. virtual void removeHelp( HelpDialogData* data );
  42. virtual void clearCache();
  43. virtual const TQPixmap getIcon() const;
  44. virtual const TQStringList getKeys() const;
  45. signals:
  46. void previewChanged( Plugin* plugin );
  47. protected slots:
  48. // call this method when your plugin settings changed
  49. // in a way, that KRename should update its preview
  50. void updatePreview()
  51. {
  52. emit previewChanged( this );
  53. }
  54. protected:
  55. TQWidget* m_widget;
  56. };
  57. #endif