TDE core libraries
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.

tdeioslavetest.h 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. This file is or will be part of KDE desktop environment
  3. Copyright 1999 Matt Koss <koss@miesto.sk>
  4. It is licensed under GPL version 2.
  5. If it is part of KDE libraries than this file is licensed under
  6. LGPL version 2.
  7. */
  8. #ifndef _TDEIOSLAVETEST_H
  9. #define _TDEIOSLAVETEST_H
  10. #include <tqlabel.h>
  11. #include <tqlineedit.h>
  12. #include <tqradiobutton.h>
  13. #include <tqpushbutton.h>
  14. #include <tqbuttongroup.h>
  15. #include <tqwidget.h>
  16. #include <tdemainwindow.h>
  17. #include "tdeio/job.h"
  18. #include "tdeio/global.h"
  19. #include "tdeio/statusbarprogress.h"
  20. #include "tdeio/slave.h"
  21. class KioslaveTest : public TDEMainWindow {
  22. Q_OBJECT
  23. public:
  24. KioslaveTest( TQString src, TQString dest, uint op, uint pr );
  25. ~KioslaveTest() {}
  26. enum Operations { List, ListRecursive, Stat, Get, Put, Copy, Move, Delete, Shred, Mkdir, Mimetype };
  27. enum ProgressModes { ProgressNone, ProgressDefault, ProgressStatus };
  28. protected:
  29. void closeEvent( TQCloseEvent * );
  30. void printUDSEntry( const TDEIO::UDSEntry & entry );
  31. // info stuff
  32. TQLabel *lb_from;
  33. TQLineEdit *le_source;
  34. TQLabel *lb_to;
  35. TQLineEdit *le_dest;
  36. // operation stuff
  37. TQButtonGroup *opButtons;
  38. TQRadioButton *rbList;
  39. TQRadioButton *rbListRecursive;
  40. TQRadioButton *rbStat;
  41. TQRadioButton *rbGet;
  42. TQRadioButton *rbPut;
  43. TQRadioButton *rbCopy;
  44. TQRadioButton *rbMove;
  45. TQRadioButton *rbDelete;
  46. TQRadioButton *rbShred;
  47. TQRadioButton *rbMkdir;
  48. TQRadioButton *rbMimetype;
  49. // progress stuff
  50. TQButtonGroup *progressButtons;
  51. TQRadioButton *rbProgressNone;
  52. TQRadioButton *rbProgressDefault;
  53. TQRadioButton *rbProgressStatus;
  54. TQPushButton *pbStart;
  55. TQPushButton *pbStop;
  56. TQPushButton *close;
  57. protected slots:
  58. void changeOperation( int id );
  59. void changeProgressMode( int id );
  60. void startJob();
  61. void stopJob();
  62. void slotResult( TDEIO::Job * );
  63. void slotEntries( TDEIO::Job *, const TDEIO::UDSEntryList& );
  64. void slotData( TDEIO::Job *, const TQByteArray &data );
  65. void slotDataReq( TDEIO::Job *, TQByteArray &data );
  66. void slotQuit();
  67. void slotSlaveConnected();
  68. void slotSlaveError();
  69. private:
  70. TDEIO::Job *job;
  71. TQWidget *main_widget;
  72. TDEIO::StatusbarProgress *statusProgress;
  73. int selectedOperation;
  74. int progressMode;
  75. int putBuffer;
  76. TDEIO::Slave *slave;
  77. };
  78. #endif // _TDEIOSLAVETEST_H