summaryrefslogtreecommitdiffstats
path: root/kio/tests/kioslavetest.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch)
tree5ac38a06f3dde268dc7927dc155896926aaf7012 /kio/tests/kioslavetest.h
downloadtdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz
tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kio/tests/kioslavetest.h')
-rw-r--r--kio/tests/kioslavetest.h108
1 files changed, 108 insertions, 0 deletions
diff --git a/kio/tests/kioslavetest.h b/kio/tests/kioslavetest.h
new file mode 100644
index 000000000..34cb00c15
--- /dev/null
+++ b/kio/tests/kioslavetest.h
@@ -0,0 +1,108 @@
+ /*
+ This file is or will be part of KDE desktop environment
+
+ Copyright 1999 Matt Koss <koss@miesto.sk>
+
+ It is licensed under GPL version 2.
+
+ If it is part of KDE libraries than this file is licensed under
+ LGPL version 2.
+ */
+
+#ifndef _KIOSLAVETEST_H
+#define _KIOSLAVETEST_H
+
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qradiobutton.h>
+#include <qpushbutton.h>
+#include <qbuttongroup.h>
+#include <qwidget.h>
+
+#include <kmainwindow.h>
+
+#include "kio/job.h"
+#include "kio/global.h"
+#include "kio/statusbarprogress.h"
+#include "kio/slave.h"
+
+class KioslaveTest : public KMainWindow {
+ Q_OBJECT
+
+public:
+ KioslaveTest( QString src, QString dest, uint op, uint pr );
+ ~KioslaveTest() {}
+
+ enum Operations { List, ListRecursive, Stat, Get, Put, Copy, Move, Delete, Shred, Mkdir, Mimetype };
+
+ enum ProgressModes { ProgressNone, ProgressDefault, ProgressStatus };
+
+protected:
+
+ void closeEvent( QCloseEvent * );
+
+ void printUDSEntry( const KIO::UDSEntry & entry );
+
+ // info stuff
+ QLabel *lb_from;
+ QLineEdit *le_source;
+
+ QLabel *lb_to;
+ QLineEdit *le_dest;
+
+ // operation stuff
+ QButtonGroup *opButtons;
+
+ QRadioButton *rbList;
+ QRadioButton *rbListRecursive;
+ QRadioButton *rbStat;
+ QRadioButton *rbGet;
+ QRadioButton *rbPut;
+ QRadioButton *rbCopy;
+ QRadioButton *rbMove;
+ QRadioButton *rbDelete;
+ QRadioButton *rbShred;
+ QRadioButton *rbMkdir;
+ QRadioButton *rbMimetype;
+
+ // progress stuff
+ QButtonGroup *progressButtons;
+
+ QRadioButton *rbProgressNone;
+ QRadioButton *rbProgressDefault;
+ QRadioButton *rbProgressStatus;
+
+ QPushButton *pbStart;
+ QPushButton *pbStop;
+
+ QPushButton *close;
+
+protected slots:
+ void changeOperation( int id );
+ void changeProgressMode( int id );
+
+ void startJob();
+ void stopJob();
+
+ void slotResult( KIO::Job * );
+ void slotEntries( KIO::Job *, const KIO::UDSEntryList& );
+ void slotData( KIO::Job *, const QByteArray &data );
+ void slotDataReq( KIO::Job *, QByteArray &data );
+
+ void slotQuit();
+ void slotSlaveConnected();
+ void slotSlaveError();
+
+private:
+ KIO::Job *job;
+ QWidget *main_widget;
+
+ KIO::StatusbarProgress *statusProgress;
+
+ int selectedOperation;
+ int progressMode;
+ int putBuffer;
+ KIO::Slave *slave;
+};
+
+#endif // _KIOSLAVETEST_H