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.

fileoperation.h 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 <tdeio/jobclasses.h>
  20. #include <kurl.h>
  21. class TQString;
  22. class FileOperation: public TQObject {
  23. Q_OBJECT
  24. public:
  25. FileOperation();
  26. ~FileOperation();
  27. bool start( const KURL & src, const KURL & dest, int mode, bool overwrite );
  28. bool fcopy( const TQString & src, const TQString & dest );
  29. inline const TQString & error() const;
  30. static TQString getName( const TQString & file );
  31. private slots:
  32. void slotResult( TDEIO::Job * job );
  33. private:
  34. bool locked;
  35. bool canceled;
  36. int result;
  37. TQString m_error;
  38. };
  39. inline const TQString & FileOperation::error() const
  40. {
  41. return m_error;
  42. }
  43. #endif