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.

74 lines
2.4KB

  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. TQ_OBJECT
  28. public:
  29. Plugin();
  30. virtual ~Plugin();
  31. virtual const TQString getName() const = 0;
  32. virtual const TQString getAccelName() const = 0;
  33. virtual const TQString getPattern() const;
  34. virtual const int type() const = 0;
  35. virtual bool alwaysUsed() const;
  36. virtual bool checkError() = 0;
  37. virtual void drawInterface( TQWidget* w, TQVBoxLayout* l ) = 0;
  38. virtual void fillStructure() { }
  39. virtual TQString processFile( BatchRenamer* b, int i, TQString token, int mode ) = 0;
  40. virtual void finished() { }
  41. virtual void addHelp( HelpDialogData* data );
  42. virtual void removeHelp( HelpDialogData* data );
  43. virtual void clearCache();
  44. virtual const TQPixmap getIcon() const;
  45. virtual const TQStringList getKeys() const;
  46. signals:
  47. void previewChanged( Plugin* plugin );
  48. protected slots:
  49. // call this method when your plugin settings changed
  50. // in a way, that KRename should update its preview
  51. void updatePreview()
  52. {
  53. emit previewChanged( this );
  54. }
  55. protected:
  56. TQWidget* m_widget;
  57. };
  58. #endif