Diffstat (limited to 'noncore/unsupported/filebrowser/filebrowser.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/filebrowser/filebrowser.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.h b/noncore/unsupported/filebrowser/filebrowser.h index 54856a0..983e58e 100644 --- a/noncore/unsupported/filebrowser/filebrowser.h +++ b/noncore/unsupported/filebrowser/filebrowser.h | |||
@@ -45,30 +45,37 @@ public: | |||
45 | private: | 45 | private: |
46 | QString sizeString( unsigned int size ); | 46 | QString sizeString( unsigned int size ); |
47 | QFileInfo fileInfo; | 47 | QFileInfo fileInfo; |
48 | }; | 48 | }; |
49 | 49 | ||
50 | 50 | ||
51 | class FileView : public QListView | 51 | class FileView : public QListView |
52 | { | 52 | { |
53 | Q_OBJECT | 53 | Q_OBJECT |
54 | 54 | ||
55 | public: | 55 | public: |
56 | FileView( const QString & dir, QWidget * parent = 0, | 56 | FileView( const QString & dir, QWidget * parent = 0, |
57 | const char * name = 0 ); | 57 | const char * name = 0, |
58 | bool hidden = FALSE, | ||
59 | bool symlinks = FALSE ); | ||
60 | |||
58 | void setDir( const QString & dir ); | 61 | void setDir( const QString & dir ); |
59 | QString cd(){ return currentDir; } | 62 | QString cd(){ return currentDir; } |
60 | QStringList history() const { return dirHistory; } | 63 | QStringList history() const { return dirHistory; } |
61 | bool showingHidden; | 64 | bool showingHidden; |
62 | 65 | ||
66 | void setShowHidden(bool hidden); | ||
67 | void setShowSymlinks(bool symlinks); | ||
68 | void setMenuKeepsOpen(bool keepOpen); | ||
69 | |||
63 | public slots: | 70 | public slots: |
64 | void updateDir(); | 71 | void updateDir(); |
65 | void parentDir(); | 72 | void parentDir(); |
66 | void lastDir(); | 73 | void lastDir(); |
67 | 74 | ||
68 | void rename(); | 75 | void rename(); |
69 | void copy(); | 76 | void copy(); |
70 | void paste(); | 77 | void paste(); |
71 | void del(); | 78 | void del(); |
72 | void cut(); | 79 | void cut(); |
73 | void newFolder(); | 80 | void newFolder(); |
74 | void viewAsText(); | 81 | void viewAsText(); |
@@ -88,58 +95,61 @@ protected slots: | |||
88 | void deselectAll(){ QListView::selectAll( FALSE ); } | 95 | void deselectAll(){ QListView::selectAll( FALSE ); } |
89 | void addToDocuments(); | 96 | void addToDocuments(); |
90 | void run(); | 97 | void run(); |
91 | void endRenaming(); | 98 | void endRenaming(); |
92 | 99 | ||
93 | private: | 100 | private: |
94 | QString currentDir; | 101 | QString currentDir; |
95 | QStringList dirHistory, flist; | 102 | QStringList dirHistory, flist; |
96 | QTimer menuTimer; | 103 | QTimer menuTimer; |
97 | InlineEdit * le; | 104 | InlineEdit * le; |
98 | FileItem * itemToRename; | 105 | FileItem * itemToRename; |
99 | bool selected; | 106 | bool selected; |
107 | bool showHidden; | ||
108 | bool showSymlinks; | ||
109 | bool menuKeepsOpen; | ||
100 | 110 | ||
101 | bool copyFile( const QString & dest, const QString & src ); | 111 | bool copyFile( const QString & dest, const QString & src ); |
102 | 112 | ||
103 | signals: | 113 | signals: |
104 | void dirChanged(); | 114 | void dirChanged(); |
105 | void textViewActivated( QWidget * w ); | 115 | void textViewActivated( QWidget * w ); |
106 | void textViewDeactivated(); | 116 | void textViewDeactivated(); |
107 | }; | 117 | }; |
108 | 118 | ||
109 | class FileBrowser : public QMainWindow | 119 | class FileBrowser : public QMainWindow |
110 | { | 120 | { |
111 | Q_OBJECT | 121 | Q_OBJECT |
112 | 122 | ||
113 | public: | 123 | public: |
114 | FileBrowser( QWidget * parent = 0, | 124 | FileBrowser( QWidget * parent = 0, |
115 | const char * name = 0, WFlags f = 0 ); | 125 | const char * name = 0, WFlags f = 0 ); |
116 | FileBrowser( const QString & dir, QWidget * parent = 0, | 126 | FileBrowser( const QString & dir, QWidget * parent = 0, |
117 | const char * name = 0, WFlags f = 0 ); | 127 | const char * name = 0, WFlags f = 0 ); |
118 | public slots: | 128 | public slots: |
119 | void changeCaption(const QString &); | 129 | void changeCaption(const QString &); |
120 | private: | 130 | private: |
121 | void init(const QString & dir); | 131 | void init(const QString & dir); |
122 | QString fileToCopy; | 132 | QString fileToCopy; |
123 | QPopupMenu * dirMenu, * sortMenu; | 133 | QPopupMenu * dirMenu, * sortMenu, *viewMenu; |
124 | FileView * fileView; | 134 | FileView * fileView; |
125 | QAction * pasteAction; | 135 | QAction * pasteAction; |
126 | QAction *lastAction; | 136 | QAction *lastAction; |
127 | QAction *upAction; | 137 | QAction *upAction; |
128 | 138 | ||
129 | bool copyFile( const QString & dest, const QString & src ); | 139 | bool copyFile( const QString & dest, const QString & src ); |
130 | 140 | ||
131 | private slots: | 141 | private slots: |
132 | void pcmciaMessage( const QCString &msg, const QByteArray &); | 142 | void pcmciaMessage( const QCString &msg, const QByteArray &); |
133 | 143 | ||
134 | void sortName(); | 144 | void sortName(); |
135 | void sortDate(); | 145 | void sortDate(); |
136 | void sortSize(); | 146 | void sortSize(); |
137 | void sortType(); | 147 | void sortType(); |
138 | void updateSorting(); | 148 | void updateSorting(); |
139 | 149 | void updateShowHidden(); | |
150 | void updateShowSymlinks(); | ||
140 | void updateDirMenu(); | 151 | void updateDirMenu(); |
141 | void dirSelected( int id ); | 152 | void dirSelected( int id ); |
142 | void showHidden(); | ||
143 | }; | 153 | }; |
144 | 154 | ||
145 | #endif | 155 | #endif |