summaryrefslogtreecommitdiff
path: root/libopie/ofileselector/olocallister.cpp
authorzecke <zecke>2002-10-29 19:08:40 (UTC)
committer zecke <zecke>2002-10-29 19:08:40 (UTC)
commit2957aae1073f4c41dd6783c41d1199be71cd9f4a (patch) (unidiff)
tree2aa5c4f61105aa151867e170601de58511479fd8 /libopie/ofileselector/olocallister.cpp
parenta575fd4c862693705018902b4482c5135a8cb6a2 (diff)
downloadopie-2957aae1073f4c41dd6783c41d1199be71cd9f4a.zip
opie-2957aae1073f4c41dd6783c41d1199be71cd9f4a.tar.gz
opie-2957aae1073f4c41dd6783c41d1199be71cd9f4a.tar.bz2
the reverse getting of filenames is actually enabled
There will be some code clean ups... but the interfaces should be fine now
Diffstat (limited to 'libopie/ofileselector/olocallister.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/ofileselector/olocallister.cpp29
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
@@ -7,2 +7,3 @@
7#include "ofileselector.h" 7#include "ofileselector.h"
8#include "ofileview.h"
8#include "olocallister.h" 9#include "olocallister.h"
@@ -12,2 +13,3 @@ OLocalLister::OLocalLister( OFileSelector* file )
12{ 13{
14 m_dir = QDir::homeDirPath();
13} 15}
@@ -53,5 +55,8 @@ QMap<QString, QStringList> OLocalLister::mimeTypes( const QString& curDir ) {
53 */ 55 */
54void OLocalLister::reparse( const QString& path ) { 56void OLocalLister::reparse( const QString& pa ) {
57 if (!pa.isEmpty() )
58 m_dir = pa;
59
55 QString currentMimeType; 60 QString currentMimeType;
56 QDir dir( path ); 61 QDir dir( m_dir );
57 62
@@ -125 +130,21 @@ void OLocalLister::changedDir( const QString& dir, const QString& file, const QS
125} 130}
131/*
132 * assemble the the Url now
133 */
134QString OLocalLister::selectedName()const {
135 QString str = m_dir;
136 QString name = lineEdit();
137
138 if ( name.isEmpty() )
139 name = view()->currentView()->selectedName();
140
141 str += "/" + name;
142
143 return str;
144}
145QStringList OLocalLister::selectedNames()const {
146 QStringList list;
147 list << selectedName();
148
149 return list;
150}