00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef NVEMFTP_H
00010 #define NVEMFTP_H
00011
00012 #include <qmainwindow.h>
00013 #include <qurloperator.h>
00014 #include <qurl.h>
00015 #include <qguardedptr.h>
00016 #include <qpopupmenu.h>
00017 #include "ftpview.h"
00018 #include "nvemsplitter.h"
00019 #include "nnet.h"
00020 #include "nnetplugin.h"
00021 #include "nvemoptsdialog.h"
00022 #include "nhostinfo.h"
00023 #include "nqueue.h"
00024
00025 class QAction;
00026 class QToolBar;
00027 class QListView;
00028 class QListViewItem;
00029 class QTabWidget;
00030 class QTextEdit;
00031 class QWidget;
00032 class FtpView;
00033 class QComboBox;
00034 class QProgressBar;
00035 class QLabel;
00036 class QSpinBox;
00037 class QLineEdit;
00038 class QVBox;
00039 class QHBox;
00040 class QPushButton;
00041 class QNetworkOperation;
00042 class QColor;
00043
00047 class nvemFTP : public QMainWindow
00048 {
00049 Q_OBJECT
00050
00051 public:
00053 nvemFTP( QWidget* parent = 0, const char* name = 0, WFlags fl = WType_TopLevel );
00055 virtual ~nvemFTP();
00056
00058 nvemSplitter *topSplitter() const { return tabSplitter; }
00060 nvemSplitter *vertSplitter() const { return vSplitter; }
00062 nvemSplitter *botSplitter() const { return logSplitter; }
00064 void refillProtocols();
00065
00066 protected:
00068 enum Views { LeftLocal=0, LeftRemote, RightLocal, RightRemote };
00070 NNet *rightRemoteNNet;
00072 NNet *leftRemoteNNet;
00074 FtpView *leftRemoteView, *rightRemoteView;
00076 friend class NQueue;
00077
00078 private:
00079 void initGUI();
00080 void initLeftTab();
00081 void initRightTab();
00082 void initQueue();
00083 void initOptions();
00084 void initLog();
00085 void initActions();
00086 void initOperatorConnects();
00087 void initStatusBar();
00088
00089 private slots:
00090 virtual void fileExit();
00091 virtual void slotAboutClicked();
00092 virtual void slotOptionsClicked();
00093 virtual void slotQuickUserChanged(const QString &user);
00094 virtual void slotQuickConnect();
00095 virtual void slotQuickDisconnect();
00096 virtual void slotConnectionStateChanged( int, const QString &msg );
00097 virtual void slotAddToLog(int, NNet::logType col, QString buf );
00098 virtual void slotAddToLog( NNet::logType col, QString buf );
00099 virtual void slotDataTransferProgress( int, unsigned int bytesDone, unsigned int bytesTotal);
00100 virtual void slotDataTransferComplete( int, bool good, uint size, int time, double rate );
00101 virtual void slotItemSelected(const int, const QString, const QUrlInfo &);
00102
00103 virtual void slotTransferItem( const int, const QString, const QUrlInfo & );
00104 virtual void slotRemoveItem( const int, const QString, const QUrlInfo & );
00105 virtual void slotAbortRequested( const int );
00106 virtual void slotListRequested( const int );
00107 virtual void slotRawRequested( const int );
00108
00109 virtual void slotLeftLocalDirChanged(const QString &path);
00110 virtual void slotLeftLocalDirChanged(const QUrlInfo &info);
00111 virtual void slotLeftLocalFinished( QNetworkOperation *op );
00112 virtual void slotLeftLocalStart( QNetworkOperation *op );
00113 virtual void slotLeftLocalRefresh();
00114
00115 virtual void slotRightLocalDirChanged(const QString &path);
00116 virtual void slotRightLocalDirChanged(const QUrlInfo &info);
00117 virtual void slotRightLocalFinished( QNetworkOperation *op );
00118 virtual void slotRightLocalStart( QNetworkOperation *op );
00119 virtual void slotRightLocalRefresh();
00120
00121 virtual void slotLeftRemoteChangeDir(const QString &path);
00122 virtual void slotLeftRemoteDirChanged(int, const QString &path);
00123 virtual void slotLeftRemoteDirChanged(const QUrlInfo &info);
00124 virtual void slotLeftRemoteConnClosed(int);
00125 virtual void slotLeftRemoteConnected(int, NHostInfo);
00126
00127 virtual void slotRightRemoteChangeDir(const QString &path);
00128 virtual void slotRightRemoteDirChanged(int, const QString &path);
00129 virtual void slotRightRemoteDirChanged(const QUrlInfo &info);
00130 virtual void slotRightRemoteConnClosed(int);
00131 virtual void slotRightRemoteConnected(int, NHostInfo);
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149 private:
00150 nvemOptionsDialog *optsDialog;
00151 QTextEdit *logWindow;
00152 nvemSplitter *tabSplitter, *vSplitter, *logSplitter;
00153 QProgressBar *progressBar;
00154 QLabel *progressLabel;
00155 FtpView *leftLocalView, *rightLocalView;
00156 QVBox *mainWidget;
00157 QComboBox *leftLocalCombo, *leftRemoteCombo, *rightLocalCombo,
00158 *rightRemoteCombo, *quickHost, *quickUser, *quickRemotePath;
00159 QComboBox *sideSelection, *quickProtocol;
00160 QSpinBox *quickPortSpin;
00161 QLineEdit *quickPassEdit;
00162 QTabWidget *RightTab, *LeftTab;
00163 QUrlOperator leftLocalOperator, rightLocalOperator,
00164 oldLeftLocal, oldRightLocal;
00165 NQueue *QueueList;
00166 QMenuBar *menubar;
00167 QPopupMenu *fileMenu;
00168 QPopupMenu *editMenu;
00169 QPopupMenu *helpMenu;
00170 QToolBar *toolBar;
00171
00172
00173
00174 QAction* fileOptionsAction;
00175 QAction* fileExitAction;
00176 QAction* editUndoAction;
00177 QAction* editRedoAction;
00178 QAction* editCutAction;
00179 QAction* editCopyAction;
00180 QAction* editPasteAction;
00181
00182
00183
00184 QAction* helpAboutAction;
00185 QAction* queueStartAction;
00186 QAction* queueStopAction;
00187
00188 };
00189
00190 #endif // NVEMFTP_H