summaryrefslogtreecommitdiff
path: root/libopie/ofileselector/ofilelistview.cpp
Unidiff
Diffstat (limited to 'libopie/ofileselector/ofilelistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector/ofilelistview.cpp43
1 files changed, 25 insertions, 18 deletions
diff --git a/libopie/ofileselector/ofilelistview.cpp b/libopie/ofileselector/ofilelistview.cpp
index 0c7d45b..7108a5b 100644
--- a/libopie/ofileselector/ofilelistview.cpp
+++ b/libopie/ofileselector/ofilelistview.cpp
@@ -1,4 +1,7 @@
1 1
2#include <qpe/mimetype.h>
3#include <qpe/resource.h>
4
2#include "ofileselector.h" 5#include "ofileselector.h"
3#include "ofileselectoritem.h" 6#include "ofileselectoritem.h"
4#include "ofilelistview.h" 7#include "ofilelistview.h"
@@ -15,7 +18,7 @@ OFileListView::~OFileListView() {
15void OFileListView::clear() { 18void OFileListView::clear() {
16 QListView::clear(); 19 QListView::clear();
17} 20}
18void OFileListView::addFile( const QString& mime, 21void OFileListView::addFile( const QString&,
19 QFileInfo* info, 22 QFileInfo* info,
20 bool isSymlink ) { 23 bool isSymlink ) {
21 MimeType type( info->absFilePath() ); 24 MimeType type( info->absFilePath() );
@@ -33,8 +36,8 @@ void OFileListView::addFile( const QString& mime,
33 name = info->fileName() + " -> " +info->dirPath() + "/" + info->readLink(); 36 name = info->fileName() + " -> " +info->dirPath() + "/" + info->readLink();
34 else { 37 else {
35 name = info->fileName(); 38 name = info->fileName();
36 if( ( selector()->mode() == Open && !info->isReadable() )|| 39 if( ( selector()->mode() == OFileSelector::Open && !info->isReadable() ) ||
37 ( selector()->mode() == Save && !info->isWritable() ) ){ 40 ( selector()->mode() == OFileSelector::Save && !info->isWritable() ) ){
38 41
39 locked = true; pix = Resource::loadPixmap("locked"); 42 locked = true; pix = Resource::loadPixmap("locked");
40 } 43 }
@@ -48,15 +51,15 @@ void OFileListView::addFile( const QString& /*mime*/, const QString& /*dir*/,
48 const QString& /*file*/, bool /*isSyml*/ ) { 51 const QString& /*file*/, bool /*isSyml*/ ) {
49 52
50} 53}
51void OFileListView::addDir( const QString& mime, 54void OFileListView::addDir( const QString&,
52 QFileInfo* info, bool isSym ) { 55 QFileInfo* info, bool symlink ) {
53 56
54 bool locked = false; 57 bool locked = false;
55 QString name; 58 QString name;
56 QPixmap pix; 59 QPixmap pix;
57 60
58 if( ( selector()->mode() == Open && !info->isReadable() ) || 61 if( ( selector()->mode() == OFileSelector::Open && !info->isReadable() ) ||
59 ( selector()->mode() == Save && !info->isWritable() ) ){ 62 ( selector()->mode() == OFileSelector::Save && !info->isWritable() ) ){
60 63
61 locked = true; 64 locked = true;
62 65
@@ -78,17 +81,17 @@ void OFileListView::addDir( const QString& mime,
78 true ); 81 true );
79 82
80} 83}
81void OFileListView::addDir( const QString& mime, const QString& dir, 84void OFileListView::addDir( const QString& /*mime*/, const QString& /*dir*/,
82 const QString& file, bool ) { 85 const QString& /*file*/, bool ) {
83 86
84} 87}
85void OFileListView::addSymlink( const QString& mime, 88void OFileListView::addSymlink( const QString& /*mime*/,
86 QFileInfo* info, 89 QFileInfo* /*info*/,
87 bool isSym ) { 90 bool /*isSym*/ ) {
88 91
89} 92}
90void OFileListView::addSymlink( const QString& mime, const QString& path, 93void OFileListView::addSymlink( const QString& /*mime*/, const QString& /*path*/,
91 const QString& file, bool isSym ) { 94 const QString& /*file*/, bool /*isSym*/ ) {
92 95
93} 96}
94void OFileListView::cd( const QString& ) { 97void OFileListView::cd( const QString& ) {
@@ -105,13 +108,17 @@ QString OFileListView::selectedName()const{
105 return item->text( 1 ); 108 return item->text( 1 );
106} 109}
107QStringList OFileListView::selectedNames()const { 110QStringList OFileListView::selectedNames()const {
108 111 QStringList list;
112 list << selectedName();
113 return list;
109} 114}
110QString OFileListView::selectedPath()const { 115QString OFileListView::selectedPath()const {
111 116 return QString::null;
112} 117}
113QString OFileListView::selectedPaths()const { 118QStringList OFileListView::selectedPaths()const {
114 119 QStringList list;
120 list << selectedPath();
121 return list;
115} 122}
116int OFileListView::fileCount() { 123int OFileListView::fileCount() {
117 return childCount(); 124 return childCount();