-rw-r--r-- | libopie/ofileselector.h | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/libopie/ofileselector.h b/libopie/ofileselector.h index 5c38ac4..47697b9 100644 --- a/libopie/ofileselector.h +++ b/libopie/ofileselector.h | |||
@@ -63,6 +63,7 @@ class QHBoxLayout; | |||
63 | class QVBoxLayout; | 63 | class QVBoxLayout; |
64 | class QPopupMenu; | 64 | class QPopupMenu; |
65 | class QFileInfo; | 65 | class QFileInfo; |
66 | class QHBox; | ||
66 | // | 67 | // |
67 | 68 | ||
68 | 69 | ||
@@ -81,17 +82,17 @@ class OFileSelector : public QWidget { | |||
81 | 82 | ||
82 | OFileSelector(const QString &mimeFilter, QWidget *parent, | 83 | OFileSelector(const QString &mimeFilter, QWidget *parent, |
83 | const char *name, bool newVisible = TRUE, | 84 | const char *name, bool newVisible = TRUE, |
84 | bool closeVisible = FALSE ) { }; | 85 | bool closeVisible = FALSE ); |
85 | 86 | ||
86 | ~OFileSelector() {}; | 87 | ~OFileSelector(); |
87 | 88 | ||
88 | // currently only for the FILESELECTOR Mode | 89 | // currently only for the FILESELECTOR Mode |
89 | void setNewVisible( bool /*b*/ ) { }; | 90 | void setNewVisible( bool /*b*/ ); |
90 | void setCloseVisible(bool /*b*/ ) { }; | 91 | void setCloseVisible(bool /*b*/ ); |
91 | 92 | ||
92 | // end file selector mode | 93 | // end file selector mode |
93 | // deprecated | 94 | // deprecated |
94 | void reread() { reparse(); }; | 95 | void reread(); |
95 | // make sure not to leak please | 96 | // make sure not to leak please |
96 | const DocLnk *selected(); | 97 | const DocLnk *selected(); |
97 | // end deprecated | 98 | // end deprecated |
@@ -134,7 +135,7 @@ class OFileSelector : public QWidget { | |||
134 | void setShowPopup( bool pop ) { m_showPopup = pop; }; | 135 | void setShowPopup( bool pop ) { m_showPopup = pop; }; |
135 | void setPopupMenu( QPopupMenu * ); | 136 | void setPopupMenu( QPopupMenu * ); |
136 | 137 | ||
137 | void updateLay(); | 138 | // void updateLay(); |
138 | 139 | ||
139 | void reparse(); // re reads the dir | 140 | void reparse(); // re reads the dir |
140 | 141 | ||
@@ -159,16 +160,19 @@ class OFileSelector : public QWidget { | |||
159 | void closeMe(); | 160 | void closeMe(); |
160 | void ok(); | 161 | void ok(); |
161 | void cancel(); | 162 | void cancel(); |
163 | void contextMenu(); | ||
162 | 164 | ||
163 | protected slots: | 165 | private slots: |
166 | void slotTest() { qWarning("slotTest" ); setLineEditVisible(false ); }; | ||
164 | void slotOk(); | 167 | void slotOk(); |
165 | void slotCancel(); | 168 | void slotCancel(); |
166 | void slotViewCheck(const QString & ); | 169 | void slotViewCheck(const QString & ); |
167 | void slotMimeCheck(const QString & ); | 170 | void slotMimeCheck(const QString & ); |
168 | void locationComboActivated(const QString & ); | 171 | void slotLocationActivated(const QString & ); |
169 | void insertLocationPath(const QString &, int); | 172 | void slotInsertLocationPath(const QString &, int); |
170 | void locationComboChanged(); | 173 | void locationComboChanged(); |
171 | protected: | 174 | |
175 | private: | ||
172 | void init(); | 176 | void init(); |
173 | void updateMimes(); | 177 | void updateMimes(); |
174 | 178 | ||
@@ -178,7 +182,7 @@ class OFileSelector : public QWidget { | |||
178 | int m_mode, m_selector; | 182 | int m_mode, m_selector; |
179 | QComboBox *m_location, *m_mimeCheck, *m_viewCheck; | 183 | QComboBox *m_location, *m_mimeCheck, *m_viewCheck; |
180 | QPushButton *m_homeButton, *m_docButton, *m_hideButton, *m_ok, *m_cancel; | 184 | QPushButton *m_homeButton, *m_docButton, *m_hideButton, *m_ok, *m_cancel; |
181 | QPushButton *m_reread, *m_up; | 185 | QPushButton *m_reread, *m_up, *m_new, *m_close; |
182 | QListView *m_View; | 186 | QListView *m_View; |
183 | QCheckBox *m_checkPerm; | 187 | QCheckBox *m_checkPerm; |
184 | QWidget *m_pseudo; | 188 | QWidget *m_pseudo; |
@@ -186,17 +190,17 @@ class OFileSelector : public QWidget { | |||
186 | 190 | ||
187 | QString m_currentDir; | 191 | QString m_currentDir; |
188 | QString m_name; | 192 | QString m_name; |
189 | QStringList m_mimetypes, requestedMimeTypesList; | 193 | QStringList m_mimetypes; |
190 | 194 | ||
191 | FileSelector *m_select; | 195 | FileSelector *m_select; |
192 | QWidgetStack *m_stack; | 196 | QWidgetStack *m_stack; |
193 | QVBoxLayout *m_lay; | 197 | QVBoxLayout *m_lay; |
194 | QGridLayout *m_Oselector; | 198 | QGridLayout *m_Oselector; |
195 | 199 | ||
196 | QHBoxLayout *m_boxToolbar; | 200 | QHBox *m_boxToolbar; |
197 | QHBoxLayout *m_boxOk; | 201 | QHBox *m_boxOk; // (no layout anymore) wait |
198 | QHBoxLayout *m_boxName; | 202 | QHBox *m_boxName; // (no Layout anymore) wait |
199 | QHBoxLayout *m_boxView; | 203 | QHBox *m_boxView; |
200 | 204 | ||
201 | QPopupMenu *m_custom; | 205 | QPopupMenu *m_custom; |
202 | 206 | ||
@@ -217,7 +221,7 @@ class OFileSelector : public QWidget { | |||
217 | bool m_files : 1; | 221 | bool m_files : 1; |
218 | bool m_showPopup : 1; | 222 | bool m_showPopup : 1; |
219 | 223 | ||
220 | // implementation todo | 224 | void initVars(); |
221 | virtual void addFile(const QString &mime, QFileInfo *info, bool symlink = FALSE ); | 225 | virtual void addFile(const QString &mime, QFileInfo *info, bool symlink = FALSE ); |
222 | virtual void addDir( const QString &mime, QFileInfo *info , bool symlink = FALSE ); | 226 | virtual void addDir( const QString &mime, QFileInfo *info , bool symlink = FALSE ); |
223 | virtual void addSymlink(const QString &, QFileInfo *, bool = FALSE ){}; | 227 | virtual void addSymlink(const QString &, QFileInfo *, bool = FALSE ){}; |
@@ -226,6 +230,7 @@ class OFileSelector : public QWidget { | |||
226 | void initializeYes(); | 230 | void initializeYes(); |
227 | void initializeChooser(); | 231 | void initializeChooser(); |
228 | void initializeListView(); | 232 | void initializeListView(); |
233 | void initializePerm(); | ||
229 | void initPics(); | 234 | void initPics(); |
230 | bool compliesMime(const QString &path, const QString &mime); | 235 | bool compliesMime(const QString &path, const QString &mime); |
231 | 236 | ||