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.

56 lines
1.8KB

  1. /***************************************************************************
  2. fileoperation.h - description
  3. -------------------
  4. begin : Sun Nov 11 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 FILEOPERATION_H
  17. #define FILEOPERATION_H
  18. #include <tqobject.h>
  19. #include <kio/jobclasses.h>
  20. #include <kurl.h>
  21. class TQString;
  22. class FileOperation: public TQObject {
  23. Q_OBJECT
  24. TQ_OBJECT
  25. public:
  26. FileOperation();
  27. ~FileOperation();
  28. bool start( const KURL & src, const KURL & dest, int mode, bool overwrite );
  29. bool fcopy( const TQString & src, const TQString & dest );
  30. inline const TQString & error() const;
  31. static TQString getName( const TQString & file );
  32. private slots:
  33. void slotResult( KIO::Job * job );
  34. private:
  35. bool locked;
  36. bool canceled;
  37. int result;
  38. TQString m_error;
  39. };
  40. inline const TQString & FileOperation::error() const
  41. {
  42. return m_error;
  43. }
  44. #endif