00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef OPIEFTP_H
00013 #define OPIEFTP_H
00014
00015 #include <qvariant.h>
00016 #include <qdialog.h>
00017 #include <qmainwindow.h>
00018 #include <qdir.h>
00019 #include <qstring.h>
00020 #include <qpoint.h>
00021 #include <qpixmap.h>
00022
00023 class QVBoxLayout;
00024 class QHBoxLayout;
00025 class QGridLayout;
00026 class QComboBox;
00027 class QListView;
00028 class QListViewItem;
00029 class QLabel;
00030 class QProgressBar;
00031 class QSpinBox;
00032 class QTabWidget;
00033 class QWidget;
00034 class QToolBar;
00035 class QMenuBar;
00036 class QPopupMenu;
00037 class QFile;
00038 class QLineEdit;
00039 class QPushButton;
00040 class QToolButton;
00041 class QStringList;
00042 class QListBox;
00043 class QTimer;
00044
00045 class OpieFtp : public QMainWindow
00046 {
00047 Q_OBJECT
00048
00049 public:
00050 static QString appName() { return QString::fromLatin1("opieftp"); }
00051 OpieFtp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
00052 ~OpieFtp();
00053
00054 QTabWidget *TabWidget;
00055 QWidget *tab, *tab_2, *tab_3;
00056 QListView *Local_View, *Remote_View;
00057 QListBox *serverListView;
00058
00059 QComboBox *UsernameComboBox, *ServerComboBox, *currentPathCombo;
00060 QLineEdit *PasswordEdit, *remotePath;
00061 QLabel *TextLabel2, *TextLabel1, *TextLabel3, *TextLabel4;;
00062 QSpinBox* PortSpinBox;
00063 QPopupMenu *connectionMenu, *localMenu, *remoteMenu, *tabMenu, *aboutMenu;
00064 QDir currentDir;
00065 QString currentRemoteDir;
00066 QString filterStr;
00067 QListViewItem * item;
00068 QPushButton *connectServerBtn, *newServerButton;
00069 QToolButton *cdUpButton, *homeButton, *docButton;
00070 bool b;
00071
00072 int currentServerConfig;
00073 protected slots:
00074 void initializeGui();
00075 void timerOut();
00076 void upDir();
00077 void homeButtonPushed();
00078 void docButtonPushed();
00079 void doAbout();
00080
00081 void serverComboEdited(const QString & );
00082 void UsernameComboBoxEdited(const QString & );
00083 void PasswordEditEdited(const QString & );
00084
00085 void showLocalMenu( QListViewItem *);
00086 void showRemoteMenu( QListViewItem *);
00087 void doLocalCd();
00088 void doRemoteCd();
00089 void localUpload();
00090 void remoteDownload();
00091 void newConnection();
00092 void connector();
00093 void disConnector();
00094 void populateLocalView();
00095 bool populateRemoteView();
00096 void showHidden();
00097 void writeConfig();
00098 void readConfig();
00099 void localListClicked(QListViewItem *);
00100 void remoteListClicked(QListViewItem *);
00101 void ListPressed( int, QListViewItem *, const QPoint&, int);
00102 void RemoteListPressed( int, QListViewItem *, const QPoint&, int);
00103 void localMakDir();
00104 void localDelete();
00105 void remoteMakDir();
00106 void remoteDelete();
00107
00108 bool remoteDirList(const QString &);
00109 bool remoteChDir(const QString &);
00110
00111 void tabChanged(QWidget*);
00112 void cleanUp();
00113
00114 void remoteRename();
00115 void localRename();
00116
00117 void currentPathComboChanged();
00118 void currentPathComboActivated(const QString &);
00119 void switchToLocalTab();
00120 void switchToRemoteTab();
00121 void switchToConfigTab();
00122
00123 void fillCombos();
00124 void clearCombos();
00125 void fillRemoteCombo(const QString&);
00126 void fillCombo(const QString &);
00127 void serverComboSelected(int);
00128 void deleteServer();
00129 void connectorBtnToggled(bool);
00130 void NewServer();
00131 void serverListClicked( const QString &);
00132
00133 protected:
00134 QPixmap unknownXpm;
00135 bool fuckeduphack;
00136 QStringList remoteDirPathStringList, localDirPathStringList;
00137 QString newServerName;
00138 void nullifyCallBack();
00139 QGridLayout* tabLayout;
00140 QGridLayout* tabLayout_2;
00141 QGridLayout* tabLayout_3;
00142
00143 };
00144
00145 #endif // OPIEFTP_H