author | llornkcor <llornkcor> | 2002-05-14 22:05:31 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-05-14 22:05:31 (UTC) |
commit | b1198cf567577dba9710b9fb19d924c766202c38 (patch) (unidiff) | |
tree | f0017f1bd44b6f5e0f08a77b986bf0b59c28077a | |
parent | 1d397c2c0df731dc878c8574f653c8c2685e2378 (diff) | |
download | opie-b1198cf567577dba9710b9fb19d924c766202c38.zip opie-b1198cf567577dba9710b9fb19d924c766202c38.tar.gz opie-b1198cf567577dba9710b9fb19d924c766202c38.tar.bz2 |
DOS crapola
-rw-r--r-- | noncore/unsupported/filebrowser/filebrowser.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.h b/noncore/unsupported/filebrowser/filebrowser.h index 549d463..2ce28ba 100644 --- a/noncore/unsupported/filebrowser/filebrowser.h +++ b/noncore/unsupported/filebrowser/filebrowser.h | |||
@@ -1,118 +1,119 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef FILEBROWSER_H | 20 | #ifndef FILEBROWSER_H |
21 | #define FILEBROWSER_H | 21 | #define FILEBROWSER_H |
22 | 22 | ||
23 | |||
23 | #include <qlistview.h> | 24 | #include <qlistview.h> |
24 | #include <qmainwindow.h> | 25 | #include <qmainwindow.h> |
25 | #include <qfileinfo.h> | 26 | #include <qfileinfo.h> |
26 | #include <qaction.h> | 27 | #include <qaction.h> |
27 | #include <qtimer.h> | 28 | #include <qtimer.h> |
28 | #include <qstringlist.h> | 29 | #include <qstringlist.h> |
29 | class QLabel; | 30 | class QLabel; |
30 | class InlineEdit; | 31 | class InlineEdit; |
31 | 32 | ||
32 | class FileItem : public QListViewItem | 33 | class FileItem : public QListViewItem |
33 | { | 34 | { |
34 | public: | 35 | public: |
35 | FileItem( QListView * parent, const QFileInfo & fi ); | 36 | FileItem( QListView * parent, const QFileInfo & fi ); |
36 | 37 | ||
37 | QString key( int column, bool ascending = TRUE ) const; | 38 | QString key( int column, bool ascending = TRUE ) const; |
38 | QString getFilePath(){ return fileInfo.filePath(); } | 39 | QString getFilePath(){ return fileInfo.filePath(); } |
39 | QString getFileName(){ return fileInfo.fileName(); } | 40 | QString getFileName(){ return fileInfo.fileName(); } |
40 | bool isDir(){ return fileInfo.isDir(); } | 41 | bool isDir(){ return fileInfo.isDir(); } |
41 | bool isExecutable(){ return fileInfo.isExecutable(); } | 42 | bool isExecutable(){ return fileInfo.isExecutable(); } |
42 | bool isLib(); | 43 | bool isLib(); |
43 | int launch(); | 44 | int launch(); |
44 | bool rename( const QString & name ); | 45 | bool rename( const QString & name ); |
45 | private: | 46 | private: |
46 | QString sizeString( unsigned int size ); | 47 | QString sizeString( unsigned int size ); |
47 | QFileInfo fileInfo; | 48 | QFileInfo fileInfo; |
48 | QPixmap FileItem::drawThumbnail(const QFileInfo &file); | 49 | QPixmap FileItem::drawThumbnail(const QFileInfo &file); |
49 | }; | 50 | }; |
50 | 51 | ||
51 | 52 | ||
52 | class FileView : public QListView | 53 | class FileView : public QListView |
53 | { | 54 | { |
54 | Q_OBJECT | 55 | Q_OBJECT |
55 | 56 | ||
56 | public: | 57 | public: |
57 | FileView( const QString & dir, QWidget * parent = 0, | 58 | FileView( const QString & dir, QWidget * parent = 0, |
58 | const char * name = 0, | 59 | const char * name = 0, |
59 | bool hidden = FALSE, | 60 | bool hidden = FALSE, |
60 | bool symlinks = FALSE, | 61 | bool symlinks = FALSE, |
61 | bool thumbnails = FALSE ); | 62 | bool thumbnails = FALSE ); |
62 | 63 | ||
63 | void setDir( const QString & dir ); | 64 | void setDir( const QString & dir ); |
64 | QString cd(){ return currentDir; } | 65 | QString cd(){ return currentDir; } |
65 | QStringList history() const { return dirHistory; } | 66 | QStringList history() const { return dirHistory; } |
66 | bool showingHidden; | 67 | bool showingHidden; |
67 | 68 | ||
68 | void setShowHidden(bool hidden); | 69 | void setShowHidden(bool hidden); |
69 | void setShowSymlinks(bool symlinks); | 70 | void setShowSymlinks(bool symlinks); |
70 | void setShowThumbnails(bool thumbnails); | 71 | void setShowThumbnails(bool thumbnails); |
71 | bool getShowThumbnails () const { return showThumbnails; } | 72 | bool getShowThumbnails () const { return showThumbnails; } |
72 | void setMenuKeepsOpen(bool keepOpen); | 73 | void setMenuKeepsOpen(bool keepOpen); |
73 | 74 | ||
74 | public slots: | 75 | public slots: |
75 | void updateDir(); | 76 | void updateDir(); |
76 | void parentDir(); | 77 | void parentDir(); |
77 | void lastDir(); | 78 | void lastDir(); |
78 | 79 | ||
79 | void rename(); | 80 | void rename(); |
80 | void copy(); | 81 | void copy(); |
81 | void paste(); | 82 | void paste(); |
82 | void del(); | 83 | void del(); |
83 | void cut(); | 84 | void cut(); |
84 | void newFolder(); | 85 | void newFolder(); |
85 | void viewAsText(); | 86 | void viewAsText(); |
86 | void chPerm(); | 87 | void chPerm(); |
87 | protected: | 88 | protected: |
88 | void generateDir( const QString & dir ); | 89 | void generateDir( const QString & dir ); |
89 | void resizeEvent( QResizeEvent* ); | 90 | void resizeEvent( QResizeEvent* ); |
90 | void contentsMousePressEvent( QMouseEvent * e ); | 91 | void contentsMousePressEvent( QMouseEvent * e ); |
91 | void contentsMouseReleaseEvent( QMouseEvent * e ); | 92 | void contentsMouseReleaseEvent( QMouseEvent * e ); |
92 | 93 | ||
93 | protected slots: | 94 | protected slots: |
94 | void itemClicked( QListViewItem * i ); | 95 | void itemClicked( QListViewItem * i ); |
95 | void itemDblClicked( QListViewItem * i ); | 96 | void itemDblClicked( QListViewItem * i ); |
96 | void showFileMenu(); | 97 | void showFileMenu(); |
97 | void cancelMenuTimer(); | 98 | void cancelMenuTimer(); |
98 | void selectAll(){ QListView::selectAll( TRUE ); } | 99 | void selectAll(){ QListView::selectAll( TRUE ); } |
99 | void deselectAll(){ QListView::selectAll( FALSE ); } | 100 | void deselectAll(){ QListView::selectAll( FALSE ); } |
100 | void addToDocuments(); | 101 | void addToDocuments(); |
101 | void run(); | 102 | void run(); |
102 | void endRenaming(); | 103 | void endRenaming(); |
103 | private: | 104 | private: |
104 | QString currentDir; | 105 | QString currentDir; |
105 | QStringList dirHistory, flist; | 106 | QStringList dirHistory, flist; |
106 | QTimer menuTimer; | 107 | QTimer menuTimer; |
107 | InlineEdit * le; | 108 | InlineEdit * le; |
108 | FileItem * itemToRename; | 109 | FileItem * itemToRename; |
109 | bool selected; | 110 | bool selected; |
110 | bool showHidden; | 111 | bool showHidden; |
111 | bool showSymlinks; | 112 | bool showSymlinks; |
112 | bool showThumbnails; | 113 | bool showThumbnails; |
113 | bool menuKeepsOpen; | 114 | bool menuKeepsOpen; |
114 | 115 | ||
115 | bool copyFile( const QString & dest, const QString & src ); | 116 | bool copyFile( const QString & dest, const QString & src ); |
116 | 117 | ||
117 | signals: | 118 | signals: |
118 | void dirChanged(); | 119 | void dirChanged(); |