00001 #ifndef TRANSFER_DIALOG_H
00002 #define TRANSFER_DIALOG_H
00003
00004 #include "qdialog.h"
00005
00006 class QLineEdit;
00007 class QComboBox;
00008 class QProgressBar;
00009 class QLabel;
00010 class QPushButton;
00011 class MainWindow;
00012 class FileTransferLayer;
00013 class ReceiveLayer;
00014
00015 class TransferDialog : public QDialog
00016 {
00017 Q_OBJECT
00018 public:
00019 TransferDialog(QWidget *parent = 0l, MainWindow *mainwindow = 0l, const char *name = 0l);
00020 ~TransferDialog();
00021 bool isRunning();
00022
00023 public slots:
00024 void slotFilename();
00025 void slotTransfer();
00026 void slotCancel();
00027 void slotProgress(const QString&, int, int, int, int, int);
00028 void slotError(int error, const QString& message);
00029 void slotSent();
00030 void slotReceived(const QString& file);
00031 void slotMode(int id);
00032
00033 private:
00034 enum Modes
00035 {
00036 id_send,
00037 id_receive
00038 };
00039
00040 void cleanup();
00041
00042 QLineEdit *filename;
00043 QComboBox *protocol;
00044 QProgressBar *progressbar;
00045 QLabel *statusbar;
00046 QPushButton *ok, *cancel, *selector;
00047 MainWindow* m_win;
00048 FileTransferLayer* m_lay;
00049 ReceiveLayer *m_recvlay;
00050 int m_transfermode;
00051 int m_autocleanup;
00052 bool m_running;
00053 };
00054
00055 #endif
00056