00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ADVANCEDFM_H
00013 #define ADVANCEDFM_H
00014 #define QTOPIA_INTERNAL_FSLP // to get access to fileproperties
00015 #define QT_QWS_OPIE
00016
00017 #include <opie2/oprocess.h>
00018 #include <opie2/osplitter.h>
00019
00020 #include <qpe/ir.h>
00021 #include <qpe/qcopenvelope_qws.h>
00022
00023 #include <qvariant.h>
00024 #include <qdialog.h>
00025 #include <qmainwindow.h>
00026 #include <qstringlist.h>
00027 #include <qdir.h>
00028 #include <qstring.h>
00029 #include <qpoint.h>
00030 #include <qtimer.h>
00031 #include <qpixmap.h>
00032
00033
00034 class QVBoxLayout;
00035 class QHBoxLayout;
00036 class QGridLayout;
00037 class QComboBox;
00038 class QListView;
00039 class QListviewItem;
00040 class QLabel;
00041 class QProgressBar;
00042 class QSpinBox;
00043 class QWidget;
00044 class QPopupMenu;
00045 class QFile;
00046 class QListViewItem;
00047 class QLineEdit;
00048 class MenuButton;
00049
00050 class QToolButton;
00051 class Ir;
00052
00053 class AdvancedFm : public QMainWindow
00054 {
00055 Q_OBJECT
00056 public:
00057 static QString appName() { return QString::fromLatin1("advancedfm"); }
00058 AdvancedFm(QWidget *p = 0, const char* name = 0, WFlags fl = 0);
00059 ~AdvancedFm();
00060 protected:
00061
00062 Opie::Ui::OSplitter *TabWidget;
00063 QCopChannel * channel;
00064 QPixmap unknownXpm;
00065 int whichTab;
00066
00067 QWidget *tab, *tab_2, *tab_3;
00068 QListView *Local_View, *Remote_View;
00069
00070 QLineEdit *currentPathEdit;
00071 QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu ;
00072 QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton;
00073
00074 QDir currentDir, currentRemoteDir;
00075 QComboBox *currentPathCombo;
00076 QString filterStr, s_addBookmark, s_removeBookmark;
00077 QListViewItem * item;
00078 bool b;
00079 QStringList fileSystemTypeList, fsList;
00080 int currentServerConfig;
00081 QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3;
00082 QStringList remoteDirPathStringList, localDirPathStringList;
00083 QLineEdit *renameBox;
00084
00085 void init();
00086 void initConnections();
00087 void keyReleaseEvent( QKeyEvent *);
00088 void keyPressEvent( QKeyEvent *);
00089 QString getFileSystemType(const QString &);
00090 QString getDiskSpace(const QString &);
00091 void parsetab(const QString &fileName);
00092 QString checkDiskSpace(const QString &);
00093 QString dealWithSymName(const QString &);
00094 QDir *CurrentDir();
00095 QDir *OtherDir();
00096 QListView *CurrentView();
00097 QListView *OtherView();
00098 void setOtherTabCurrent();
00099
00100
00101
00102
00103 protected slots:
00104 void changeTo(const QString &);
00105 void slotSwitchMenu(int);
00106 void selectAll();
00107 void addToDocs();
00108 void doDirChange();
00109 void mkDir();
00110 void del();
00111 void rn();
00112 void populateView();
00113 void rePopulate();
00114 void showHidden();
00115 void showMenuHidden();
00116 void ListClicked(QListViewItem *);
00117 void ListPressed( int, QListViewItem *, const QPoint&, int);
00118 void makeDir();
00119 void doDelete();
00120 void tabChanged(QWidget*);
00121 void cleanUp();
00122 void renameIt();
00123 void runThis();
00124 void runText();
00125 void filePerms();
00126 void doProperties();
00127 void runCommand();
00128 void runCommandStd();
00129 QStringList getPath();
00130 void mkSym();
00131 void switchToLocalTab();
00132 void switchToRemoteTab();
00133 void refreshCurrentTab();
00134
00135 void openSearch();
00136 void dirMenuSelected(int);
00137 void showFileMenu();
00138 void homeButtonPushed();
00139 void docButtonPushed();
00140 void SDButtonPushed();
00141 void CFButtonPushed();
00142 void QPEButtonPushed();
00143 void upDir();
00144 void currentPathComboChanged();
00145
00146 void copy();
00147 void copyTimer();
00148 void copyAs();
00149 void copyAsTimer();
00150 void copySameDir();
00151 void copySameDirTimer();
00152 void move();
00153 void moveTimer();
00154
00155 void fillCombo(const QString &);
00156 bool copyFile( const QString & , const QString & );
00157 void fileStatus();
00158 void doAbout();
00159 void doBeam();
00160 void fileBeamFinished( Ir *);
00161 bool copyDirectory( const QString & , const QString & );
00162
00163 bool moveDirectory( const QString & , const QString & );
00164
00165
00166
00167 private:
00168 MenuButton *menuButton;
00169 QString oldName, localViewDir, remoteViewDir;
00170 void startProcess(const QString &);
00171 bool eventFilter( QObject * , QEvent * );
00172 void cancelRename();
00173 void doRename(QListView *);
00174 void okRename();
00175 void customDirsToMenu();
00176 void addCustomDir();
00177 void removeCustomDir();
00178 void navigateToSelected();
00179
00180 private slots:
00181 void processEnded(Opie::Core::OProcess *);
00182 void oprocessStderr(Opie::Core::OProcess *, char *, int);
00183 void gotoCustomDir(const QString &);
00184 void qcopReceive(const QCString&, const QByteArray&);
00185 void setDocument(const QString &);
00186
00187
00188 };
00189
00190 #endif // ADVANCEDFM_H