Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 122 |
1 files changed, 60 insertions, 62 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index 7478dcb..8eec6ba 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | advancedfm.h | 2 | advancedfm.h |
3 | ------------------- | 3 | ------------------- |
4 | ** Created: Sat Mar 9 23:33:09 2002 | 4 | ** Created: Sat Mar 9 23:33:09 2002 |
5 | copyright : (C) 2002 by ljp | 5 | copyright : (C) 2002 by ljp |
6 | email : ljp@llornkcor.com | 6 | email : ljp@llornkcor.com |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
9 | * the Free Software Foundation; either version 2 of the License, or * | 9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * | 10 | * (at your option) any later version. * |
11 | ***************************************************************************/ | 11 | ***************************************************************************/ |
12 | #ifndef ADVANCEDFM_H | 12 | #ifndef ADVANCEDFM_H |
13 | #define ADVANCEDFM_H | 13 | #define ADVANCEDFM_H |
14 | #define QTOPIA_INTERNAL_FSLP // to get access to fileproperties | 14 | #define QTOPIA_INTERNAL_FSLP // to get access to fileproperties |
15 | #define QT_QWS_OPIE | 15 | #define QT_QWS_OPIE |
16 | 16 | ||
17 | //#include <opie/otabwidget.h> | 17 | //#include <opie/otabwidget.h> |
18 | #include <qpe/ir.h> | 18 | #include <qpe/ir.h> |
19 | 19 | ||
20 | #include <qvariant.h> | 20 | #include <qvariant.h> |
21 | #include <qdialog.h> | 21 | #include <qdialog.h> |
22 | #include <qmainwindow.h> | 22 | #include <qmainwindow.h> |
23 | #include <qstringlist.h> | 23 | #include <qstringlist.h> |
@@ -43,131 +43,129 @@ class QPEMenuBar; | |||
43 | class QPopupMenu; | 43 | class QPopupMenu; |
44 | class QFile; | 44 | class QFile; |
45 | class QListViewItem; | 45 | class QListViewItem; |
46 | class QLineEdit; | 46 | class QLineEdit; |
47 | class MenuButton; | 47 | class MenuButton; |
48 | 48 | ||
49 | //class QPushButton; | 49 | //class QPushButton; |
50 | class QToolButton; | 50 | class QToolButton; |
51 | class Ir; | 51 | class Ir; |
52 | 52 | ||
53 | class AdvancedFm : public QMainWindow | 53 | class AdvancedFm : public QMainWindow |
54 | { | 54 | { |
55 | Q_OBJECT | 55 | Q_OBJECT |
56 | public: | 56 | public: |
57 | AdvancedFm(); | 57 | AdvancedFm(); |
58 | ~AdvancedFm(); | 58 | ~AdvancedFm(); |
59 | protected slots: | 59 | protected slots: |
60 | void selectAll(); | 60 | void selectAll(); |
61 | void addToDocs(); | 61 | void addToDocs(); |
62 | void doLocalCd(); | 62 | void doDirChange(); |
63 | void doRemoteCd(); | 63 | void mkDir(); |
64 | // void copy(); | 64 | void del(); |
65 | void mkDir(); | 65 | void rn(); |
66 | void del(); | 66 | void populateLocalView(); |
67 | void rn(); | 67 | void populateRemoteView(); |
68 | void populateLocalView(); | 68 | void showHidden(); |
69 | void populateRemoteView(); | 69 | void showMenuHidden(); |
70 | void showHidden(); | 70 | // void showRemoteHidden(); |
71 | void showMenuHidden(); | 71 | void writeConfig(); |
72 | void showRemoteHidden(); | 72 | void readConfig(); |
73 | void writeConfig(); | 73 | void ListClicked(QListViewItem *); |
74 | void readConfig(); | 74 | void ListPressed( int, QListViewItem *, const QPoint&, int); |
75 | void localListClicked(QListViewItem *); | 75 | void makeDir(); |
76 | void remoteListClicked(QListViewItem *); | 76 | void doDelete(); |
77 | void localListPressed( int, QListViewItem *, const QPoint&, int); | 77 | void tabChanged(QWidget*); |
78 | void remoteListPressed( int, QListViewItem *, const QPoint&, int); | 78 | void cleanUp(); |
79 | void localMakDir(); | 79 | void renameIt(); |
80 | void localDelete(); | 80 | void runThis(); |
81 | void remoteMakDir(); | 81 | void runText(); |
82 | void remoteDelete(); | 82 | void filePerms(); |
83 | /* bool remoteDirList(const QString &); */ | 83 | void doProperties(); |
84 | /* bool remoteChDir(const QString &); */ | 84 | void runCommand(); |
85 | void tabChanged(QWidget*); | 85 | void runCommandStd(); |
86 | void cleanUp(); | 86 | QStringList getPath(); |
87 | void remoteRename(); | 87 | void mkSym(); |
88 | void localRename(); | ||
89 | void runThis(); | ||
90 | void runText(); | ||
91 | void filePerms(); | ||
92 | void doProperties(); | ||
93 | void runCommand(); | ||
94 | void runCommandStd(); | ||
95 | QStringList getPath(); | ||
96 | void mkSym(); | ||
97 | void switchToLocalTab(); | 88 | void switchToLocalTab(); |
98 | void switchToRemoteTab(); | 89 | void switchToRemoteTab(); |
99 | 90 | ||
100 | protected: | 91 | protected: |
101 | 92 | ||
102 | OTabWidget *TabWidget; | 93 | OTabWidget *TabWidget; |
94 | int whichTab; | ||
103 | // QTabWidget *TabWidget; | 95 | // QTabWidget *TabWidget; |
104 | QWidget *tab, *tab_2, *tab_3; | 96 | QWidget *tab, *tab_2, *tab_3; |
105 | QListView *Local_View, *Remote_View; | 97 | QListView *Local_View, *Remote_View; |
106 | 98 | ||
107 | QLineEdit *currentPathEdit; | 99 | QLineEdit *currentPathEdit; |
108 | QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu /*, *customDirMenu*/; | 100 | QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu /*, *customDirMenu*/; |
109 | QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; | 101 | QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; |
110 | // QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; | 102 | // QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; |
111 | QDir currentDir, currentRemoteDir; | 103 | QDir currentDir, currentRemoteDir; |
112 | QComboBox *currentPathCombo; | 104 | QComboBox *currentPathCombo; |
113 | QString filterStr, s_addBookmark, s_removeBookmark; | 105 | QString filterStr, s_addBookmark, s_removeBookmark; |
114 | QListViewItem * item; | 106 | QListViewItem * item; |
115 | bool b; | 107 | bool b; |
116 | QStringList fileSystemTypeList, fsList; | 108 | QStringList fileSystemTypeList, fsList; |
117 | int currentServerConfig; | 109 | int currentServerConfig; |
118 | bool zaurusDevice; | 110 | bool zaurusDevice; |
119 | QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3; | 111 | QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3; |
120 | QStringList remoteDirPathStringList, localDirPathStringList; | 112 | QStringList remoteDirPathStringList, localDirPathStringList; |
121 | QLineEdit *renameBox; | 113 | QLineEdit *renameBox; |
122 | 114 | ||
123 | void init(); | 115 | void init(); |
124 | void initConnections(); | 116 | void initConnections(); |
125 | void keyReleaseEvent( QKeyEvent *); | 117 | void keyReleaseEvent( QKeyEvent *); |
118 | void keyPressEvent( QKeyEvent *); | ||
126 | QString getFileSystemType(const QString &); | 119 | QString getFileSystemType(const QString &); |
127 | QString getDiskSpace(const QString &); | 120 | QString getDiskSpace(const QString &); |
128 | void parsetab(const QString &fileName); | 121 | void parsetab(const QString &fileName); |
129 | QString checkDiskSpace(const QString &); | 122 | QString checkDiskSpace(const QString &); |
130 | QString dealWithSymName(const QString &); | 123 | QString dealWithSymName(const QString &); |
131 | 124 | QDir *CurrentDir(); | |
125 | QDir *OtherDir(); | ||
126 | QListView *CurrentView(); | ||
127 | QListView *OtherView(); | ||
128 | void PopulateView(); | ||
129 | |||
132 | protected slots: | 130 | protected slots: |
133 | void dirMenuSelected(int); | 131 | void dirMenuSelected(int); |
134 | void showFileMenu(); | 132 | void showFileMenu(); |
135 | void cancelMenuTimer(); | 133 | void cancelMenuTimer(); |
136 | void homeButtonPushed(); | 134 | void homeButtonPushed(); |
137 | void docButtonPushed(); | 135 | void docButtonPushed(); |
138 | void SDButtonPushed(); | 136 | void SDButtonPushed(); |
139 | void CFButtonPushed(); | 137 | void CFButtonPushed(); |
140 | void QPEButtonPushed(); | 138 | void QPEButtonPushed(); |
141 | void upDir(); | 139 | void upDir(); |
142 | void currentPathComboChanged(); | 140 | void currentPathComboChanged(); |
143 | void copy(); | 141 | void copy(); |
144 | void copyAs(); | 142 | void copyAs(); |
145 | void copySameDir(); | 143 | void copySameDir(); |
146 | void currentPathComboActivated(const QString &); | 144 | void currentPathComboActivated(const QString &); |
147 | void fillCombo(const QString &); | 145 | void fillCombo(const QString &); |
148 | bool copyFile( const QString & , const QString & ); | 146 | bool copyFile( const QString & , const QString & ); |
149 | void move(); | 147 | void move(); |
150 | void fileStatus(); | 148 | void fileStatus(); |
151 | void doAbout(); | 149 | void doAbout(); |
152 | void doBeam(); | 150 | void doBeam(); |
153 | void fileBeamFinished( Ir *); | 151 | void fileBeamFinished( Ir *); |
154 | 152 | ||
155 | private: | 153 | private: |
156 | MenuButton *menuButton; | 154 | MenuButton *menuButton; |
157 | QString oldName; | 155 | QString oldName; |
158 | QTimer menuTimer; | 156 | QTimer menuTimer; |
159 | void startProcess(const QString &); | 157 | void startProcess(const QString &); |
160 | bool eventFilter( QObject * , QEvent * ); | 158 | bool eventFilter( QObject * , QEvent * ); |
161 | void cancelRename(); | 159 | void cancelRename(); |
162 | void doRename(QListView *); | 160 | void doRename(QListView *); |
163 | void okRename(); | 161 | void okRename(); |
164 | void customDirsToMenu(); | 162 | void customDirsToMenu(); |
165 | void addCustomDir(); | 163 | void addCustomDir(); |
166 | void removeCustomDir(); | 164 | void removeCustomDir(); |
167 | 165 | ||
168 | private slots: | 166 | private slots: |
169 | void processEnded(); | 167 | void processEnded(); |
170 | void gotoCustomDir(const QString &); | 168 | void gotoCustomDir(const QString &); |
171 | }; | 169 | }; |
172 | 170 | ||
173 | #endif // ADVANCEDFM_H | 171 | #endif // ADVANCEDFM_H |