summaryrefslogtreecommitdiff
path: root/noncore/unsupported/filebrowser/filebrowser.cpp
authorllornkcor <llornkcor>2002-02-24 18:32:43 (UTC)
committer llornkcor <llornkcor>2002-02-24 18:32:43 (UTC)
commitade25ac278169f0e0c9ee0771e754adb46cf7ce2 (patch) (unidiff)
treebed5d735366cd6cc1a86e35d9227eeee7469f04f /noncore/unsupported/filebrowser/filebrowser.cpp
parent322012c251740f680055c27a96aa998fbce188ca (diff)
downloadopie-ade25ac278169f0e0c9ee0771e754adb46cf7ce2.zip
opie-ade25ac278169f0e0c9ee0771e754adb46cf7ce2.tar.gz
opie-ade25ac278169f0e0c9ee0771e754adb46cf7ce2.tar.bz2
whatever
Diffstat (limited to 'noncore/unsupported/filebrowser/filebrowser.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/filebrowser/filebrowser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp
index 10dff07..41e7634 100644
--- a/noncore/unsupported/filebrowser/filebrowser.cpp
+++ b/noncore/unsupported/filebrowser/filebrowser.cpp
@@ -1,78 +1,78 @@
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 20
21#include "inlineedit.h" 21#include "inlineedit.h"
22#include "filebrowser.h" 22#include "filebrowser.h"
23#include "filePermissions.h" 23#include "filePermissions.h"
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25#include <qpe/global.h> 25#include <qpe/global.h>
26#include <qpe/mimetype.h> 26#include <qpe/mimetype.h>
27#include <qpe/applnk.h> 27#include <qpe/applnk.h>
28 28
29#include <qcopchannel_qws.h> 29#include <qcopchannel_qws.h>
30#include <qcopenvelope_qws.h> 30#include <qpe/qcopenvelope_qws.h>
31 31
32#include <qmessagebox.h> 32#include <qmessagebox.h>
33#include <qdir.h> 33#include <qdir.h>
34#include <qregexp.h> 34#include <qregexp.h>
35#include <qheader.h> 35#include <qheader.h>
36#include <qpe/qpetoolbar.h> 36#include <qpe/qpetoolbar.h>
37#include <qpopupmenu.h> 37#include <qpopupmenu.h>
38#include <qpe/qpemenubar.h> 38#include <qpe/qpemenubar.h>
39#include <qaction.h> 39#include <qaction.h>
40#include <qstringlist.h> 40#include <qstringlist.h>
41#include <qcursor.h> 41#include <qcursor.h>
42#include <qmultilineedit.h> 42#include <qmultilineedit.h>
43#include <qfont.h> 43#include <qfont.h>
44 44
45#include <unistd.h> 45#include <unistd.h>
46#include <stdlib.h> 46#include <stdlib.h>
47#include <sys/stat.h> 47#include <sys/stat.h>
48 48
49// 49//
50// FileItem 50// FileItem
51// 51//
52FileItem::FileItem( QListView * parent, const QFileInfo & fi ) 52FileItem::FileItem( QListView * parent, const QFileInfo & fi )
53 : QListViewItem( parent ), 53 : QListViewItem( parent ),
54 fileInfo( fi ) 54 fileInfo( fi )
55{ 55{
56 QDate d = fi.lastModified().date(); 56 QDate d = fi.lastModified().date();
57 57
58 setText( 0, fi.fileName() ); 58 setText( 0, fi.fileName() );
59 setText( 1, sizeString( fi.size() ) + " " ); 59 setText( 1, sizeString( fi.size() ) + " " );
60 setText( 2, QString().sprintf("%4d-%02d-%02d",d.year(), d.month(), d.day() ) ); 60 setText( 2, QString().sprintf("%4d-%02d-%02d",d.year(), d.month(), d.day() ) );
61 61
62 MimeType mt(fi.filePath()); 62 MimeType mt(fi.filePath());
63 63
64 if( fi.isDir() ) 64 if( fi.isDir() )
65 setText( 3, "directory" ); 65 setText( 3, "directory" );
66 else if( isLib() ) 66 else if( isLib() )
67 setText( 3, "library" ); 67 setText( 3, "library" );
68 else 68 else
69 setText( 3, mt.description() ); 69 setText( 3, mt.description() );
70 70
71 QPixmap pm; 71 QPixmap pm;
72 if( fi.isDir() ){ 72 if( fi.isDir() ){
73 if( !QDir( fi.filePath() ).isReadable() ) 73 if( !QDir( fi.filePath() ).isReadable() )
74 pm = Resource::loadPixmap( "lockedfolder" ); 74 pm = Resource::loadPixmap( "lockedfolder" );
75 else 75 else
76 pm = Resource::loadPixmap( "folder" ); 76 pm = Resource::loadPixmap( "folder" );
77 } 77 }
78 else if( !fi.isReadable() ) 78 else if( !fi.isReadable() )