Diffstat (limited to 'libopie/ofileselector/olocallister.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie/ofileselector/olocallister.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/libopie/ofileselector/olocallister.cpp b/libopie/ofileselector/olocallister.cpp index 5d7884d..4d36d64 100644 --- a/libopie/ofileselector/olocallister.cpp +++ b/libopie/ofileselector/olocallister.cpp @@ -4,13 +4,15 @@ #include <qpe/mimetype.h> #include "ofileselector.h" +#include "ofileview.h" #include "olocallister.h" OLocalLister::OLocalLister( OFileSelector* file ) : OLister( file ) { + m_dir = QDir::homeDirPath(); } OLocalLister::~OLocalLister() { } @@ -50,11 +52,14 @@ QMap<QString, QStringList> OLocalLister::mimeTypes( const QString& curDir ) { * filter filters * filter files * filter mimetypes */ -void OLocalLister::reparse( const QString& path ) { +void OLocalLister::reparse( const QString& pa ) { + if (!pa.isEmpty() ) + m_dir = pa; + QString currentMimeType; - QDir dir( path ); + QDir dir( m_dir ); dir.setSorting( view()->sorting() ); dir.setFilter( view()->filter() ); @@ -122,4 +127,24 @@ void OLocalLister::fileSelected( const QString& dir, const QString& file, const } void OLocalLister::changedDir( const QString& dir, const QString& file, const QString& ) { internChangedDir( dir + "/" + file ); } +/* + * assemble the the Url now + */ +QString OLocalLister::selectedName()const { + QString str = m_dir; + QString name = lineEdit(); + + if ( name.isEmpty() ) + name = view()->currentView()->selectedName(); + + str += "/" + name; + + return str; +} +QStringList OLocalLister::selectedNames()const { + QStringList list; + list << selectedName(); + + return list; +} |